openseadragon 0.6.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +20 -31
- data/app/assets/javascripts/openseadragon/rails.js +17 -4
- data/lib/openseadragon/engine.rb +12 -0
- data/lib/openseadragon/version.rb +1 -1
- data/openseadragon.gemspec +3 -3
- data/vendor/assets/javascripts/openseadragon/openseadragon.js +9039 -4567
- data/vendor/assets/javascripts/openseadragon/openseadragon.js.map +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d2b4c84da4c039322fa16dd73d8c87f4036d7e16c32d73d42febf1721f309a8
|
4
|
+
data.tar.gz: 61aa2f0266974e33c7a047a79dda95ecb0636c67ab15f6083b8b96c71c9f14c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db5a685f62b18680bff97b257254a71ab37c2de16713e08add72e1ff327d2b982913ddaf7d0e03035cd2d4ef5ea2f1aa570eab80903ce8bae00a692e046b25a9
|
7
|
+
data.tar.gz: 7d5b4b98750b6aa36cecf7b82feb6660d7312d353770e23044243803f27d96dc9c0069112ad664b3425befc8367497cd62262cbe5af408601b92804c946b3bc6
|
data/.github/workflows/ruby.yml
CHANGED
@@ -2,44 +2,33 @@ name: CI
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [
|
5
|
+
branches: [master]
|
6
6
|
pull_request:
|
7
|
-
branches: [
|
7
|
+
branches: [master]
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
test:
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
strategy:
|
13
13
|
matrix:
|
14
|
-
rails_version: [
|
15
|
-
ruby: [2
|
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
|
16
23
|
env:
|
17
24
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
18
25
|
steps:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
test_rails52:
|
29
|
-
runs-on: ubuntu-latest
|
30
|
-
strategy:
|
31
|
-
matrix:
|
32
|
-
rails_version: [5.2.4.4]
|
33
|
-
ruby: [2.7]
|
34
|
-
env:
|
35
|
-
RAILS_VERSION: ${{ matrix.rails_version }}
|
36
|
-
steps:
|
37
|
-
- uses: actions/checkout@v2
|
38
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
39
|
-
uses: ruby/setup-ruby@v1
|
40
|
-
with:
|
41
|
-
ruby-version: ${{ matrix.ruby }}
|
42
|
-
- name: Install dependencies with Rails ${{ matrix.rails_version }}
|
43
|
-
run: bundle install
|
44
|
-
- name: Run tests
|
45
|
-
run: bundle exec rake
|
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
|
@@ -2,11 +2,15 @@
|
|
2
2
|
|
3
3
|
(function($) {
|
4
4
|
function initOpenSeadragon() {
|
5
|
-
$('picture[data-openseadragon]').openseadragon();
|
5
|
+
$('picture[data-openseadragon]:not(:has(.openseadragon-container))').openseadragon();
|
6
6
|
}
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
const jquery3 = parseInt($.fn.jquery.split('.')[0]) >= 3;
|
9
|
+
let handler = 'ready';
|
10
|
+
|
11
|
+
if (typeof Turbo !== 'undefined') {
|
12
|
+
handler = 'turbo:load turbo:frame-load';
|
13
|
+
} else if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {
|
10
14
|
// Turbolinks 5
|
11
15
|
if (Turbolinks.BrowserAdapter) {
|
12
16
|
handler = 'turbolinks:load';
|
@@ -15,5 +19,14 @@
|
|
15
19
|
handler = 'page:load ready';
|
16
20
|
}
|
17
21
|
}
|
18
|
-
|
22
|
+
|
23
|
+
// Support for $(document).on( "ready", handler ) was removed in jQuery 3
|
24
|
+
if (jquery3 && handler.includes('ready')) {
|
25
|
+
handler = handler.replace('ready', '').trim();
|
26
|
+
$(initOpenSeadragon);
|
27
|
+
}
|
28
|
+
|
29
|
+
if (handler) {
|
30
|
+
$(document).on(handler, initOpenSeadragon);
|
31
|
+
}
|
19
32
|
})(jQuery);
|
data/lib/openseadragon/engine.rb
CHANGED
@@ -2,6 +2,18 @@ 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
|
data/openseadragon.gemspec
CHANGED
@@ -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/
|
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")
|
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
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", '~>
|
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', '>
|
28
|
+
spec.add_dependency 'rails', '> 6.1.0'
|
29
29
|
end
|