geoblacklight_sidecar_images 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: 96f06c7af296c459455b5fe957e3beb1cb645d6858d4616fd36be7588be9a6e4
4
- data.tar.gz: c072e128bfdf21f0a2403a2ea828f2f7e810b989cf36aba7387d8e32d5c00a27
3
+ metadata.gz: 07e87a85df004575b8fe2b6c5527b6207fc680063d365cc90f344cf458c36d66
4
+ data.tar.gz: 943c20ab4215221cfcdef614d2e1d8874b1f74a538e04eb812ab252f50453dd1
5
5
  SHA512:
6
- metadata.gz: 7e22a7a9de645a3746d4136b874ce312a62a0f0f7bbe5207d5952352d5abee212a041b588d0f8898b745998b1858c95fe58e7968f7f040fa639dce80e0e1cbb1
7
- data.tar.gz: '097fe4199abadd75813720959580afd61e7753361f0e37c76ea9ec308c7a296ceb915e610f057b094252319950afd33bfe001d2017be430b150ededa74c55cae'
6
+ metadata.gz: 3946c6b696da98e7293414f8cc273051c4933f6584cd0cece3b5eb6dc1af1ebe042cd287e8ba57b6c0ac1f251634f1cb563f3695a452448d3a4a478465be3a35
7
+ data.tar.gz: d8e8b2886ad18358a55c992edf1d5cbfe43bf53e613115ad72f5908096f34f476d058387c97d9afc97f8c955b58c570f0dd534aecd7b6285c8b1f1d6793edac8
@@ -12,14 +12,14 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  strategy:
14
14
  matrix:
15
- bundler_version: [2.1.1]
15
+ bundler_version: [2.2.8]
16
16
  faraday_version: ['~> 2.0']
17
17
  steps:
18
18
  - uses: actions/checkout@v2
19
19
  - name: Set up Ruby
20
20
  uses: ruby/setup-ruby@v1
21
21
  with:
22
- ruby-version: 3.2
22
+ ruby-version: 3.3.1
23
23
  - name: Install bundler
24
24
  run: gem install bundler -v ${{ matrix.bundler_version }}
25
25
  - name: Install dependencies
@@ -33,9 +33,9 @@ jobs:
33
33
  runs-on: ubuntu-latest
34
34
  strategy:
35
35
  matrix:
36
- ruby_version: ["3.2"]
37
- rails_version: [7.0.4.2, 6.1.7.2]
38
- bundler_version: [2.1.1]
36
+ ruby_version: [3.3.1]
37
+ rails_version: [7.1.3.2, 7.0.8.1]
38
+ bundler_version: [2.2.8]
39
39
  faraday_version: ['~> 2.0']
40
40
 
41
41
  name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }} / faraday ${{ matrix.faraday_version }}
data/README.md CHANGED
@@ -19,7 +19,7 @@ This GeoBlacklight plugin captures remote images from geographic web services an
19
19
 
20
20
  ## Requirements
21
21
 
