blacklight-spotlight 0.5.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fca6298cd0b33b7047e4476caa703812750e677
4
- data.tar.gz: 6eb41f57205d58a1728cfa00a12d65132762644a
3
+ metadata.gz: 19ff3a47f366456895a647229c3c9fea67ec3b76
4
+ data.tar.gz: 7a59c82abf7fcc1b25bebc9319867779b31082f4
5
5
  SHA512:
6
- metadata.gz: 74e40b060f9ff6840fc5a8d3a6f6b0f9fba7a2dd44d38d42121a1311eee5281448e4205498f9801d7627d7a0d1bf363f11a085cde8caa39e1783db5b4c0d72cb
7
- data.tar.gz: be19923238f9a87ee0717ccdd04261571c7757dbd62d413c3042cd6eb88246582b4f1a01e3a7dd66d0b08303fae41dfb62bff91d571ace2c0e18286aec939294
6
+ metadata.gz: 059110ca3e0365f26885a4ca692b4ba405b29f0d469f1ebfc34122d45ce71aa3313860f381f963e05da98810795614a55937e0eeea64841f47392773c131ffba
7
+ data.tar.gz: 4b546801b5cc566c9440a49cebd4b6b78aac9e8abcf208f24edf05b0acc83ba0edb91e3934c4b19ef7bf8d1057d82183d9cfe0cec5e0946be9aa424d5f35ce93
data/README.md CHANGED
@@ -71,7 +71,7 @@ See the [Spotlight wiki](https://github.com/sul-dlss/spotlight/wiki) for more de
71
71
 
72
72
  Spotlight:
73
73
 
74
- * is a Rails engine and needs to be used in the context of a Rails application. We use [engine_cart](https://github.com/cbeer/engine_cart) to create an internal test application at spec/internal.
74
+ * is a Rails engine and needs to be used in the context of a Rails application. We use [engine_cart](https://github.com/cbeer/engine_cart) to create an internal test application at .internal_test_app/
75
75
  * uses Solr as part of its integration tests. We use [jettywrapper](https://github.com/projecthydra/jettywrapper) to manage the Solr instance used for development and test.
76
76
 
77
77
  Our `$ rake ci` and `$ rake spotlight:server` tasks utilize Solr and the testing rails app automatically.
@@ -7,7 +7,7 @@ module Spotlight
7
7
 
8
8
  helper Openseadragon::OpenseadragonHelper
9
9
  include Spotlight::Base
10
- include Blacklight::Catalog::SearchContext
10
+ include Blacklight::SearchContext
11
11
  include Spotlight::Catalog::AccessControlsEnforcement
12
12
 
13
13
  helper_method :get_search_results, :search_results, :search_params_logic, :fetch, :page_collection_name
@@ -22,7 +22,7 @@ module Spotlight
22
22
  add_breadcrumb t(:'spotlight.resources.upload.new.header'), new_exhibit_resources_upload_path(@exhibit)
23
23
  end
24
24
 
25
- # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
25
+ # rubocop:disable Metrics/MethodLength
26
26
  def create
27
27
  @resource.attributes = resource_params
28
28
 
@@ -38,7 +38,7 @@ module Spotlight
38
38
  redirect_to admin_exhibit_catalog_index_path(@resource.exhibit, sort: :timestamp)
39
39
  end
40
40
  end
41
- # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
41
+ # rubocop:enable Metrics/MethodLength
42
42
 
43
43
  def csv_upload
44
44
  file = csv_params[:url]
@@ -11,7 +11,6 @@ module Spotlight
11
11
 
12
12
  include Spotlight::Base
13
13
 
14
- # rubocop:disable Metrics/AbcSize
15
14
  def create
16
15
  @search.attributes = search_params
17
16
  @search.query_params = params.except(:exhibit_id, :search, *blacklisted_search_session_params).reject { |_k, v| v.blank? }
@@ -22,7 +21,6 @@ module Spotlight
22
21
  redirect_to :back, alert: @search.errors.full_messages.join('<br>'.html_safe)
23
22
  end
24
23
  end
25
- # rubocop:enable Metrics/AbcSize
26
24
 
27
25
  def index
28
26
  respond_to do |format|
@@ -44,7 +44,7 @@ module Spotlight
44
44
  def documents
45
45
  return enum_for(:documents) unless block_given?
46
46
 
47
- Blacklight::SolrResponse.new(solr_response, {}).docs.each do |result|
47
+ Blacklight::Solr::Response.new(solr_response, {}).docs.each do |result|
48
48
  yield blacklight_config.document_model.new(result)
49
49
  end
50
50
  end
@@ -4,8 +4,8 @@ require 'spotlight/engine'
4
4
  ##
5
5
  # Spotlight
6
6
  module Spotlight
7
- require 'spotlight/config'
8
- require 'spotlight/base'
9
- require 'spotlight/controller'
10
- require 'spotlight/catalog'
7
+ autoload :Config, 'spotlight/config'
8
+ autoload :Base, 'spotlight/base'
9
+ autoload :Controller, 'spotlight/controller'
10
+ autoload :Catalog, 'spotlight/catalog'
11
11
  end
@@ -125,11 +125,13 @@ module Spotlight
125
125
 
126
126
  Spotlight::Engine.config.default_browse_index_view_type = :gallery
127
127
 
128
- # Field containing the last modified date for a Solr document
129
- Blacklight::Configuration.default_values[:index].timestamp_field ||= 'timestamp'
128
+ initializer 'blacklight.configuration' do
129
+ # Field containing the last modified date for a Solr document
130
+ Blacklight::Configuration.default_values[:index].timestamp_field ||= 'timestamp'
130
131
 
131
- # Field containing the last modified date for a Solr document
132
- Blacklight::Configuration.default_values[:browse] ||= Blacklight::OpenStructWithHashAccess.new(document_actions: [])
132
+ # Default configuration for the browse view
133
+ Blacklight::Configuration.default_values[:browse] ||= Blacklight::OpenStructWithHashAccess.new(document_actions: [])
134
+ end
133
135
 
134
136
  # make blacklight configuration play nice with bootstrap_form
135
137
  Blacklight::OpenStructWithHashAccess.send(:extend, ActiveModel::Translation)
@@ -1,4 +1,4 @@
1
1
  #
2
2
  module Spotlight
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
@@ -29,7 +29,7 @@ describe Spotlight::Resources::UploadController, type: :controller do
29
29
  end
30
30
 
31
31
  describe 'POST csv_upload' do
32
- let(:csv) { fixture_file_upload(File.expand_path(File.join('..', 'fixtures', 'csv-upload-fixture.csv'), Rails.root), 'text/csv') }
32
+ let(:csv) { fixture_file_upload(File.expand_path(File.join('..', 'spec', 'fixtures', 'csv-upload-fixture.csv'), Rails.root), 'text/csv') }
33
33
  let(:serialized_csv) do
34
34
  [
35
35
  {
@@ -1,10 +1,10 @@
1
1
  require 'rails/generators'
2
2
 
3
3
  class TestAppGenerator < Rails::Generators::Base
4
- source_root '../../spec/test_app_templates'
4
+ source_root '../spec/test_app_templates'
5
5
 
6
6
  def add_gems
7
- gem 'blacklight', '~> 5.13'
7
+ gem 'blacklight', '~> 5.16'
8
8
  gem 'blacklight-gallery', '>= 0.3.0'
9
9
  gem 'jettywrapper'
10
10
  Bundler.with_clean_env do
@@ -4,7 +4,7 @@ namespace :spotlight_test do
4
4
  namespace :solr do
5
5
  desc 'Index test data into solr; must be run from within an app (see spotlight:fixtures)'
6
6
  task :seed do
7
- docs = YAML.load(File.open(File.expand_path(File.join('..', 'fixtures', 'sample_solr_documents.yml'), Rails.root)))
7
+ docs = YAML.load(File.open(File.expand_path(File.join('..', 'spec', 'fixtures', 'sample_solr_documents.yml'), Rails.root)))
8
8
  Blacklight.default_index.connection.add docs
9
9
  Blacklight.default_index.connection.commit
10
10
  end
@@ -18,7 +18,7 @@ describe Spotlight::ItemUploader do
18
18
  end
19
19
 
20
20
  before do
21
- subject.store!(File.open(File.expand_path(File.join('..', 'fixtures', '800x600.png'), Rails.root)))
21
+ subject.store!(File.open(File.expand_path(File.join('..', 'spec', 'fixtures', '800x600.png'), Rails.root)))
22
22
  end
23
23
 
24
24
  after do
@@ -52,7 +52,7 @@ describe Spotlight::ItemUploader do
52
52
  end
53
53
  end
54
54
  }
55
- subject.store!(File.open(File.expand_path(File.join('..', 'fixtures', '800x600.png'), Rails.root)))
55
+ subject.store!(File.open(File.expand_path(File.join('..', 'spec', 'fixtures', '800x600.png'), Rails.root)))
56
56
  end
57
57
 
58
58
  after do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-10-27 00:00:00.000000000 Z
14
+ date: 2015-11-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -39,14 +39,14 @@ dependencies:
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '5.13'
42
+ version: '5.16'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '5.13'
49
+ version: '5.16'
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: autoprefixer-rails
52
52
  requirement: !ruby/object:Gem::Requirement
@@ -533,16 +533,16 @@ dependencies:
533
533
  name: rubocop
534
534
  requirement: !ruby/object:Gem::Requirement
535
535
  requirements:
536
- - - ">="
536
+ - - "~>"
537
537
  - !ruby/object:Gem::Version
538
- version: '0'
538
+ version: '0.35'
539
539
  type: :development
540
540
  prerelease: false
541
541
  version_requirements: !ruby/object:Gem::Requirement
542
542
  requirements:
543
- - - ">="
543
+ - - "~>"
544
544
  - !ruby/object:Gem::Version
545
- version: '0'
545
+ version: '0.35'
546
546
  - !ruby/object:Gem::Dependency
547
547
  name: rubocop-rspec
548
548
  requirement: !ruby/object:Gem::Requirement
@@ -1270,7 +1270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1270
1270
  version: '0'
1271
1271
  requirements: []
1272
1272
  rubyforge_project:
1273
- rubygems_version: 2.4.8
1273
+ rubygems_version: 2.4.6
1274
1274
  signing_key:
1275
1275
  specification_version: 4
1276
1276
  summary: Enable librarians, curators, and others who are responsible for digital collections