summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Walters, Tim Hinderliter <cw@opscode.com,tim@opscode.com>2010-05-17 15:36:00 -0700
committerDaniel DeLeo <dan@opscode.com>2010-06-03 12:21:56 -0700
commitf4df0cbba21e498b566a209cd385021d1325db79 (patch)
tree91c7fe225d2768bfe231ed408b1638d2bb479985
parentb678ce8f7b08f007f21425437225077d68293954 (diff)
downloadchef-f4df0cbba21e498b566a209cd385021d1325db79.tar.gz
Changing Resources to use new initializer
-rw-r--r--chef/lib/chef/resource/apt_package.rb8
-rw-r--r--chef/lib/chef/resource/bash.rb8
-rw-r--r--chef/lib/chef/resource/cron.rb6
-rw-r--r--chef/lib/chef/resource/csh.rb8
-rw-r--r--chef/lib/chef/resource/deploy.rb6
-rw-r--r--chef/lib/chef/resource/directory.rb8
-rw-r--r--chef/lib/chef/resource/dpkg_package.rb8
-rw-r--r--chef/lib/chef/resource/easy_install_package.rb6
-rw-r--r--chef/lib/chef/resource/erl_call.rb6
-rw-r--r--chef/lib/chef/resource/execute.rb6
-rw-r--r--chef/lib/chef/resource/file.rb6
-rw-r--r--chef/lib/chef/resource/freebsd_package.rb6
-rw-r--r--chef/lib/chef/resource/gem_package.rb6
-rw-r--r--chef/lib/chef/resource/git.rb6
-rw-r--r--chef/lib/chef/resource/group.rb6
-rw-r--r--chef/lib/chef/resource/http_request.rb8
-rw-r--r--chef/lib/chef/resource/ifconfig.rb6
-rw-r--r--chef/lib/chef/resource/link.rb6
-rw-r--r--chef/lib/chef/resource/log.rb4
-rw-r--r--chef/lib/chef/resource/mdadm.rb6
-rw-r--r--chef/lib/chef/resource/mount.rb4
-rw-r--r--chef/lib/chef/resource/package.rb6
-rw-r--r--chef/lib/chef/resource/pacman_package.rb8
-rw-r--r--chef/lib/chef/resource/perl.rb8
-rw-r--r--chef/lib/chef/resource/portage_package.rb8
-rw-r--r--chef/lib/chef/resource/python.rb8
-rw-r--r--chef/lib/chef/resource/remote_directory.rb6
-rw-r--r--chef/lib/chef/resource/remote_file.rb6
-rw-r--r--chef/lib/chef/resource/route.rb6
-rw-r--r--chef/lib/chef/resource/ruby.rb6
-rw-r--r--chef/lib/chef/resource/ruby_block.rb5
-rw-r--r--chef/lib/chef/resource/scm.rb8
-rw-r--r--chef/lib/chef/resource/script.rb8
-rw-r--r--chef/lib/chef/resource/service.rb6
-rw-r--r--chef/lib/chef/resource/subversion.rb4
-rw-r--r--chef/lib/chef/resource/template.rb6
-rw-r--r--chef/lib/chef/resource/user.rb6
-rw-r--r--chef/lib/chef/resource/yum_package.rb6
38 files changed, 123 insertions, 122 deletions
diff --git a/chef/lib/chef/resource/apt_package.rb b/chef/lib/chef/resource/apt_package.rb
index b7c52273a2..6f987eee7b 100644
--- a/chef/lib/chef/resource/apt_package.rb
+++ b/chef/lib/chef/resource/apt_package.rb
@@ -22,13 +22,13 @@ require 'chef/provider/package/apt'
class Chef
class Resource
class AptPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :apt_package
@provider = Chef::Provider::Package::Apt
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/bash.rb b/chef/lib/chef/resource/bash.rb
index df4e079770..bef15f1089 100644
--- a/chef/lib/chef/resource/bash.rb
+++ b/chef/lib/chef/resource/bash.rb
@@ -21,13 +21,13 @@ require 'chef/resource/script'
class Chef
class Resource
class Bash < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :bash
@interpreter = "bash"
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/cron.rb b/chef/lib/chef/resource/cron.rb
index 206bf2c540..c8ecc9a0a3 100644
--- a/chef/lib/chef/resource/cron.rb
+++ b/chef/lib/chef/resource/cron.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Cron < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :cron
@action = :create
@allowed_actions.push(:create, :delete)
diff --git a/chef/lib/chef/resource/csh.rb b/chef/lib/chef/resource/csh.rb
index 833d4d6439..13f35d8206 100644
--- a/chef/lib/chef/resource/csh.rb
+++ b/chef/lib/chef/resource/csh.rb
@@ -21,13 +21,13 @@ require 'chef/resource/script'
class Chef
class Resource
class Csh < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :csh
@interpreter = "csh"
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/deploy.rb b/chef/lib/chef/resource/deploy.rb
index a513b16411..202fe739fc 100644
--- a/chef/lib/chef/resource/deploy.rb
+++ b/chef/lib/chef/resource/deploy.rb
@@ -51,9 +51,9 @@ class Chef
class Deploy < Chef::Resource
provider_base Chef::Provider::Deploy
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :deploy
@deploy_to = name
@environment = nil
diff --git a/chef/lib/chef/resource/directory.rb b/chef/lib/chef/resource/directory.rb
index 0a7263ee76..be16c4c488 100644
--- a/chef/lib/chef/resource/directory.rb
+++ b/chef/lib/chef/resource/directory.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Directory < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :directory
@path = name
@action = :create
@@ -73,4 +73,4 @@ class Chef
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/dpkg_package.rb b/chef/lib/chef/resource/dpkg_package.rb
index d0e3d31067..278dbd9e67 100644
--- a/chef/lib/chef/resource/dpkg_package.rb
+++ b/chef/lib/chef/resource/dpkg_package.rb
@@ -22,13 +22,13 @@ require 'chef/provider/package/dpkg'
class Chef
class Resource
class DpkgPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :dpkg_package
@provider = Chef::Provider::Package::Dpkg
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/easy_install_package.rb b/chef/lib/chef/resource/easy_install_package.rb
index 8e8161651e..cd0da7a783 100644
--- a/chef/lib/chef/resource/easy_install_package.rb
+++ b/chef/lib/chef/resource/easy_install_package.rb
@@ -21,9 +21,9 @@ require 'chef/resource/package'
class Chef
class Resource
class EasyInstallPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :easy_install_package
@provider = Chef::Provider::Package::EasyInstall
end
diff --git a/chef/lib/chef/resource/erl_call.rb b/chef/lib/chef/resource/erl_call.rb
index 0923dea2f9..a53114c4a9 100644
--- a/chef/lib/chef/resource/erl_call.rb
+++ b/chef/lib/chef/resource/erl_call.rb
@@ -23,9 +23,9 @@ class Chef
class ErlCall < Chef::Resource
# erl_call : http://erlang.org/doc/man/erl_call.html
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :erl_call
@code = "q()." # your erlang code goes here
diff --git a/chef/lib/chef/resource/execute.rb b/chef/lib/chef/resource/execute.rb
index 46b7287d6a..4ca511a901 100644
--- a/chef/lib/chef/resource/execute.rb
+++ b/chef/lib/chef/resource/execute.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Execute < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :execute
@command = name
@backup = 5
diff --git a/chef/lib/chef/resource/file.rb b/chef/lib/chef/resource/file.rb
index cc8ed4e982..d0777111ff 100644
--- a/chef/lib/chef/resource/file.rb
+++ b/chef/lib/chef/resource/file.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class File < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :file
@path = name
@backup = 5
diff --git a/chef/lib/chef/resource/freebsd_package.rb b/chef/lib/chef/resource/freebsd_package.rb
index 66c96c721a..8cfc135ee3 100644
--- a/chef/lib/chef/resource/freebsd_package.rb
+++ b/chef/lib/chef/resource/freebsd_package.rb
@@ -22,9 +22,9 @@ require 'chef/provider/package/freebsd'
class Chef
class Resource
class FreebsdPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :freebsd_package
@provider = Chef::Provider::Package::Freebsd
end
diff --git a/chef/lib/chef/resource/gem_package.rb b/chef/lib/chef/resource/gem_package.rb
index 9de503b7e9..cfe527915a 100644
--- a/chef/lib/chef/resource/gem_package.rb
+++ b/chef/lib/chef/resource/gem_package.rb
@@ -21,9 +21,9 @@ require 'chef/resource/package'
class Chef
class Resource
class GemPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :gem_package
@provider = Chef::Provider::Package::Rubygems
end
diff --git a/chef/lib/chef/resource/git.rb b/chef/lib/chef/resource/git.rb
index b95982eabc..dbf00a4a08 100644
--- a/chef/lib/chef/resource/git.rb
+++ b/chef/lib/chef/resource/git.rb
@@ -22,8 +22,8 @@ class Chef
class Resource
class Git < Chef::Resource::Scm
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+ def initialize(name, run_context)
+ super
@resource_name = :git
@provider = Chef::Provider::Git
end
@@ -33,4 +33,4 @@ class Chef
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/group.rb b/chef/lib/chef/resource/group.rb
index 36a6c141d4..132abe03eb 100644
--- a/chef/lib/chef/resource/group.rb
+++ b/chef/lib/chef/resource/group.rb
@@ -19,9 +19,9 @@
class Chef
class Resource
class Group < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :group
@group_name = name
@gid = nil
diff --git a/chef/lib/chef/resource/http_request.rb b/chef/lib/chef/resource/http_request.rb
index ff7a330149..c141ee204f 100644
--- a/chef/lib/chef/resource/http_request.rb
+++ b/chef/lib/chef/resource/http_request.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class HttpRequest < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :http_request
@message = name
@url = nil
@@ -49,4 +49,4 @@ class Chef
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/ifconfig.rb b/chef/lib/chef/resource/ifconfig.rb
index 22096f486b..26bf3e18d1 100644
--- a/chef/lib/chef/resource/ifconfig.rb
+++ b/chef/lib/chef/resource/ifconfig.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Ifconfig < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :ifconfig
@target = name
@action = :add
diff --git a/chef/lib/chef/resource/link.rb b/chef/lib/chef/resource/link.rb
index 0bb616c0ac..505c262d48 100644
--- a/chef/lib/chef/resource/link.rb
+++ b/chef/lib/chef/resource/link.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Link < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :link
@to = nil
@action = :create
diff --git a/chef/lib/chef/resource/log.rb b/chef/lib/chef/resource/log.rb
index 53cffb46f8..0158b3cc47 100644
--- a/chef/lib/chef/resource/log.rb
+++ b/chef/lib/chef/resource/log.rb
@@ -39,8 +39,8 @@ class Chef
# name<String>:: Message to log
# collection<Array>:: Collection of included recipes
# node<Chef::Node>:: Node where resource will be used
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+ def initialize(name, run_context)
+ super
@resource_name = :log
@level = :info
@action = :write
diff --git a/chef/lib/chef/resource/mdadm.rb b/chef/lib/chef/resource/mdadm.rb
index 31946089a5..99ee46b121 100644
--- a/chef/lib/chef/resource/mdadm.rb
+++ b/chef/lib/chef/resource/mdadm.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Mdadm < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :mdadm
@chunk = 16
diff --git a/chef/lib/chef/resource/mount.rb b/chef/lib/chef/resource/mount.rb
index 56dcfedee9..09d7641b6f 100644
--- a/chef/lib/chef/resource/mount.rb
+++ b/chef/lib/chef/resource/mount.rb
@@ -22,8 +22,8 @@ class Chef
class Resource
class Mount < Chef::Resource
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+ def initialize(name, run_context)
+ super
@resource_name = :mount
@mount_point = name
@device = nil
diff --git a/chef/lib/chef/resource/package.rb b/chef/lib/chef/resource/package.rb
index eabad866d1..c8b083f6d1 100644
--- a/chef/lib/chef/resource/package.rb
+++ b/chef/lib/chef/resource/package.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Package < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :package
@package_name = name
@version = nil
diff --git a/chef/lib/chef/resource/pacman_package.rb b/chef/lib/chef/resource/pacman_package.rb
index a4e5710566..5d523d5016 100644
--- a/chef/lib/chef/resource/pacman_package.rb
+++ b/chef/lib/chef/resource/pacman_package.rb
@@ -21,13 +21,13 @@ require 'chef/resource/package'
class Chef
class Resource
class PacmanPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :pacman_package
@provider = Chef::Provider::Package::Pacman
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/perl.rb b/chef/lib/chef/resource/perl.rb
index d7a832039f..85d838ad53 100644
--- a/chef/lib/chef/resource/perl.rb
+++ b/chef/lib/chef/resource/perl.rb
@@ -21,13 +21,13 @@ require 'chef/resource/script'
class Chef
class Resource
class Perl < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :perl
@interpreter = "perl"
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/portage_package.rb b/chef/lib/chef/resource/portage_package.rb
index 2453d9e23c..81abc9e947 100644
--- a/chef/lib/chef/resource/portage_package.rb
+++ b/chef/lib/chef/resource/portage_package.rb
@@ -21,13 +21,13 @@ require 'chef/resource/package'
class Chef
class Resource
class PortagePackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :portage_package
@provider = Chef::Provider::Package::Portage
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/python.rb b/chef/lib/chef/resource/python.rb
index 36e524bb1e..132ca96290 100644
--- a/chef/lib/chef/resource/python.rb
+++ b/chef/lib/chef/resource/python.rb
@@ -21,13 +21,13 @@ require 'chef/resource/script'
class Chef
class Resource
class Python < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :python
@interpreter = "python"
end
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/remote_directory.rb b/chef/lib/chef/resource/remote_directory.rb
index 1920c086de..7db38f87c5 100644
--- a/chef/lib/chef/resource/remote_directory.rb
+++ b/chef/lib/chef/resource/remote_directory.rb
@@ -21,9 +21,9 @@ require 'chef/resource/directory'
class Chef
class Resource
class RemoteDirectory < Chef::Resource::Directory
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :remote_directory
@path = name
@source = ::File.basename(name)
diff --git a/chef/lib/chef/resource/remote_file.rb b/chef/lib/chef/resource/remote_file.rb
index 4916702ed6..748fc9f920 100644
--- a/chef/lib/chef/resource/remote_file.rb
+++ b/chef/lib/chef/resource/remote_file.rb
@@ -21,9 +21,9 @@ require 'chef/resource/file'
class Chef
class Resource
class RemoteFile < Chef::Resource::File
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :remote_file
@action = "create"
@source = ::File.basename(name)
diff --git a/chef/lib/chef/resource/route.rb b/chef/lib/chef/resource/route.rb
index 276dbedb31..dfa241768d 100644
--- a/chef/lib/chef/resource/route.rb
+++ b/chef/lib/chef/resource/route.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Route < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :route
@target = name
@action = :add
diff --git a/chef/lib/chef/resource/ruby.rb b/chef/lib/chef/resource/ruby.rb
index 765610dc80..5e295dd39b 100644
--- a/chef/lib/chef/resource/ruby.rb
+++ b/chef/lib/chef/resource/ruby.rb
@@ -21,9 +21,9 @@ require 'chef/resource/script'
class Chef
class Resource
class Ruby < Chef::Resource::Script
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :ruby
@interpreter = "ruby"
end
diff --git a/chef/lib/chef/resource/ruby_block.rb b/chef/lib/chef/resource/ruby_block.rb
index 4f34c567b3..4c16a548b2 100644
--- a/chef/lib/chef/resource/ruby_block.rb
+++ b/chef/lib/chef/resource/ruby_block.rb
@@ -20,8 +20,9 @@
class Chef
class Resource
class RubyBlock < Chef::Resource
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :ruby_block
@action = "create"
@allowed_actions.push(:create)
diff --git a/chef/lib/chef/resource/scm.rb b/chef/lib/chef/resource/scm.rb
index 215fb59d06..c0139153ad 100644
--- a/chef/lib/chef/resource/scm.rb
+++ b/chef/lib/chef/resource/scm.rb
@@ -22,9 +22,9 @@ require 'chef/resource'
class Chef
class Resource
class Scm < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@destination = name
@resource_name = :scm
@enable_submodules = false
@@ -141,4 +141,4 @@ class Chef
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/script.rb b/chef/lib/chef/resource/script.rb
index 8ec2dc469a..9dd9943e7d 100644
--- a/chef/lib/chef/resource/script.rb
+++ b/chef/lib/chef/resource/script.rb
@@ -21,9 +21,9 @@ require 'chef/resource/execute'
class Chef
class Resource
class Script < Chef::Resource::Execute
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :script
@command = name
@code = nil
@@ -48,4 +48,4 @@ class Chef
end
end
-end \ No newline at end of file
+end
diff --git a/chef/lib/chef/resource/service.rb b/chef/lib/chef/resource/service.rb
index f32d3c062b..64778c27bf 100644
--- a/chef/lib/chef/resource/service.rb
+++ b/chef/lib/chef/resource/service.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class Service < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :service
@service_name = name
@enabled = nil
diff --git a/chef/lib/chef/resource/subversion.rb b/chef/lib/chef/resource/subversion.rb
index 3a48fad927..190291d071 100644
--- a/chef/lib/chef/resource/subversion.rb
+++ b/chef/lib/chef/resource/subversion.rb
@@ -22,8 +22,8 @@ class Chef
class Resource
class Subversion < Chef::Resource::Scm
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+ def initialize(name, run_context)
+ super
@resource_name = :subversion
@provider = Chef::Provider::Subversion
allowed_actions << :force_export
diff --git a/chef/lib/chef/resource/template.rb b/chef/lib/chef/resource/template.rb
index 6e3c5ef66c..06de130b67 100644
--- a/chef/lib/chef/resource/template.rb
+++ b/chef/lib/chef/resource/template.rb
@@ -21,9 +21,9 @@ require 'chef/resource/file'
class Chef
class Resource
class Template < Chef::Resource::File
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :template
@action = "create"
@source = "#{::File.basename(name)}.erb"
diff --git a/chef/lib/chef/resource/user.rb b/chef/lib/chef/resource/user.rb
index df777f3c66..061963425b 100644
--- a/chef/lib/chef/resource/user.rb
+++ b/chef/lib/chef/resource/user.rb
@@ -21,9 +21,9 @@ require 'chef/resource'
class Chef
class Resource
class User < Chef::Resource
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :user
@username = name
@comment = nil
diff --git a/chef/lib/chef/resource/yum_package.rb b/chef/lib/chef/resource/yum_package.rb
index 4ab76a5156..6195c07710 100644
--- a/chef/lib/chef/resource/yum_package.rb
+++ b/chef/lib/chef/resource/yum_package.rb
@@ -22,9 +22,9 @@ require 'chef/provider/package/yum'
class Chef
class Resource
class YumPackage < Chef::Resource::Package
-
- def initialize(name, collection=nil, node=nil)
- super(name, collection, node)
+
+ def initialize(name, run_context)
+ super
@resource_name = :yum_package
@provider = Chef::Provider::Package::Yum
end