22
- * [Ruby on Rails >= 6.1.7](https://weblog.rubyonrails.org/releases/)
22
+ * [Ruby on Rails >= 5.2, < 8.0](https://weblog.rubyonrails.org/releases/)
23
23
  * [GeoBlacklight v4 or v3](https://github.com/geoblacklight/geoblacklight)
24
24
  * [ImageMagick](https://github.com/ImageMagick/ImageMagick)
25
25
 
@@ -220,7 +220,7 @@ document.sidecar.image.attached?
220
220
  document.sidecar.image.variable?
221
221
 
222
222
  # Example image_tag with resize
223
- <%= image_tag document.sidecar.image.variant(resize: "100x100"), {class: 'media-object'} %>
223
+ <%= image_tag document.sidecar.image.variant(resize_to_fit: [100, 100]), {class: 'media-object'} %>
224
224
 
225
225
  ```
226
226
 
@@ -241,7 +241,7 @@ Example for adding a thumbnail to the show page sidebar.
241
241
  <div class="card">
242
242
  <div class="card-header">Thumbnail</div>
243
243
  <div class="card-body">
244
- <%= image_tag @document.sidecar.image.variant(resize: "200"), {class: 'mr-3'} %>
244
+ <%= image_tag @document.sidecar.image.variant(resize_to_fit: [200, 200]), {class: 'mr-3'} %>
245
245
  </div>
246
246
  </div>
247
247
  <% end %>
@@ -266,7 +266,7 @@ bundle exec rake gblsci:sample_data:seed
266
266
  # Run harvest
267
267
  bundle exec rake gblsci:images:harvest_all
268
268
 
269
- # Tail log
269
+ # Tail image service log file
270
270
  tail -f log/image_service_development.log
271
271
 
272
272
  ```
@@ -22,18 +22,18 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency "image_processing", "~> 1.6"
23
23
  s.add_dependency "mimemagic", "~> 0.3"
24
24
  s.add_dependency "mini_magick", "~> 4.9.4"
25
- s.add_dependency "rails", ">= 5.2", "< 7.1"
25
+ s.add_dependency "rails", ">= 5.2", "< 8.0"
26
26
  s.add_dependency "statesman", ">= 3.4"
27
27
 
28
28
  s.add_development_dependency "byebug"
29
29
  s.add_development_dependency "capybara"
30
30
  s.add_development_dependency "webdrivers"
31
- s.add_development_dependency "database_cleaner", "~> 1.3"
32
- s.add_development_dependency "engine_cart", "~> 2.2"
33
- s.add_development_dependency "rspec-rails", "~> 3.0"
31
+ s.add_development_dependency "database_cleaner", "~> 2.0"
32
+ s.add_development_dependency "engine_cart", "~> 2.0"
33
+ s.add_development_dependency "rspec-rails", "~> 6.0"
34
34
  s.add_development_dependency "selenium-webdriver"
35
35
  s.add_development_dependency "simplecov", "~> 0.22"
36
36
  s.add_development_dependency "solr_wrapper", "~> 4.0"
37
37
  s.add_development_dependency "sprockets", "< 4"
38
- s.add_development_dependency "standard", "~> 1.24"
38
+ s.add_development_dependency "standard", "~> 1.0"
39
39
  end
@@ -12,7 +12,7 @@ module GeoblacklightSidecarImages
12
12
  DESCRIPTION
13
13
 
14
14
  def set_active_storage_processor
15
- app_config = <<-"APP"
15
+ app_config = <<-APP
16
16
 
17
17
  config.active_storage.variant_processor = :mini_magick
18
18
  APP
@@ -12,7 +12,7 @@ module GeoblacklightSidecarImages
12
12
  DESCRIPTION
13
13
 
14
14
  def config_development_jobs_queue_adapter
15
- job_config = <<-"JOBS"
15
+ job_config = <<-JOBS
16
16
  config.active_job.queue_adapter = :inline
17
17
  JOBS
18
18
 
@@ -22,7 +22,7 @@ module GeoblacklightSidecarImages
22
22
  end
23
23
 
24
24
  def include_sidecar_solrdocument
25
- sidecar = <<-"SIDECAR"
25
+ sidecar = <<-SIDECAR
26
26
  def sidecar
27
27
  # Find or create, and set version
28
28
  sidecar = SolrDocumentSidecar.where(
@@ -55,8 +55,8 @@ module Blacklight
55
55
  #
56
56
  # @param [Hash] options
57
57
  # @return [String]
58
- def render_nav_actions(options = {}, &block)
59
- render_filtered_partials(blacklight_config.navbar.partials, options, &block)
58
+ def render_nav_actions(options = {}, &)
59
+ render_filtered_partials(blacklight_config.navbar.partials, options, &)
60
60
  end
61
61
 
62
62
  ##
@@ -5,7 +5,7 @@
5
5
  <div class='col-2 thumbnail'>
6
6
  <% if document.sidecar.image.attached? %>
7
7
  <% if document.sidecar.image.variable? %>
8
- <%= image_tag document.sidecar.image.variant(resize: "200") %>
8
+ <%= image_tag document.sidecar.image.variant(resize_to_fit: [200, 200]) %>
9
9
  <% else %>
10
10
  <%= image_tag document.sidecar.image %>
11
11
  <% end %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GeoblacklightSidecarImages
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rails_helper"
3
+ require "spec_helper"
4
4
 
5
5
  describe GeoblacklightSidecarImages::StoreImageJob, type: :job do
6
6
  let(:document) { SolrDocument.new(document_attributes) }
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rails_helper"
4
3
  require "spec_helper"
5
4
  require "rake"
6
5
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rails_helper"
3
+ require "spec_helper"
4
4
 
5
5
  describe SolrDocumentSidecar do
6
6
  let(:document) { SolrDocument.new(document_attributes) }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rails_helper"
3
+ require "spec_helper"
4
4
 
5
5
  describe Geoblacklight::SolrDocument do
6
6
  let(:document) { SolrDocument.new(document_attributes) }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rails_helper"
3
+ require "spec_helper"
4
4
 
5
5
  describe GeoblacklightSidecarImages::ImageService do
6
6
  # Dynamic Map Layer
data/spec/spec_helper.rb CHANGED
@@ -1,23 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ENV["RAILS_ENV"] = "test"
3
+ ENV["RAILS_ENV"] ||= "test"
4
4
 
5
- require "simplecov"
6
- SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
5
+ # require "simplecov"
6
+ # SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
7
7
 
8
- SimpleCov.start "rails" do
9
- # @TODO
10
- # refuse_coverage_drop
11
- end
8
+ # SimpleCov.start "rails" do
9
+ # @TODO
10
+ # refuse_coverage_drop
11
+ # end
12
12
 
13
13
  require "database_cleaner"
14
+ require "capybara/rspec"
15
+ require "selenium-webdriver"
16
+ require "webdrivers"
17
+
18
+ require "rails/all"
19
+ require "blacklight"
20
+ require "geoblacklight"
21
+ require "geoblacklight_sidecar_images"
22
+
14
23
  require "engine_cart"
15
24
  EngineCart.load_application!
16
25
 
17
26
  require "rspec/rails"
18
- require "capybara/rspec"
19
- require "selenium-webdriver"
20
- require "webdrivers"
21
27
 
22
28
  def json_data(filename)
23
29
  file_content = file_fixture("#{filename}.json").read
@@ -25,6 +31,9 @@ def json_data(filename)
25
31
  end
26
32
 
27
33
  RSpec.configure do |config|
34
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
35
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
36
+
28
37
  config.use_transactional_fixtures = false
29
38
 
30
39
  config.before do
@@ -36,3 +45,7 @@ RSpec.configure do |config|
36
45
  DatabaseCleaner.clean
37
46
  end
38
47
  end
48
+
49
+ def main_app
50
+ Rails.application.class.routes.url_helpers
51
+ end
@@ -1 +1,2 @@
1
- gem 'faraday', ENV["FARADAY_VERSION"].to_s != "" ? ENV["FARADAY_VERSION"] : '>= 1.0'
1
+ gem 'faraday', ENV["FARADAY_VERSION"].to_s != "" ? ENV["FARADAY_VERSION"] : '>= 1.0'
2
+ gem 'devise'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight_sidecar_images
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Larson
8
8
  - Eliot Jordan
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-03-08 00:00:00.000000000 Z
12
+ date: 2024-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -90,7 +90,7 @@ dependencies:
90
90
  version: '5.2'
91
91
  - - "<"
92
92
  - !ruby/object:Gem::Version
93
- version: '7.1'
93
+ version: '8.0'
94
94
  type: :runtime
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
@@ -100,7 +100,7 @@ dependencies:
100
100
  version: '5.2'
101
101
  - - "<"
102
102
  - !ruby/object:Gem::Version
103
- version: '7.1'
103
+ version: '8.0'
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: statesman
106
106
  requirement: !ruby/object:Gem::Requirement
@@ -163,42 +163,42 @@ dependencies:
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '1.3'
166
+ version: '2.0'
167
167
  type: :development
168
168
  prerelease: false
169
169
  version_requirements: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '1.3'
173
+ version: '2.0'
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: engine_cart
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '2.2'
180
+ version: '2.0'
181
181
  type: :development
182
182
  prerelease: false
183
183
  version_requirements: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '2.2'
187
+ version: '2.0'
188
188
  - !ruby/object:Gem::Dependency
189
189
  name: rspec-rails
190
190
  requirement: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '3.0'
194
+ version: '6.0'
195
195
  type: :development
196
196
  prerelease: false
197
197
  version_requirements: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '3.0'
201
+ version: '6.0'
202
202
  - !ruby/object:Gem::Dependency
203
203
  name: selenium-webdriver
204
204
  requirement: !ruby/object:Gem::Requirement
@@ -261,15 +261,15 @@ dependencies:
261
261
  requirements:
262
262
  - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: '1.24'
264
+ version: '1.0'
265
265
  type: :development
266
266
  prerelease: false
267
267
  version_requirements: !ruby/object:Gem::Requirement
268
268
  requirements:
269
269
  - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '1.24'
272
- description:
271
+ version: '1.0'
272
+ description:
273
273
  email:
274
274
  - ewlarson@gmail.com
275
275
  executables: []
@@ -353,7 +353,6 @@ files:
353
353
  - spec/lib/tasks/geoblacklight_sidecar_images_spec.rb
354
354
  - spec/models/solr_document_sidecar_spec.rb
355
355
  - spec/models/solr_document_spec.rb
356
- - spec/rails_helper.rb
357
356
  - spec/services/image_service_spec.rb
358
357
  - spec/spec_helper.rb
359
358
  - spec/test_app_templates/Gemfile.extra
@@ -363,7 +362,7 @@ homepage: https://github.com/geoblacklight/geoblacklight_sidecar_images
363
362
  licenses:
364
363
  - Apache 2.0
365
364
  metadata: {}
366
- post_install_message:
365
+ post_install_message:
367
366
  rdoc_options: []
368
367
  require_paths:
369
368
  - lib
@@ -378,8 +377,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
378
377
  - !ruby/object:Gem::Version
379
378
  version: '0'
380
379
  requirements: []
381
- rubygems_version: 3.1.4
382
- signing_key:
380
+ rubygems_version: 3.5.9
381
+ signing_key:
383
382
  specification_version: 4
384
383
  summary: Store local copies of remote imagery in GeoBlacklight
385
384
  test_files: []
data/spec/rails_helper.rb DELETED
@@ -1,59 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ENV["RAILS_ENV"] ||= "test"
4
-
5
- require "spec_helper"
6
- require "database_cleaner"
7
- require "engine_cart"
8
- EngineCart.load_application!
9
-
10
- require "rspec/rails"
11
- # Add additional requires below this line. Rails is not loaded until this point!
12
-
13
- require "geoblacklight_sidecar_images"
14
-
15
- # Requires supporting ruby files with custom matchers and macros, etc, in
16
- # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
17
- # run as spec files by default. This means that files in spec/support that end
18
- # in _spec.rb will both be required and run as specs, causing the specs to be
19
- # run twice. It is recommended that you do not name files matching this glob to
20
- # end with _spec.rb. You can configure this pattern with the --pattern
21
- # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
22
- #
23
- # The following line is provided for convenience purposes. It has the downside
24
- # of increasing the boot-up time by auto-requiring all files in the support
25
- # directory. Alternatively, in the individual `*_spec.rb` files, manually
26
- # require only the support files necessary.
27
- #
28
- # Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
29
-
30
- # require 'capybara/poltergeist'
31
- # Capybara.javascript_driver = :poltergeist
32
-
33
- RSpec.configure do |config|
34
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
35
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
36
-
37
- config.before(:suite) do
38
- DatabaseCleaner.clean_with :truncation
39
- end
40
-
41
- config.before do
42
- DatabaseCleaner.strategy = if Capybara.current_driver == :rack_test
43
- :transaction
44
- else
45
- :truncation
46
- end
47
- DatabaseCleaner.start
48
- end
49
-
50
- config.after do
51
- DatabaseCleaner.clean
52
- end
53
-
54
- config.infer_spec_type_from_file_location!
55
- end
56
-
57
- def main_app
58
- Rails.application.class.routes.url_helpers
59
- end