{"action":"created","comment":{"url":"https://api.github.com/repos/simplare/stoffi-web/pulls/comments/69076058","id":69076058,"diff_hunk":"@@ -1,36 +1,37 @@\n+# frozen_string_literal: true\n class AddPolymorphicToShares < ActiveRecord::Migration\n   def up\n-  change_table :shares do |t|\n-    t.references :object, :polymorphic => true\n-  end\n+    change_table :shares do |t|\n+      t.references :object, polymorphic: true\n+    end\n \n-  Share.all.each do |s|\n-    s.object_type = s.object.capitalize\n-    if s.object == 'song'\n-      s.object_id = s.song_id\n-    else\n-      s.object_id = s.playlist_id\n+    Share.all.each do |s|\n+      s.object_type = s.object.capitalize\n+      s.object_id = if s.object == 'song'\n+                      s.song_id\n+                    else\n+                      s.playlist_id\n+                    end\n+      s.save\n     end\n-    s.save\n-  end\n \n-  remove_column :shares, :object\n-  remove_column :shares, :song_id\n+    remove_column :shares, :object\n+    remove_column :shares, :song_id\n   end\n \n   def down\n-  add_column :shares, :object, :string\n-  add_column :shares, :song_id, :integer\n-  \n-  Share.all.each do |s|\n-    s.object = s.object_type.downcase\n-    if s.object == 'song'\n-      s.song_id = s.object_id\n-    else\n-      s.playlist_id = s.object_id\n+    add_column :shares, :object, :string\n+    add_column :shares, :song_id, :integer\n+\n+    Share.all.each do |s|\n+      s.object = s.object_type.downcase\n+      if s.object == 'song'","path":"db/migrate/20140322173708_add_polymorphic_to_shares.rb","position":50,"original_position":50,"commit_id":"c7f375c7c7ebb48b9f0456459f81535e53c366ae","original_commit_id":"c7f375c7c7ebb48b9f0456459f81535e53c366ae","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2016-06-30T06:02:56Z","updated_at":"2016-06-30T06:02:56Z","html_url":"https://github.com/simplare/stoffi-web/pull/88#discussion_r69076058","pull_request_url":"https://api.github.com/repos/simplare/stoffi-web/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/simplare/stoffi-web/pulls/comments/69076058"},"html":{"href":"https://github.com/simplare/stoffi-web/pull/88#discussion_r69076058"},"pull_request":{"href":"https://api.github.com/repos/simplare/stoffi-web/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/simplare/stoffi-web/pulls/88","id":75764169,"html_url":"https://github.com/simplare/stoffi-web/pull/88","diff_url":"https://github.com/simplare/stoffi-web/pull/88.diff","patch_url":"https://github.com/simplare/stoffi-web/pull/88.patch","issue_url":"https://api.github.com/repos/simplare/stoffi-web/issues/88","number":88,"state":"open","locked":false,"title":"Automatically correct style using rubocop","user":{"login":"ephracis","id":247659,"avatar_url":"https://avatars.githubusercontent.com/u/247659?v=3","gravatar_id":"","url":"https://api.github.com/users/ephracis","html_url":"https://github.com/ephracis","followers_url":"https://api.github.com/users/ephracis/followers","following_url":"https://api.github.com/users/ephracis/following{/other_user}","gists_url":"https://api.github.com/users/ephracis/gists{/gist_id}","starred_url":"https://api.github.com/users/ephracis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ephracis/subscriptions","organizations_url":"https://api.github.com/users/ephracis/orgs","repos_url":"https://api.github.com/users/ephracis/repos","events_url":"https://api.github.com/users/ephracis/events{/privacy}","received_events_url":"https://api.github.com/users/ephracis/received_events","type":"User","site_admin":false},"body":"Clean up the code according to the Ruby Coding Style\r\nusing the `rubocop` tool.\r\n\r\nThe following directories and files are temporarily exempted:\r\n- `config/`\r\n- `db/`\r\n- `spec/teaspoon_env.rb`\r\n- `lib/crawler/crawler.rb`\r\n\r\nThe following cops are temporarily disabled:\r\n- `Metrics/MethodLength`\r\n- `Metrics/ClassLength`\r\n- `Metrics/PerceivedComplexity`\r\n- `Metrics/CyclomaticComplexity`\r\n- `Metrics/AbcSize`\r\n- `Metrics/ParameterLists`\r\n- `Lint/Eval`\r\n- `Rails/HasAndBelongsToMany`\r\n\r\nThese will be included/enabled at a later time when I have\r\ntime and energy to focus on more extensive code cleaning that\r\nrequires refactoring on a larger and more complex scale.\r\n\r\nFixes: #72","created_at":"2016-06-30T06:01:25Z","updated_at":"2016-06-30T06:02:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c3ca3e8e801efce1b1e777a67c20fd922bfd272","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/simplare/stoffi-web/milestones/2","html_url":"https://github.com/simplare/stoffi-web/milestones/2.0-beta.1","labels_url":"https://api.github.com/repos/simplare/stoffi-web/milestones/2/labels","id":1153389,"number":2,"title":"2.0-beta.1","description":"Rewrite the whole frontend (markup, styling and client side scripts), introduce A/B testing, clean up URLs, create activity feed.","creator":{"login":"ephracis","id":247659,"avatar_url":"https://avatars.githubusercontent.com/u/247659?v=3","gravatar_id":"","url":"https://api.github.com/users/ephracis","html_url":"https://github.com/ephracis","followers_url":"https://api.github.com/users/ephracis/followers","following_url":"https://api.github.com/users/ephracis/following{/other_user}","gists_url":"https://api.github.com/users/ephracis/gists{/gist_id}","starred_url":"https://api.github.com/users/ephracis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ephracis/subscriptions","organizations_url":"https://api.github.com/users/ephracis/orgs","repos_url":"https://api.github.com/users/ephracis/repos","events_url":"https://api.github.com/users/ephracis/events{/privacy}","received_events_url":"https://api.github.com/users/ephracis/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":18,"state":"open","created_at":"2015-06-07T10:50:14Z","updated_at":"2016-06-30T06:01:40Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/simplare/stoffi-web/pulls/88/commits","review_comments_url":"https://api.github.com/repos/simplare/stoffi-web/pulls/88/comments","review_comment_url":"https://api.github.com/repos/simplare/stoffi-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/simplare/stoffi-web/issues/88/comments","statuses_url":"https://api.github.com/repos/simplare/stoffi-web/statuses/c7f375c7c7ebb48b9f0456459f81535e53c366ae","head":{"label":"ephracis:feature/rubocop","ref":"feature/rubocop","sha":"c7f375c7c7ebb48b9f0456459f81535e53c366ae","user":{"login":"ephracis","id":247659,"avatar_url":"https://avatars.githubusercontent.com/u/247659?v=3","gravatar_id":"","url":"https://api.github.com/users/ephracis","html_url":"https://github.com/ephracis","followers_url":"https://api.github.com/users/ephracis/followers","following_url":"https://api.github.com/users/ephracis/following{/other_user}","gists_url":"https://api.github.com/users/ephracis/gists{/gist_id}","starred_url":"https://api.github.com/users/ephracis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ephracis/subscriptions","organizations_url":"https://api.github.com/users/ephracis/orgs","repos_url":"https://api.github.com/users/ephracis/repos","events_url":"https://api.github.com/users/ephracis/events{/privacy}","received_events_url":"https://api.github.com/users/ephracis/received_events","type":"User","site_admin":false},"repo":{"id":34926290,"name":"stoffi-web","full_name":"ephracis/stoffi-web","owner":{"login":"ephracis","id":247659,"avatar_url":"https://avatars.githubusercontent.com/u/247659?v=3","gravatar_id":"","url":"https://api.github.com/users/ephracis","html_url":"https://github.com/ephracis","followers_url":"https://api.github.com/users/ephracis/followers","following_url":"https://api.github.com/users/ephracis/following{/other_user}","gists_url":"https://api.github.com/users/ephracis/gists{/gist_id}","starred_url":"https://api.github.com/users/ephracis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ephracis/subscriptions","organizations_url":"https://api.github.com/users/ephracis/orgs","repos_url":"https://api.github.com/users/ephracis/repos","events_url":"https://api.github.com/users/ephracis/events{/privacy}","received_events_url":"https://api.github.com/users/ephracis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ephracis/stoffi-web","description":"The Stoffi website","fork":true,"url":"https://api.github.com/repos/ephracis/stoffi-web","forks_url":"https://api.github.com/repos/ephracis/stoffi-web/forks","keys_url":"https://api.github.com/repos/ephracis/stoffi-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ephracis/stoffi-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ephracis/stoffi-web/teams","hooks_url":"https://api.github.com/repos/ephracis/stoffi-web/hooks","issue_events_url":"https://api.github.com/repos/ephracis/stoffi-web/issues/events{/number}","events_url":"https://api.github.com/repos/ephracis/stoffi-web/events","assignees_url":"https://api.github.com/repos/ephracis/stoffi-web/assignees{/user}","branches_url":"https://api.github.com/repos/ephracis/stoffi-web/branches{/branch}","tags_url":"https://api.github.com/repos/ephracis/stoffi-web/tags","blobs_url":"https://api.github.com/repos/ephracis/stoffi-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ephracis/stoffi-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ephracis/stoffi-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/ephracis/stoffi-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ephracis/stoffi-web/statuses/{sha}","languages_url":"https://api.github.com/repos/ephracis/stoffi-web/languages","stargazers_url":"https://api.github.com/repos/ephracis/stoffi-web/stargazers","contributors_url":"https://api.github.com/repos/ephracis/stoffi-web/contributors","subscribers_url":"https://api.github.com/repos/ephracis/stoffi-web/subscribers","subscription_url":"https://api.github.com/repos/ephracis/stoffi-web/subscription","commits_url":"https://api.github.com/repos/ephracis/stoffi-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/ephracis/stoffi-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/ephracis/stoffi-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/ephracis/stoffi-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/ephracis/stoffi-web/contents/{+path}","compare_url":"https://api.github.com/repos/ephracis/stoffi-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ephracis/stoffi-web/merges","archive_url":"https://api.github.com/repos/ephracis/stoffi-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ephracis/stoffi-web/downloads","issues_url":"https://api.github.com/repos/ephracis/stoffi-web/issues{/number}","pulls_url":"https://api.github.com/repos/ephracis/stoffi-web/pulls{/number}","milestones_url":"https://api.github.com/repos/ephracis/stoffi-web/milestones{/number}","notifications_url":"https://api.github.com/repos/ephracis/stoffi-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ephracis/stoffi-web/labels{/name}","releases_url":"https://api.github.com/repos/ephracis/stoffi-web/releases{/id}","deployments_url":"https://api.github.com/repos/ephracis/stoffi-web/deployments","created_at":"2015-05-01T22:08:02Z","updated_at":"2016-06-27T08:03:41Z","pushed_at":"2016-06-30T05:59:24Z","git_url":"git://github.com/ephracis/stoffi-web.git","ssh_url":"git@github.com:ephracis/stoffi-web.git","clone_url":"https://github.com/ephracis/stoffi-web.git","svn_url":"https://github.com/ephracis/stoffi-web","homepage":"https://stoffi.io","size":29192,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"simplare:master","ref":"master","sha":"dea925ce2c253f9d46721bb54fd485da3b0c0a3b","user":{"login":"simplare","id":6578237,"avatar_url":"https://avatars.githubusercontent.com/u/6578237?v=3","gravatar_id":"","url":"https://api.github.com/users/simplare","html_url":"https://github.com/simplare","followers_url":"https://api.github.com/users/simplare/followers","following_url":"https://api.github.com/users/simplare/following{/other_user}","gists_url":"https://api.github.com/users/simplare/gists{/gist_id}","starred_url":"https://api.github.com/users/simplare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplare/subscriptions","organizations_url":"https://api.github.com/users/simplare/orgs","repos_url":"https://api.github.com/users/simplare/repos","events_url":"https://api.github.com/users/simplare/events{/privacy}","received_events_url":"https://api.github.com/users/simplare/received_events","type":"Organization","site_admin":false},"repo":{"id":34925554,"name":"stoffi-web","full_name":"simplare/stoffi-web","owner":{"login":"simplare","id":6578237,"avatar_url":"https://avatars.githubusercontent.com/u/6578237?v=3","gravatar_id":"","url":"https://api.github.com/users/simplare","html_url":"https://github.com/simplare","followers_url":"https://api.github.com/users/simplare/followers","following_url":"https://api.github.com/users/simplare/following{/other_user}","gists_url":"https://api.github.com/users/simplare/gists{/gist_id}","starred_url":"https://api.github.com/users/simplare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplare/subscriptions","organizations_url":"https://api.github.com/users/simplare/orgs","repos_url":"https://api.github.com/users/simplare/repos","events_url":"https://api.github.com/users/simplare/events{/privacy}","received_events_url":"https://api.github.com/users/simplare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simplare/stoffi-web","description":"The web service of Stoffi","fork":false,"url":"https://api.github.com/repos/simplare/stoffi-web","forks_url":"https://api.github.com/repos/simplare/stoffi-web/forks","keys_url":"https://api.github.com/repos/simplare/stoffi-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simplare/stoffi-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simplare/stoffi-web/teams","hooks_url":"https://api.github.com/repos/simplare/stoffi-web/hooks","issue_events_url":"https://api.github.com/repos/simplare/stoffi-web/issues/events{/number}","events_url":"https://api.github.com/repos/simplare/stoffi-web/events","assignees_url":"https://api.github.com/repos/simplare/stoffi-web/assignees{/user}","branches_url":"https://api.github.com/repos/simplare/stoffi-web/branches{/branch}","tags_url":"https://api.github.com/repos/simplare/stoffi-web/tags","blobs_url":"https://api.github.com/repos/simplare/stoffi-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simplare/stoffi-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simplare/stoffi-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/simplare/stoffi-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simplare/stoffi-web/statuses/{sha}","languages_url":"https://api.github.com/repos/simplare/stoffi-web/languages","stargazers_url":"https://api.github.com/repos/simplare/stoffi-web/stargazers","contributors_url":"https://api.github.com/repos/simplare/stoffi-web/contributors","subscribers_url":"https://api.github.com/repos/simplare/stoffi-web/subscribers","subscription_url":"https://api.github.com/repos/simplare/stoffi-web/subscription","commits_url":"https://api.github.com/repos/simplare/stoffi-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/simplare/stoffi-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/simplare/stoffi-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/simplare/stoffi-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/simplare/stoffi-web/contents/{+path}","compare_url":"https://api.github.com/repos/simplare/stoffi-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simplare/stoffi-web/merges","archive_url":"https://api.github.com/repos/simplare/stoffi-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simplare/stoffi-web/downloads","issues_url":"https://api.github.com/repos/simplare/stoffi-web/issues{/number}","pulls_url":"https://api.github.com/repos/simplare/stoffi-web/pulls{/number}","milestones_url":"https://api.github.com/repos/simplare/stoffi-web/milestones{/number}","notifications_url":"https://api.github.com/repos/simplare/stoffi-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simplare/stoffi-web/labels{/name}","releases_url":"https://api.github.com/repos/simplare/stoffi-web/releases{/id}","deployments_url":"https://api.github.com/repos/simplare/stoffi-web/deployments","created_at":"2015-05-01T21:46:20Z","updated_at":"2016-06-06T19:16:07Z","pushed_at":"2016-06-30T06:01:25Z","git_url":"git://github.com/simplare/stoffi-web.git","ssh_url":"git@github.com:simplare/stoffi-web.git","clone_url":"https://github.com/simplare/stoffi-web.git","svn_url":"https://github.com/simplare/stoffi-web","homepage":"https://stoffi.io","size":29199,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":37,"forks":2,"open_issues":37,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simplare/stoffi-web/pulls/88"},"html":{"href":"https://github.com/simplare/stoffi-web/pull/88"},"issue":{"href":"https://api.github.com/repos/simplare/stoffi-web/issues/88"},"comments":{"href":"https://api.github.com/repos/simplare/stoffi-web/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/simplare/stoffi-web/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/simplare/stoffi-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/simplare/stoffi-web/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/simplare/stoffi-web/statuses/c7f375c7c7ebb48b9f0456459f81535e53c366ae"}}}}
{"actor":{"display_login":"houndci-bot"}}