openseadragon 0.6.0 → 0.7.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 +4 -4
- data/.github/workflows/ruby.yml +20 -31
- data/app/assets/javascripts/openseadragon/rails.js +12 -2
- 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: 39aab662d767f7253ab361fd872a045e8052d5adf007e7daa0a3bd2cb02b9e31
|
4
|
+
data.tar.gz: 2b64d32f2c80655ac8e54cc413bbcfae54ecab8f8ead082ff4572b249a9997d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 864860428049aeb71b90f7c5f4b9f779c2861384ba26554acb23d2fbb26e70a42f59921e52b38c4de04f6be3561255ac6f8b3bf9b752f903ac7511c75c4a0a30
|
7
|
+
data.tar.gz: e363a199c6c5dfe4fd23df36ba45a6cbb3c15d3aa31fff5d7d331c01f7866dc112afe02195fd02924d66560dc868b09c631a985e139165e8ef11ca0db207598a
|
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
|
@@ -5,7 +5,8 @@
|
|
5
5
|
$('picture[data-openseadragon]').openseadragon();
|
6
6
|
}
|
7
7
|
|
8
|
-
|
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
|
-
|
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);
|
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
|