openseadragon 0.8.0 → 0.9.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: 8d2b4c84da4c039322fa16dd73d8c87f4036d7e16c32d73d42febf1721f309a8
4
- data.tar.gz: 61aa2f0266974e33c7a047a79dda95ecb0636c67ab15f6083b8b96c71c9f14c4
3
+ metadata.gz: 9e3da1588ba9032045fdd971139a7c1148b9018a0116105dcadb4b92ec71eb1b
4
+ data.tar.gz: 9c4540d29f7811b595351270a85147e542ece5d5a8a158d31660b524588520e2
5
5
  SHA512:
6
- metadata.gz: db5a685f62b18680bff97b257254a71ab37c2de16713e08add72e1ff327d2b982913ddaf7d0e03035cd2d4ef5ea2f1aa570eab80903ce8bae00a692e046b25a9
7
- data.tar.gz: 7d5b4b98750b6aa36cecf7b82feb6660d7312d353770e23044243803f27d96dc9c0069112ad664b3425befc8367497cd62262cbe5af408601b92804c946b3bc6
6
+ metadata.gz: 66b8a096d5feac7919a9184c95aa27dcc212d37a544193ce446f1a9ec04987d07f7c2d2223d059fea7b76903259298b588de613787fe117f62e9ed65917a1659
7
+ data.tar.gz: 76346caa73ff55e6f0bea32ec54c11a0168a01c56ba5901b14089dcd76ad4b2c60fdc1fb00515679eccc9b8b0d3c3c1c1d81cced7c119d275cddad3641b4e6b9
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ pin_all_from File.expand_path('../app/assets/javascripts/openseadragon', __dir__), under: 'openseadragon'
4
+ pin_all_from File.expand_path('../vendor/assets/javascripts', __dir__)
@@ -5,6 +5,8 @@ module Openseadragon
5
5
  source_root File.expand_path('../templates', __FILE__)
6
6
 
7
7
  def assets
8
+ return unless defined?(Sprockets)
9
+
8
10
  copy_file "openseadragon.css", "app/assets/stylesheets/openseadragon.css"
9
11
  copy_file "openseadragon.js", "app/assets/javascripts/openseadragon.js"
10
12
 
@@ -13,6 +15,18 @@ module Openseadragon
13
15
  end
14
16
  end
15
17
 
18
+ def append_javascript
19
+ return unless defined?(Importmap) && !defined?(Sprockets)
20
+
21
+ append_to_file 'app/javascript/application.js' do
22
+ <<~CONTENT
23
+ // Openseadragon gem imports
24
+ import "openseadragon/jquery"
25
+ import "openseadragon/rails"
26
+ CONTENT
27
+ end
28
+ end
29
+
16
30
  def inject_helper
17
31
  inject_into_class 'app/controllers/application_controller.rb', ApplicationController do
18
32
  " helper Openseadragon::OpenseadragonHelper\n"
@@ -17,5 +17,9 @@ module Openseadragon
17
17
  initializer 'openseadragon.assets.precompile' do |app|
18
18
  app.config.assets.precompile += %w[openseadragon/*.png]
19
19
  end
20
+
21
+ initializer "openseadragon.importmap", before: "importmap" do |app|
22
+ app.config.importmap.paths << Engine.root.join("config/importmap.rb") if app.config.respond_to?(:importmap)
23
+ end
20
24
  end
21
25
  end
@@ -1,3 +1,3 @@
1
1
  module Openseadragon
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openseadragon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-10-08 00:00:00.000000000 Z
13
+ date: 2024-12-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -135,6 +135,7 @@ files:
135
135
  - app/helpers/openseadragon/openseadragon_helper.rb
136
136
  - app/models/openseadragon/image.rb
137
137
  - app/models/openseadragon/open_street_map.rb
138
+ - config/importmap.rb
138
139
  - lib/generators/openseadragon/install_generator.rb
139
140
  - lib/generators/openseadragon/templates/openseadragon.css
140
141
  - lib/generators/openseadragon/templates/openseadragon.js
@@ -209,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
210
  - !ruby/object:Gem::Version
210
211
  version: '0'
211
212
  requirements: []
212
- rubygems_version: 3.4.19
213
+ rubygems_version: 3.5.23
213
214
  signing_key:
214
215
  specification_version: 4
215
216
  summary: OpenSeadragon assets and helpers for Rails. http://openseadragon.github.io/