{"action":"created","comment":{"url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/comments/75883363","id":75883363,"diff_hunk":"@@ -62,21 +62,21 @@\n         data on these politicians; great for spreadsheets, perfect for\n         quick analysis.\n       </p>\n-      <ul class=\"grid-list grid-list--vertically-center\" id=\"terms-<%= house[:slug].downcase %>\">\n-        <% house[:legislative_periods].each do |t| %>\n-          <li id=\"term-<%= house[:slug].downcase %>-<%= t[:slug].downcase %>\" style=\"margin-bottom:1.5em\">\n+      <ul class=\"grid-list grid-list--vertically-center\" id=\"terms-<%= house.slug.downcase %>\">\n+        <% house.legislative_periods.each do |t| %>\n+          <li id=\"term-<%= house.slug.downcase %>-<%= t.slug.downcase %>\" style=\"margin-bottom:1.5em\">\n             <div class=\"avatar-unit\">\n               <span class=\"avatar\"><i class=\"fa fa-university\"></i></span>\n-              <a href=\"<%= term_table_url(@page.country, house, t) %>\"><h3><%= t[:name] %></h3></a>\n+              <a href=\"<%= term_table_url(@page.country, house, t) %>\"><h3><%= t.name %></h3></a>\n               <p>\n-                <% unless t[:start_date].to_s.empty? and t[:end_date].to_s.empty? %>\n-                  <%= t[:start_date] %> - <%= t[:end_date] %>\n+                <% unless t.start_date.to_s.empty? and t.end_date.to_s.empty? %>\n+                 <%= t.start_date %> - <%=  t.end_date rescue '' %>","path":"views/country_download.erb","position":55,"original_position":55,"commit_id":"c3a662d7fb5608bf8fcdc834c3f9023521646977","original_commit_id":"c3a662d7fb5608bf8fcdc834c3f9023521646977","user":{"login":"tmtmtmtm","id":57483,"avatar_url":"https://avatars.githubusercontent.com/u/57483?v=3","gravatar_id":"","url":"https://api.github.com/users/tmtmtmtm","html_url":"https://github.com/tmtmtmtm","followers_url":"https://api.github.com/users/tmtmtmtm/followers","following_url":"https://api.github.com/users/tmtmtmtm/following{/other_user}","gists_url":"https://api.github.com/users/tmtmtmtm/gists{/gist_id}","starred_url":"https://api.github.com/users/tmtmtmtm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmtmtmtm/subscriptions","organizations_url":"https://api.github.com/users/tmtmtmtm/orgs","repos_url":"https://api.github.com/users/tmtmtmtm/repos","events_url":"https://api.github.com/users/tmtmtmtm/events{/privacy}","received_events_url":"https://api.github.com/users/tmtmtmtm/received_events","type":"User","site_admin":false},"body":"If you cherry-pick https://github.com/everypolitician/viewer-sinatra/pull/14909/commits/77c2e3fc1e6bdf248b092afa8017acd4922f3821 you won't need to do this 'rescue'\r\n\r\nOnce these are proper date method calls, you can also simplify the previous line to `if t.start_date || t.end_date`\r\n","created_at":"2016-08-23T14:55:28Z","updated_at":"2016-08-23T14:55:28Z","html_url":"https://github.com/everypolitician/viewer-sinatra/pull/14901#discussion_r75883363","pull_request_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901","_links":{"self":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/comments/75883363"},"html":{"href":"https://github.com/everypolitician/viewer-sinatra/pull/14901#discussion_r75883363"},"pull_request":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901"}}},"pull_request":{"url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901","id":82365103,"html_url":"https://github.com/everypolitician/viewer-sinatra/pull/14901","diff_url":"https://github.com/everypolitician/viewer-sinatra/pull/14901.diff","patch_url":"https://github.com/everypolitician/viewer-sinatra/pull/14901.patch","issue_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/14901","number":14901,"state":"open","locked":false,"title":"Remove JSON from download template","user":{"login":"ondenman","id":4107953,"avatar_url":"https://avatars.githubusercontent.com/u/4107953?v=3","gravatar_id":"","url":"https://api.github.com/users/ondenman","html_url":"https://github.com/ondenman","followers_url":"https://api.github.com/users/ondenman/followers","following_url":"https://api.github.com/users/ondenman/following{/other_user}","gists_url":"https://api.github.com/users/ondenman/gists{/gist_id}","starred_url":"https://api.github.com/users/ondenman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondenman/subscriptions","organizations_url":"https://api.github.com/users/ondenman/orgs","repos_url":"https://api.github.com/users/ondenman/repos","events_url":"https://api.github.com/users/ondenman/events{/privacy}","received_events_url":"https://api.github.com/users/ondenman/received_events","type":"User","site_admin":false},"body":"Removing JSON references from download template\r\n\r\nRemoves all but one (house[:names] depends on new method implemented in EP Ruby (https://github.com/everypolitician/everypolitician-ruby/issues/49)).","created_at":"2016-08-23T13:32:17Z","updated_at":"2016-08-23T14:55:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67555e1652e8bef273d35b4a1089484c93f4230c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901/commits","review_comments_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901/comments","review_comment_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/14901/comments","statuses_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/statuses/c3a662d7fb5608bf8fcdc834c3f9023521646977","head":{"label":"everypolitician:14844-remove-json-from-download-template","ref":"14844-remove-json-from-download-template","sha":"c3a662d7fb5608bf8fcdc834c3f9023521646977","user":{"login":"everypolitician","id":12497298,"avatar_url":"https://avatars.githubusercontent.com/u/12497298?v=3","gravatar_id":"","url":"https://api.github.com/users/everypolitician","html_url":"https://github.com/everypolitician","followers_url":"https://api.github.com/users/everypolitician/followers","following_url":"https://api.github.com/users/everypolitician/following{/other_user}","gists_url":"https://api.github.com/users/everypolitician/gists{/gist_id}","starred_url":"https://api.github.com/users/everypolitician/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/everypolitician/subscriptions","organizations_url":"https://api.github.com/users/everypolitician/orgs","repos_url":"https://api.github.com/users/everypolitician/repos","events_url":"https://api.github.com/users/everypolitician/events{/privacy}","received_events_url":"https://api.github.com/users/everypolitician/received_events","type":"Organization","site_admin":false},"repo":{"id":33254196,"name":"viewer-sinatra","full_name":"everypolitician/viewer-sinatra","owner":{"login":"everypolitician","id":12497298,"avatar_url":"https://avatars.githubusercontent.com/u/12497298?v=3","gravatar_id":"","url":"https://api.github.com/users/everypolitician","html_url":"https://github.com/everypolitician","followers_url":"https://api.github.com/users/everypolitician/followers","following_url":"https://api.github.com/users/everypolitician/following{/other_user}","gists_url":"https://api.github.com/users/everypolitician/gists{/gist_id}","starred_url":"https://api.github.com/users/everypolitician/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/everypolitician/subscriptions","organizations_url":"https://api.github.com/users/everypolitician/orgs","repos_url":"https://api.github.com/users/everypolitician/repos","events_url":"https://api.github.com/users/everypolitician/events{/privacy}","received_events_url":"https://api.github.com/users/everypolitician/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/everypolitician/viewer-sinatra","description":"Sinatra app for (pre)viewing EveryPolitician website dynamically","fork":false,"url":"https://api.github.com/repos/everypolitician/viewer-sinatra","forks_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/forks","keys_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/teams","hooks_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/hooks","issue_events_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/events{/number}","events_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/events","assignees_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/assignees{/user}","branches_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/branches{/branch}","tags_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/tags","blobs_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/refs{/sha}","trees_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/statuses/{sha}","languages_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/languages","stargazers_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/stargazers","contributors_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/contributors","subscribers_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/subscribers","subscription_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/subscription","commits_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/commits{/sha}","git_commits_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/commits{/sha}","comments_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/comments{/number}","issue_comment_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/comments{/number}","contents_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/contents/{+path}","compare_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/merges","archive_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/downloads","issues_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues{/number}","pulls_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls{/number}","milestones_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/milestones{/number}","notifications_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/labels{/name}","releases_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/releases{/id}","deployments_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/deployments","created_at":"2015-04-01T15:02:20Z","updated_at":"2016-07-18T10:59:59Z","pushed_at":"2016-08-23T14:49:36Z","git_url":"git://github.com/everypolitician/viewer-sinatra.git","ssh_url":"git@github.com:everypolitician/viewer-sinatra.git","clone_url":"https://github.com/everypolitician/viewer-sinatra.git","svn_url":"https://github.com/everypolitician/viewer-sinatra","homepage":"http://everypolitician.org/","size":18608,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":125,"forks":3,"open_issues":125,"watchers":1,"default_branch":"master"}},"base":{"label":"everypolitician:master","ref":"master","sha":"0814159404f938bf9c35fcff9e281c494d69360e","user":{"login":"everypolitician","id":12497298,"avatar_url":"https://avatars.githubusercontent.com/u/12497298?v=3","gravatar_id":"","url":"https://api.github.com/users/everypolitician","html_url":"https://github.com/everypolitician","followers_url":"https://api.github.com/users/everypolitician/followers","following_url":"https://api.github.com/users/everypolitician/following{/other_user}","gists_url":"https://api.github.com/users/everypolitician/gists{/gist_id}","starred_url":"https://api.github.com/users/everypolitician/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/everypolitician/subscriptions","organizations_url":"https://api.github.com/users/everypolitician/orgs","repos_url":"https://api.github.com/users/everypolitician/repos","events_url":"https://api.github.com/users/everypolitician/events{/privacy}","received_events_url":"https://api.github.com/users/everypolitician/received_events","type":"Organization","site_admin":false},"repo":{"id":33254196,"name":"viewer-sinatra","full_name":"everypolitician/viewer-sinatra","owner":{"login":"everypolitician","id":12497298,"avatar_url":"https://avatars.githubusercontent.com/u/12497298?v=3","gravatar_id":"","url":"https://api.github.com/users/everypolitician","html_url":"https://github.com/everypolitician","followers_url":"https://api.github.com/users/everypolitician/followers","following_url":"https://api.github.com/users/everypolitician/following{/other_user}","gists_url":"https://api.github.com/users/everypolitician/gists{/gist_id}","starred_url":"https://api.github.com/users/everypolitician/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/everypolitician/subscriptions","organizations_url":"https://api.github.com/users/everypolitician/orgs","repos_url":"https://api.github.com/users/everypolitician/repos","events_url":"https://api.github.com/users/everypolitician/events{/privacy}","received_events_url":"https://api.github.com/users/everypolitician/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/everypolitician/viewer-sinatra","description":"Sinatra app for (pre)viewing EveryPolitician website dynamically","fork":false,"url":"https://api.github.com/repos/everypolitician/viewer-sinatra","forks_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/forks","keys_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/teams","hooks_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/hooks","issue_events_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/events{/number}","events_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/events","assignees_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/assignees{/user}","branches_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/branches{/branch}","tags_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/tags","blobs_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/refs{/sha}","trees_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/statuses/{sha}","languages_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/languages","stargazers_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/stargazers","contributors_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/contributors","subscribers_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/subscribers","subscription_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/subscription","commits_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/commits{/sha}","git_commits_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/git/commits{/sha}","comments_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/comments{/number}","issue_comment_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/comments{/number}","contents_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/contents/{+path}","compare_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/merges","archive_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/downloads","issues_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues{/number}","pulls_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls{/number}","milestones_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/milestones{/number}","notifications_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/labels{/name}","releases_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/releases{/id}","deployments_url":"https://api.github.com/repos/everypolitician/viewer-sinatra/deployments","created_at":"2015-04-01T15:02:20Z","updated_at":"2016-07-18T10:59:59Z","pushed_at":"2016-08-23T14:49:36Z","git_url":"git://github.com/everypolitician/viewer-sinatra.git","ssh_url":"git@github.com:everypolitician/viewer-sinatra.git","clone_url":"https://github.com/everypolitician/viewer-sinatra.git","svn_url":"https://github.com/everypolitician/viewer-sinatra","homepage":"http://everypolitician.org/","size":18608,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":125,"forks":3,"open_issues":125,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901"},"html":{"href":"https://github.com/everypolitician/viewer-sinatra/pull/14901"},"issue":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/14901"},"comments":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/issues/14901/comments"},"review_comments":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901/comments"},"review_comment":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/pulls/14901/commits"},"statuses":{"href":"https://api.github.com/repos/everypolitician/viewer-sinatra/statuses/c3a662d7fb5608bf8fcdc834c3f9023521646977"}}}}
{"actor":{"display_login":"tmtmtmtm"}}