blacklight-gallery 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 +4 -4
- data/.gitignore +2 -1
- data/Gemfile +22 -11
- data/app/models/concerns/blacklight/gallery/openseadragon_solr_document.rb +4 -4
- data/blacklight-gallery.gemspec +3 -2
- data/lib/blacklight/gallery/version.rb +1 -1
- data/spec/models/concerns/openseadragon_solr_document_spec.rb +37 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -2
- metadata +29 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a53aff88a47da1ba281d332cd1daea53020e37b4
|
4
|
+
data.tar.gz: 1f81070bc809fe402b42db61a4a54bfe88c866b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd5380372da4752fe3233febf9477e6308a53caf432a14b3ed954675fbfb9f69377bd08582cfeaaea94006e334e709d5de71d81cd29f659ddf730ee086d4606c
|
7
|
+
data.tar.gz: 058d3d596e076e0713ce7ed9c4c74e26f1db0e8dad0ad49078d9c2dfa41d73a1ffa4a276568964db1597f8b06436d4c11f7f3b848bfb2dc8c265ce90c9421f01
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -5,19 +5,30 @@ gemspec
|
|
5
5
|
|
6
6
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
# BEGIN ENGINE_CART BLOCK
|
9
|
+
# engine_cart: 0.8.0
|
10
|
+
# engine_cart stanza: 0.8.0
|
11
|
+
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
|
12
|
+
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path(".internal_test_app", File.dirname(__FILE__)))
|
13
|
+
if File.exist?(file)
|
14
|
+
begin
|
15
|
+
eval_gemfile file
|
16
|
+
rescue Bundler::GemfileError => e
|
17
|
+
Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
|
18
|
+
Bundler.ui.warn e.message
|
19
|
+
end
|
12
20
|
else
|
13
|
-
|
21
|
+
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
|
22
|
+
|
23
|
+
gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
|
14
24
|
|
15
|
-
|
16
|
-
|
17
|
-
gem 'sass-rails', ">= 5.0.0"
|
25
|
+
if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] =~ /^4.2/
|
26
|
+
gem 'bootstrap-sass', '>= 3.3.5.1'
|
18
27
|
gem 'responders', "~> 2.0"
|
28
|
+
gem 'sass-rails', ">= 5.0"
|
19
29
|
else
|
20
|
-
gem 'sass
|
21
|
-
gem '
|
30
|
+
gem 'bootstrap-sass', '< 3.3.5' # 3.3.5 requires sass 3.3, incompatible with sass-rails 4.x
|
31
|
+
gem 'sass-rails', "< 5.0"
|
22
32
|
end
|
23
|
-
end
|
33
|
+
end
|
34
|
+
# END ENGINE_CART BLOCK
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Blacklight::Gallery::OpenseadragonSolrDocument
|
2
|
-
def to_openseadragon
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
def to_openseadragon(view_config = nil)
|
3
|
+
return unless view_config.try(:tile_source_field) &&
|
4
|
+
fetch(view_config.tile_source_field, nil)
|
5
|
+
Array(fetch(view_config.tile_source_field))
|
6
6
|
end
|
7
7
|
end
|
data/blacklight-gallery.gemspec
CHANGED
@@ -18,18 +18,19 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "rails"
|
21
|
-
spec.add_dependency
|
21
|
+
spec.add_dependency 'blacklight', '>= 5.12', '< 7'
|
22
22
|
spec.add_dependency "bootstrap-sass", "~> 3.0"
|
23
23
|
spec.add_dependency "openseadragon", ">= 0.2.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.5"
|
26
26
|
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency 'sqlite3'
|
27
28
|
spec.add_development_dependency "rspec-rails", "~> 3.1"
|
28
29
|
spec.add_development_dependency "rspec-its"
|
29
30
|
spec.add_development_dependency "rspec-activemodel-mocks"
|
30
31
|
spec.add_development_dependency "rspec-collection_matchers"
|
31
32
|
spec.add_development_dependency "jettywrapper"
|
32
|
-
spec.add_development_dependency "engine_cart", "~> 0.
|
33
|
+
spec.add_development_dependency "engine_cart", "~> 0.8"
|
33
34
|
spec.add_development_dependency "capybara"
|
34
35
|
spec.add_development_dependency "poltergeist", ">= 1.5.0"
|
35
36
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Blacklight::Gallery::OpenseadragonSolrDocument do
|
4
|
+
subject { SolrDocument.new(fields).to_openseadragon(view_config) }
|
5
|
+
|
6
|
+
context 'when configured for the view' do
|
7
|
+
let(:fields) { { some_field: 'data' } }
|
8
|
+
let(:view_config) { double('ViewConfig', tile_source_field: :some_field) }
|
9
|
+
it 'returns the data from the document as an array' do
|
10
|
+
expect(subject).to eq ['data']
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
context 'when not configured for the view' do
|
15
|
+
let(:fields) { { some_field: 'data' } }
|
16
|
+
let(:view_config) { double('ViewConfig') }
|
17
|
+
it 'returns nil' do
|
18
|
+
expect(subject).to be_nil
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'when the document has the field' do
|
23
|
+
let(:fields) { { some_field: 'data' } }
|
24
|
+
let(:view_config) { double('ViewConfig', tile_source_field: :some_field) }
|
25
|
+
it 'returns the data from the document as an array' do
|
26
|
+
expect(subject).to eq ['data']
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'when the document does not have the field' do
|
31
|
+
let(:fields) { { some_other_field: 'data' } }
|
32
|
+
let(:view_config) { double('ViewConfig', tile_source_field: :some_field) }
|
33
|
+
it 'returns the data from the document as an array' do
|
34
|
+
expect(subject).to be_nil
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-gallery
|
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
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: blacklight
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '5.12'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '7'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '5.12'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '7'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bootstrap-sass
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +100,20 @@ dependencies:
|
|
94
100
|
- - ">="
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: sqlite3
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
97
117
|
- !ruby/object:Gem::Dependency
|
98
118
|
name: rspec-rails
|
99
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +190,14 @@ dependencies:
|
|
170
190
|
requirements:
|
171
191
|
- - "~>"
|
172
192
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0.
|
193
|
+
version: '0.8'
|
174
194
|
type: :development
|
175
195
|
prerelease: false
|
176
196
|
version_requirements: !ruby/object:Gem::Requirement
|
177
197
|
requirements:
|
178
198
|
- - "~>"
|
179
199
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0.
|
200
|
+
version: '0.8'
|
181
201
|
- !ruby/object:Gem::Dependency
|
182
202
|
name: capybara
|
183
203
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,6 +278,7 @@ files:
|
|
258
278
|
- spec/features/masonry_spec.rb
|
259
279
|
- spec/features/slideshow_spec.rb
|
260
280
|
- spec/helpers/blacklight/gallery_helper_spec.rb
|
281
|
+
- spec/models/concerns/openseadragon_solr_document_spec.rb
|
261
282
|
- spec/spec_helper.rb
|
262
283
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
263
284
|
- spec/views/catalog/_document_slideshow.html.erb_spec.rb
|
@@ -286,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
307
|
version: '0'
|
287
308
|
requirements: []
|
288
309
|
rubyforge_project:
|
289
|
-
rubygems_version: 2.4.5
|
310
|
+
rubygems_version: 2.4.5.1
|
290
311
|
signing_key:
|
291
312
|
specification_version: 4
|
292
313
|
summary: Gallery display for Blacklight
|
@@ -295,6 +316,7 @@ test_files:
|
|
295
316
|
- spec/features/masonry_spec.rb
|
296
317
|
- spec/features/slideshow_spec.rb
|
297
318
|
- spec/helpers/blacklight/gallery_helper_spec.rb
|
319
|
+
- spec/models/concerns/openseadragon_solr_document_spec.rb
|
298
320
|
- spec/spec_helper.rb
|
299
321
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
300
322
|
- spec/views/catalog/_document_slideshow.html.erb_spec.rb
|