summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-06-12 20:34:48 -0700
committerGitHub <noreply@github.com>2018-06-12 20:34:48 -0700
commit57d88270bbe68d2163a87362c4053ee2e581ee25 (patch)
tree921be806eed1321473b316716142be6e6de84d5d
parent409eac9ad65a706a401b9259298bbf1c5ecd339d (diff)
parentd5e8523dbf25a997ea21dc244e26d9edc06af2a6 (diff)
downloadchef-57d88270bbe68d2163a87362c4053ee2e581ee25.tar.gz
Merge pull request #7364 from chef/missing_requires
Add missing chef/resource requires in resource
-rw-r--r--lib/chef/resource/chef_handler.rb2
-rw-r--r--lib/chef/resource/dsc_script.rb1
-rw-r--r--lib/chef/resource/hostname.rb16
-rw-r--r--lib/chef/resource/ohai.rb2
-rw-r--r--lib/chef/resource/ohai_hint.rb2
5 files changed, 23 insertions, 0 deletions
diff --git a/lib/chef/resource/chef_handler.rb b/lib/chef/resource/chef_handler.rb
index ceed235840..6d55f882bd 100644
--- a/lib/chef/resource/chef_handler.rb
+++ b/lib/chef/resource/chef_handler.rb
@@ -15,6 +15,8 @@
# limitations under the License.
#
+require "chef/resource"
+
class Chef
class Resource
class ChefHandler < Chef::Resource
diff --git a/lib/chef/resource/dsc_script.rb b/lib/chef/resource/dsc_script.rb
index d10113be56..f3fa5d0314 100644
--- a/lib/chef/resource/dsc_script.rb
+++ b/lib/chef/resource/dsc_script.rb
@@ -16,6 +16,7 @@
# limitations under the License.
#
+require "chef/resource"
require "chef/exceptions"
require "chef/dsl/powershell"
diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb
index 878f502dae..02996f4464 100644
--- a/lib/chef/resource/hostname.rb
+++ b/lib/chef/resource/hostname.rb
@@ -1,3 +1,19 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require "chef/resource"
+
class Chef
class Resource
# Sets the hostname and updates /etc/hosts on *nix systems
diff --git a/lib/chef/resource/ohai.rb b/lib/chef/resource/ohai.rb
index a84d521333..b286412434 100644
--- a/lib/chef/resource/ohai.rb
+++ b/lib/chef/resource/ohai.rb
@@ -17,6 +17,8 @@
# limitations under the License.
#
+require "chef/resource"
+
class Chef
class Resource
class Ohai < Chef::Resource
diff --git a/lib/chef/resource/ohai_hint.rb b/lib/chef/resource/ohai_hint.rb
index 6eb36aea13..f485222ec6 100644
--- a/lib/chef/resource/ohai_hint.rb
+++ b/lib/chef/resource/ohai_hint.rb
@@ -15,6 +15,8 @@
# limitations under the License.
#
+require "chef/resource"
+
class Chef
class Resource
class OhaiHint < Chef::Resource