sprinkle 0.7.6 → 0.7.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sprinkle/verify.rb +11 -0
- data/lib/sprinkle/version.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- data/spec/sprinkle/verify_spec.rb +11 -0
- metadata +2 -2
data/lib/sprinkle/verify.rb
CHANGED
@@ -91,6 +91,17 @@ module Sprinkle
|
|
91
91
|
self.instance_eval(&block)
|
92
92
|
end
|
93
93
|
|
94
|
+
def runner(*cmds)
|
95
|
+
ActiveSupport::Deprecation.warn
|
96
|
+
"runner inside verify is depreciated and will removed in the future\n" +
|
97
|
+
"use runs_without_error instead."
|
98
|
+
runs_without_error(*cmds)
|
99
|
+
end
|
100
|
+
|
101
|
+
def runs_without_error(*cmds)
|
102
|
+
@commands += cmds
|
103
|
+
end
|
104
|
+
|
94
105
|
def process(roles, pre = false) #:nodoc:
|
95
106
|
description = @description.empty? ? " (#{@package.name})" : @description
|
96
107
|
|
data/lib/sprinkle/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -55,6 +55,9 @@ describe Sprinkle::Verify do
|
|
55
55
|
# Check for a certain RPM package
|
56
56
|
has_rpm 'ntp'
|
57
57
|
|
58
|
+
runner "some random command"
|
59
|
+
runs_without_error "some other random command"
|
60
|
+
|
58
61
|
belongs_to_user "/etc/", "me"
|
59
62
|
belongs_to_user "/etc/", 2
|
60
63
|
belongs_to_group "/etc/", "root"
|
@@ -121,6 +124,14 @@ describe Sprinkle::Verify do
|
|
121
124
|
@verification.commands.should include("id -nG alf | xargs -n1 echo | grep alien")
|
122
125
|
end
|
123
126
|
|
127
|
+
it 'should have the command from runner' do
|
128
|
+
@verification.commands.should include('some random command')
|
129
|
+
end
|
130
|
+
|
131
|
+
it 'should have the command from runs_without_error' do
|
132
|
+
@verification.commands.should include('some other random command')
|
133
|
+
end
|
134
|
+
|
124
135
|
it 'should use id to check for user' do
|
125
136
|
@verification.commands.should include('id bob')
|
126
137
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprinkle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.6
|
4
|
+
version: 0.7.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-09-
|
13
|
+
date: 2013-09-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|