{"action":"created","comment":{"url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments/60880774","id":60880774,"diff_hunk":"@@ -92,4 +92,35 @@ def test_validate(data)\n       assert_equal(expected, site.valid?)\n     end\n   end\n+\n+  sub_test_case \"Custome style\" do\n+    test \"with #base_hue\" do\n+      site = create(:site, base_hue: 300)\n+\n+      assert site.custom_hue_css_url\n+    end\n+\n+    test \"without #base_hue\" do\n+      site = create(:site, base_hue: nil)\n+\n+      assert_nil site.custom_hue_css_url\n+    end\n+\n+    test \"update #base_hue\" do\n+      site = create(:site, base_hue: nil)\n+\n+      assert_nil site.custom_hue_css_url\n+      site.update!(base_hue: 200)\n+      assert_valid_custom_css site\n+      site.update!(base_hue: 300)\n+      assert_valid_custom_css site\n+      site.update!(base_hue: nil)\n+      assert_nil site.custom_hue_css_url\n+    end\n+\n+    def assert_valid_custom_css(site)\n+      assert_match /\\.css\\z/, site.custom_hue_css_url","path":"test/models/site_test.rb","position":31,"original_position":31,"commit_id":"6c387bea22a7a667b1ee795c19a3bf1693e1b4a2","original_commit_id":"6c387bea22a7a667b1ee795c19a3bf1693e1b4a2","user":{"login":"okkez-bot","id":18323547,"avatar_url":"https://avatars.githubusercontent.com/u/18323547?v=3","gravatar_id":"","url":"https://api.github.com/users/okkez-bot","html_url":"https://github.com/okkez-bot","followers_url":"https://api.github.com/users/okkez-bot/followers","following_url":"https://api.github.com/users/okkez-bot/following{/other_user}","gists_url":"https://api.github.com/users/okkez-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/okkez-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okkez-bot/subscriptions","organizations_url":"https://api.github.com/users/okkez-bot/orgs","repos_url":"https://api.github.com/users/okkez-bot/repos","events_url":"https://api.github.com/users/okkez-bot/events{/privacy}","received_events_url":"https://api.github.com/users/okkez-bot/received_events","type":"User","site_admin":false},"body":"__[rubocop]__\n* Lint/AmbiguousRegexpLiteral: Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the `/` if it should be a division.","created_at":"2016-04-25T08:57:25Z","updated_at":"2016-04-25T08:57:25Z","html_url":"https://github.com/bm-sms/daimon-news/pull/448#discussion_r60880774","pull_request_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448","_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments/60880774"},"html":{"href":"https://github.com/bm-sms/daimon-news/pull/448#discussion_r60880774"},"pull_request":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448"}}},"pull_request":{"url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448","id":65605430,"html_url":"https://github.com/bm-sms/daimon-news/pull/448","diff_url":"https://github.com/bm-sms/daimon-news/pull/448.diff","patch_url":"https://github.com/bm-sms/daimon-news/pull/448.patch","issue_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/448","number":448,"state":"open","locked":false,"title":"Custom style","user":{"login":"tricknotes","id":290782,"avatar_url":"https://avatars.githubusercontent.com/u/290782?v=3","gravatar_id":"","url":"https://api.github.com/users/tricknotes","html_url":"https://github.com/tricknotes","followers_url":"https://api.github.com/users/tricknotes/followers","following_url":"https://api.github.com/users/tricknotes/following{/other_user}","gists_url":"https://api.github.com/users/tricknotes/gists{/gist_id}","starred_url":"https://api.github.com/users/tricknotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tricknotes/subscriptions","organizations_url":"https://api.github.com/users/tricknotes/orgs","repos_url":"https://api.github.com/users/tricknotes/repos","events_url":"https://api.github.com/users/tricknotes/events{/privacy}","received_events_url":"https://api.github.com/users/tricknotes/received_events","type":"User","site_admin":false},"body":"`Site#base_hue` を変更すると、サイトの雰囲気が変わるようにしました。\r\n\r\n## TODO\r\n* [x] Just works\r\n* [x] テスト直す & 追加する\r\n* [x] 同じファイルをなんども動的に生成しないようどこかにキャッシュする\r\n* [x] 管理画面の登録フォームをいい感じにする\r\n* [x] spectram の assets を管理しやすいように配置する\r\n","created_at":"2016-04-07T10:14:41Z","updated_at":"2016-04-25T08:57:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75ee493523f57cbe2535adfd7136021769871776","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448/commits","review_comments_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448/comments","review_comment_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/448/comments","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news/statuses/6c387bea22a7a667b1ee795c19a3bf1693e1b4a2","head":{"label":"bm-sms:custom-style","ref":"custom-style","sha":"6c387bea22a7a667b1ee795c19a3bf1693e1b4a2","user":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"repo":{"id":46255953,"name":"daimon-news","full_name":"bm-sms/daimon-news","owner":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bm-sms/daimon-news","description":"","fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news","forks_url":"https://api.github.com/repos/bm-sms/daimon-news/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-04-14T09:38:55Z","pushed_at":"2016-04-25T08:57:18Z","git_url":"git://github.com/bm-sms/daimon-news.git","ssh_url":"git@github.com:bm-sms/daimon-news.git","clone_url":"https://github.com/bm-sms/daimon-news.git","svn_url":"https://github.com/bm-sms/daimon-news","homepage":"","size":1154,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":5,"default_branch":"master"}},"base":{"label":"bm-sms:master","ref":"master","sha":"7a444a2700c2c9882879380d79c91bc50411adeb","user":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"repo":{"id":46255953,"name":"daimon-news","full_name":"bm-sms/daimon-news","owner":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bm-sms/daimon-news","description":"","fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news","forks_url":"https://api.github.com/repos/bm-sms/daimon-news/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-04-14T09:38:55Z","pushed_at":"2016-04-25T08:57:18Z","git_url":"git://github.com/bm-sms/daimon-news.git","ssh_url":"git@github.com:bm-sms/daimon-news.git","clone_url":"https://github.com/bm-sms/daimon-news.git","svn_url":"https://github.com/bm-sms/daimon-news","homepage":"","size":1154,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448"},"html":{"href":"https://github.com/bm-sms/daimon-news/pull/448"},"issue":{"href":"https://api.github.com/repos/bm-sms/daimon-news/issues/448"},"comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news/issues/448/comments"},"review_comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448/comments"},"review_comment":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/448/commits"},"statuses":{"href":"https://api.github.com/repos/bm-sms/daimon-news/statuses/6c387bea22a7a667b1ee795c19a3bf1693e1b4a2"}}}}