stove 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/stove/cookbook/metadata.rb +11 -0
- data/lib/stove/rake_task.rb +1 -1
- data/lib/stove/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81f9d1281c571d2ef3fb23ea93ceb2b1d435ea60
|
4
|
+
data.tar.gz: 7762c7e2004f355e7ad385754e1813573c84f727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b338e1852007ae23bd882c39b4592aa7a470fa856cb64b3d400cf326010149d85a7cb9a52df29bc2b801411a9d50df1c3d30ee03115dcdb802d316f2e131cf9f
|
7
|
+
data.tar.gz: d546ac3c3d3f3b5b9c7a7924f657fcf9f3ddbcc97ec64f8a1caef324c48f4774b97b4b069f87e535e0b6ed8cd28e72ee14af38ed44c040366a76239900f31eb0
|
data/CHANGELOG.md
CHANGED
@@ -142,10 +142,13 @@ module Stove
|
|
142
142
|
|
143
143
|
def from_file(path)
|
144
144
|
path = path.to_s
|
145
|
+
path_json = File.join(File.dirname(path), 'metadata.json')
|
145
146
|
|
146
147
|
if File.exist?(path) && File.readable?(path)
|
147
148
|
self.instance_eval(IO.read(path), path, 1)
|
148
149
|
self
|
150
|
+
elsif File.exist?(path_json) && File.readable?(path_json)
|
151
|
+
metadata_from_json(path_json)
|
149
152
|
else
|
150
153
|
raise Error::MetadataNotFound.new(path: path)
|
151
154
|
end
|
@@ -198,6 +201,14 @@ module Stove
|
|
198
201
|
|
199
202
|
private
|
200
203
|
|
204
|
+
def metadata_from_json(path)
|
205
|
+
json = JSON.parse(IO.read(path))
|
206
|
+
json.keys.each do |key|
|
207
|
+
set_or_return(key.to_sym, json[key])
|
208
|
+
end
|
209
|
+
self
|
210
|
+
end
|
211
|
+
|
201
212
|
def set_or_return(symbol, arg)
|
202
213
|
iv_symbol = "@#{symbol.to_s}".to_sym
|
203
214
|
|
data/lib/stove/rake_task.rb
CHANGED
@@ -9,7 +9,7 @@ module Stove
|
|
9
9
|
def initialize(name = nil)
|
10
10
|
yield self if block_given?
|
11
11
|
|
12
|
-
desc 'Publish this cookbook' unless ::Rake.application.
|
12
|
+
desc 'Publish this cookbook' unless ::Rake.application.last_description
|
13
13
|
task(name || :publish) do |t, args|
|
14
14
|
Cli.new(stove_opts || []).execute!
|
15
15
|
end
|
data/lib/stove/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-api
|