importmap_mocha-rails 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +2 -7
- data/config/importmap.rb +0 -16
- data/lib/importmap_mocha/engine.rb +0 -50
- data/lib/importmap_mocha/version.rb +0 -5
- data/lib/importmap_mocha-rails.rb +0 -5
- data/lib/tasks/importmap_mocha/rails_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86ad7a8af87278157916f9355aa84c1eec7564969abaf41335585f667bdc815b
|
4
|
+
data.tar.gz: 52c7eb3feaafa2f2c3dbefebe343edbe29863bf13d404a56242b13a1604b5dce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 298fce026b6f26defde4dd2ec9b23b2a0314b4b803cb719833594fdc47ef2b54307ee0afb2346110bc7f4c3e241b78d11b17c4055ef06e38af07dc7a1896cb6d
|
7
|
+
data.tar.gz: 147026a848c6ce0d2d2901c38b5fbf88e72c8e3f864fc00d21885f7cf096537e358386bfc91b625975720d4d9fb6d6b8f99f50923d3521f9a640e65fdb1f2767
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: importmap_mocha-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -52,11 +52,6 @@ files:
|
|
52
52
|
- app/controllers/importmap_mocha/test_controller.rb
|
53
53
|
- app/helpers/importmap_mocha/test_helper.rb
|
54
54
|
- app/views/importmap_mocha/test/index.html.erb
|
55
|
-
- config/importmap.rb
|
56
|
-
- lib/importmap_mocha-rails.rb
|
57
|
-
- lib/importmap_mocha/engine.rb
|
58
|
-
- lib/importmap_mocha/version.rb
|
59
|
-
- lib/tasks/importmap_mocha/rails_tasks.rake
|
60
55
|
homepage: https://github.com/tohosaku/importmap_mocha-rails
|
61
56
|
licenses:
|
62
57
|
- MIT
|
data/config/importmap.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
pin "importmap_mocha"
|
2
|
-
|
3
|
-
pin "@mswjs/interceptors", to: "@mswjs--interceptors.js"
|
4
|
-
pin "@mswjs/interceptors/presets/browser" , to: "@mswjs--interceptors--presets--browser.js"
|
5
|
-
pin "chai", to: "chai.js"
|
6
|
-
|
7
|
-
pin "@open-draft/logger", to: "@open-draft--logger.js" # @0.3.0
|
8
|
-
pin "is-node-process", to: "is-node-process.js" # @1.2.0
|
9
|
-
pin "outvariant", to: "outvariant.js" # @1.4.0
|
10
|
-
pin "@open-draft/until", to: "@open-draft--until.js" # @2.1.0
|
11
|
-
pin "@open-draft/deferred-promise", to: "@open-draft--deferred-promise.js" # @2.2.0
|
12
|
-
pin "strict-event-emitter", to: "strict-event-emitter.js" # @0.5.1
|
13
|
-
|
14
|
-
Rails.application.config.importmap_mocha_path.each do |path|
|
15
|
-
pin_all_from path
|
16
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ImportmapMocha
|
4
|
-
class Engine < ::Rails::Engine
|
5
|
-
config.before_initialize do
|
6
|
-
Rails.application.config.importmap_mocha_path = []
|
7
|
-
%w[test spec].each do |d|
|
8
|
-
path = Rails.root.join(d, 'javascripts')
|
9
|
-
Rails.application.config.importmap_mocha_path << path if path.exist?
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
initializer 'importmap_mocha.assets' do
|
14
|
-
if Rails.application.config.respond_to?(:assets)
|
15
|
-
Rails.application.config.assets.paths << Engine.root.join('app/assets/javascripts')
|
16
|
-
Rails.application.config.assets.paths << Engine.root.join('app/assets/stylesheets')
|
17
|
-
Rails.application.config.assets.paths << Engine.root.join('vendor/javascripts')
|
18
|
-
Rails.application.config.assets.paths << Engine.root.join('vendor/stylesheets')
|
19
|
-
Rails.application.config.assets.paths += Rails.application.config.importmap_mocha_path
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
PRECOMPILE_ASSETS = %w[importmap_mocha.js chai.js mocha.js mocha.css].freeze
|
24
|
-
|
25
|
-
initializer 'turbo.assets' do
|
26
|
-
Rails.application.config.assets.precompile += PRECOMPILE_ASSETS if Rails.application.config.respond_to?(:assets)
|
27
|
-
end
|
28
|
-
|
29
|
-
initializer 'importmap_mocha.importmap', before: 'importmap' do |app|
|
30
|
-
app.config.importmap.paths << Engine.root.join('config/importmap.rb') if Rails.application.respond_to?(:importmap)
|
31
|
-
end
|
32
|
-
|
33
|
-
initializer 'importmap_mocha.routes' do
|
34
|
-
Rails.application.routes.prepend do
|
35
|
-
scope module: 'importmap_mocha' do
|
36
|
-
get '/rails/info/mocha' => 'test#index'
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
initializer 'importmap_mocha.config' do
|
42
|
-
unless Rails.application.config.respond_to?(:importmap_mocha_style)
|
43
|
-
Rails.application.config.importmap_mocha_style = 'bdd'
|
44
|
-
end
|
45
|
-
unless Rails.application.config.respond_to?(:importmap_mocha_scripts)
|
46
|
-
Rails.application.config.importmap_mocha_scripts = []
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|