Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added environment to cron resource.

  • Loading branch information...
commit 96ef7d770a7d898fdce097c7fda9039abf7bf485 1 parent 294e9f7
@iafonov iafonov authored
View
8 chef/lib/chef/resource/cron.rb
@@ -172,6 +172,14 @@ def user(arg=nil)
:kind_of => String
)
end
+
+ def environment(arg=nil)
+ set_or_return(
+ :environment,
+ arg,
+ :kind_of => Hash
+ )
+ end
private
View
6 chef/spec/unit/resource/cron_spec.rb
@@ -98,6 +98,12 @@
@resource.shell.should eql("/bin/zsh")
end
+ it "should allow you to specify environment variables hash" do
+ env = {"TEST" => "LOL"}
+ @resource.environment env
+ @resource.environment.should eql(env)
+ end
+
it "should allow * for all time and date values" do
[ "minute", "hour", "day", "month", "weekday" ].each do |x|
@resource.send(x, "*").should eql("*")
Please sign in to comment.
Something went wrong with that request. Please try again.