diff options
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/authenticator.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/basic_client.rb | 4 | ||||
-rw-r--r-- | lib/chef/http/cookie_jar.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/http_request.rb | 6 | ||||
-rw-r--r-- | lib/chef/http/ssl_policies.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/validate_content_length.rb | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb index 6b059c9733..1e302f5173 100644 --- a/lib/chef/http/authenticator.rb +++ b/lib/chef/http/authenticator.rb @@ -18,7 +18,7 @@ require_relative "auth_credentials" require_relative "../exceptions" -require "openssl" +require "openssl" unless defined?(OpenSSL) class Chef class HTTP diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb index a599f2219e..3cbfc8c968 100644 --- a/lib/chef/http/basic_client.rb +++ b/lib/chef/http/basic_client.rb @@ -20,8 +20,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "uri" -require "net/http" +require "uri" unless defined?(URI) +require "net/http" unless defined?(Net::HTTP) require_relative "ssl_policies" require_relative "http_request" diff --git a/lib/chef/http/cookie_jar.rb b/lib/chef/http/cookie_jar.rb index 4908fde0c9..5d54fa2c4d 100644 --- a/lib/chef/http/cookie_jar.rb +++ b/lib/chef/http/cookie_jar.rb @@ -20,7 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "singleton" +require "singleton" unless defined?(Singleton) class Chef class HTTP diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index a8549b32da..566d05fa84 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -20,8 +20,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "uri" -require "net/http" +require "uri" unless defined?(URI) +require "net/http" unless defined?(Net::HTTP) require_relative "../dist" # To load faster, we only want ohai's version string. @@ -30,7 +30,7 @@ require_relative "../dist" begin require "ohai/version" # used in user agent string. rescue LoadError - require "ohai" + require "ohai" unless defined?(Ohai::System) end require_relative "../version" diff --git a/lib/chef/http/ssl_policies.rb b/lib/chef/http/ssl_policies.rb index 2708e5b3b1..3f7dd34404 100644 --- a/lib/chef/http/ssl_policies.rb +++ b/lib/chef/http/ssl_policies.rb @@ -21,7 +21,7 @@ # limitations under the License. # -require "openssl" +require "openssl" unless defined?(OpenSSL) require_relative "../util/path_helper" class Chef diff --git a/lib/chef/http/validate_content_length.rb b/lib/chef/http/validate_content_length.rb index e24ebc0dd5..1b1a8a398a 100644 --- a/lib/chef/http/validate_content_length.rb +++ b/lib/chef/http/validate_content_length.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "pp" +require "pp" unless defined?(PP) require_relative "../log" class Chef |