{"action":"opened","number":24,"pull_request":{"url":"https://api.github.com/repos/pulibrary/pul_solr/pulls/24","id":93042416,"html_url":"https://github.com/pulibrary/pul_solr/pull/24","diff_url":"https://github.com/pulibrary/pul_solr/pull/24.diff","patch_url":"https://github.com/pulibrary/pul_solr/pull/24.patch","issue_url":"https://api.github.com/repos/pulibrary/pul_solr/issues/24","number":24,"state":"open","locked":false,"title":"use shared_context to allow contexts to access diff solr cores and instances","user":{"login":"codeforkjeff","id":615941,"avatar_url":"https://avatars.githubusercontent.com/u/615941?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforkjeff","html_url":"https://github.com/codeforkjeff","followers_url":"https://api.github.com/users/codeforkjeff/followers","following_url":"https://api.github.com/users/codeforkjeff/following{/other_user}","gists_url":"https://api.github.com/users/codeforkjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforkjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforkjeff/subscriptions","organizations_url":"https://api.github.com/users/codeforkjeff/orgs","repos_url":"https://api.github.com/users/codeforkjeff/repos","events_url":"https://api.github.com/users/codeforkjeff/events{/privacy}","received_events_url":"https://api.github.com/users/codeforkjeff/received_events","type":"User","site_admin":false},"body":"Hi! We at Penn enjoyed the impromptu presentation on this repo by @tampakis at the Blacklight Summit last week. We're currently trying to build on your excellent work for our own Solr schemas, and ran into the issue of not being to access different Solr cores/instances because of the way spec_helper.rb was written. \r\n\r\nThis is a simple refactor to allow you to override the default Solr instance used. Here's some sample code that uses it:\r\n\r\n```ruby\r\nrequire 'spec_helper'\r\nrequire 'json'\r\n\r\ndescribe 'sample tests' do\r\n  include_context 'solr_helpers'\r\n\r\n  before(:all) do\r\n    # here's the override\r\n    solr(core: \"solr/pulmap\")\r\n    delete_all\r\n  end\r\n  describe 'sample field' do\r\n    it 'does something appropriate' do\r\n      # use methods as you normally would\r\n      expect(solr_resp_doc_ids_only(...)).to include(...)\r\n    end\r\n  end\r\n  after(:all) do\r\n    delete_all\r\n  end\r\nend\r\n```\r\n\r\nJust sending this PR along in the spirit of sharing, but if you are already working on achieving this some other way, please feel free to close.\r\n","created_at":"2016-11-09T21:30:42Z","updated_at":"2016-11-09T21:30:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pulibrary/pul_solr/pulls/24/commits","review_comments_url":"https://api.github.com/repos/pulibrary/pul_solr/pulls/24/comments","review_comment_url":"https://api.github.com/repos/pulibrary/pul_solr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulibrary/pul_solr/issues/24/comments","statuses_url":"https://api.github.com/repos/pulibrary/pul_solr/statuses/e7e6c6f0c641ebeaaf186e27828064fddec6f38c","head":{"label":"upenn-libraries:use-shared-context","ref":"use-shared-context","sha":"e7e6c6f0c641ebeaaf186e27828064fddec6f38c","user":{"login":"upenn-libraries","id":4396813,"avatar_url":"https://avatars.githubusercontent.com/u/4396813?v=3","gravatar_id":"","url":"https://api.github.com/users/upenn-libraries","html_url":"https://github.com/upenn-libraries","followers_url":"https://api.github.com/users/upenn-libraries/followers","following_url":"https://api.github.com/users/upenn-libraries/following{/other_user}","gists_url":"https://api.github.com/users/upenn-libraries/gists{/gist_id}","starred_url":"https://api.github.com/users/upenn-libraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upenn-libraries/subscriptions","organizations_url":"https://api.github.com/users/upenn-libraries/orgs","repos_url":"https://api.github.com/users/upenn-libraries/repos","events_url":"https://api.github.com/users/upenn-libraries/events{/privacy}","received_events_url":"https://api.github.com/users/upenn-libraries/received_events","type":"Organization","site_admin":false},"repo":{"id":73321312,"name":"pul_solr","full_name":"upenn-libraries/pul_solr","owner":{"login":"upenn-libraries","id":4396813,"avatar_url":"https://avatars.githubusercontent.com/u/4396813?v=3","gravatar_id":"","url":"https://api.github.com/users/upenn-libraries","html_url":"https://github.com/upenn-libraries","followers_url":"https://api.github.com/users/upenn-libraries/followers","following_url":"https://api.github.com/users/upenn-libraries/following{/other_user}","gists_url":"https://api.github.com/users/upenn-libraries/gists{/gist_id}","starred_url":"https://api.github.com/users/upenn-libraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upenn-libraries/subscriptions","organizations_url":"https://api.github.com/users/upenn-libraries/orgs","repos_url":"https://api.github.com/users/upenn-libraries/repos","events_url":"https://api.github.com/users/upenn-libraries/events{/privacy}","received_events_url":"https://api.github.com/users/upenn-libraries/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/upenn-libraries/pul_solr","description":"PU Library Solr Configs and Specs","fork":true,"url":"https://api.github.com/repos/upenn-libraries/pul_solr","forks_url":"https://api.github.com/repos/upenn-libraries/pul_solr/forks","keys_url":"https://api.github.com/repos/upenn-libraries/pul_solr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/upenn-libraries/pul_solr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/upenn-libraries/pul_solr/teams","hooks_url":"https://api.github.com/repos/upenn-libraries/pul_solr/hooks","issue_events_url":"https://api.github.com/repos/upenn-libraries/pul_solr/issues/events{/number}","events_url":"https://api.github.com/repos/upenn-libraries/pul_solr/events","assignees_url":"https://api.github.com/repos/upenn-libraries/pul_solr/assignees{/user}","branches_url":"https://api.github.com/repos/upenn-libraries/pul_solr/branches{/branch}","tags_url":"https://api.github.com/repos/upenn-libraries/pul_solr/tags","blobs_url":"https://api.github.com/repos/upenn-libraries/pul_solr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/upenn-libraries/pul_solr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/upenn-libraries/pul_solr/git/refs{/sha}","trees_url":"https://api.github.com/repos/upenn-libraries/pul_solr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/upenn-libraries/pul_solr/statuses/{sha}","languages_url":"https://api.github.com/repos/upenn-libraries/pul_solr/languages","stargazers_url":"https://api.github.com/repos/upenn-libraries/pul_solr/stargazers","contributors_url":"https://api.github.com/repos/upenn-libraries/pul_solr/contributors","subscribers_url":"https://api.github.com/repos/upenn-libraries/pul_solr/subscribers","subscription_url":"https://api.github.com/repos/upenn-libraries/pul_solr/subscription","commits_url":"https://api.github.com/repos/upenn-libraries/pul_solr/commits{/sha}","git_commits_url":"https://api.github.com/repos/upenn-libraries/pul_solr/git/commits{/sha}","comments_url":"https://api.github.com/repos/upenn-libraries/pul_solr/comments{/number}","issue_comment_url":"https://api.github.com/repos/upenn-libraries/pul_solr/issues/comments{/number}","contents_url":"https://api.github.com/repos/upenn-libraries/pul_solr/contents/{+path}","compare_url":"https://api.github.com/repos/upenn-libraries/pul_solr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/upenn-libraries/pul_solr/merges","archive_url":"https://api.github.com/repos/upenn-libraries/pul_solr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/upenn-libraries/pul_solr/downloads","issues_url":"https://api.github.com/repos/upenn-libraries/pul_solr/issues{/number}","pulls_url":"https://api.github.com/repos/upenn-libraries/pul_solr/pulls{/number}","milestones_url":"https://api.github.com/repos/upenn-libraries/pul_solr/milestones{/number}","notifications_url":"https://api.github.com/repos/upenn-libraries/pul_solr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/upenn-libraries/pul_solr/labels{/name}","releases_url":"https://api.github.com/repos/upenn-libraries/pul_solr/releases{/id}","deployments_url":"https://api.github.com/repos/upenn-libraries/pul_solr/deployments","created_at":"2016-11-09T21:07:10Z","updated_at":"2016-11-09T21:07:12Z","pushed_at":"2016-11-09T21:27:51Z","git_url":"git://github.com/upenn-libraries/pul_solr.git","ssh_url":"git@github.com:upenn-libraries/pul_solr.git","clone_url":"https://github.com/upenn-libraries/pul_solr.git","svn_url":"https://github.com/upenn-libraries/pul_solr","homepage":null,"size":28461,"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":"pulibrary:master","ref":"master","sha":"e1a5870d4ed74c66ed7ebc93e67998d6045a17fa","user":{"login":"pulibrary","id":1827800,"avatar_url":"https://avatars.githubusercontent.com/u/1827800?v=3","gravatar_id":"","url":"https://api.github.com/users/pulibrary","html_url":"https://github.com/pulibrary","followers_url":"https://api.github.com/users/pulibrary/followers","following_url":"https://api.github.com/users/pulibrary/following{/other_user}","gists_url":"https://api.github.com/users/pulibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/pulibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulibrary/subscriptions","organizations_url":"https://api.github.com/users/pulibrary/orgs","repos_url":"https://api.github.com/users/pulibrary/repos","events_url":"https://api.github.com/users/pulibrary/events{/privacy}","received_events_url":"https://api.github.com/users/pulibrary/received_events","type":"Organization","site_admin":false},"repo":{"id":56603221,"name":"pul_solr","full_name":"pulibrary/pul_solr","owner":{"login":"pulibrary","id":1827800,"avatar_url":"https://avatars.githubusercontent.com/u/1827800?v=3","gravatar_id":"","url":"https://api.github.com/users/pulibrary","html_url":"https://github.com/pulibrary","followers_url":"https://api.github.com/users/pulibrary/followers","following_url":"https://api.github.com/users/pulibrary/following{/other_user}","gists_url":"https://api.github.com/users/pulibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/pulibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulibrary/subscriptions","organizations_url":"https://api.github.com/users/pulibrary/orgs","repos_url":"https://api.github.com/users/pulibrary/repos","events_url":"https://api.github.com/users/pulibrary/events{/privacy}","received_events_url":"https://api.github.com/users/pulibrary/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulibrary/pul_solr","description":"PU Library Solr Configs and Specs","fork":false,"url":"https://api.github.com/repos/pulibrary/pul_solr","forks_url":"https://api.github.com/repos/pulibrary/pul_solr/forks","keys_url":"https://api.github.com/repos/pulibrary/pul_solr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulibrary/pul_solr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulibrary/pul_solr/teams","hooks_url":"https://api.github.com/repos/pulibrary/pul_solr/hooks","issue_events_url":"https://api.github.com/repos/pulibrary/pul_solr/issues/events{/number}","events_url":"https://api.github.com/repos/pulibrary/pul_solr/events","assignees_url":"https://api.github.com/repos/pulibrary/pul_solr/assignees{/user}","branches_url":"https://api.github.com/repos/pulibrary/pul_solr/branches{/branch}","tags_url":"https://api.github.com/repos/pulibrary/pul_solr/tags","blobs_url":"https://api.github.com/repos/pulibrary/pul_solr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulibrary/pul_solr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulibrary/pul_solr/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulibrary/pul_solr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulibrary/pul_solr/statuses/{sha}","languages_url":"https://api.github.com/repos/pulibrary/pul_solr/languages","stargazers_url":"https://api.github.com/repos/pulibrary/pul_solr/stargazers","contributors_url":"https://api.github.com/repos/pulibrary/pul_solr/contributors","subscribers_url":"https://api.github.com/repos/pulibrary/pul_solr/subscribers","subscription_url":"https://api.github.com/repos/pulibrary/pul_solr/subscription","commits_url":"https://api.github.com/repos/pulibrary/pul_solr/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulibrary/pul_solr/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulibrary/pul_solr/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulibrary/pul_solr/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulibrary/pul_solr/contents/{+path}","compare_url":"https://api.github.com/repos/pulibrary/pul_solr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulibrary/pul_solr/merges","archive_url":"https://api.github.com/repos/pulibrary/pul_solr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulibrary/pul_solr/downloads","issues_url":"https://api.github.com/repos/pulibrary/pul_solr/issues{/number}","pulls_url":"https://api.github.com/repos/pulibrary/pul_solr/pulls{/number}","milestones_url":"https://api.github.com/repos/pulibrary/pul_solr/milestones{/number}","notifications_url":"https://api.github.com/repos/pulibrary/pul_solr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulibrary/pul_solr/labels{/name}","releases_url":"https://api.github.com/repos/pulibrary/pul_solr/releases{/id}","deployments_url":"https://api.github.com/repos/pulibrary/pul_solr/deployments","created_at":"2016-04-19T14:20:01Z","updated_at":"2016-04-19T14:20:50Z","pushed_at":"2016-10-28T15:28:53Z","git_url":"git://github.com/pulibrary/pul_solr.git","ssh_url":"git@github.com:pulibrary/pul_solr.git","clone_url":"https://github.com/pulibrary/pul_solr.git","svn_url":"https://github.com/pulibrary/pul_solr","homepage":null,"size":28461,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulibrary/pul_solr/pulls/24"},"html":{"href":"https://github.com/pulibrary/pul_solr/pull/24"},"issue":{"href":"https://api.github.com/repos/pulibrary/pul_solr/issues/24"},"comments":{"href":"https://api.github.com/repos/pulibrary/pul_solr/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/pulibrary/pul_solr/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/pulibrary/pul_solr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulibrary/pul_solr/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/pulibrary/pul_solr/statuses/e7e6c6f0c641ebeaaf186e27828064fddec6f38c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":86,"deletions":67,"changed_files":10}}
{"actor":{"display_login":"codeforkjeff"}}