{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/comments/43405425","id":43405425,"diff_hunk":"@@ -5,47 +5,204 @@\n \n   let(:fake_druid) { 'oo000oo0000' }\n   let(:r) { Harvestdor::Indexer::Resource.new(double, fake_druid) }\n-  let(:logger) { Logger.new(StringIO.new) }\n-  let(:sdb) { GDor::Indexer::SolrDocBuilder.new(r, logger) }\n+  let(:sdb) { GDor::Indexer::SolrDocBuilder.new(r, Logger.new(StringIO.new)) }\n   let(:solr_doc) { {} }\n+  let(:mods_loc_phys_loc) do\n+    Nokogiri::XML <<-EOF\n+      <mods xmlns=\"#{Mods::MODS_NS}\">\n+        <location>\n+          <physicalLocation>#{example}</physicalLocation>\n+        </location>\n+      </mods>\n+    EOF\n+  end\n+  let(:mods_rel_item_loc_phys_loc) do\n+    Nokogiri::XML <<-EOF\n+      <mods xmlns=\"#{Mods::MODS_NS}\">\n+        <relatedItem>\n+          <location>\n+            <physicalLocation>#{example}</physicalLocation>\n+          </location>\n+        </relatedItem>\n+      </mods>\n+    EOF\n+  end\n+\n+  before do\n+    allow(r).to receive(:harvestdor_client)\n+    i = Harvestdor::Indexer.new\n+    i.logger.level = Logger::WARN\n+    allow(r).to receive(:indexer).and_return i\n+  end\n \n   describe '#add_series' do\n-    let(:smods_rec) { Stanford::Mods::Record.new }\n-    let(:mods_start) { \"<mods xmlns='#{Mods::MODS_NS}'><location><physicalLocation>\" }\n-    let(:mods_end) { '</physicalLocation></location></mods>' }\n-    before do\n-      allow(r).to receive(:harvestdor_client)\n-    end\n+    # example string as key, expected series name as value\n+    {\n+      # feigenbaum\n+      'Call Number: SC0340, Accession 2005-101': '2005-101',\n+      'Call Number: SC0340, Accession 2005-101, Box : 39, Folder: 9': '2005-101',\n+      'Call Number: SC0340, Accession 2005-101, Box: 2, Folder: 3': '2005-101',\n+      'Call Number: SC0340, Accession: 1986-052': '1986-052',\n+      'Call Number: SC0340, Accession: 1986-052, Box 3 Folder 38': '1986-052',\n+      'Call Number: SC0340, Accession: 2005-101, Box : 50, Folder: 31': '2005-101',\n+      'Call Number: SC0340, Accession: 1986-052, Box: 5, Folder: 1': '1986-052',\n+      'SC0340, Accession 1986-052': '1986-052',\n+      'SC0340, Accession 2005-101, Box 18': '2005-101',\n+      'Call Number: SC0340, Accession 2005-101, Box: 42A, Folder: 24': '2005-101',\n+      'Call Number: SC0340, Accession: 1986-052, Box: 42A, Folder: 59': '1986-052',\n+      'SC0340': nil,\n+      'SC0340, 1986-052, Box 18': nil,\n+      'Stanford University. Libraries. Department of Special Collections and University Archives': nil,\n+      # shpc (actually in <relatedItem><location><physicalLocation>)\n+      'Series Biographical Photographs | Box 42 | Folder Abbot, Nathan': 'Biographical Photographs',\n+      'Series General Photographs | Box 42 | Folder Administration building--Outer Quad': 'General Photographs',\n+      # menuez\n+      'MSS Photo 451, Series 1, Box 32, Folder 11, Sleeve 32-11-2, Frame B32-F11-S2-6': '1',\n+      'Series 1, Box 10, Folder 8': '1',\n+      # fuller\n+      'Collection: M1090 , Series: 4 , Box: 5 , Folder: 10': '4',\n+      # hummel (actually in <relatedItem><location><physicalLocation>)\n+      'Box 42 | Folder 3': nil,\n+      'Flat-box 228 | Volume 1': nil\n+    }.each do |example, expected|\n+      describe \"for example '#{example}'\" do\n+        let(:example) { example }\n+        context 'in /location/physicalLocation' do\n+          before do\n+            i = Harvestdor::Indexer.new","path":"spec/unit/spotlight/dor/indexer_spec.rb","position":76,"original_position":76,"commit_id":"1f5bf8130fac18444413399527ea576c0224cb87","original_commit_id":"1f5bf8130fac18444413399527ea576c0224cb87","user":{"login":"ndushay","id":96775,"avatar_url":"https://avatars.githubusercontent.com/u/96775?v=3","gravatar_id":"","url":"https://api.github.com/users/ndushay","html_url":"https://github.com/ndushay","followers_url":"https://api.github.com/users/ndushay/followers","following_url":"https://api.github.com/users/ndushay/following{/other_user}","gists_url":"https://api.github.com/users/ndushay/gists{/gist_id}","starred_url":"https://api.github.com/users/ndushay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndushay/subscriptions","organizations_url":"https://api.github.com/users/ndushay/orgs","repos_url":"https://api.github.com/users/ndushay/repos","events_url":"https://api.github.com/users/ndushay/events{/privacy}","received_events_url":"https://api.github.com/users/ndushay/received_events","type":"User","site_admin":false},"body":"I'll try it without.  I think I did it to quiet the annoying messages in the tests, but i may have done it in two places.","created_at":"2015-10-29T16:04:19Z","updated_at":"2015-10-29T16:04:19Z","html_url":"https://github.com/sul-dlss/spotlight-dor-resources/pull/13#discussion_r43405425","pull_request_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/comments/43405425"},"html":{"href":"https://github.com/sul-dlss/spotlight-dor-resources/pull/13#discussion_r43405425"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13","id":48773825,"html_url":"https://github.com/sul-dlss/spotlight-dor-resources/pull/13","diff_url":"https://github.com/sul-dlss/spotlight-dor-resources/pull/13.diff","patch_url":"https://github.com/sul-dlss/spotlight-dor-resources/pull/13.patch","issue_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/13","number":13,"state":"open","locked":false,"title":"index box and folder information per feigenbaum data","user":{"login":"ndushay","id":96775,"avatar_url":"https://avatars.githubusercontent.com/u/96775?v=3","gravatar_id":"","url":"https://api.github.com/users/ndushay","html_url":"https://github.com/ndushay","followers_url":"https://api.github.com/users/ndushay/followers","following_url":"https://api.github.com/users/ndushay/following{/other_user}","gists_url":"https://api.github.com/users/ndushay/gists{/gist_id}","starred_url":"https://api.github.com/users/ndushay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndushay/subscriptions","organizations_url":"https://api.github.com/users/ndushay/orgs","repos_url":"https://api.github.com/users/ndushay/repos","events_url":"https://api.github.com/users/ndushay/events{/privacy}","received_events_url":"https://api.github.com/users/ndushay/received_events","type":"User","site_admin":false},"body":"Remaining work for the branch:\n\n- [x] single valued fields for  series, box, folder\n- [x] box for non-feigenbaum colls (Closes #14)\n- [x] folder for non-feigenbaum colls (#14)\n- [x] series for non-feigenbaum colls (#14)\n- [ ] ~~display field for series/box/folder information (connects to #18)~~  this will be a separate branch and PR\n\nConnects to sul-dlss/sul-exhibits-template#51","created_at":"2015-10-26T17:52:18Z","updated_at":"2015-10-29T16:04:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df8c369006e00856260e10439363581cb08baef2","assignee":{"login":"ndushay","id":96775,"avatar_url":"https://avatars.githubusercontent.com/u/96775?v=3","gravatar_id":"","url":"https://api.github.com/users/ndushay","html_url":"https://github.com/ndushay","followers_url":"https://api.github.com/users/ndushay/followers","following_url":"https://api.github.com/users/ndushay/following{/other_user}","gists_url":"https://api.github.com/users/ndushay/gists{/gist_id}","starred_url":"https://api.github.com/users/ndushay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndushay/subscriptions","organizations_url":"https://api.github.com/users/ndushay/orgs","repos_url":"https://api.github.com/users/ndushay/repos","events_url":"https://api.github.com/users/ndushay/events{/privacy}","received_events_url":"https://api.github.com/users/ndushay/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/13/comments","statuses_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/statuses/1f5bf8130fac18444413399527ea576c0224cb87","head":{"label":"sul-dlss:index-box-folder","ref":"index-box-folder","sha":"1f5bf8130fac18444413399527ea576c0224cb87","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":17453060,"name":"spotlight-dor-resources","full_name":"sul-dlss/spotlight-dor-resources","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/spotlight-dor-resources","description":"Harvest Stanford DOR resources into a Spotlight exhibit","fork":false,"url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources","forks_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/forks","keys_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/teams","hooks_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/events","assignees_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/tags","blobs_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/subscription","commits_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/merges","archive_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/downloads","issues_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/releases{/id}","created_at":"2014-03-05T19:55:10Z","updated_at":"2015-04-20T21:28:05Z","pushed_at":"2015-10-29T01:12:40Z","git_url":"git://github.com/sul-dlss/spotlight-dor-resources.git","ssh_url":"git@github.com:sul-dlss/spotlight-dor-resources.git","clone_url":"https://github.com/sul-dlss/spotlight-dor-resources.git","svn_url":"https://github.com/sul-dlss/spotlight-dor-resources","homepage":"","size":636,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"sul-dlss:master","ref":"master","sha":"023600b3034e424bb9cbb6daf6a60a9863a6c433","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":17453060,"name":"spotlight-dor-resources","full_name":"sul-dlss/spotlight-dor-resources","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/spotlight-dor-resources","description":"Harvest Stanford DOR resources into a Spotlight exhibit","fork":false,"url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources","forks_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/forks","keys_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/teams","hooks_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/events","assignees_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/tags","blobs_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/subscription","commits_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/merges","archive_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/downloads","issues_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/releases{/id}","created_at":"2014-03-05T19:55:10Z","updated_at":"2015-04-20T21:28:05Z","pushed_at":"2015-10-29T01:12:40Z","git_url":"git://github.com/sul-dlss/spotlight-dor-resources.git","ssh_url":"git@github.com:sul-dlss/spotlight-dor-resources.git","clone_url":"https://github.com/sul-dlss/spotlight-dor-resources.git","svn_url":"https://github.com/sul-dlss/spotlight-dor-resources","homepage":"","size":636,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13"},"html":{"href":"https://github.com/sul-dlss/spotlight-dor-resources/pull/13"},"issue":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/13"},"comments":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/spotlight-dor-resources/statuses/1f5bf8130fac18444413399527ea576c0224cb87"}}}}