shadow_puppet 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTcxNTgyMDUyOTllZjU0OThhMzhjODg5Y2UzZjgwZjlmMzQ4ZWE2MQ==
5
+ data.tar.gz: !binary |-
6
+ MDMxMzJmZjE1M2M5MTI2OWU0MTVjMWU1NzNiMTM3MDIwMDcwOGIwOQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZmEzNzc3MzJhOWVjY2YxYjdjNjJlNWM0NDgxZDA5MGI4YmM3ZDJlYzNlM2Fm
10
+ ZDZhYWQzNjgwYmVhNWVjY2I5YzFmZGE0Yzg3NWViMTNiODhlYjlmNzY2ZjJm
11
+ NmQ4MDMwYTA1NDhkNjk3OWQ0M2ViNzgxMjI0YjYzNTVmODg5M2Q=
12
+ data.tar.gz: !binary |-
13
+ NmViMWY1OTg1ZWU0NjdhZDllMTliMGQwYjk3NDlkMmZlZWYzYTBjODhlZDZm
14
+ NjM5Y2MyNDgwMGU3NDZjZGE4MzhhNDQ1OWNiYWQ1YTNhYjE1YTQ3Yzc1MDJm
15
+ OWRjNjY1ZTBmZTc2NDAyNWQ5MDBhNDdlOTliZDY5ZTExN2VjNDI=
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ Jeweler::Tasks.new do |gem|
13
13
  gem.rubyforge_project = "moonshine"
14
14
  gem.authors = ["Jesse Newland", "Josh Nichols", "Eric Lindvall", "Lee Jones", "Will Farrington", "dreamcat4", "Patrick Schless", "Ches Martin", "Rob Lingle", "Scott Fleckenstein"]
15
15
 
16
- gem.version = "0.6.3"
16
+ gem.version = "0.6.4"
17
17
 
18
18
  gem.rdoc_options << '--inline-source' << '--webcvs=http://github.com/railsmachine/shadow_puppet/tree/master/'
19
19
 
@@ -237,11 +237,11 @@ module ShadowPuppet
237
237
  def execute(force=false)
238
238
  return false if executed? && !force
239
239
  evaluate_recipes
240
- apply
240
+ transaction = apply
241
241
  rescue Exception => e
242
242
  false
243
243
  else
244
- true
244
+ not transaction.any_failed?
245
245
  ensure
246
246
  @executed = true
247
247
  end
@@ -253,11 +253,11 @@ module ShadowPuppet
253
253
  def execute!(force=false)
254
254
  return false if executed? && !force
255
255
  evaluate_recipes
256
- apply
256
+ transaction = apply
257
257
  rescue Exception => e
258
258
  raise e
259
259
  else
260
- true
260
+ not transaction.any_failed?
261
261
  ensure
262
262
  @executed = true
263
263
  end
@@ -305,8 +305,9 @@ module ShadowPuppet
305
305
  # Create a catalog of all contained Puppet Resources and apply that
306
306
  # catalog to the currently running system
307
307
  def apply
308
- catalog.apply
308
+ transaction = catalog.apply
309
309
  catalog.clear
310
+ transaction
310
311
  end
311
312
 
312
313
  def resource_or_reference(type, *args)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "shadow_puppet"
8
- s.version = "0.6.3"
8
+ s.version = "0.6.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jesse Newland", "Josh Nichols", "Eric Lindvall", "Lee Jones", "Will Farrington", "dreamcat4", "Patrick Schless", "Ches Martin", "Rob Lingle", "Scott Fleckenstein"]
12
- s.date = "2012-07-11"
12
+ s.date = "2013-12-09"
13
13
  s.description = "A Ruby Puppet DSL"
14
14
  s.email = "will@railsmachine.com"
15
15
  s.executables = ["shadow_puppet"]
@@ -1,6 +1,22 @@
1
1
  class BlankManifest < ShadowPuppet::Manifest
2
2
  end
3
3
 
4
+ class SuccessfulManifest < ShadowPuppet::Manifest
5
+ recipe :foo
6
+
7
+ def foo
8
+ exec('foo', :command => 'true')
9
+ end
10
+ end
11
+
12
+ class FailureManifest < SuccessfulManifest
13
+ recipe :bar
14
+
15
+ def bar
16
+ exec('bar', :command => 'false')
17
+ end
18
+ end
19
+
4
20
  #this does nothing
5
21
  class NoOpManifest < ShadowPuppet::Manifest
6
22
  def foo
@@ -1,5 +1,29 @@
1
1
  describe "A manifest" do
2
2
 
3
+ describe "when successful" do
4
+
5
+ before(:each) do
6
+ @manifest = SuccessfulManifest.new
7
+ end
8
+
9
+ it "returns true when executed" do
10
+ @manifest.execute.should be_true
11
+ end
12
+
13
+ end
14
+
15
+ describe "with resouces that fail" do
16
+
17
+ before(:each) do
18
+ @manifest = FailureManifest.new
19
+ end
20
+
21
+ it "returns false when executed" do
22
+ @manifest.execute.should be_false
23
+ end
24
+
25
+ end
26
+
3
27
  describe "when blank" do
