itamae 1.2.11 → 1.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/itamae/recipe.rb +11 -6
- data/lib/itamae/resource/base.rb +2 -0
- data/lib/itamae/version.txt +1 -1
- data/spec/integration/default_spec.rb +10 -0
- data/spec/integration/recipes/default.rb +39 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47fe6f419701b8d6ea5e8e83de69f6ec2a613b84
|
4
|
+
data.tar.gz: 4575a36969617f23fa01d53f058b2061bef21b2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4903252764a33d19b67966d9b8b3243ae886b1b1e0e8dc61610afd35b93aa77f3cf62d8f72a270ec327344564bdf56b489efc3708d8975701ca50e8355057423
|
7
|
+
data.tar.gz: a4977c7fd756974df71c798a7d4034f76026239f1a9baf5291c3d70ff2df0859b6be4133236ba8d0029dfb5088ad83d8827bec5c1ae36af126be9644f2f352e1
|
data/CHANGELOG.md
CHANGED
data/lib/itamae/recipe.rb
CHANGED
@@ -46,17 +46,22 @@ module Itamae
|
|
46
46
|
|
47
47
|
Logger.formatter.with_indent do
|
48
48
|
@children.run(options)
|
49
|
-
|
50
|
-
@delayed_notifications.uniq do |notification|
|
51
|
-
[notification.action, notification.action_resource]
|
52
|
-
end.each do |notification|
|
53
|
-
notification.run(options)
|
54
|
-
end
|
49
|
+
run_delayed_notifications(options)
|
55
50
|
end
|
56
51
|
end
|
57
52
|
|
58
53
|
private
|
59
54
|
|
55
|
+
def run_delayed_notifications(options)
|
56
|
+
@delayed_notifications.uniq! do |notification|
|
57
|
+
[notification.action, notification.action_resource]
|
58
|
+
end
|
59
|
+
|
60
|
+
while notification = @delayed_notifications.shift
|
61
|
+
notification.run(options)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
60
65
|
def show_banner
|
61
66
|
Logger.info "Recipe: #{@path}"
|
62
67
|
end
|
data/lib/itamae/resource/base.rb
CHANGED
data/lib/itamae/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.12
|
@@ -135,3 +135,13 @@ describe file('/tmp/remote_file_in_definition') do
|
|
135
135
|
it { should be_file }
|
136
136
|
its(:content) { should eq("definition_example\n") }
|
137
137
|
end
|
138
|
+
|
139
|
+
describe file('/tmp/multi_delayed_notifies') do
|
140
|
+
it { should be_file }
|
141
|
+
its(:content) { should eq("1\n2\n3\n4\n") }
|
142
|
+
end
|
143
|
+
|
144
|
+
describe file('/tmp/multi_immediately_notifies') do
|
145
|
+
it { should be_file }
|
146
|
+
its(:content) { should eq("1\n2\n3\n4\n") }
|
147
|
+
end
|
@@ -236,3 +236,42 @@ execute 'true' do
|
|
236
236
|
verify 'true'
|
237
237
|
end
|
238
238
|
|
239
|
+
#####
|
240
|
+
|
241
|
+
execute 'echo 1 > /tmp/multi_delayed_notifies' do
|
242
|
+
notifies :run, "execute[echo 2 >> /tmp/multi_delayed_notifies]"
|
243
|
+
end
|
244
|
+
|
245
|
+
execute 'echo 2 >> /tmp/multi_delayed_notifies' do
|
246
|
+
action :nothing
|
247
|
+
notifies :run, "execute[echo 3 >> /tmp/multi_delayed_notifies]"
|
248
|
+
end
|
249
|
+
|
250
|
+
execute 'echo 3 >> /tmp/multi_delayed_notifies' do
|
251
|
+
action :nothing
|
252
|
+
notifies :run, "execute[echo 4 >> /tmp/multi_delayed_notifies]"
|
253
|
+
end
|
254
|
+
|
255
|
+
execute 'echo 4 >> /tmp/multi_delayed_notifies' do
|
256
|
+
action :nothing
|
257
|
+
end
|
258
|
+
|
259
|
+
#####
|
260
|
+
|
261
|
+
execute 'echo 1 > /tmp/multi_immediately_notifies' do
|
262
|
+
notifies :run, "execute[echo 2 >> /tmp/multi_immediately_notifies]", :immediately
|
263
|
+
end
|
264
|
+
|
265
|
+
execute 'echo 2 >> /tmp/multi_immediately_notifies' do
|
266
|
+
action :nothing
|
267
|
+
notifies :run, "execute[echo 3 >> /tmp/multi_immediately_notifies]", :immediately
|
268
|
+
end
|
269
|
+
|
270
|
+
execute 'echo 3 >> /tmp/multi_immediately_notifies' do
|
271
|
+
action :nothing
|
272
|
+
notifies :run, "execute[echo 4 >> /tmp/multi_immediately_notifies]", :immediately
|
273
|
+
end
|
274
|
+
|
275
|
+
execute 'echo 4 >> /tmp/multi_immediately_notifies' do
|
276
|
+
action :nothing
|
277
|
+
end
|
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.2.
|
4
|
+
version: 1.2.12
|
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-04-
|
11
|
+
date: 2015-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: '0'
|
263
263
|
requirements: []
|
264
264
|
rubyforge_project:
|
265
|
-
rubygems_version: 2.
|
265
|
+
rubygems_version: 2.2.2
|
266
266
|
signing_key:
|
267
267
|
specification_version: 4
|
268
268
|
summary: Simple Configuration Management Tool
|