{"action":"created","comment":{"url":"https://api.github.com/repos/datauy/back-end-birra/pulls/comments/33891139","id":33891139,"diff_hunk":"@@ -25,10 +25,42 @@ class Foursquare < Thor\n \n   private\n \n+  def parse_time(time)\n+    if (time.length == 5)\n+      hour = time[1,2]\n+      mins = time[3,2]\n+    else\n+      hour = time[0,2]\n+      mins = time[2,2]\n+    end\n+    return Time.parse(hour.concat(\":\").concat(mins))\n+  end\n+\n   def update_model(model)\n     if model.foursquare_id.present?\n       begin\n         data = FoursquareService.client.venue(model.foursquare_id)\n+        aux = [[],[],[],[],[],[],[]]\n+        data.venue_hours each do |item|\n+          item.days each do |info|\n+            if (aux[info-1] == \"\")\n+              aux[info-1].push(concat(parse_time(item.start),\n+                                      concat((\" - \"),\n+                                       parse_time(item.end)\n+                                      )\n+                                     )\n+                              )\n+            else\n+              aux[info-1].push(concat(\" | \",\n+                                     concat(parse_time(item.start),\n+                                      concat((\" - \"),\n+                                       parse_time(item.end)\n+                                      )\n+                                     )\n+                                     )\n+                              )\n+          end\n+        end","path":"lib/tasks/foursquare.thor","position":39,"original_position":39,"commit_id":"2b2c15eb938a5d06635edbbd4b7c56419b42f26c","original_commit_id":"2b2c15eb938a5d06635edbbd4b7c56419b42f26c","user":{"login":"EmilioCristalli","id":972779,"avatar_url":"https://avatars.githubusercontent.com/u/972779?v=3","gravatar_id":"","url":"https://api.github.com/users/EmilioCristalli","html_url":"https://github.com/EmilioCristalli","followers_url":"https://api.github.com/users/EmilioCristalli/followers","following_url":"https://api.github.com/users/EmilioCristalli/following{/other_user}","gists_url":"https://api.github.com/users/EmilioCristalli/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilioCristalli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilioCristalli/subscriptions","organizations_url":"https://api.github.com/users/EmilioCristalli/orgs","repos_url":"https://api.github.com/users/EmilioCristalli/repos","events_url":"https://api.github.com/users/EmilioCristalli/events{/privacy}","received_events_url":"https://api.github.com/users/EmilioCristalli/received_events","type":"User","site_admin":false},"body":"Creo que falta un `end`","created_at":"2015-07-05T01:40:02Z","updated_at":"2015-07-05T01:40:02Z","html_url":"https://github.com/datauy/back-end-birra/pull/1#discussion_r33891139","pull_request_url":"https://api.github.com/repos/datauy/back-end-birra/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/datauy/back-end-birra/pulls/comments/33891139"},"html":{"href":"https://github.com/datauy/back-end-birra/pull/1#discussion_r33891139"},"pull_request":{"href":"https://api.github.com/repos/datauy/back-end-birra/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/datauy/back-end-birra/pulls/1","id":39214655,"html_url":"https://github.com/datauy/back-end-birra/pull/1","diff_url":"https://github.com/datauy/back-end-birra/pull/1.diff","patch_url":"https://github.com/datauy/back-end-birra/pull/1.patch","issue_url":"https://api.github.com/repos/datauy/back-end-birra/issues/1","number":1,"state":"open","locked":false,"title":"Schedule","user":{"login":"EmilioCristalli","id":972779,"avatar_url":"https://avatars.githubusercontent.com/u/972779?v=3","gravatar_id":"","url":"https://api.github.com/users/EmilioCristalli","html_url":"https://github.com/EmilioCristalli","followers_url":"https://api.github.com/users/EmilioCristalli/followers","following_url":"https://api.github.com/users/EmilioCristalli/following{/other_user}","gists_url":"https://api.github.com/users/EmilioCristalli/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilioCristalli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilioCristalli/subscriptions","organizations_url":"https://api.github.com/users/EmilioCristalli/orgs","repos_url":"https://api.github.com/users/EmilioCristalli/repos","events_url":"https://api.github.com/users/EmilioCristalli/events{/privacy}","received_events_url":"https://api.github.com/users/EmilioCristalli/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-05T00:43:03Z","updated_at":"2015-07-05T01:40:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db86eab59ae36c1efdda9b60eea9ae7b2c1c1c19","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/datauy/back-end-birra/pulls/1/commits","review_comments_url":"https://api.github.com/repos/datauy/back-end-birra/pulls/1/comments","review_comment_url":"https://api.github.com/repos/datauy/back-end-birra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datauy/back-end-birra/issues/1/comments","statuses_url":"https://api.github.com/repos/datauy/back-end-birra/statuses/2b2c15eb938a5d06635edbbd4b7c56419b42f26c","head":{"label":"datauy:schedule","ref":"schedule","sha":"2b2c15eb938a5d06635edbbd4b7c56419b42f26c","user":{"login":"datauy","id":1519867,"avatar_url":"https://avatars.githubusercontent.com/u/1519867?v=3","gravatar_id":"","url":"https://api.github.com/users/datauy","html_url":"https://github.com/datauy","followers_url":"https://api.github.com/users/datauy/followers","following_url":"https://api.github.com/users/datauy/following{/other_user}","gists_url":"https://api.github.com/users/datauy/gists{/gist_id}","starred_url":"https://api.github.com/users/datauy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datauy/subscriptions","organizations_url":"https://api.github.com/users/datauy/orgs","repos_url":"https://api.github.com/users/datauy/repos","events_url":"https://api.github.com/users/datauy/events{/privacy}","received_events_url":"https://api.github.com/users/datauy/received_events","type":"Organization","site_admin":false},"repo":{"id":38172709,"name":"back-end-birra","full_name":"datauy/back-end-birra","owner":{"login":"datauy","id":1519867,"avatar_url":"https://avatars.githubusercontent.com/u/1519867?v=3","gravatar_id":"","url":"https://api.github.com/users/datauy","html_url":"https://github.com/datauy","followers_url":"https://api.github.com/users/datauy/followers","following_url":"https://api.github.com/users/datauy/following{/other_user}","gists_url":"https://api.github.com/users/datauy/gists{/gist_id}","starred_url":"https://api.github.com/users/datauy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datauy/subscriptions","organizations_url":"https://api.github.com/users/datauy/orgs","repos_url":"https://api.github.com/users/datauy/repos","events_url":"https://api.github.com/users/datauy/events{/privacy}","received_events_url":"https://api.github.com/users/datauy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datauy/back-end-birra","description":"","fork":false,"url":"https://api.github.com/repos/datauy/back-end-birra","forks_url":"https://api.github.com/repos/datauy/back-end-birra/forks","keys_url":"https://api.github.com/repos/datauy/back-end-birra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datauy/back-end-birra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datauy/back-end-birra/teams","hooks_url":"https://api.github.com/repos/datauy/back-end-birra/hooks","issue_events_url":"https://api.github.com/repos/datauy/back-end-birra/issues/events{/number}","events_url":"https://api.github.com/repos/datauy/back-end-birra/events","assignees_url":"https://api.github.com/repos/datauy/back-end-birra/assignees{/user}","branches_url":"https://api.github.com/repos/datauy/back-end-birra/branches{/branch}","tags_url":"https://api.github.com/repos/datauy/back-end-birra/tags","blobs_url":"https://api.github.com/repos/datauy/back-end-birra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datauy/back-end-birra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datauy/back-end-birra/git/refs{/sha}","trees_url":"https://api.github.com/repos/datauy/back-end-birra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datauy/back-end-birra/statuses/{sha}","languages_url":"https://api.github.com/repos/datauy/back-end-birra/languages","stargazers_url":"https://api.github.com/repos/datauy/back-end-birra/stargazers","contributors_url":"https://api.github.com/repos/datauy/back-end-birra/contributors","subscribers_url":"https://api.github.com/repos/datauy/back-end-birra/subscribers","subscription_url":"https://api.github.com/repos/datauy/back-end-birra/subscription","commits_url":"https://api.github.com/repos/datauy/back-end-birra/commits{/sha}","git_commits_url":"https://api.github.com/repos/datauy/back-end-birra/git/commits{/sha}","comments_url":"https://api.github.com/repos/datauy/back-end-birra/comments{/number}","issue_comment_url":"https://api.github.com/repos/datauy/back-end-birra/issues/comments{/number}","contents_url":"https://api.github.com/repos/datauy/back-end-birra/contents/{+path}","compare_url":"https://api.github.com/repos/datauy/back-end-birra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datauy/back-end-birra/merges","archive_url":"https://api.github.com/repos/datauy/back-end-birra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datauy/back-end-birra/downloads","issues_url":"https://api.github.com/repos/datauy/back-end-birra/issues{/number}","pulls_url":"https://api.github.com/repos/datauy/back-end-birra/pulls{/number}","milestones_url":"https://api.github.com/repos/datauy/back-end-birra/milestones{/number}","notifications_url":"https://api.github.com/repos/datauy/back-end-birra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datauy/back-end-birra/labels{/name}","releases_url":"https://api.github.com/repos/datauy/back-end-birra/releases{/id}","created_at":"2015-06-27T19:36:04Z","updated_at":"2015-06-27T19:45:19Z","pushed_at":"2015-07-05T00:43:03Z","git_url":"git://github.com/datauy/back-end-birra.git","ssh_url":"git@github.com:datauy/back-end-birra.git","clone_url":"https://github.com/datauy/back-end-birra.git","svn_url":"https://github.com/datauy/back-end-birra","homepage":null,"size":196,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"datauy:master","ref":"master","sha":"81056559bfffaf05371e7ae365409a2b8d872e71","user":{"login":"datauy","id":1519867,"avatar_url":"https://avatars.githubusercontent.com/u/1519867?v=3","gravatar_id":"","url":"https://api.github.com/users/datauy","html_url":"https://github.com/datauy","followers_url":"https://api.github.com/users/datauy/followers","following_url":"https://api.github.com/users/datauy/following{/other_user}","gists_url":"https://api.github.com/users/datauy/gists{/gist_id}","starred_url":"https://api.github.com/users/datauy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datauy/subscriptions","organizations_url":"https://api.github.com/users/datauy/orgs","repos_url":"https://api.github.com/users/datauy/repos","events_url":"https://api.github.com/users/datauy/events{/privacy}","received_events_url":"https://api.github.com/users/datauy/received_events","type":"Organization","site_admin":false},"repo":{"id":38172709,"name":"back-end-birra","full_name":"datauy/back-end-birra","owner":{"login":"datauy","id":1519867,"avatar_url":"https://avatars.githubusercontent.com/u/1519867?v=3","gravatar_id":"","url":"https://api.github.com/users/datauy","html_url":"https://github.com/datauy","followers_url":"https://api.github.com/users/datauy/followers","following_url":"https://api.github.com/users/datauy/following{/other_user}","gists_url":"https://api.github.com/users/datauy/gists{/gist_id}","starred_url":"https://api.github.com/users/datauy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datauy/subscriptions","organizations_url":"https://api.github.com/users/datauy/orgs","repos_url":"https://api.github.com/users/datauy/repos","events_url":"https://api.github.com/users/datauy/events{/privacy}","received_events_url":"https://api.github.com/users/datauy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datauy/back-end-birra","description":"","fork":false,"url":"https://api.github.com/repos/datauy/back-end-birra","forks_url":"https://api.github.com/repos/datauy/back-end-birra/forks","keys_url":"https://api.github.com/repos/datauy/back-end-birra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datauy/back-end-birra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datauy/back-end-birra/teams","hooks_url":"https://api.github.com/repos/datauy/back-end-birra/hooks","issue_events_url":"https://api.github.com/repos/datauy/back-end-birra/issues/events{/number}","events_url":"https://api.github.com/repos/datauy/back-end-birra/events","assignees_url":"https://api.github.com/repos/datauy/back-end-birra/assignees{/user}","branches_url":"https://api.github.com/repos/datauy/back-end-birra/branches{/branch}","tags_url":"https://api.github.com/repos/datauy/back-end-birra/tags","blobs_url":"https://api.github.com/repos/datauy/back-end-birra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datauy/back-end-birra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datauy/back-end-birra/git/refs{/sha}","trees_url":"https://api.github.com/repos/datauy/back-end-birra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datauy/back-end-birra/statuses/{sha}","languages_url":"https://api.github.com/repos/datauy/back-end-birra/languages","stargazers_url":"https://api.github.com/repos/datauy/back-end-birra/stargazers","contributors_url":"https://api.github.com/repos/datauy/back-end-birra/contributors","subscribers_url":"https://api.github.com/repos/datauy/back-end-birra/subscribers","subscription_url":"https://api.github.com/repos/datauy/back-end-birra/subscription","commits_url":"https://api.github.com/repos/datauy/back-end-birra/commits{/sha}","git_commits_url":"https://api.github.com/repos/datauy/back-end-birra/git/commits{/sha}","comments_url":"https://api.github.com/repos/datauy/back-end-birra/comments{/number}","issue_comment_url":"https://api.github.com/repos/datauy/back-end-birra/issues/comments{/number}","contents_url":"https://api.github.com/repos/datauy/back-end-birra/contents/{+path}","compare_url":"https://api.github.com/repos/datauy/back-end-birra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datauy/back-end-birra/merges","archive_url":"https://api.github.com/repos/datauy/back-end-birra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datauy/back-end-birra/downloads","issues_url":"https://api.github.com/repos/datauy/back-end-birra/issues{/number}","pulls_url":"https://api.github.com/repos/datauy/back-end-birra/pulls{/number}","milestones_url":"https://api.github.com/repos/datauy/back-end-birra/milestones{/number}","notifications_url":"https://api.github.com/repos/datauy/back-end-birra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datauy/back-end-birra/labels{/name}","releases_url":"https://api.github.com/repos/datauy/back-end-birra/releases{/id}","created_at":"2015-06-27T19:36:04Z","updated_at":"2015-06-27T19:45:19Z","pushed_at":"2015-07-05T00:43:03Z","git_url":"git://github.com/datauy/back-end-birra.git","ssh_url":"git@github.com:datauy/back-end-birra.git","clone_url":"https://github.com/datauy/back-end-birra.git","svn_url":"https://github.com/datauy/back-end-birra","homepage":null,"size":196,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datauy/back-end-birra/pulls/1"},"html":{"href":"https://github.com/datauy/back-end-birra/pull/1"},"issue":{"href":"https://api.github.com/repos/datauy/back-end-birra/issues/1"},"comments":{"href":"https://api.github.com/repos/datauy/back-end-birra/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/datauy/back-end-birra/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/datauy/back-end-birra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datauy/back-end-birra/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/datauy/back-end-birra/statuses/2b2c15eb938a5d06635edbbd4b7c56419b42f26c"}}}}