diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-05-08 17:03:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-05-08 17:03:26 -0700 |
commit | bc7687e56763cedbd010cfd566aa2fc0c53bb194 (patch) | |
tree | 3d3e3eec51c847f23dc2955f9d058777bdea9a91 /lib/chef/http | |
parent | e793c825c857af87e745a8af479af71522ff20db (diff) | |
download | chef-bc7687e56763cedbd010cfd566aa2fc0c53bb194.tar.gz |
Convert require to require_relative
This gives a speed boost since rubygems does not have to scan through
every gem in the gemset in order to find the file.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/api_versions.rb | 4 | ||||
-rw-r--r-- | lib/chef/http/auth_credentials.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/authenticator.rb | 4 | ||||
-rw-r--r-- | lib/chef/http/basic_client.rb | 4 | ||||
-rw-r--r-- | lib/chef/http/cookie_manager.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/decompressor.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/http_request.rb | 4 | ||||
-rw-r--r-- | lib/chef/http/json_input.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/json_output.rb | 4 | ||||
-rw-r--r-- | lib/chef/http/json_to_model_output.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/remote_request_id.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/simple.rb | 10 | ||||
-rw-r--r-- | lib/chef/http/simple_json.rb | 10 | ||||
-rw-r--r-- | lib/chef/http/ssl_policies.rb | 2 | ||||
-rw-r--r-- | lib/chef/http/validate_content_length.rb | 2 |
15 files changed, 28 insertions, 28 deletions
diff --git a/lib/chef/http/api_versions.rb b/lib/chef/http/api_versions.rb index 6c5ede40aa..e1eae4b468 100644 --- a/lib/chef/http/api_versions.rb +++ b/lib/chef/http/api_versions.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "chef/server_api_versions" -require "chef/json_compat" +require_relative "../server_api_versions" +require_relative "../json_compat" class Chef class HTTP diff --git a/lib/chef/http/auth_credentials.rb b/lib/chef/http/auth_credentials.rb index 547b5c8a83..e761c97e9b 100644 --- a/lib/chef/http/auth_credentials.rb +++ b/lib/chef/http/auth_credentials.rb @@ -20,7 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "chef/log" +require_relative "../log" require "mixlib/authentication/signedheaderauth" class Chef diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb index daa582f890..6b059c9733 100644 --- a/lib/chef/http/authenticator.rb +++ b/lib/chef/http/authenticator.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require "chef/http/auth_credentials" -require "chef/exceptions" +require_relative "auth_credentials" +require_relative "../exceptions" require "openssl" class Chef diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb index 54da722b3d..a599f2219e 100644 --- a/lib/chef/http/basic_client.rb +++ b/lib/chef/http/basic_client.rb @@ -22,8 +22,8 @@ # require "uri" require "net/http" -require "chef/http/ssl_policies" -require "chef/http/http_request" +require_relative "ssl_policies" +require_relative "http_request" class Chef class HTTP diff --git a/lib/chef/http/cookie_manager.rb b/lib/chef/http/cookie_manager.rb index 723b26ad87..b7b6dddb52 100644 --- a/lib/chef/http/cookie_manager.rb +++ b/lib/chef/http/cookie_manager.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/http/cookie_jar" +require_relative "cookie_jar" class Chef class HTTP diff --git a/lib/chef/http/decompressor.rb b/lib/chef/http/decompressor.rb index cf4a4bc593..f43f054366 100644 --- a/lib/chef/http/decompressor.rb +++ b/lib/chef/http/decompressor.rb @@ -17,7 +17,7 @@ # require "zlib" -require "chef/http/http_request" +require_relative "http_request" class Chef class HTTP diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index 18a4648443..a8549b32da 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -22,7 +22,7 @@ # require "uri" require "net/http" -require "chef/dist" +require_relative "../dist" # To load faster, we only want ohai's version string. # However, in ohai before 0.6.0, the version is defined @@ -33,7 +33,7 @@ rescue LoadError require "ohai" end -require "chef/version" +require_relative "../version" class Chef class HTTP diff --git a/lib/chef/http/json_input.rb b/lib/chef/http/json_input.rb index e2c8b3e2ee..f7204d4ccc 100644 --- a/lib/chef/http/json_input.rb +++ b/lib/chef/http/json_input.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "chef/json_compat" +require_relative "../json_compat" class Chef class HTTP diff --git a/lib/chef/http/json_output.rb b/lib/chef/http/json_output.rb index 25f1380ceb..5fe2622f94 100644 --- a/lib/chef/http/json_output.rb +++ b/lib/chef/http/json_output.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "chef/json_compat" -require "chef/log" +require_relative "../json_compat" +require_relative "../log" class Chef class HTTP diff --git a/lib/chef/http/json_to_model_output.rb b/lib/chef/http/json_to_model_output.rb index 997ceb8b1f..c908d0d23d 100644 --- a/lib/chef/http/json_to_model_output.rb +++ b/lib/chef/http/json_to_model_output.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef/http/json_output" +require_relative "json_output" class Chef class HTTP diff --git a/lib/chef/http/remote_request_id.rb b/lib/chef/http/remote_request_id.rb index a779df805e..d4fb8eb115 100644 --- a/lib/chef/http/remote_request_id.rb +++ b/lib/chef/http/remote_request_id.rb @@ -15,7 +15,7 @@ # limitations under the License. # -require "chef/request_id" +require_relative "../request_id" class Chef class HTTP diff --git a/lib/chef/http/simple.rb b/lib/chef/http/simple.rb index bdbc31c9f1..c318debd1d 100644 --- a/lib/chef/http/simple.rb +++ b/lib/chef/http/simple.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/http" -require "chef/http/authenticator" -require "chef/http/decompressor" -require "chef/http/cookie_manager" -require "chef/http/validate_content_length" +require_relative "" +require_relative "authenticator" +require_relative "decompressor" +require_relative "cookie_manager" +require_relative "validate_content_length" class Chef class HTTP diff --git a/lib/chef/http/simple_json.rb b/lib/chef/http/simple_json.rb index 7357d859ee..57886380e6 100644 --- a/lib/chef/http/simple_json.rb +++ b/lib/chef/http/simple_json.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require "chef/http" -require "chef/http/authenticator" -require "chef/http/decompressor" -require "chef/http/cookie_manager" -require "chef/http/validate_content_length" +require_relative "" +require_relative "authenticator" +require_relative "decompressor" +require_relative "cookie_manager" +require_relative "validate_content_length" class Chef class HTTP diff --git a/lib/chef/http/ssl_policies.rb b/lib/chef/http/ssl_policies.rb index a3692b81b6..2708e5b3b1 100644 --- a/lib/chef/http/ssl_policies.rb +++ b/lib/chef/http/ssl_policies.rb @@ -22,7 +22,7 @@ # require "openssl" -require "chef/util/path_helper" +require_relative "../util/path_helper" class Chef class HTTP diff --git a/lib/chef/http/validate_content_length.rb b/lib/chef/http/validate_content_length.rb index c8e8ac53ad..e24ebc0dd5 100644 --- a/lib/chef/http/validate_content_length.rb +++ b/lib/chef/http/validate_content_length.rb @@ -17,7 +17,7 @@ # require "pp" -require "chef/log" +require_relative "../log" class Chef class HTTP |