4
28
 
5
29
  before(:each) do
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shadow_puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
5
- prerelease:
4
+ version: 0.6.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jesse Newland
@@ -18,12 +17,11 @@ authors:
18
17
  autorequire:
19
18
  bindir: bin
20
19
  cert_chain: []
21
- date: 2012-07-11 00:00:00.000000000 Z
20
+ date: 2013-12-09 00:00:00.000000000 Z
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
24
23
  name: puppet
25
24
  requirement: !ruby/object:Gem::Requirement
26
- none: false
27
25
  requirements:
28
26
  - - '='
29
27
  - !ruby/object:Gem::Version
@@ -31,7 +29,6 @@ dependencies:
31
29
  type: :runtime
32
30
  prerelease: false
33
31
  version_requirements: !ruby/object:Gem::Requirement
34
- none: false
35
32
  requirements:
36
33
  - - '='
37
34
  - !ruby/object:Gem::Version
@@ -39,7 +36,6 @@ dependencies:
39
36
  - !ruby/object:Gem::Dependency
40
37
  name: highline
41
38
  requirement: !ruby/object:Gem::Requirement
42
- none: false
43
39
  requirements:
44
40
  - - ! '>='
45
41
  - !ruby/object:Gem::Version
@@ -47,7 +43,6 @@ dependencies:
47
43
  type: :runtime
48
44
  prerelease: false
49
45
  version_requirements: !ruby/object:Gem::Requirement
50
- none: false
51
46
  requirements:
52
47
  - - ! '>='
53
48
  - !ruby/object:Gem::Version
@@ -55,7 +50,6 @@ dependencies:
55
50
  - !ruby/object:Gem::Dependency
56
51
  name: builder
57
52
  requirement: !ruby/object:Gem::Requirement
58
- none: false
59
53
  requirements:
60
54
  - - ! '>='
61
55
  - !ruby/object:Gem::Version
@@ -63,7 +57,6 @@ dependencies:
63
57
  type: :runtime
64
58
  prerelease: false
65
59
  version_requirements: !ruby/object:Gem::Requirement
66
- none: false
67
60
  requirements:
68
61
  - - ! '>='
69
62
  - !ruby/object:Gem::Version
@@ -71,7 +64,6 @@ dependencies:
71
64
  - !ruby/object:Gem::Dependency
72
65
  name: activesupport
73
66
  requirement: !ruby/object:Gem::Requirement
74
- none: false
75
67
  requirements:
76
68
  - - ! '>='
77
69
  - !ruby/object:Gem::Version
@@ -79,7 +71,6 @@ dependencies:
79
71
  type: :runtime
80
72
  prerelease: false
81
73
  version_requirements: !ruby/object:Gem::Requirement
82
- none: false
83
74
  requirements:
84
75
  - - ! '>='
85
76
  - !ruby/object:Gem::Version
@@ -87,7 +78,6 @@ dependencies:
87
78
  - !ruby/object:Gem::Dependency
88
79
  name: i18n
89
80
  requirement: !ruby/object:Gem::Requirement
90
- none: false
91
81
  requirements:
92
82
  - - ! '>='
93
83
  - !ruby/object:Gem::Version
@@ -95,7 +85,6 @@ dependencies:
95
85
  type: :runtime
96
86
  prerelease: false
97
87
  version_requirements: !ruby/object:Gem::Requirement
98
- none: false
99
88
  requirements:
100
89
  - - ! '>='
101
90
  - !ruby/object:Gem::Version
@@ -103,7 +92,6 @@ dependencies:
103
92
  - !ruby/object:Gem::Dependency
104
93
  name: rake
105
94
  requirement: !ruby/object:Gem::Requirement
106
- none: false
107
95
  requirements:
108
96
  - - ! '>='
109
97
  - !ruby/object:Gem::Version
@@ -111,7 +99,6 @@ dependencies:
111
99
  type: :development
112
100
  prerelease: false
113
101
  version_requirements: !ruby/object:Gem::Requirement
114
- none: false
115
102
  requirements:
116
103
  - - ! '>='
117
104
  - !ruby/object:Gem::Version
@@ -119,7 +106,6 @@ dependencies:
119
106
  - !ruby/object:Gem::Dependency
120
107
  name: appraisal
121
108
  requirement: !ruby/object:Gem::Requirement
122
- none: false
123
109
  requirements:
124
110
  - - ! '>='
125
111
  - !ruby/object:Gem::Version
@@ -127,7 +113,6 @@ dependencies:
127
113
  type: :development
128
114
  prerelease: false
129
115
  version_requirements: !ruby/object:Gem::Requirement
130
- none: false
131
116
  requirements:
132
117
  - - ! '>='
133
118
  - !ruby/object:Gem::Version
