itamae 1.5.2 → 1.6.0

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: a9a88eb1a68fe13f014e07cde5131b7a6cf727cc
4
- data.tar.gz: b04a15f83fd79aa5c864c0c18ed10daeb9017ba7
3
+ metadata.gz: 7645dcbc25524977716925e4fd25ff38b384b9fe
4
+ data.tar.gz: 8794a7a72b0f04f54a44bfa1c77f9abaf0d9c2fd
5
5
  SHA512:
6
- metadata.gz: dff569014024f7fb87b1ada251dc4d8ad9d0644856e0aa81884cf478b3735381ab62c6165630720de0e365d3839b99db39ed5d2033d3c53129815028aaa3875c
7
- data.tar.gz: 30a4ca3e1b41fd0be3b650178df65819831fba91476a8246f6b664f35eba146ed4360220f84c0d57bd4875063c63dac1df8c74ebe55ae9abaf2bd1c059ffc48c
6
+ metadata.gz: 22979a7c43b6251c5c5351645c3806286b10f2e9c9474d33ba5072b3ce54ea5e10cac902dbb25963ccf5a5f5f8f42523db0e959c83c4e7d788d4d696623d036a
7
+ data.tar.gz: 96a6a28449318915eab6331b83502904a8514d015ae23e151a1ae876822696812a6207b954602f3a7bbb4da8f862b82b42dc9034cb3835582b675d8331fc772e
@@ -1,3 +1,12 @@
1
+ ## v1.6.0
2
+
3
+ Improvements
4
+
5
+ - [Ignore `--node-yaml` when the result is false (by @k0kubun)](https://github.com/itamae-kitchen/itamae/pull/165)
6
+ - [Allow `include_recipe` to omit `.rb` extension (by @k0kubun)](https://github.com/itamae-kitchen/itamae/pull/166)
7
+ - This is backward-compatible change
8
+ - [Allow `load_recipes` to load plugin recipes directly (by @k0kubun)](https://github.com/itamae-kitchen/itamae/pull/167)
9
+
1
10
  ## v1.5.2
2
11
 
3
12
  Improvements
@@ -118,10 +118,9 @@ module Itamae
118
118
 
119
119
  def include_recipe(target)
120
120
  expanded_path = ::File.expand_path(target, File.dirname(@recipe.path))
121
- candidate_paths = [
122
- ::Dir.exists?(expanded_path) ? ::File.join(expanded_path, "default.rb") : expanded_path,
123
- Recipe.find_recipe_in_gem(target),
124
- ].compact
121
+ expanded_path = ::File.join(expanded_path, 'default.rb') if ::Dir.exists?(expanded_path)
122
+ expanded_path.concat('.rb') unless expanded_path.end_with?('.rb')
123
+ candidate_paths = [expanded_path, Recipe.find_recipe_in_gem(target)].compact
125
124
  path = candidate_paths.find {|path| File.exist?(path) }
126
125
 
127
126
  unless path
@@ -43,7 +43,13 @@ module Itamae
43
43
 
44
44
  def load_recipes(paths)
45
45
  paths.each do |path|
46
- recipe = Recipe.new(self, File.expand_path(path))
46
+ expanded_path = File.expand_path(path)
47
+ if path.include?('::')
48
+ gem_path = Recipe.find_recipe_in_gem(path)
49
+ expanded_path = gem_path if gem_path
50
+ end
51
+
52
+ recipe = Recipe.new(self, expanded_path)
47
53
  children << recipe
48
54
  recipe.load
49
55
  end
@@ -78,7 +84,7 @@ module Itamae
78
84
  if @options[:node_yaml]
79
85
  path = File.expand_path(@options[:node_yaml])
80
86
  Itamae.logger.info "Loading node data from #{path}..."
81
- hash.merge!(YAML.load(open(path)))
87
+ hash.merge!(YAML.load(open(path)) || {})
82
88
  end
83
89
 
84
90
  Node.new(hash, @backend)
@@ -1 +1 @@
1
- 1.5.2
1
+ 1.6.0
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.2
4
+ version: 1.6.0
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-07 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor