itamae 1.5.1 → 1.5.2

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
  SHA1:
3
- metadata.gz: 527c1c2c9aac7484eb00454e1d66d91d57e07f45
4
- data.tar.gz: 557aa8fead8d4aeb0cfc289050548231e0b3fa33
3
+ metadata.gz: a9a88eb1a68fe13f014e07cde5131b7a6cf727cc
4
+ data.tar.gz: b04a15f83fd79aa5c864c0c18ed10daeb9017ba7
5
5
  SHA512:
6
- metadata.gz: 9f66b1c4369c7a72f4cad09cda136e8f83667ed83fe70e0dc46f1347ac7412c7d24114ae46414cbe5103fc02edc8bbf962d7c07118cb77191e92258d805fab43
7
- data.tar.gz: e0d54f47e26b8765299a61c573b82204cbada17b1a541e85223e56da717cc9cccd71975c93d07f21480ed4924e0ed37627a9ae501789bc2bab7d7a3ab264060e
6
+ metadata.gz: dff569014024f7fb87b1ada251dc4d8ad9d0644856e0aa81884cf478b3735381ab62c6165630720de0e365d3839b99db39ed5d2033d3c53129815028aaa3875c
7
+ data.tar.gz: 30a4ca3e1b41fd0be3b650178df65819831fba91476a8246f6b664f35eba146ed4360220f84c0d57bd4875063c63dac1df8c74ebe55ae9abaf2bd1c059ffc48c
@@ -1,3 +1,9 @@
1
+ ## v1.5.2
2
+
3
+ Improvements
4
+
5
+ - [`include_recipe 'plugin_name'` loads `itamae/plugin/recipe/plugin_name/default.rb` too](https://github.com/itamae-kitchen/itamae/pull/162)
6
+
1
7
  ## v1.5.1
2
8
 
3
9
  Improvements
@@ -11,9 +11,7 @@ module Itamae
11
11
 
12
12
  class << self
13
13
  def find_recipe_in_gem(recipe)
14
- target = recipe.gsub('::', '/')
15
- target += '.rb' if target !~ /\.rb$/
16
- plugin_name = recipe.split('::')[0]
14
+ plugin_name, recipe_file = recipe.split('::')
17
15
 
18
16
  gem_name = "itamae-plugin-recipe-#{plugin_name}"
19
17
  begin
@@ -26,7 +24,20 @@ module Itamae
26
24
 
27
25
  return nil unless spec
28
26
 
29
- File.join(spec.lib_dirs_glob, 'itamae', 'plugin', 'recipe', target)
27
+ candidate_files = []
28
+ if recipe_file
29
+ recipe_file += '.rb' unless recipe_file.end_with?('.rb')
30
+ candidate_files << "#{plugin_name}/#{recipe_file}"
31
+ else
32
+ candidate_files << "#{plugin_name}/default.rb"
33
+ candidate_files << "#{plugin_name}.rb"
34
+ end
35
+
36
+ candidate_files.map do |file|
37
+ File.join(spec.lib_dirs_glob, 'itamae', 'plugin', 'recipe', file)
38
+ end.find do |path|
39
+ File.exist?(path)
40
+ end
30
41
  end
31
42
  end
32
43
 
@@ -1 +1 @@
1
- 1.5.1
1
+ 1.5.2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor