importmap-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
- data/lib/importmap/map.rb +1 -10
- data/lib/importmap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b87e83df8630c47a117ee7a9a854a8d34bd65112e547c27a5ae9133fb62f3c8a
|
4
|
+
data.tar.gz: b6c77a31b534440c7a6a3132e1f88d14f658ed350fcd95d446bba9d58df11bc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40f0955bde9ab6792c5b1e0b5f0fa4eed8701aa09f2b71c69dd1fe1f6b088131d2dd0089e4bd68b14172e4042a49959a7de609adc9f711bbd6e819552ec6fb11
|
7
|
+
data.tar.gz: 471bc782818dc139c3a46fb8c1896784069b8d8c8ff777cdc2880d462f5efa207021292079d7b9de127af58cd916901153f8a7981944fc52e81ad80b418907fb
|
data/lib/importmap/map.rb
CHANGED
@@ -76,16 +76,7 @@ class Importmap::Map
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def module_name_from(filename, mapping)
|
79
|
-
|
80
|
-
|
81
|
-
case
|
82
|
-
when filename_without_ext_and_version == "index" && mapping.under
|
83
|
-
mapping.under
|
84
|
-
when mapping.under
|
85
|
-
"#{mapping.under}/#{filename_without_ext_and_version}"
|
86
|
-
else
|
87
|
-
module_name
|
88
|
-
end
|
79
|
+
[ mapping.under, filename.to_s.remove(filename.extname).remove(/\/?index$/).presence ].compact.join("/")
|
89
80
|
end
|
90
81
|
|
91
82
|
def module_path_from(filename, mapping)
|
data/lib/importmap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: importmap-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
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|