sprinkle 0.7.6 → 0.7.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Sprinkle
2
- Version = "0.7.6"
2
+ Version = "0.7.6.1"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -16,3 +16,5 @@ end
16
16
  class Object
17
17
  include Sprinkle::TestLogger
18
18
  end
19
+
20
+ ActiveSupport::Deprecation.silenced = true
@@ -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-06 00:00:00.000000000 Z
13
+ date: 2013-09-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec