blacklight-marc 5.5.0 → 5.10.0

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.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -2
  3. data/blacklight-marc.gemspec +2 -2
  4. data/lib/blacklight/marc/catalog.rb +2 -2
  5. data/lib/blacklight/marc/version.rb +1 -1
  6. data/lib/generators/blacklight/marc/install_generator.rb +57 -0
  7. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/config-test.properties +0 -0
  8. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/config.properties +0 -0
  9. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/index.properties +0 -0
  10. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/index_scripts/dewey.bsh +0 -0
  11. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/index_scripts/format.bsh +0 -0
  12. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/translation_maps/README_MAPS +0 -0
  13. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/translation_maps/callnumber_map.properties +0 -0
  14. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/translation_maps/composition_era_map.properties +0 -0
  15. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/translation_maps/country_map.properties +0 -0
  16. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/translation_maps/format_map.properties +0 -0
  17. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/translation_maps/instrument_map.properties +0 -0
  18. data/lib/generators/{blacklight_marc → blacklight/marc}/templates/config/SolrMarc/translation_maps/language_map.properties +0 -0
  19. data/lib/generators/blacklight_marc/marc_generator.rb +4 -52
  20. data/lib/railties/solr_marc.rake +1 -1
  21. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  22. metadata +20 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75e8d8a88f4be661346d59f902344e109f02e672
4
- data.tar.gz: 024738cc6d5c0e46cee5c91f2881afc7d3569f61
3
+ metadata.gz: e8e43d7c8a9b57de3e972546f7c341ca55545a30
4
+ data.tar.gz: fe618a0f2c13669d32457b783c47700096ca9ef0
5
5
  SHA512:
6
- metadata.gz: a1ce25d123310609c7fd38aa374bc9128a5c439974f5944285120b14501f69826cd559d2537e6b6c5cd1533cdc494ee0dfdbe05a7a9a142785f1595f6233b9ce
7
- data.tar.gz: ddb00a986af2a989198c6def0b246858e0b501f57416805f056315f476bbede3622a52cde86420d9466ae7619b70a3e029bd119d5a09325c2aecfe7cbac94aab
6
+ metadata.gz: d55e417c12342255ba4839a1baa6364324e52141039adab7860fa02638734e9711611a5f3eb63df8404c073eeb02a6f38d6ed098d213cdcaa8a6339fae366d38
7
+ data.tar.gz: 9050cf52fad6e56be7900fd07b53c9bdd8513ad807f2426f5e16565c81e7c578b17f61ed9795970cc0f152cf14b6a44443b0a243abcbfc3352be09533a84735f
data/Rakefile CHANGED
@@ -1,10 +1,12 @@
1
1
  require "bundler/gem_tasks"
2
- ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.2.zip"
2
+ ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.3.zip"
3
3
 
4
4
  require 'jettywrapper'
5
5
  require 'rspec/core/rake_task'
6
6
  require 'engine_cart/rake_task'
7
7
 
8
+ EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
9
+
8
10
  RSpec::Core::RakeTask.new(:spec)
9
11
 
10
12
  task :default => [:ci]
@@ -30,7 +32,7 @@ namespace :blacklight_marc do
30
32
  end
31
33
 
32
34
  desc "Clean out the test rails app"
33
- task :clean => ['engine_cart:clean', 'jetty:clean'] do
35
+ task :clean => ['jetty:clean'] do
34
36
  end
35
37
 
36
38
  desc "Create the test rails app"
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "blacklight", "~> 5.8"
20
+ spec.add_dependency "blacklight", "~> 5.10"
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.3"
23
23
  spec.add_development_dependency "rake"
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "rspec-activemodel-mocks"
26
26
  spec.add_development_dependency "jettywrapper"
27
27
  spec.add_development_dependency "capybara"
28
- spec.add_development_dependency "engine_cart", "~> 0.4"
28
+ spec.add_development_dependency "engine_cart", "~> 0.6"
29
29
 
30
30
  spec.add_dependency "rails"
31
31
  # Let's allow future versions of marc, count on
@@ -1,7 +1,7 @@
1
1
  module Blacklight::Marc
2
2
  module Catalog
3
3
  def librarian_view
4
- @response, @document = get_solr_response_for_doc_id params[:id]
4
+ @response, @document = fetch params[:id]
5
5
 
6
6
  respond_to do |format|
7
7
  format.html
@@ -11,7 +11,7 @@ module Blacklight::Marc
11
11
 
12
12
  # grabs a bunch of documents to export to endnote
13
13
  def endnote
14
- @response, @documents = get_solr_response_for_document_ids(params[:id])
14
+ @response, @documents = fetch(Array(params[:id]))
15
15
  respond_to do |format|
16
16
  format.endnote { render :layout => false }
17
17
  end
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Marc
3
- VERSION = "5.5.0"
3
+ VERSION = "5.10.0"
4
4
  end
5
5
  end
@@ -0,0 +1,57 @@
1
+ require 'rails/generators'
2
+
3
+ module Blacklight::Marc
4
+ class InstallGenerator < Rails::Generators::Base
5
+
6
+ source_root File.expand_path('../templates', __FILE__)
7
+
8
+ desc """
9
+ 1. Creates config/SolrMarc/... with settings for SolrMarc
10
+ 2. Creates a CatalogController with some some demo fields for MARC-like data
11
+ 3. Injects MARC-specific behaviors into the SolrDocument
12
+ 4. Injects MARC-specific behaviors into the CatalogController
13
+ """
14
+
15
+ # Copy all files in templates/config directory to host config
16
+ def create_configuration_files
17
+ directory("config/SolrMarc")
18
+ end
19
+
20
+ # add MARC-specific extensions to the solr document
21
+ def add_marc_extension_to_solrdocument
22
+
23
+ insert_into_file "app/models/solr_document.rb", :after => "include Blacklight::Solr::Document" do <<EOF
24
+
25
+ # The following shows how to setup this blacklight document to display marc documents
26
+ extension_parameters[:marc_source_field] = :marc_display
27
+ extension_parameters[:marc_format_type] = :marcxml
28
+ use_extension( Blacklight::Solr::Document::Marc) do |document|
29
+ document.key?( :marc_display )
30
+ end
31
+
32
+ field_semantics.merge!(
33
+ :title => "title_display",
34
+ :author => "author_display",
35
+ :language => "language_facet",
36
+ :format => "format"
37
+ )
38
+
39
+ EOF
40
+ end
41
+ end
42
+
43
+ # Add MARC behaviors to the catalog controller
44
+ def inject_blacklight_controller_behavior
45
+ # prepend_file("app/controllers/application_controller.rb", "require 'blacklight/controller'\n\n")
46
+ inject_into_class "app/controllers/catalog_controller.rb", "CatalogController", :after => "include Blacklight::Catalog" do
47
+ " include Blacklight::Marc::Catalog\n"
48
+ end
49
+ end
50
+
51
+
52
+ def inject_blacklight_marc_routes
53
+ route('Blacklight::Marc.add_routes(self)')
54
+ end
55
+
56
+ end
57
+ end
@@ -1,57 +1,9 @@
1
- require 'rails/generators'
2
-
3
1
  module BlacklightMarc
4
2
  class MarcGenerator < Rails::Generators::Base
5
3
 
6
- source_root File.expand_path('../templates', __FILE__)
7
-
8
- desc """
9
- 1. Creates config/SolrMarc/... with settings for SolrMarc
10
- 2. Creates a CatalogController with some some demo fields for MARC-like data
11
- 3. Injects MARC-specific behaviors into the SolrDocument
12
- 4. Injects MARC-specific behaviors into the CatalogController
13
- """
14
-
15
- # Copy all files in templates/config directory to host config
16
- def create_configuration_files
17
- directory("config/SolrMarc")
18
- end
19
-
20
- # add MARC-specific extensions to the solr document
21
- def add_marc_extension_to_solrdocument
22
-
23
- insert_into_file "app/models/solr_document.rb", :after => "include Blacklight::Solr::Document" do <<EOF
24
-
25
- # The following shows how to setup this blacklight document to display marc documents
26
- extension_parameters[:marc_source_field] = :marc_display
27
- extension_parameters[:marc_format_type] = :marcxml
28
- use_extension( Blacklight::Solr::Document::Marc) do |document|
29
- document.key?( :marc_display )
30
- end
31
-
32
- field_semantics.merge!(
33
- :title => "title_display",
34
- :author => "author_display",
35
- :language => "language_facet",
36
- :format => "format"
37
- )
38
-
39
- EOF
40
- end
4
+ def generate_blacklight_marc_install
5
+ say "blacklight_marc:marc generator is deprecated; use blacklight:marc:install instead", :red
6
+ generate "blacklight:marc:install"
41
7
  end
