summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-11 15:07:08 +0000
committerballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-11 15:07:08 +0000
commit24b11b59829fe773ec49db03bbf8b7ddcc0ef182 (patch)
tree14a0ffd490d306ab42a787a0e6fb79b84ab56bbe /lib
parentca2b9e64e76d43380a5e03a87599de1d791a48ce (diff)
downloadpuppet-24b11b59829fe773ec49db03bbf8b7ddcc0ef182.tar.gz
puppet-24b11b59829fe773ec49db03bbf8b7ddcc0ef182.tar.xz
puppet-24b11b59829fe773ec49db03bbf8b7ddcc0ef182.zip
Removed acts_as_taggable from the rails stuff. I haven't removed the tables from the schema nor the indexes yet.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2505 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/resource.rb8
-rw-r--r--lib/puppet/rails/host.rb8
-rw-r--r--lib/puppet/rails/puppet_class.rb2
-rw-r--r--lib/puppet/rails/resource.rb8
4 files changed, 3 insertions, 23 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index d19b4ac1e..d00c8d50f 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -294,11 +294,9 @@ class Puppet::Parser::Resource
resource = host.resources.build(args)
end
- # Handle file and tags specially
- [:file, :tags].each do |param|
- if self.send(param) and (!resource.send(param) or resource.send(param) != self.send(param))
- resource.send(param.to_s + "=", self.send(param))
- end
+ # Handle file specially
+ if self.file and (!resource.file or resource.file != self.file)
+ resource.file = self.file
end
# Either way, now add our parameters
diff --git a/lib/puppet/rails/host.rb b/lib/puppet/rails/host.rb
index fbf51c838..ff6fb8f83 100644
--- a/lib/puppet/rails/host.rb
+++ b/lib/puppet/rails/host.rb
@@ -17,8 +17,6 @@ class Puppet::Rails::Host < ActiveRecord::Base
:include => [ :param_names, :param_values ],
:dependent => :destroy
- acts_as_taggable
-
# If the host already exists, get rid of its objects
def self.clean(host)
if obj = self.find_by_name(host)
@@ -73,12 +71,6 @@ class Puppet::Rails::Host < ActiveRecord::Base
return host
end
- def tags=(tags)
- tags.each do |tag|
- self.tag_with tag
- end
- end
-
# Return the value of a fact.
def fact(name)
if fv = self.fact_values.find(:first, :conditions => "fact_names.name = '#{name}'")
diff --git a/lib/puppet/rails/puppet_class.rb b/lib/puppet/rails/puppet_class.rb
index 0ef7dfd38..1e8784ddb 100644
--- a/lib/puppet/rails/puppet_class.rb
+++ b/lib/puppet/rails/puppet_class.rb
@@ -2,8 +2,6 @@ class Puppet::Rails::PuppetClass < ActiveRecord::Base
has_many :resources
has_many :source_files
has_many :hosts
-
- acts_as_taggable
end
# $Id$
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index 4f26af6d9..49bd1dacc 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -1,5 +1,4 @@
require 'puppet'
-require 'puppet/rails/external/tagging/init'
require 'puppet/rails/param_name'
require 'puppet/util/rails/collection_merger'
@@ -11,13 +10,6 @@ class Puppet::Rails::Resource < ActiveRecord::Base
belongs_to :source_file
belongs_to :host
- acts_as_taggable
-
- def tags=(tags)
- #puts "setting tags %s" % tags.inspect
- self.tag_with(tags.join(","))
- end
-
def file
if f = self.source_file
return f.filename