summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/rails_resource.rb
diff options
context:
space:
mode:
authorshadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2006-11-09 18:59:16 +0000
committershadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2006-11-09 18:59:16 +0000
commit51882d98289eea6b362ea99231d480728e937797 (patch)
tree0720b987de3542c9feb33dad9dd0a4e306cb29d8 /lib/puppet/rails/rails_resource.rb
parentcf166c25911f521cdf12178ebbe0b39f81473b35 (diff)
downloadpuppet-51882d98289eea6b362ea99231d480728e937797.tar.gz
puppet-51882d98289eea6b362ea99231d480728e937797.tar.xz
puppet-51882d98289eea6b362ea99231d480728e937797.zip
The new rails files.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1838 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/rails/rails_resource.rb')
-rw-r--r--lib/puppet/rails/rails_resource.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/puppet/rails/rails_resource.rb b/lib/puppet/rails/rails_resource.rb
deleted file mode 100644
index caad1b460..000000000
--- a/lib/puppet/rails/rails_resource.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-require 'puppet'
-require 'puppet/rails/rails_parameter'
-
-#RailsParameter = Puppet::Rails::RailsParameter
-class Puppet::Rails::RailsResource < ActiveRecord::Base
- has_many :rails_parameters, :dependent => :delete_all
- serialize :tags, Array
-
- belongs_to :host
-
- # Convert our object to a resource. Do not retain whether the object
- # is collectable, though, since that would cause it to get stripped
- # from the configuration.
- def to_resource(scope)
- hash = self.attributes
- hash["type"] = hash["restype"]
- hash.delete("restype")
- hash.delete("host_id")
- hash.delete("id")
- hash.each do |p, v|
- hash.delete(p) if v.nil?
- end
- hash[:scope] = scope
- hash[:source] = scope.source
- obj = Puppet::Parser::Resource.new(hash)
- rails_parameters.each do |param|
- obj.set(param.to_resourceparam(scope.source))
- end
-
- return obj
- end
-end
-
-# $Id$