importmap-rails 0.4.2 → 0.4.3

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: 90c8dfc1a293d3e6f5e1fbfdac6a7852a54d4fefe0179874adccccef986ffb70
4
- data.tar.gz: f54c20b0877bcf7e0a88cb15ab9a05dbeb81638c0a48a1a16687880e2e651332
3
+ metadata.gz: 06f09e5cb89d870d3ef6b604e8161926a454a81e86aef033b8a3cd65274543af
4
+ data.tar.gz: 7027b536650f7ad0d320d70d30e09c525853b0949b857ff8da8aac2ebbe87ec3
5
5
  SHA512:
6
- metadata.gz: c56e463c75ffb6e1d39d6d7edd2ab1da88d13abd674fe4db7f6cf056a505253800e121ea8cf8880d6f7eca29831340cc6e3c55f79efb66b1da2faf034935f5fd
7
- data.tar.gz: 20e1e5e714d63e188ad265f7b01130803bb4c2881aa1b65cccf3adfdcb168f891b9deb7e0f3899a9248c5cf321e47311a1dfaa7f78a5f128f346b164833f1e02
6
+ metadata.gz: f31d17177dce653b7f2ff9eef08245b52c5ccf12ab5f7536796116b771f702486ee0081e4c345d215cd69cacdaefddd6694307d684be972f61e6afa13f9fe84b
7
+ data.tar.gz: a38b6fd51717b34ef57a751f2adc882827c05a585a8a3fe87ec695bbe523f5e7657d9bfbb98da9ddcacff7ff83b3230ecf8e3167069471b3c9801fe65855679f
data/lib/importmap/map.rb CHANGED
@@ -9,14 +9,14 @@ class Importmap::Map
9
9
  end
10
10
 
11
11
  def draw(path = nil, &block)
12
- if path
12
+ if path && File.exist?(path)
13
13
  begin
14
14
  instance_eval(File.read(path))
15
15
  rescue Exception => e
16
16
  Rails.logger.error "Unable to parse import map from #{path}: #{e.message}"
17
17
  raise "Unable to parse import map from #{path}: #{e.message}"
18
18
  end
19
- else
19
+ elsif block_given?
20
20
  instance_eval(&block)
21
21
  end
22
22
 
@@ -1,3 +1,3 @@
1
1
  module Importmap
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: importmap-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson