{"action":"created","comment":{"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments/55321108","id":55321108,"diff_hunk":"@@ -0,0 +1,40 @@\n+require 'test_helper'\n+\n+class SearchTest < ActionDispatch::IntegrationTest\n+  setup do\n+    setup_groonga_database\n+    @current_site = create(:site)\n+    @other_site = create(:site)\n+    switch_domain(@current_site.fqdn)\n+    @indexer = PostIndexer.new\n+  end\n+\n+  teardown do\n+    teardown_groonga_database\n+  end\n+\n+  test 'only posts of the current site' do\n+    create_post(@current_site, 'current site', 'contents...')\n+    create_post(@other_site, 'other site', 'contents...')\n+\n+    visit '/'\n+\n+    fill_in 'query[keywords]', with: 'contents'\n+\n+    click_on 'search'\n+\n+    within('main') do\n+      assert_equal '「contents」を含む記事は1件見つかりました。', find('p').text","path":"test/integration/search_test.rb","position":27,"original_position":27,"commit_id":"b97ab71b92a32704d593264d3e879acabb998103","original_commit_id":"8892405b43c7145657bd1c23e171a3b69f2055c0","user":{"login":"myokoym","id":386687,"avatar_url":"https://avatars.githubusercontent.com/u/386687?v=3","gravatar_id":"","url":"https://api.github.com/users/myokoym","html_url":"https://github.com/myokoym","followers_url":"https://api.github.com/users/myokoym/followers","following_url":"https://api.github.com/users/myokoym/following{/other_user}","gists_url":"https://api.github.com/users/myokoym/gists{/gist_id}","starred_url":"https://api.github.com/users/myokoym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myokoym/subscriptions","organizations_url":"https://api.github.com/users/myokoym/orgs","repos_url":"https://api.github.com/users/myokoym/repos","events_url":"https://api.github.com/users/myokoym/events{/privacy}","received_events_url":"https://api.github.com/users/myokoym/received_events","type":"User","site_admin":false},"body":"たしかに…！直しました！","created_at":"2016-03-08T06:29:44Z","updated_at":"2016-03-08T06:29:44Z","html_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/288#discussion_r55321108","pull_request_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288","_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments/55321108"},"html":{"href":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/288#discussion_r55321108"},"pull_request":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288"}}},"pull_request":{"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288","id":61199831,"html_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/288","diff_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/288.diff","patch_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/288.patch","issue_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/288","number":288,"state":"open","locked":false,"title":"記事検索","user":{"login":"myokoym","id":386687,"avatar_url":"https://avatars.githubusercontent.com/u/386687?v=3","gravatar_id":"","url":"https://api.github.com/users/myokoym","html_url":"https://github.com/myokoym","followers_url":"https://api.github.com/users/myokoym/followers","following_url":"https://api.github.com/users/myokoym/following{/other_user}","gists_url":"https://api.github.com/users/myokoym/gists{/gist_id}","starred_url":"https://api.github.com/users/myokoym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myokoym/subscriptions","organizations_url":"https://api.github.com/users/myokoym/orgs","repos_url":"https://api.github.com/users/myokoym/repos","events_url":"https://api.github.com/users/myokoym/events{/privacy}","received_events_url":"https://api.github.com/users/myokoym/received_events","type":"User","site_admin":false},"body":"レイアウトの右サイドバーに記事検索の検索ボックスを追加しました。\r\n\r\n機能としては以下です。\r\n\r\n* 記事のタイトル、本文から検索\r\n* 記事のタイトルを表示\r\n* 関係者で絞り込み可能\r\n\r\n関係者の名前や説明での検索は今はできていませんが、必要なら実装可能です。\r\n\r\nClose #185 \r\n","created_at":"2016-03-01T06:37:22Z","updated_at":"2016-03-08T06:29:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cfa37211fa7967b8b95a10ab3570cbaf7c7b5c5","assignee":{"login":"mtsmfm","id":1796864,"avatar_url":"https://avatars.githubusercontent.com/u/1796864?v=3","gravatar_id":"","url":"https://api.github.com/users/mtsmfm","html_url":"https://github.com/mtsmfm","followers_url":"https://api.github.com/users/mtsmfm/followers","following_url":"https://api.github.com/users/mtsmfm/following{/other_user}","gists_url":"https://api.github.com/users/mtsmfm/gists{/gist_id}","starred_url":"https://api.github.com/users/mtsmfm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtsmfm/subscriptions","organizations_url":"https://api.github.com/users/mtsmfm/orgs","repos_url":"https://api.github.com/users/mtsmfm/repos","events_url":"https://api.github.com/users/mtsmfm/events{/privacy}","received_events_url":"https://api.github.com/users/mtsmfm/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288/commits","review_comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288/comments","review_comment_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/288/comments","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/b97ab71b92a32704d593264d3e879acabb998103","head":{"label":"bm-sms:search-rebased","ref":"search-rebased","sha":"b97ab71b92a32704d593264d3e879acabb998103","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-multi-tenant","full_name":"bm-sms/daimon-news-multi-tenant","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-multi-tenant","description":"","fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant","forks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-02-26T02:26:40Z","pushed_at":"2016-03-08T06:06:25Z","git_url":"git://github.com/bm-sms/daimon-news-multi-tenant.git","ssh_url":"git@github.com:bm-sms/daimon-news-multi-tenant.git","clone_url":"https://github.com/bm-sms/daimon-news-multi-tenant.git","svn_url":"https://github.com/bm-sms/daimon-news-multi-tenant","homepage":"","size":843,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":3,"default_branch":"master"}},"base":{"label":"bm-sms:master","ref":"master","sha":"ea9d629030b85ed63275edf53cf98b13e1057134","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-multi-tenant","full_name":"bm-sms/daimon-news-multi-tenant","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-multi-tenant","description":"","fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant","forks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-02-26T02:26:40Z","pushed_at":"2016-03-08T06:06:25Z","git_url":"git://github.com/bm-sms/daimon-news-multi-tenant.git","ssh_url":"git@github.com:bm-sms/daimon-news-multi-tenant.git","clone_url":"https://github.com/bm-sms/daimon-news-multi-tenant.git","svn_url":"https://github.com/bm-sms/daimon-news-multi-tenant","homepage":"","size":843,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288"},"html":{"href":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/288"},"issue":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/288"},"comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/288/comments"},"review_comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288/comments"},"review_comment":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/288/commits"},"statuses":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/b97ab71b92a32704d593264d3e879acabb998103"}}}}