summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-28 15:20:52 -0600
committerLuke Kanies <luke@madstop.com>2007-11-28 15:20:52 -0600
commit11ae473e3852adcc382a3efea2329586d2e4bcb3 (patch)
tree7a7ff70f7d9f7bc9af0635c56690fb9fc810b9f5 /lib/puppet/rails
parent8127397e1efafc13975b79eabf7ce951c1e90114 (diff)
downloadpuppet-11ae473e3852adcc382a3efea2329586d2e4bcb3.tar.gz
puppet-11ae473e3852adcc382a3efea2329586d2e4bcb3.tar.xz
puppet-11ae473e3852adcc382a3efea2329586d2e4bcb3.zip
Theoretically, this patch is to fix #917 (which it does), but
there were enough problems fixing it that I decided something more drastic needed to be done. This uses the new Puppet::ResourceReference class to canonize what a resource reference looks like and how to retrieve resources via their references. Specifically, it guarantees that resource types are always capitalized, even when they include '::' in them. While many files are modified in this commit, the majority of changes are quite small, and most of the changes are fixing the tests to use capitalized types. As we look at consolidating some of our resource types, we could consolidate the ResourceReference stuff at the same time, but at least the Puppet::Parser::ResourceReference class subclasses the main Puppet::ResourceReference class.
Diffstat (limited to 'lib/puppet/rails')
-rw-r--r--lib/puppet/rails/host.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/rails/host.rb b/lib/puppet/rails/host.rb
index e0a26bdd4..9ecacdd6f 100644
--- a/lib/puppet/rails/host.rb
+++ b/lib/puppet/rails/host.rb
@@ -29,9 +29,7 @@ class Puppet::Rails::Host < ActiveRecord::Base
# Store our host in the database.
def self.store(node, resources)
- unless name = hash[:name]
- raise ArgumentError, "You must specify the hostname for storage"
- end
+ raise ArgumentError, "You must specify the hostname for storage" unless name = hash[:name]
args = {}