@@ -135,7 +120,6 @@ dependencies:
135
120
  - !ruby/object:Gem::Dependency
136
121
  name: rspec
137
122
  requirement: !ruby/object:Gem::Requirement
138
- none: false
139
123
  requirements:
140
124
  - - ~>
141
125
  - !ruby/object:Gem::Version
@@ -143,7 +127,6 @@ dependencies:
143
127
  type: :development
144
128
  prerelease: false
145
129
  version_requirements: !ruby/object:Gem::Requirement
146
- none: false
147
130
  requirements:
148
131
  - - ~>
149
132
  - !ruby/object:Gem::Version
@@ -151,7 +134,6 @@ dependencies:
151
134
  - !ruby/object:Gem::Dependency
152
135
  name: rspec-core
153
136
  requirement: !ruby/object:Gem::Requirement
154
- none: false
155
137
  requirements:
156
138
  - - ~>
157
139
  - !ruby/object:Gem::Version
@@ -159,7 +141,6 @@ dependencies:
159
141
  type: :development
160
142
  prerelease: false
161
143
  version_requirements: !ruby/object:Gem::Requirement
162
- none: false
163
144
  requirements:
164
145
  - - ~>
165
146
  - !ruby/object:Gem::Version
@@ -167,7 +148,6 @@ dependencies:
167
148
  - !ruby/object:Gem::Dependency
168
149
  name: test-unit
169
150
  requirement: !ruby/object:Gem::Requirement
170
- none: false
171
151
  requirements:
172
152
  - - ! '>='
173
153
  - !ruby/object:Gem::Version
@@ -175,7 +155,6 @@ dependencies:
175
155
  type: :development
176
156
  prerelease: false
177
157
  version_requirements: !ruby/object:Gem::Requirement
178
- none: false
179
158
  requirements:
180
159
  - - ! '>='
181
160
  - !ruby/object:Gem::Version
@@ -183,7 +162,6 @@ dependencies:
183
162
  - !ruby/object:Gem::Dependency
184
163
  name: jeweler
185
164
  requirement: !ruby/object:Gem::Requirement
186
- none: false
187
165
  requirements:
188
166
  - - ~>
189
167
  - !ruby/object:Gem::Version
@@ -191,7 +169,6 @@ dependencies:
191
169
  type: :development
192
170
  prerelease: false
193
171
  version_requirements: !ruby/object:Gem::Requirement
194
- none: false
195
172
  requirements:
196
173
  - - ~>
197
174
  - !ruby/object:Gem::Version
@@ -199,7 +176,6 @@ dependencies:
199
176
  - !ruby/object:Gem::Dependency
200
177
  name: rdoc
201
178
  requirement: !ruby/object:Gem::Requirement
202
- none: false
203
179
  requirements:
204
180
  - - ! '>='
205
181
  - !ruby/object:Gem::Version
@@ -207,7 +183,6 @@ dependencies:
207
183
  type: :development
208
184
  prerelease: false
209
185
  version_requirements: !ruby/object:Gem::Requirement
210
- none: false
211
186
  requirements:
212
187
  - - ! '>='
213
188
  - !ruby/object:Gem::Version
@@ -215,7 +190,6 @@ dependencies:
215
190
  - !ruby/object:Gem::Dependency
216
191
  name: pry
217
192
  requirement: !ruby/object:Gem::Requirement
218
- none: false
219
193
  requirements:
220
194
  - - ! '>='
221
195
  - !ruby/object:Gem::Version
@@ -223,7 +197,6 @@ dependencies:
223
197
  type: :development
224
198
  prerelease: false
225
199
  version_requirements: !ruby/object:Gem::Requirement
226
- none: false
227
200
  requirements:
228
201
  - - ! '>='
229
202
  - !ruby/object:Gem::Version
@@ -275,6 +248,7 @@ files:
275
248
  - spec/type_spec.rb
276
249
  homepage: http://railsmachine.github.com/shadow_puppet
277
250
  licenses: []
251
+ metadata: {}
278
252
  post_install_message:
279
253
  rdoc_options:
280
254
  - --inline-source
@@ -282,20 +256,18 @@ rdoc_options:
282
256
  require_paths:
283
257
  - lib
284
258
  required_ruby_version: !ruby/object:Gem::Requirement
285
- none: false
286
259
  requirements:
287
260
  - - ! '>='
288
261
  - !ruby/object:Gem::Version
289
262
  version: '0'
290
263
  required_rubygems_version: !ruby/object:Gem::Requirement
291
- none: false
292
264
  requirements:
293
265
  - - ! '>='
294
266
  - !ruby/object:Gem::Version
295
267
  version: '0'
296
268
  requirements: []
297
269
  rubyforge_project: moonshine
298
- rubygems_version: 1.8.25
270
+ rubygems_version: 2.1.11
299
271
  signing_key:
300
272
  specification_version: 3
301
273
  summary: A Ruby Puppet DSL