42
-
43
- # Add MARC behaviors to the catalog controller
44
- def inject_blacklight_controller_behavior
45
- # prepend_file("app/controllers/application_controller.rb", "require 'blacklight/controller'\n\n")
46
- inject_into_class "app/controllers/catalog_controller.rb", "CatalogController", :after => "include Blacklight::Catalog" do
47
- " include Blacklight::Marc::Catalog\n"
48
- end
49
- end
50
-
51
-
52
- def inject_blacklight_marc_routes
53
- route('Blacklight::Marc.add_routes(self)')
54
- end
55
-
56
8
  end
57
- end
9
+ end
@@ -123,7 +123,7 @@ def compute_arguments
123
123
  # use :replicate_master_url for current env if present, otherwise :url
124
124
  # for current env.
125
125
  # Also take jetty_path from there if present.
126
- if c = Blacklight.solr_config
126
+ if c = Blacklight.connection_config
127
127
  arguments[:solr_url] = c[:url]
128
128
  if c[:jetty_path]
129
129
  arguments[:solr_path] ||= File.expand_path(File.join(c[:jetty_path], "solr"), Rails.root)
@@ -33,6 +33,6 @@ class TestAppGenerator < Rails::Generators::Base
33
33
  end
34
34
 
35
35
  def run_blacklight_marc_generator
36
- generate 'blacklight_marc:marc'
36
+ generate 'blacklight:marc:install'
37
37
  end
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-marc
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.0
4
+ version: 5.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2015-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blacklight
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.8'
19
+ version: '5.10'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.8'
26
+ version: '5.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.4'
117
+ version: '0.6'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.4'
124
+ version: '0.6'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rails
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -191,19 +191,20 @@ files:
191
191
  - lib/blacklight/marc/version.rb
192
192
  - lib/blacklight/solr/document/marc.rb
193
193
  - lib/blacklight/solr/document/marc_export.rb
194
+ - lib/generators/blacklight/marc/install_generator.rb
195
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/config-test.properties
196
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/config.properties
197
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/index.properties
198
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/index_scripts/dewey.bsh
199
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/index_scripts/format.bsh
200
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/translation_maps/README_MAPS
201
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/translation_maps/callnumber_map.properties
202
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/translation_maps/composition_era_map.properties
203
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/translation_maps/country_map.properties
204
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/translation_maps/format_map.properties
205
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/translation_maps/instrument_map.properties
206
+ - lib/generators/blacklight/marc/templates/config/SolrMarc/translation_maps/language_map.properties
194
207
  - lib/generators/blacklight_marc/marc_generator.rb
195
- - lib/generators/blacklight_marc/templates/config/SolrMarc/config-test.properties
196
- - lib/generators/blacklight_marc/templates/config/SolrMarc/config.properties
197
- - lib/generators/blacklight_marc/templates/config/SolrMarc/index.properties
198
- - lib/generators/blacklight_marc/templates/config/SolrMarc/index_scripts/dewey.bsh
199
- - lib/generators/blacklight_marc/templates/config/SolrMarc/index_scripts/format.bsh
200
- - lib/generators/blacklight_marc/templates/config/SolrMarc/translation_maps/README_MAPS
201
- - lib/generators/blacklight_marc/templates/config/SolrMarc/translation_maps/callnumber_map.properties
202
- - lib/generators/blacklight_marc/templates/config/SolrMarc/translation_maps/composition_era_map.properties
203
- - lib/generators/blacklight_marc/templates/config/SolrMarc/translation_maps/country_map.properties
204
- - lib/generators/blacklight_marc/templates/config/SolrMarc/translation_maps/format_map.properties
205
- - lib/generators/blacklight_marc/templates/config/SolrMarc/translation_maps/instrument_map.properties
206
- - lib/generators/blacklight_marc/templates/config/SolrMarc/translation_maps/language_map.properties
207
208
  - lib/railties/solr_marc.rake
208
209
  - spec/controllers/catalog_controller_spec.rb
209
210
  - spec/features/librarian_view_spec.rb
@@ -238,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
239
  version: '0'
239
240
  requirements: []
240
241
  rubyforge_project:
241
- rubygems_version: 2.2.2
242
+ rubygems_version: 2.4.5
242
243
  signing_key:
243
244
  specification_version: 4
244
245
  summary: MARC support for Blacklight