spotlight-dor-resources 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c91af5162db19c4708a4e80f442be4b98d0bd6e
4
- data.tar.gz: d03f5c8af01006bcff3f49446382f409f609d315
3
+ metadata.gz: 530510440644d53bf3b9202ce791767450d5c1f5
4
+ data.tar.gz: a22368a3abd223409a70aceb55c455a789b24891
5
5
  SHA512:
6
- metadata.gz: f0946634a2e184c61ecdf088c863da61f5a702fc5a0c2261239782ce6aa19a49867e0216c14b3d6672097e177797da488620451fa0566ccb52fb42c1f4108965
7
- data.tar.gz: 1c5fa858bfb69890bae753b6821952370bda52d2ccaf8b2ff7b6b0c1ce83fdeda5b485a40e48e924532f214c7715a7bf094585c50d862b695ffb66e56c3f6831
6
+ metadata.gz: fee7ddcd17c1a30a1f160e30f18f880710764169b12a2d30a9dfccc3c84978c23e55e930cbabf531e4c2ad411633099a633591bfb08ce02539254cf7ea4e5678
7
+ data.tar.gz: f002d055517684527f5b23f15552ea7618363b6ad154c1cb574d8ef42839eb24be2f40b67a889fb7f810a64d1af70503b586929a1db1de1edd37540957c37ce0
data/README.md CHANGED
@@ -40,12 +40,19 @@ This will download a test jetty instance (to run Solr), generate a testing app a
40
40
 
41
41
  ### Indexing with the generated test app
42
42
 
43
+ $ rake exhibits:configure_solr
44
+ $ rake jetty:clean
45
+ $ rake jetty:start
43
46
  $ bundle exec rake engine_cart:console
44
47
 
45
48
  ```ruby
46
49
  druid="ty202yt2402" # a feigenbaum druid
47
50
  druid="cx709ty7769" # a revs druid
48
51
  purl=Spotlight::Resources::Purl.new({:url=>"https://purl.stanford.edu/#{druid}"})
52
+ purl.exhibit=Spotlight::Exhibit.new # need an exhibit to attach the test solr docs too
53
+ purl.exhibit.title='stanford'
54
+ purl.exhibit.save
55
+
49
56
  puts purl.to_solr.first # the solr document as a hash
50
57
  public_xml=purl.resource.public_xml # nokogiri doc with all public XML
51
58
  mods=purl.resource.mods # nokogiri doc with just the MODs
data/Rakefile CHANGED
@@ -22,6 +22,7 @@ require 'exhibits_solr_conf'
22
22
  desc 'Run tests in generated test Rails app with generated Solr instance running'
23
23
  task ci: ['engine_cart:generate', 'jetty:clean', 'exhibits:configure_solr'] do
24
24
  ENV['environment'] = 'test'
25
+ ENV['TEST_JETTY_PORT'] = '8983'
25
26
  jetty_params = Jettywrapper.load_config
26
27
  jetty_params[:startup_wait] = 60
27
28
 
@@ -2,7 +2,7 @@ module Spotlight
2
2
  module Dor
3
3
  # :nodoc:
4
4
  module Resources
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
7
7
  end
8
8
  end
@@ -27,4 +27,12 @@ describe 'gdor indexing integration test', :vcr do
27
27
  it 'has exhibit-specific indexing' do
28
28
  expect(subject).to include 'full_image_url_ssm'
29
29
  end
30
+
31
+ it 'can write doc to solr with latest exhibits_solr_conf', vcr: false do
32
+ # hd778hw9236 has B.C. date -- good for checking Solr field types
33
+ r = Spotlight::Resources::Purl.new(url: 'https://purl.stanford.edu/hd778hw9236')
34
+ allow(r).to receive(:to_global_id).and_return('x')
35
+ allow(r).to receive(:exhibit).and_return(exhibit)
36
+ r.reindex
37
+ end
30
38
  end
data/spec/spec_helper.rb CHANGED
@@ -28,6 +28,7 @@ VCR.configure do |config|
28
28
  config.cassette_library_dir = "spec/vcr_cassettes"
29
29
  config.hook_into :webmock
30
30
  config.configure_rspec_metadata!
31
+ config.allow_http_connections_when_no_cassette = true
31
32
  end
32
33
 
33
34
  RSpec.configure do |config|
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency 'faraday'
24
24
  spec.add_dependency 'solrizer'
25
- spec.add_dependency 'gdor-indexer', '>=0.4.0' # for new pub date methods
25
+ spec.add_dependency 'gdor-indexer', '>=0.4.1' # for new pub date methods
26
26
  # newer versions of harvestdor-indexer have performance improvements for collections
27
27
  spec.add_dependency 'harvestdor-indexer', '~> 2.3'
28
28
  spec.add_dependency 'rails'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotlight-dor-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.4.0
47
+ version: 0.4.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.4.0
54
+ version: 0.4.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: harvestdor-indexer
57
57
  requirement: !ruby/object:Gem::Requirement