diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 05:47:57 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 05:47:57 +0000 |
| commit | f851ca64cf3861ffa63cf2698fd4719361803f82 (patch) | |
| tree | 3415e3bf54691e9ff07f723fb72c4dfb5e8c040c | |
| parent | 9f4870637ce57d548d23c0b3330200014327c268 (diff) | |
| download | puppet-f851ca64cf3861ffa63cf2698fd4719361803f82.tar.gz puppet-f851ca64cf3861ffa63cf2698fd4719361803f82.tar.xz puppet-f851ca64cf3861ffa63cf2698fd4719361803f82.zip | |
Adding :replace aliases, as requested in #366.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1952 980ebf18-57e1-0310-9a29-db15c13687c0
| -rw-r--r-- | lib/puppet/rails/fact_name.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/rails/fact_value.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/rails/puppet_class.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/rails/resource.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/transaction.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/type/pfile.rb | 2 | ||||
| -rwxr-xr-x | test/types/file.rb | 9 |
7 files changed, 19 insertions, 2 deletions
diff --git a/lib/puppet/rails/fact_name.rb b/lib/puppet/rails/fact_name.rb index 85c951f87..47687589d 100644 --- a/lib/puppet/rails/fact_name.rb +++ b/lib/puppet/rails/fact_name.rb @@ -1,3 +1,5 @@ class Puppet::Rails::FactName < ActiveRecord::Base has_many :fact_values, :dependent => :destroy end + +# $Id$ diff --git a/lib/puppet/rails/fact_value.rb b/lib/puppet/rails/fact_value.rb index 09be5d265..f42362c97 100644 --- a/lib/puppet/rails/fact_value.rb +++ b/lib/puppet/rails/fact_value.rb @@ -1,3 +1,5 @@ class Puppet::Rails::FactValue < ActiveRecord::Base belongs_to :fact_name end + +# $Id$ diff --git a/lib/puppet/rails/puppet_class.rb b/lib/puppet/rails/puppet_class.rb index de54a31e9..0ef7dfd38 100644 --- a/lib/puppet/rails/puppet_class.rb +++ b/lib/puppet/rails/puppet_class.rb @@ -5,3 +5,5 @@ class Puppet::Rails::PuppetClass < ActiveRecord::Base acts_as_taggable end + +# $Id$ diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb index d78b02b88..011b9a883 100644 --- a/lib/puppet/rails/resource.rb +++ b/lib/puppet/rails/resource.rb @@ -70,3 +70,5 @@ class Puppet::Rails::Resource < ActiveRecord::Base return obj end end + +# $Id$ diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index ff78281ad..59b42f82c 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -257,8 +257,6 @@ class Transaction Puppet::Log.close(@report) end - @relgraph.to_jpg(File.expand_path("~/tmp/graphs"), "simple_relgraph") - Puppet.debug "Finishing transaction %s with %s changes" % [self.object_id, @count] diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 0d69ffdda..cc3950743 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -118,6 +118,8 @@ module Puppet sourced but exists. This is useful for using file sources purely for initialization." newvalues(:true, :false) + aliasvalue(:yes, :true) + aliasvalue(:no, :false) defaultto :true end diff --git a/test/types/file.rb b/test/types/file.rb index 6c1635dbe..ef405638d 100755 --- a/test/types/file.rb +++ b/test/types/file.rb @@ -1801,6 +1801,15 @@ class TestFile < Test::Unit::TestCase assert_equal("testing", File.read(path), "file has the wrong content") end end + + # #366 + def test_replace_aliases + file = Puppet::Type.newfile :path => tempfile() + file[:replace] = :yes + assert_equal(:true, file[:replace], ":replace did not alias :true to :yes") + file[:replace] = :no + assert_equal(:false, file[:replace], ":replace did not alias :false to :no") + end end # $Id$ |
