openseadragon 0.5.0 → 0.7.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
- SHA1:
3
- metadata.gz: 8d66f78f52a81526049f7be9b14ddc64669a5977
4
- data.tar.gz: 248b34157489eb40c6cdfbf9e2dac3b2fd1aca87
2
+ SHA256:
3
+ metadata.gz: 39aab662d767f7253ab361fd872a045e8052d5adf007e7daa0a3bd2cb02b9e31
4
+ data.tar.gz: 2b64d32f2c80655ac8e54cc413bbcfae54ecab8f8ead082ff4572b249a9997d6
5
5
  SHA512:
6
- metadata.gz: 3aa9e60434688b0484bafd24a0a78c24a83331c85875f2e020ac5b0705de6419b7eab9a70d76479485f0ea8e0bc5ca46d9bb0b164a7ce0ce41b1a5696fbbc9a1
7
- data.tar.gz: fd097f52ff4581b8da589e06ddd02e009539da2f632e545b6e97f211a51c71b46fb5f4f3caf50ac305842d46716f71af08d4238eccf18c6eac522f9f92f2614d
6
+ metadata.gz: 864860428049aeb71b90f7c5f4b9f779c2861384ba26554acb23d2fbb26e70a42f59921e52b38c4de04f6be3561255ac6f8b3bf9b752f903ac7511c75c4a0a30
7
+ data.tar.gz: e363a199c6c5dfe4fd23df36ba45a6cbb3c15d3aa31fff5d7d331c01f7866dc112afe02195fd02924d66560dc868b09c631a985e139165e8ef11ca0db207598a
@@ -0,0 +1,34 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ rails_version: [7.2.0]
15
+ ruby: [3.2, 3.3]
16
+ include:
17
+ - ruby: 3.3
18
+ rails_version: 7.1.3.4
19
+ - ruby: 3.2
20
+ rails_version: 7.0.8.4
21
+ - ruby: 3.1
22
+ rails_version: 6.1.7.8
23
+ env:
24
+ RAILS_VERSION: ${{ matrix.rails_version }}
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ - name: Set up Ruby ${{ matrix.ruby }}
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ - name: Install dependencies with Rails ${{ matrix.rails_version }}
32
+ run: bundle install
33
+ - name: Run tests
34
+ run: bundle exec rake
data/Gemfile CHANGED
@@ -21,19 +21,12 @@ else
21
21
  if ENV['RAILS_VERSION']
22
22
  if ENV['RAILS_VERSION'] == 'edge'
23
23
  gem 'rails', github: 'rails/rails'
24
- ENV['ENGINE_CART_RAILS_OPTIONS']= "--edge --skip-turbolinks"
24
+ ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
25
+ elsif ENV['RAILS_VERSION'] < '6'
26
+ gem 'sprockets', '< 4'
25
27
  else
26
28
  gem 'rails', ENV['RAILS_VERSION']
27
29
  end
28
30
  end
29
-
30
- if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] =~ /^4.2/
31
- gem 'responders', "~> 2.0"
32
- gem 'sass-rails', ">= 5.0"
33
- elsif ENV['RAILS_VERSION'] =~ /^5.0/ || ENV['RAILS_VERSION'] == 'edge'
34
- # nop
35
- else
36
- gem 'sass-rails', "< 5.0"
37
- end
38
31
  end
39
32
  # END ENGINE_CART BLOCK
@@ -0,0 +1 @@
1
+ //= link_tree ../../../vendor/assets/images
@@ -5,7 +5,8 @@
5
5
  $('picture[data-openseadragon]').openseadragon();
6
6
  }
7
7
 
8
- var handler = 'ready';
8
+ const jquery3 = parseInt($.fn.jquery.split('.')[0]) >= 3;
9
+ let handler = 'ready';
9
10
  if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {
10
11
  // Turbolinks 5
11
12
  if (Turbolinks.BrowserAdapter) {
@@ -15,5 +16,14 @@
15
16
  handler = 'page:load ready';
16
17
  }
17
18
  }
18
- $(document).on(handler, initOpenSeadragon);
19
+
20
+ // Support for $(document).on( "ready", handler ) was removed in jQuery 3
21
+ if (jquery3 && handler.includes('ready')) {
22
+ handler = handler.replace('ready', '').trim();
23
+ $(initOpenSeadragon);
24
+ }
25
+
26
+ if (handler) {
27
+ $(document).on(handler, initOpenSeadragon);
28
+ }
19
29
  })(jQuery);
@@ -3,10 +3,14 @@ require 'rails/generators'
3
3
  module Openseadragon
4
4
  class Install < Rails::Generators::Base
5
5
  source_root File.expand_path('../templates', __FILE__)
6
-
6
+
7
7
  def assets
8
8
  copy_file "openseadragon.css", "app/assets/stylesheets/openseadragon.css"
9
9
  copy_file "openseadragon.js", "app/assets/javascripts/openseadragon.js"
10
+
11
+ if File.exist? 'app/assets/config/manifest.js'
12
+ append_to_file 'app/assets/config/manifest.js', "\n//= link openseadragon-assets\n"
13
+ end
10
14
  end
11
15
 
12
16
  def inject_helper
@@ -15,4 +19,4 @@ module Openseadragon
15
19
  end
16
20
  end
17
21
  end
18
- end
22
+ end
@@ -1,7 +1,19 @@
1
- module Openseadragon
1
+ module Openseadragon
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace Openseadragon
4
4
 
5
+ config.before_configuration do
6
+ # see https://github.com/fxn/zeitwerk#for_gem
7
+ # openseadragon_rails puts a generator into LOCAL APP lib/generators, so tell
8
+ # zeitwerk to ignore the whole directory? If we're using a recent
9
+ # enough version of Rails to have zeitwerk config
10
+ #
11
+ # See: https://github.com/cbeer/engine_cart/issues/117
12
+ if Rails.try(:autoloaders).try(:main).respond_to?(:ignore)
13
+ Rails.autoloaders.main.ignore(Rails.root.join('lib/generators'))
14
+ end
15
+ end
16
+
5
17
  initializer 'openseadragon.assets.precompile' do |app|
6
18
  app.config.assets.precompile += %w[openseadragon/*.png]
7
19
  end
@@ -1,3 +1,3 @@
1
1
  module Openseadragon
2
- VERSION = "0.5.0"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["justin@curationexperts.com", "cabeer@stanford.edu", "jchris@stanford.edu"],
11
11
  spec.summary = %q{OpenSeadragon assets and helpers for Rails. http://openseadragon.github.io/}
12
12
  spec.description = %q{OpenSeadragon is a javascript library for displaying tiling images. This gem packages those assets and some Rails helpers for using them}
13
- spec.homepage = "https://github.com/iiif/openseadragon-rails"
13
+ spec.homepage = "https://github.com/sul-dlss/openseadragon-rails"
14
14
  spec.license = "Apache 2.0"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.5"
21
+ spec.add_development_dependency "bundler"
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "engine_cart"
24
- spec.add_development_dependency "rspec-rails", '~> 3.1'
24
+ spec.add_development_dependency "rspec-rails", '~> 6.1'
25
25
  spec.add_development_dependency "capybara"
26
26
  spec.add_development_dependency "sqlite3"
27
27
 
28
- spec.add_dependency 'rails', '> 3.2.0'
28
+ spec.add_dependency 'rails', '> 6.1.0'
29
29
  end