itamae 1.0.0.beta31 → 1.0.0.beta32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8250002526603495eda53090a2e48d2864cebc3a
4
- data.tar.gz: 4e353bf04cf6e2a397383166449ee8e834c8f7ea
3
+ metadata.gz: 5e05142ebe2064c8ea35f6ca3f54fe9ce1df6383
4
+ data.tar.gz: 292bfe518cb67a305ee08891459ecb5b5f6c0f66
5
5
  SHA512:
6
- metadata.gz: 3bae35fde9745a1c1988cb258ee33dd55f64d30e48feb41a5caf93b27788f86c7bae40607522fa6c9ae03dee028b876deb163004e599461b2b0ef4c3f668e1d1
7
- data.tar.gz: 2eab68ec98e34db0d50936cc80d68ea1f262267d19285888a3bb6838809d9c2eef617fa1c57a1a5c0b01dbc390ffedaa934a6cbc93b4c9fb60f72b163ad75218
6
+ metadata.gz: 935258ed1e922445a2f7a501739519d5df67177e1351fb897b0959946f65b2c354de75f9c0241ad91a686a649593a2df254de249b3a26a405bd961b5183894a3
7
+ data.tar.gz: 9360186a116aea90b32b9bc5d1627c93756a7981b15ca2fdb5031c9ca2d5cb87e4f06e93273edd2c8ba3576571f13e81e76700642b83a198a797d75146663844
data/lib/itamae/recipe.rb CHANGED
@@ -69,15 +69,17 @@ module Itamae
69
69
  end
70
70
 
71
71
  def find_recipe_from_load_path(recipe)
72
- target = recipe.gsub(/::/, '/')
72
+ target = recipe.gsub('::', '/')
73
73
  target += '.rb' if target !~ /\.rb$/
74
74
  plugin_name = recipe.split('::')[0]
75
75
 
76
- $LOAD_PATH.find do |path|
77
- if path =~ %r{/itamae-plugin-recipe-#{plugin_name}}
78
- return File.join(path, 'itamae', 'plugin', 'recipe', target)
79
- end
76
+ spec = Gem.loaded_specs.values.find do |spec|
77
+ spec.name == "itamae-plugin-recipe-#{plugin_name}"
80
78
  end
79
+
80
+ return nil unless spec
81
+
82
+ File.join(spec.lib_dirs_glob, 'itamae', 'plugin', 'recipe', target)
81
83
  end
82
84
 
83
85
  def define(name, params = {}, &block)
@@ -1 +1 @@
1
- 1.0.0.beta31
1
+ 1.0.0.beta32
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta31
4
+ version: 1.0.0.beta32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai