spina 2.3.0 → 2.3.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spina might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1e7e4d19a62bc03781a665e09f382754210d744e8f44a381faa935a2d0c4e13
4
- data.tar.gz: 04c88a4b97d1efc04074b12eb411abd55175ebf375fb90721c58b11fc899f60f
3
+ metadata.gz: c97beac4ca46c39f812ae453d8dc2c2c55e7074af2e10e96975db7dd0e7e9c74
4
+ data.tar.gz: 821c60141f3e68320c21a8f7e0c972bc042c98bd5e0c67aa8c1bd2fe2929ea36
5
5
  SHA512:
6
- metadata.gz: '031682c8e78ddb62af9eb5a556ddc1fcf093cbd503aafef22bca51769da356d7a17863e579ad85a74de2bd810ee370e0069338cbbfd1f4a242a6da381902a0a4'
7
- data.tar.gz: 3ba215dfa01aa461f0238676ec08c41dafb3e8307a1bfb12e18a29e7cca045c7be20d3b5beb95020916e910308fc57e61d742054e819d6d4d181b8b816b5b976
6
+ metadata.gz: f867838a13bf13a8092306dad90b0ac6186b05a11443f2a7d0bc8f21b7133cd4dc6d883785da430b9eab93a5447835eec3b2c02f7dbb177bea959e51927ddb64
7
+ data.tar.gz: f836d9d8be8706319f1bedaa58c15ba89a663066c2cd9eb00954d62588038a77559ddf309e9aca90438ac667557f4fb3f27682a5894e119336d35b0636cc1df7
@@ -1,11 +1,12 @@
1
1
  module Spina::SpinaHelper
2
2
 
3
- def spina_importmap_tags
3
+ def spina_importmap_tags(entry_point = "application")
4
4
  safe_join [
5
- javascript_inline_importmap_tag(Spina.config.importmap.paths),
5
+ javascript_inline_importmap_tag(Spina.config.importmap.to_json(resolver: self)),
6
+ javascript_importmap_module_preload_tags(Spina.config.importmap),
6
7
  javascript_importmap_shim_tag,
7
8
  javascript_include_tag("spina/libraries/trix"),
8
- javascript_import_module_tag("application")
9
+ javascript_import_module_tag(entry_point)
9
10
  ], "\n"
10
11
  end
11
12
 
data/lib/spina.rb CHANGED
@@ -51,8 +51,7 @@ module Spina
51
51
  self.queues = ActiveSupport::InheritableOptions.new
52
52
 
53
53
  # An importmap specifically meant for Spina
54
- self.importmap = ActiveSupport::OrderedOptions.new
55
- self.importmap.paths = Importmap::Paths.new
54
+ self.importmap = Importmap::Map.new
56
55
 
57
56
  # Tailwind purging
58
57
  # Spina will by default purge all unused Tailwind classes by scanning
data/lib/spina/engine.rb CHANGED
@@ -40,13 +40,17 @@ module Spina
40
40
  end
41
41
 
42
42
  initializer "spina.importmap" do
43
- Spina.config.importmap.paths.tap do |paths|
43
+ Spina.config.importmap.draw do
44
44
  # Stimulus & Turbo
45
- paths.asset "@hotwired/stimulus", path: "stimulus"
46
- paths.asset "@hotwired/stimulus-autoloader", path: "stimulus-autoloader"
47
- paths.asset "@hotwired/turbo-rails", path: "turbo"
45
+ pin "@hotwired/stimulus", to: "stimulus.js"
46
+ pin "@hotwired/stimulus-autoloader", to: "stimulus-autoloader.js"
47
+ pin "@hotwired/turbo-rails", to: "turbo.js"
48
48
 
49
- paths.assets_in Spina::Engine.root.join("app/assets/javascripts/spina"), append_base_path: true
49
+ # Spina entrypoint
50
+ pin "application", to: "spina/application.js"
51
+
52
+ pin_all_from Spina::Engine.root.join("app/assets/javascripts/spina/controllers"), under: "controllers", to: "spina/controllers"
53
+ pin_all_from Spina::Engine.root.join("app/assets/javascripts/spina/libraries"), under: "libraries", to: "spina/libraries"
50
54
  end
51
55
  end
52
56
 
data/lib/spina/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spina
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -182,44 +182,44 @@ dependencies:
182
182
  name: importmap-rails
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: 0.1.1
187
+ version: 0.2.7
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: 0.1.1
194
+ version: 0.2.7
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: turbo-rails
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 0.7.0
201
+ version: 0.7.2
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">="
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 0.7.0
208
+ version: 0.7.2
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: stimulus-rails
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ">="
213
+ - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 0.3.0
215
+ version: 0.3.3
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ">="
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 0.3.0
222
+ version: 0.3.3
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: babosa
225
225
  requirement: !ruby/object:Gem::Requirement