summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-19 01:49:19 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-19 01:49:19 +0000
commite5a9e24e839942d97f0b0f6dbd097f91f3c880f4 (patch)
tree328daacfee1ee7715e9dcd9628e1ba257ec686f4 /lib/puppet
parentbd444d84f403f0454533ee19e9da6893c054f3b4 (diff)
More test fixes. I seem to be getting very close.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2624 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/interpreter.rb2
-rwxr-xr-xlib/puppet/provider/cron/crontab.rb7
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb
index 3a719e03c..f595c03a2 100644
--- a/lib/puppet/parser/interpreter.rb
+++ b/lib/puppet/parser/interpreter.rb
@@ -810,6 +810,8 @@ class Puppet::Parser::Interpreter
unless ActiveRecord::Base.connected?
Puppet::Rails.connect
+ else
+ Puppet.warning "Already connected"
end
# Fork the storage, since we don't need the client waiting
diff --git a/lib/puppet/provider/cron/crontab.rb b/lib/puppet/provider/cron/crontab.rb
index 7599b1bdf..19cce98a2 100755
--- a/lib/puppet/provider/cron/crontab.rb
+++ b/lib/puppet/provider/cron/crontab.rb
@@ -86,7 +86,6 @@ Puppet::Type.type(:cron).provide(:crontab,
# See if we can match the hash against an existing cron job.
def self.match(hash, resources)
resources.each do |name, obj|
- p hash
# we now have a cron job whose command exactly matches
# let's see if the other fields match
@@ -151,7 +150,11 @@ Puppet::Type.type(:cron).provide(:crontab,
record[:name] = name
name = nil
end
- record[:environment] = envs
+ if envs.empty?
+ record[:environment] = :absent
+ else
+ record[:environment] = envs
+ end
end
}.reject { |record| record[:skip] }
end