spotlight-dor-resources 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/Rakefile +1 -0
- data/lib/spotlight/dor/resources/version.rb +1 -1
- data/spec/integration/gdor_integration_spec.rb +8 -0
- data/spec/spec_helper.rb +1 -0
- data/spotlight-dor-resources.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 530510440644d53bf3b9202ce791767450d5c1f5
|
|
4
|
+
data.tar.gz: a22368a3abd223409a70aceb55c455a789b24891
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
|
@@ -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
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
54
|
+
version: 0.4.1
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: harvestdor-indexer
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|