From dad360173bb575c17daa531021e80064f6fefded Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 20 Dec 2019 15:16:38 -0800 Subject: [PATCH 1/2] Substitute require for require_relative require_relative is significantly faster and should be used when available. Signed-off-by: Tim Smith --- lib/chef_zero.rb | 2 +- lib/chef_zero/chef_data/data_normalizer.rb | 6 +- lib/chef_zero/chef_data/default_creator.rb | 2 +- .../data_store/data_already_exists_error.rb | 2 +- .../data_store/data_not_found_error.rb | 2 +- lib/chef_zero/data_store/default_facade.rb | 4 +- lib/chef_zero/data_store/interface_v2.rb | 2 +- lib/chef_zero/data_store/memory_store.rb | 6 +- lib/chef_zero/data_store/memory_store_v2.rb | 6 +- lib/chef_zero/data_store/raw_file_store.rb | 6 +- lib/chef_zero/data_store/v1_to_v2_adapter.rb | 2 +- lib/chef_zero/data_store/v2_to_v1_adapter.rb | 2 +- lib/chef_zero/endpoints/acl_endpoint.rb | 4 +- lib/chef_zero/endpoints/acls_endpoint.rb | 6 +- .../endpoints/actor_default_key_endpoint.rb | 2 +- lib/chef_zero/endpoints/actor_endpoint.rb | 4 +- lib/chef_zero/endpoints/actor_key_endpoint.rb | 2 +- .../endpoints/actor_keys_endpoint.rb | 2 +- lib/chef_zero/endpoints/actors_endpoint.rb | 2 +- .../endpoints/authenticate_user_endpoint.rb | 2 +- lib/chef_zero/endpoints/container_endpoint.rb | 4 +- .../endpoints/containers_endpoint.rb | 2 +- lib/chef_zero/endpoints/controls_endpoint.rb | 2 +- .../endpoints/cookbook_artifact_endpoint.rb | 2 +- .../cookbook_artifact_identifier_endpoint.rb | 2 +- .../endpoints/cookbook_artifacts_endpoint.rb | 2 +- lib/chef_zero/endpoints/cookbook_endpoint.rb | 2 +- .../endpoints/cookbook_version_endpoint.rb | 8 +- lib/chef_zero/endpoints/cookbooks_base.rb | 4 +- lib/chef_zero/endpoints/cookbooks_endpoint.rb | 2 +- lib/chef_zero/endpoints/data_bag_endpoint.rb | 6 +- .../endpoints/data_bag_item_endpoint.rb | 6 +- lib/chef_zero/endpoints/data_bags_endpoint.rb | 2 +- .../environment_cookbook_endpoint.rb | 2 +- .../environment_cookbook_versions_endpoint.rb | 4 +- .../environment_cookbooks_endpoint.rb | 2 +- .../endpoints/environment_endpoint.rb | 4 +- .../endpoints/environment_nodes_endpoint.rb | 2 +- .../endpoints/environment_recipes_endpoint.rb | 2 +- .../endpoints/environment_role_endpoint.rb | 2 +- .../endpoints/file_store_file_endpoint.rb | 2 +- lib/chef_zero/endpoints/group_endpoint.rb | 4 +- lib/chef_zero/endpoints/groups_endpoint.rb | 2 +- lib/chef_zero/endpoints/license_endpoint.rb | 2 +- lib/chef_zero/endpoints/node_endpoint.rb | 4 +- .../endpoints/node_identifiers_endpoint.rb | 2 +- lib/chef_zero/endpoints/nodes_endpoint.rb | 4 +- ...ganization_association_request_endpoint.rb | 2 +- ...anization_association_requests_endpoint.rb | 2 +- ...organization_authenticate_user_endpoint.rb | 2 +- .../endpoints/organization_endpoint.rb | 2 +- .../endpoints/organization_user_base.rb | 2 +- .../organization_user_default_key_endpoint.rb | 2 +- .../endpoints/organization_user_endpoint.rb | 2 +- .../organization_user_key_endpoint.rb | 4 +- .../organization_user_keys_endpoint.rb | 2 +- .../endpoints/organization_users_endpoint.rb | 4 +- .../organization_validator_key_endpoint.rb | 2 +- .../endpoints/organizations_endpoint.rb | 2 +- lib/chef_zero/endpoints/policies_endpoint.rb | 2 +- lib/chef_zero/endpoints/policy_endpoint.rb | 2 +- .../endpoints/policy_group_endpoint.rb | 4 +- .../endpoints/policy_group_policy_endpoint.rb | 4 +- .../endpoints/policy_groups_endpoint.rb | 4 +- .../endpoints/policy_revision_endpoint.rb | 2 +- .../endpoints/policy_revisions_endpoint.rb | 2 +- lib/chef_zero/endpoints/principal_endpoint.rb | 4 +- lib/chef_zero/endpoints/rest_list_endpoint.rb | 2 +- .../endpoints/rest_object_endpoint.rb | 4 +- lib/chef_zero/endpoints/role_endpoint.rb | 4 +- .../endpoints/role_environments_endpoint.rb | 2 +- lib/chef_zero/endpoints/sandbox_endpoint.rb | 4 +- lib/chef_zero/endpoints/sandboxes_endpoint.rb | 2 +- lib/chef_zero/endpoints/search_endpoint.rb | 10 +- lib/chef_zero/endpoints/searches_endpoint.rb | 2 +- .../endpoints/server_api_version_endpoint.rb | 2 +- .../endpoints/system_recovery_endpoint.rb | 2 +- lib/chef_zero/endpoints/universe_endpoint.rb | 4 +- .../user_association_request_endpoint.rb | 2 +- ...ser_association_requests_count_endpoint.rb | 2 +- .../user_association_requests_endpoint.rb | 2 +- .../endpoints/user_organizations_endpoint.rb | 2 +- lib/chef_zero/endpoints/version_endpoint.rb | 4 +- lib/chef_zero/rest_base.rb | 8 +- lib/chef_zero/rspec.rb | 4 +- lib/chef_zero/server.rb | 158 +++++++++--------- lib/chef_zero/socketless_server_map.rb | 2 +- lib/chef_zero/solr/query/phrase.rb | 2 +- lib/chef_zero/solr/query/term.rb | 2 +- lib/chef_zero/solr/solr_parser.rb | 12 +- 90 files changed, 219 insertions(+), 219 deletions(-) diff --git a/lib/chef_zero.rb b/lib/chef_zero.rb index 4fdb4a08..77da1d60 100644 --- a/lib/chef_zero.rb +++ b/lib/chef_zero.rb @@ -1,5 +1,5 @@ module ChefZero - require "chef_zero/log" + require_relative "chef_zero/log" MIN_API_VERSION = 0 MAX_API_VERSION = 2 diff --git a/lib/chef_zero/chef_data/data_normalizer.rb b/lib/chef_zero/chef_data/data_normalizer.rb index b5286dce..de3ff585 100644 --- a/lib/chef_zero/chef_data/data_normalizer.rb +++ b/lib/chef_zero/chef_data/data_normalizer.rb @@ -1,6 +1,6 @@ -require "chef_zero" -require "chef_zero/rest_base" -require "chef_zero/chef_data/default_creator" +require_relative "../../chef_zero" +require_relative "../rest_base" +require_relative "default_creator" module ChefZero module ChefData diff --git a/lib/chef_zero/chef_data/default_creator.rb b/lib/chef_zero/chef_data/default_creator.rb index 90c8200b..3144e3a1 100644 --- a/lib/chef_zero/chef_data/default_creator.rb +++ b/lib/chef_zero/chef_data/default_creator.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/acl_path" +require_relative "acl_path" module ChefZero module ChefData diff --git a/lib/chef_zero/data_store/data_already_exists_error.rb b/lib/chef_zero/data_store/data_already_exists_error.rb index 60f5b575..f9bcba31 100644 --- a/lib/chef_zero/data_store/data_already_exists_error.rb +++ b/lib/chef_zero/data_store/data_already_exists_error.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef_zero/data_store/data_error" +require_relative "data_error" module ChefZero module DataStore diff --git a/lib/chef_zero/data_store/data_not_found_error.rb b/lib/chef_zero/data_store/data_not_found_error.rb index 508b460d..ef023532 100644 --- a/lib/chef_zero/data_store/data_not_found_error.rb +++ b/lib/chef_zero/data_store/data_not_found_error.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef_zero/data_store/data_error" +require_relative "data_error" module ChefZero module DataStore diff --git a/lib/chef_zero/data_store/default_facade.rb b/lib/chef_zero/data_store/default_facade.rb index 2b93b786..df6afc66 100644 --- a/lib/chef_zero/data_store/default_facade.rb +++ b/lib/chef_zero/data_store/default_facade.rb @@ -1,5 +1,5 @@ -require "chef_zero/data_store/interface_v2" -require "chef_zero/chef_data/default_creator" +require_relative "interface_v2" +require_relative "../chef_data/default_creator" module ChefZero module DataStore diff --git a/lib/chef_zero/data_store/interface_v2.rb b/lib/chef_zero/data_store/interface_v2.rb index 8c02e2ef..4b24e1d8 100644 --- a/lib/chef_zero/data_store/interface_v2.rb +++ b/lib/chef_zero/data_store/interface_v2.rb @@ -1,4 +1,4 @@ -require "chef_zero/data_store/interface_v1" +require_relative "interface_v1" module ChefZero module DataStore diff --git a/lib/chef_zero/data_store/memory_store.rb b/lib/chef_zero/data_store/memory_store.rb index fa2a9cf2..cc76b232 100644 --- a/lib/chef_zero/data_store/memory_store.rb +++ b/lib/chef_zero/data_store/memory_store.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef_zero/data_store/v2_to_v1_adapter" -require "chef_zero/data_store/memory_store_v2" -require "chef_zero/data_store/default_facade" +require_relative "v2_to_v1_adapter" +require_relative "memory_store_v2" +require_relative "default_facade" module ChefZero module DataStore diff --git a/lib/chef_zero/data_store/memory_store_v2.rb b/lib/chef_zero/data_store/memory_store_v2.rb index 809d2213..10ed007d 100644 --- a/lib/chef_zero/data_store/memory_store_v2.rb +++ b/lib/chef_zero/data_store/memory_store_v2.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef_zero/data_store/data_already_exists_error" -require "chef_zero/data_store/data_not_found_error" -require "chef_zero/data_store/interface_v2" +require_relative "data_already_exists_error" +require_relative "data_not_found_error" +require_relative "interface_v2" module ChefZero module DataStore diff --git a/lib/chef_zero/data_store/raw_file_store.rb b/lib/chef_zero/data_store/raw_file_store.rb index d643f03b..b284a099 100644 --- a/lib/chef_zero/data_store/raw_file_store.rb +++ b/lib/chef_zero/data_store/raw_file_store.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require "chef_zero/data_store/data_already_exists_error" -require "chef_zero/data_store/data_not_found_error" -require "chef_zero/data_store/interface_v2" +require_relative "data_already_exists_error" +require_relative "data_not_found_error" +require_relative "interface_v2" require "fileutils" module ChefZero diff --git a/lib/chef_zero/data_store/v1_to_v2_adapter.rb b/lib/chef_zero/data_store/v1_to_v2_adapter.rb index 18406569..d1852821 100644 --- a/lib/chef_zero/data_store/v1_to_v2_adapter.rb +++ b/lib/chef_zero/data_store/v1_to_v2_adapter.rb @@ -1,4 +1,4 @@ -require "chef_zero/data_store/interface_v2" +require_relative "interface_v2" module ChefZero module DataStore diff --git a/lib/chef_zero/data_store/v2_to_v1_adapter.rb b/lib/chef_zero/data_store/v2_to_v1_adapter.rb index 38f2bc1d..cfb71324 100644 --- a/lib/chef_zero/data_store/v2_to_v1_adapter.rb +++ b/lib/chef_zero/data_store/v2_to_v1_adapter.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "chef_zero/data_store/interface_v1" +require_relative "interface_v1" module ChefZero module DataStore diff --git a/lib/chef_zero/endpoints/acl_endpoint.rb b/lib/chef_zero/endpoints/acl_endpoint.rb index d5010f95..328512ad 100644 --- a/lib/chef_zero/endpoints/acl_endpoint.rb +++ b/lib/chef_zero/endpoints/acl_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/chef_data/acl_path" +require_relative "../rest_base" +require_relative "../chef_data/acl_path" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/acls_endpoint.rb b/lib/chef_zero/endpoints/acls_endpoint.rb index 48759c24..2ed5b786 100644 --- a/lib/chef_zero/endpoints/acls_endpoint.rb +++ b/lib/chef_zero/endpoints/acls_endpoint.rb @@ -1,7 +1,7 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/chef_data/data_normalizer" -require "chef_zero/chef_data/acl_path" +require_relative "../rest_base" +require_relative "../chef_data/data_normalizer" +require_relative "../chef_data/acl_path" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/actor_default_key_endpoint.rb b/lib/chef_zero/endpoints/actor_default_key_endpoint.rb index a13204bb..99d7174c 100644 --- a/lib/chef_zero/endpoints/actor_default_key_endpoint.rb +++ b/lib/chef_zero/endpoints/actor_default_key_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/actor_endpoint.rb b/lib/chef_zero/endpoints/actor_endpoint.rb index 8c79f9a2..ad32a28e 100644 --- a/lib/chef_zero/endpoints/actor_endpoint.rb +++ b/lib/chef_zero/endpoints/actor_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/actor_key_endpoint.rb b/lib/chef_zero/endpoints/actor_key_endpoint.rb index a61d2f37..291def23 100644 --- a/lib/chef_zero/endpoints/actor_key_endpoint.rb +++ b/lib/chef_zero/endpoints/actor_key_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/actor_keys_endpoint.rb b/lib/chef_zero/endpoints/actor_keys_endpoint.rb index 89528b2b..8aab1d51 100644 --- a/lib/chef_zero/endpoints/actor_keys_endpoint.rb +++ b/lib/chef_zero/endpoints/actor_keys_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/actors_endpoint.rb b/lib/chef_zero/endpoints/actors_endpoint.rb index f4a21608..79a72a83 100644 --- a/lib/chef_zero/endpoints/actors_endpoint.rb +++ b/lib/chef_zero/endpoints/actors_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_list_endpoint" +require_relative "rest_list_endpoint" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/authenticate_user_endpoint.rb b/lib/chef_zero/endpoints/authenticate_user_endpoint.rb index 44ed24e3..dfde6e42 100644 --- a/lib/chef_zero/endpoints/authenticate_user_endpoint.rb +++ b/lib/chef_zero/endpoints/authenticate_user_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/container_endpoint.rb b/lib/chef_zero/endpoints/container_endpoint.rb index 95b92ca1..04724c1f 100644 --- a/lib/chef_zero/endpoints/container_endpoint.rb +++ b/lib/chef_zero/endpoints/container_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/containers_endpoint.rb b/lib/chef_zero/endpoints/containers_endpoint.rb index 22607655..8a6a81b3 100644 --- a/lib/chef_zero/endpoints/containers_endpoint.rb +++ b/lib/chef_zero/endpoints/containers_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_list_endpoint" +require_relative "rest_list_endpoint" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/controls_endpoint.rb b/lib/chef_zero/endpoints/controls_endpoint.rb index b7021af4..b9816993 100644 --- a/lib/chef_zero/endpoints/controls_endpoint.rb +++ b/lib/chef_zero/endpoints/controls_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/dist" +require_relative "../dist" module ChefZero module Endpoints # /organizations/ORG/controls diff --git a/lib/chef_zero/endpoints/cookbook_artifact_endpoint.rb b/lib/chef_zero/endpoints/cookbook_artifact_endpoint.rb index d0cf8227..59da82c0 100644 --- a/lib/chef_zero/endpoints/cookbook_artifact_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbook_artifact_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/data_normalizer" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb b/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb index 1c2d6a76..851d000e 100644 --- a/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/data_normalizer" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/cookbook_artifacts_endpoint.rb b/lib/chef_zero/endpoints/cookbook_artifacts_endpoint.rb index e2d1d2a0..d613916d 100644 --- a/lib/chef_zero/endpoints/cookbook_artifacts_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbook_artifacts_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/data_normalizer" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/cookbook_endpoint.rb b/lib/chef_zero/endpoints/cookbook_endpoint.rb index 8c4d49d7..d2d58ef7 100644 --- a/lib/chef_zero/endpoints/cookbook_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbook_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/endpoints/cookbooks_base" +require_relative "cookbooks_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb index 5ec1aa4d..2cad5ea0 100644 --- a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb @@ -1,8 +1,8 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/rest_error_response" -require "chef_zero/chef_data/data_normalizer" -require "chef_zero/data_store/data_not_found_error" +require_relative "rest_object_endpoint" +require_relative "../rest_error_response" +require_relative "../chef_data/data_normalizer" +require_relative "../data_store/data_not_found_error" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/cookbooks_base.rb b/lib/chef_zero/endpoints/cookbooks_base.rb index 331f504f..67061c68 100644 --- a/lib/chef_zero/endpoints/cookbooks_base.rb +++ b/lib/chef_zero/endpoints/cookbooks_base.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/chef_data/data_normalizer" +require_relative "../rest_base" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/cookbooks_endpoint.rb b/lib/chef_zero/endpoints/cookbooks_endpoint.rb index e3e2ebe3..bba0596f 100644 --- a/lib/chef_zero/endpoints/cookbooks_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbooks_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/endpoints/cookbooks_base" +require_relative "cookbooks_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/data_bag_endpoint.rb b/lib/chef_zero/endpoints/data_bag_endpoint.rb index 8d1a96f9..6b41c7a1 100644 --- a/lib/chef_zero/endpoints/data_bag_endpoint.rb +++ b/lib/chef_zero/endpoints/data_bag_endpoint.rb @@ -1,7 +1,7 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_list_endpoint" -require "chef_zero/endpoints/data_bag_item_endpoint" -require "chef_zero/rest_error_response" +require_relative "rest_list_endpoint" +require_relative "data_bag_item_endpoint" +require_relative "../rest_error_response" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/data_bag_item_endpoint.rb b/lib/chef_zero/endpoints/data_bag_item_endpoint.rb index ec21ab0a..0c6f3e29 100644 --- a/lib/chef_zero/endpoints/data_bag_item_endpoint.rb +++ b/lib/chef_zero/endpoints/data_bag_item_endpoint.rb @@ -1,7 +1,7 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/endpoints/data_bag_item_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "data_bag_item_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/data_bags_endpoint.rb b/lib/chef_zero/endpoints/data_bags_endpoint.rb index f90b7d71..ec073439 100644 --- a/lib/chef_zero/endpoints/data_bags_endpoint.rb +++ b/lib/chef_zero/endpoints/data_bags_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_list_endpoint" +require_relative "rest_list_endpoint" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/environment_cookbook_endpoint.rb b/lib/chef_zero/endpoints/environment_cookbook_endpoint.rb index 3e4bb619..d88c1980 100644 --- a/lib/chef_zero/endpoints/environment_cookbook_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_cookbook_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/cookbooks_base" +require_relative "cookbooks_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb b/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb index 8023d69d..e09d704e 100644 --- a/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/rest_error_response" +require_relative "../rest_base" +require_relative "../rest_error_response" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/environment_cookbooks_endpoint.rb b/lib/chef_zero/endpoints/environment_cookbooks_endpoint.rb index ced63453..07a5a3be 100644 --- a/lib/chef_zero/endpoints/environment_cookbooks_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_cookbooks_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/cookbooks_base" +require_relative "cookbooks_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/environment_endpoint.rb b/lib/chef_zero/endpoints/environment_endpoint.rb index 37f0169f..d2a6d867 100644 --- a/lib/chef_zero/endpoints/environment_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/environment_nodes_endpoint.rb b/lib/chef_zero/endpoints/environment_nodes_endpoint.rb index 55e18774..7f0dbabb 100644 --- a/lib/chef_zero/endpoints/environment_nodes_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_nodes_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/environment_recipes_endpoint.rb b/lib/chef_zero/endpoints/environment_recipes_endpoint.rb index d79660e2..1d69d999 100644 --- a/lib/chef_zero/endpoints/environment_recipes_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_recipes_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/cookbooks_base" +require_relative "cookbooks_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/environment_role_endpoint.rb b/lib/chef_zero/endpoints/environment_role_endpoint.rb index 9d3ce3e8..b0d0cf57 100644 --- a/lib/chef_zero/endpoints/environment_role_endpoint.rb +++ b/lib/chef_zero/endpoints/environment_role_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/cookbooks_base" +require_relative "cookbooks_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/file_store_file_endpoint.rb b/lib/chef_zero/endpoints/file_store_file_endpoint.rb index 290d7d9c..9f692682 100644 --- a/lib/chef_zero/endpoints/file_store_file_endpoint.rb +++ b/lib/chef_zero/endpoints/file_store_file_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/group_endpoint.rb b/lib/chef_zero/endpoints/group_endpoint.rb index b1b4f8fc..a831dbc5 100644 --- a/lib/chef_zero/endpoints/group_endpoint.rb +++ b/lib/chef_zero/endpoints/group_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/groups_endpoint.rb b/lib/chef_zero/endpoints/groups_endpoint.rb index 47cd1019..424fe139 100644 --- a/lib/chef_zero/endpoints/groups_endpoint.rb +++ b/lib/chef_zero/endpoints/groups_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_list_endpoint" +require_relative "rest_list_endpoint" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/license_endpoint.rb b/lib/chef_zero/endpoints/license_endpoint.rb index ec85834e..949a6613 100644 --- a/lib/chef_zero/endpoints/license_endpoint.rb +++ b/lib/chef_zero/endpoints/license_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/node_endpoint.rb b/lib/chef_zero/endpoints/node_endpoint.rb index 689b631e..e311871b 100644 --- a/lib/chef_zero/endpoints/node_endpoint.rb +++ b/lib/chef_zero/endpoints/node_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/node_identifiers_endpoint.rb b/lib/chef_zero/endpoints/node_identifiers_endpoint.rb index b62693ad..2081593a 100644 --- a/lib/chef_zero/endpoints/node_identifiers_endpoint.rb +++ b/lib/chef_zero/endpoints/node_identifiers_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" require "uuidtools" module ChefZero diff --git a/lib/chef_zero/endpoints/nodes_endpoint.rb b/lib/chef_zero/endpoints/nodes_endpoint.rb index d828a115..513b1478 100644 --- a/lib/chef_zero/endpoints/nodes_endpoint.rb +++ b/lib/chef_zero/endpoints/nodes_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_association_request_endpoint.rb b/lib/chef_zero/endpoints/organization_association_request_endpoint.rb index 65caf569..6243a6c5 100644 --- a/lib/chef_zero/endpoints/organization_association_request_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_association_request_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb b/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb index cb4005d3..d16a8b7d 100644 --- a/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_authenticate_user_endpoint.rb b/lib/chef_zero/endpoints/organization_authenticate_user_endpoint.rb index 8a7abf72..ba8e13a0 100644 --- a/lib/chef_zero/endpoints/organization_authenticate_user_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_authenticate_user_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_endpoint.rb b/lib/chef_zero/endpoints/organization_endpoint.rb index d71d9ade..a7f190df 100644 --- a/lib/chef_zero/endpoints/organization_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_user_base.rb b/lib/chef_zero/endpoints/organization_user_base.rb index 5be119d9..8b806c1b 100644 --- a/lib/chef_zero/endpoints/organization_user_base.rb +++ b/lib/chef_zero/endpoints/organization_user_base.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb b/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb index ad10377b..4a366d7b 100644 --- a/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_user_endpoint.rb b/lib/chef_zero/endpoints/organization_user_endpoint.rb index 7e694398..f29bdce8 100644 --- a/lib/chef_zero/endpoints/organization_user_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_user_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_user_key_endpoint.rb b/lib/chef_zero/endpoints/organization_user_key_endpoint.rb index 8e1cfc1b..94719f31 100644 --- a/lib/chef_zero/endpoints/organization_user_key_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_user_key_endpoint.rb @@ -1,5 +1,5 @@ -require "chef_zero/rest_base" -require "chef_zero/endpoints/actor_keys_endpoint" +require_relative "../rest_base" +require_relative "actor_keys_endpoint" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_user_keys_endpoint.rb b/lib/chef_zero/endpoints/organization_user_keys_endpoint.rb index c08e3fa7..afc09414 100644 --- a/lib/chef_zero/endpoints/organization_user_keys_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_user_keys_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_users_endpoint.rb b/lib/chef_zero/endpoints/organization_users_endpoint.rb index fd41c484..7a26fa17 100644 --- a/lib/chef_zero/endpoints/organization_users_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_users_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/endpoints/organization_user_base" +require_relative "../rest_base" +require_relative "organization_user_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/organization_validator_key_endpoint.rb b/lib/chef_zero/endpoints/organization_validator_key_endpoint.rb index 2251f002..11e535ae 100644 --- a/lib/chef_zero/endpoints/organization_validator_key_endpoint.rb +++ b/lib/chef_zero/endpoints/organization_validator_key_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" require "uuidtools" module ChefZero diff --git a/lib/chef_zero/endpoints/organizations_endpoint.rb b/lib/chef_zero/endpoints/organizations_endpoint.rb index 6ad46fe3..aa5c8e2c 100644 --- a/lib/chef_zero/endpoints/organizations_endpoint.rb +++ b/lib/chef_zero/endpoints/organizations_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" require "uuidtools" module ChefZero diff --git a/lib/chef_zero/endpoints/policies_endpoint.rb b/lib/chef_zero/endpoints/policies_endpoint.rb index 3a8deeaa..1b6f7ce0 100644 --- a/lib/chef_zero/endpoints/policies_endpoint.rb +++ b/lib/chef_zero/endpoints/policies_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/data_normalizer" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/policy_endpoint.rb b/lib/chef_zero/endpoints/policy_endpoint.rb index 1e802789..6d135750 100644 --- a/lib/chef_zero/endpoints/policy_endpoint.rb +++ b/lib/chef_zero/endpoints/policy_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/data_normalizer" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/policy_group_endpoint.rb b/lib/chef_zero/endpoints/policy_group_endpoint.rb index 573dc17c..5e4c2f5f 100644 --- a/lib/chef_zero/endpoints/policy_group_endpoint.rb +++ b/lib/chef_zero/endpoints/policy_group_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/chef_data/data_normalizer" +require_relative "../rest_base" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/policy_group_policy_endpoint.rb b/lib/chef_zero/endpoints/policy_group_policy_endpoint.rb index b69cfe3d..401de58c 100644 --- a/lib/chef_zero/endpoints/policy_group_policy_endpoint.rb +++ b/lib/chef_zero/endpoints/policy_group_policy_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/chef_data/data_normalizer" +require_relative "../rest_base" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/policy_groups_endpoint.rb b/lib/chef_zero/endpoints/policy_groups_endpoint.rb index a7062684..c22bf34c 100644 --- a/lib/chef_zero/endpoints/policy_groups_endpoint.rb +++ b/lib/chef_zero/endpoints/policy_groups_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/chef_data/data_normalizer" +require_relative "../rest_base" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/policy_revision_endpoint.rb b/lib/chef_zero/endpoints/policy_revision_endpoint.rb index c8255104..be19fdc9 100644 --- a/lib/chef_zero/endpoints/policy_revision_endpoint.rb +++ b/lib/chef_zero/endpoints/policy_revision_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/data_normalizer" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/policy_revisions_endpoint.rb b/lib/chef_zero/endpoints/policy_revisions_endpoint.rb index d755f811..260e53c3 100644 --- a/lib/chef_zero/endpoints/policy_revisions_endpoint.rb +++ b/lib/chef_zero/endpoints/policy_revisions_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/chef_data/data_normalizer" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/principal_endpoint.rb b/lib/chef_zero/endpoints/principal_endpoint.rb index ebd83151..b59a0c96 100644 --- a/lib/chef_zero/endpoints/principal_endpoint.rb +++ b/lib/chef_zero/endpoints/principal_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero" -require "chef_zero/rest_base" +require_relative "../../chef_zero" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/rest_list_endpoint.rb b/lib/chef_zero/endpoints/rest_list_endpoint.rb index 28af8d46..c410e544 100644 --- a/lib/chef_zero/endpoints/rest_list_endpoint.rb +++ b/lib/chef_zero/endpoints/rest_list_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/rest_object_endpoint.rb b/lib/chef_zero/endpoints/rest_object_endpoint.rb index 4fc2ef1f..22c9ee69 100644 --- a/lib/chef_zero/endpoints/rest_object_endpoint.rb +++ b/lib/chef_zero/endpoints/rest_object_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/rest_base" -require "chef_zero/rest_error_response" +require_relative "../rest_base" +require_relative "../rest_error_response" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/role_endpoint.rb b/lib/chef_zero/endpoints/role_endpoint.rb index 4e31cdc5..acef5702 100644 --- a/lib/chef_zero/endpoints/role_endpoint.rb +++ b/lib/chef_zero/endpoints/role_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/role_environments_endpoint.rb b/lib/chef_zero/endpoints/role_environments_endpoint.rb index 625e13ad..15712d95 100644 --- a/lib/chef_zero/endpoints/role_environments_endpoint.rb +++ b/lib/chef_zero/endpoints/role_environments_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/sandbox_endpoint.rb b/lib/chef_zero/endpoints/sandbox_endpoint.rb index aedb6653..78d0f4ba 100644 --- a/lib/chef_zero/endpoints/sandbox_endpoint.rb +++ b/lib/chef_zero/endpoints/sandbox_endpoint.rb @@ -1,5 +1,5 @@ -require "chef_zero/rest_base" -require "chef_zero/rest_error_response" +require_relative "../rest_base" +require_relative "../rest_error_response" require "ffi_yajl" module ChefZero diff --git a/lib/chef_zero/endpoints/sandboxes_endpoint.rb b/lib/chef_zero/endpoints/sandboxes_endpoint.rb index 62fea760..258344b7 100644 --- a/lib/chef_zero/endpoints/sandboxes_endpoint.rb +++ b/lib/chef_zero/endpoints/sandboxes_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/search_endpoint.rb b/lib/chef_zero/endpoints/search_endpoint.rb index c3410746..935da3da 100644 --- a/lib/chef_zero/endpoints/search_endpoint.rb +++ b/lib/chef_zero/endpoints/search_endpoint.rb @@ -1,9 +1,9 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" -require "chef_zero/rest_error_response" -require "chef_zero/solr/solr_parser" -require "chef_zero/solr/solr_doc" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" +require_relative "../rest_error_response" +require_relative "../solr/solr_parser" +require_relative "../solr/solr_doc" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/searches_endpoint.rb b/lib/chef_zero/endpoints/searches_endpoint.rb index 748a93cd..4797c374 100644 --- a/lib/chef_zero/endpoints/searches_endpoint.rb +++ b/lib/chef_zero/endpoints/searches_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/server_api_version_endpoint.rb b/lib/chef_zero/endpoints/server_api_version_endpoint.rb index ba32257c..14cd0a63 100644 --- a/lib/chef_zero/endpoints/server_api_version_endpoint.rb +++ b/lib/chef_zero/endpoints/server_api_version_endpoint.rb @@ -1,4 +1,4 @@ -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/system_recovery_endpoint.rb b/lib/chef_zero/endpoints/system_recovery_endpoint.rb index 0f77a8c7..8cf838ac 100644 --- a/lib/chef_zero/endpoints/system_recovery_endpoint.rb +++ b/lib/chef_zero/endpoints/system_recovery_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/universe_endpoint.rb b/lib/chef_zero/endpoints/universe_endpoint.rb index 5ee59b10..dc34bfef 100644 --- a/lib/chef_zero/endpoints/universe_endpoint.rb +++ b/lib/chef_zero/endpoints/universe_endpoint.rb @@ -1,6 +1,6 @@ require "ffi_yajl" -require "chef_zero/endpoints/rest_object_endpoint" -require "chef_zero/chef_data/data_normalizer" +require_relative "rest_object_endpoint" +require_relative "../chef_data/data_normalizer" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/user_association_request_endpoint.rb b/lib/chef_zero/endpoints/user_association_request_endpoint.rb index 70dd189c..48737222 100644 --- a/lib/chef_zero/endpoints/user_association_request_endpoint.rb +++ b/lib/chef_zero/endpoints/user_association_request_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/user_association_requests_count_endpoint.rb b/lib/chef_zero/endpoints/user_association_requests_count_endpoint.rb index 617b2b11..ff809e3f 100644 --- a/lib/chef_zero/endpoints/user_association_requests_count_endpoint.rb +++ b/lib/chef_zero/endpoints/user_association_requests_count_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/user_association_requests_endpoint.rb b/lib/chef_zero/endpoints/user_association_requests_endpoint.rb index c8db13b1..114296cd 100644 --- a/lib/chef_zero/endpoints/user_association_requests_endpoint.rb +++ b/lib/chef_zero/endpoints/user_association_requests_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/user_organizations_endpoint.rb b/lib/chef_zero/endpoints/user_organizations_endpoint.rb index 4e40eb03..505a5040 100644 --- a/lib/chef_zero/endpoints/user_organizations_endpoint.rb +++ b/lib/chef_zero/endpoints/user_organizations_endpoint.rb @@ -1,5 +1,5 @@ require "ffi_yajl" -require "chef_zero/rest_base" +require_relative "../rest_base" module ChefZero module Endpoints diff --git a/lib/chef_zero/endpoints/version_endpoint.rb b/lib/chef_zero/endpoints/version_endpoint.rb index 3ec687e5..54834176 100644 --- a/lib/chef_zero/endpoints/version_endpoint.rb +++ b/lib/chef_zero/endpoints/version_endpoint.rb @@ -1,5 +1,5 @@ -require "chef_zero/rest_base" -require "chef_zero/dist" +require_relative "../rest_base" +require_relative "../dist" module ChefZero module Endpoints diff --git a/lib/chef_zero/rest_base.rb b/lib/chef_zero/rest_base.rb index a7a05b91..89c2b12b 100644 --- a/lib/chef_zero/rest_base.rb +++ b/lib/chef_zero/rest_base.rb @@ -1,7 +1,7 @@ -require "chef_zero/rest_request" -require "chef_zero/rest_error_response" -require "chef_zero/data_store/data_not_found_error" -require "chef_zero/chef_data/acl_path" +require_relative "rest_request" +require_relative "rest_error_response" +require_relative "data_store/data_not_found_error" +require_relative "chef_data/acl_path" module ChefZero class RestBase diff --git a/lib/chef_zero/rspec.rb b/lib/chef_zero/rspec.rb index 8d78560b..63cbecf2 100644 --- a/lib/chef_zero/rspec.rb +++ b/lib/chef_zero/rspec.rb @@ -1,6 +1,6 @@ require "tempfile" -require "chef_zero/server" -require "chef_zero/rest_request" +require_relative "server" +require_relative "rest_request" module ChefZero module RSpec diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb index 2606dfb4..89a320b1 100644 --- a/lib/chef_zero/server.rb +++ b/lib/chef_zero/server.rb @@ -26,87 +26,87 @@ require "webrick" require "webrick/https" -require "chef_zero" -require "chef_zero/socketless_server_map" -require "chef_zero/chef_data/cookbook_data" -require "chef_zero/chef_data/acl_path" -require "chef_zero/rest_router" -require "chef_zero/data_store/memory_store_v2" -require "chef_zero/data_store/v1_to_v2_adapter" -require "chef_zero/data_store/default_facade" -require "chef_zero/version" +require_relative "../chef_zero" +require_relative "socketless_server_map" +require_relative "chef_data/cookbook_data" +require_relative "chef_data/acl_path" +require_relative "rest_router" +require_relative "data_store/memory_store_v2" +require_relative "data_store/v1_to_v2_adapter" +require_relative "data_store/default_facade" +require_relative "version" require "chef_zero/dist.rb" -require "chef_zero/endpoints/rest_list_endpoint" -require "chef_zero/endpoints/authenticate_user_endpoint" -require "chef_zero/endpoints/acls_endpoint" -require "chef_zero/endpoints/acl_endpoint" -require "chef_zero/endpoints/actor_endpoint" -require "chef_zero/endpoints/actors_endpoint" -require "chef_zero/endpoints/actor_key_endpoint" -require "chef_zero/endpoints/organization_user_key_endpoint" -require "chef_zero/endpoints/organization_user_default_key_endpoint" -require "chef_zero/endpoints/organization_user_keys_endpoint" -require "chef_zero/endpoints/actor_default_key_endpoint" -require "chef_zero/endpoints/actor_keys_endpoint" -require "chef_zero/endpoints/cookbooks_endpoint" -require "chef_zero/endpoints/cookbook_endpoint" -require "chef_zero/endpoints/cookbook_version_endpoint" -require "chef_zero/endpoints/cookbook_artifacts_endpoint" -require "chef_zero/endpoints/cookbook_artifact_endpoint" -require "chef_zero/endpoints/cookbook_artifact_identifier_endpoint" -require "chef_zero/endpoints/containers_endpoint" -require "chef_zero/endpoints/container_endpoint" -require "chef_zero/endpoints/controls_endpoint" -require "chef_zero/endpoints/dummy_endpoint" -require "chef_zero/endpoints/data_bags_endpoint" -require "chef_zero/endpoints/data_bag_endpoint" -require "chef_zero/endpoints/data_bag_item_endpoint" -require "chef_zero/endpoints/groups_endpoint" -require "chef_zero/endpoints/group_endpoint" -require "chef_zero/endpoints/environment_endpoint" -require "chef_zero/endpoints/environment_cookbooks_endpoint" -require "chef_zero/endpoints/environment_cookbook_endpoint" -require "chef_zero/endpoints/environment_cookbook_versions_endpoint" -require "chef_zero/endpoints/environment_nodes_endpoint" -require "chef_zero/endpoints/environment_recipes_endpoint" -require "chef_zero/endpoints/environment_role_endpoint" -require "chef_zero/endpoints/license_endpoint" -require "chef_zero/endpoints/node_endpoint" -require "chef_zero/endpoints/nodes_endpoint" -require "chef_zero/endpoints/node_identifiers_endpoint" -require "chef_zero/endpoints/organizations_endpoint" -require "chef_zero/endpoints/organization_endpoint" -require "chef_zero/endpoints/organization_association_requests_endpoint" -require "chef_zero/endpoints/organization_association_request_endpoint" -require "chef_zero/endpoints/organization_authenticate_user_endpoint" -require "chef_zero/endpoints/organization_users_endpoint" -require "chef_zero/endpoints/organization_user_endpoint" -require "chef_zero/endpoints/organization_validator_key_endpoint" -require "chef_zero/endpoints/policies_endpoint" -require "chef_zero/endpoints/policy_endpoint" -require "chef_zero/endpoints/policy_revisions_endpoint" -require "chef_zero/endpoints/policy_revision_endpoint" -require "chef_zero/endpoints/policy_groups_endpoint" -require "chef_zero/endpoints/policy_group_endpoint" -require "chef_zero/endpoints/policy_group_policy_endpoint" -require "chef_zero/endpoints/principal_endpoint" -require "chef_zero/endpoints/role_endpoint" -require "chef_zero/endpoints/role_environments_endpoint" -require "chef_zero/endpoints/sandboxes_endpoint" -require "chef_zero/endpoints/sandbox_endpoint" -require "chef_zero/endpoints/searches_endpoint" -require "chef_zero/endpoints/search_endpoint" -require "chef_zero/endpoints/system_recovery_endpoint" -require "chef_zero/endpoints/user_association_requests_endpoint" -require "chef_zero/endpoints/user_association_requests_count_endpoint" -require "chef_zero/endpoints/user_association_request_endpoint" -require "chef_zero/endpoints/user_organizations_endpoint" -require "chef_zero/endpoints/file_store_file_endpoint" -require "chef_zero/endpoints/not_found_endpoint" -require "chef_zero/endpoints/version_endpoint" -require "chef_zero/endpoints/server_api_version_endpoint" -require "chef_zero/endpoints/universe_endpoint" +require_relative "endpoints/rest_list_endpoint" +require_relative "endpoints/authenticate_user_endpoint" +require_relative "endpoints/acls_endpoint" +require_relative "endpoints/acl_endpoint" +require_relative "endpoints/actor_endpoint" +require_relative "endpoints/actors_endpoint" +require_relative "endpoints/actor_key_endpoint" +require_relative "endpoints/organization_user_key_endpoint" +require_relative "endpoints/organization_user_default_key_endpoint" +require_relative "endpoints/organization_user_keys_endpoint" +require_relative "endpoints/actor_default_key_endpoint" +require_relative "endpoints/actor_keys_endpoint" +require_relative "endpoints/cookbooks_endpoint" +require_relative "endpoints/cookbook_endpoint" +require_relative "endpoints/cookbook_version_endpoint" +require_relative "endpoints/cookbook_artifacts_endpoint" +require_relative "endpoints/cookbook_artifact_endpoint" +require_relative "endpoints/cookbook_artifact_identifier_endpoint" +require_relative "endpoints/containers_endpoint" +require_relative "endpoints/container_endpoint" +require_relative "endpoints/controls_endpoint" +require_relative "endpoints/dummy_endpoint" +require_relative "endpoints/data_bags_endpoint" +require_relative "endpoints/data_bag_endpoint" +require_relative "endpoints/data_bag_item_endpoint" +require_relative "endpoints/groups_endpoint" +require_relative "endpoints/group_endpoint" +require_relative "endpoints/environment_endpoint" +require_relative "endpoints/environment_cookbooks_endpoint" +require_relative "endpoints/environment_cookbook_endpoint" +require_relative "endpoints/environment_cookbook_versions_endpoint" +require_relative "endpoints/environment_nodes_endpoint" +require_relative "endpoints/environment_recipes_endpoint" +require_relative "endpoints/environment_role_endpoint" +require_relative "endpoints/license_endpoint" +require_relative "endpoints/node_endpoint" +require_relative "endpoints/nodes_endpoint" +require_relative "endpoints/node_identifiers_endpoint" +require_relative "endpoints/organizations_endpoint" +require_relative "endpoints/organization_endpoint" +require_relative "endpoints/organization_association_requests_endpoint" +require_relative "endpoints/organization_association_request_endpoint" +require_relative "endpoints/organization_authenticate_user_endpoint" +require_relative "endpoints/organization_users_endpoint" +require_relative "endpoints/organization_user_endpoint" +require_relative "endpoints/organization_validator_key_endpoint" +require_relative "endpoints/policies_endpoint" +require_relative "endpoints/policy_endpoint" +require_relative "endpoints/policy_revisions_endpoint" +require_relative "endpoints/policy_revision_endpoint" +require_relative "endpoints/policy_groups_endpoint" +require_relative "endpoints/policy_group_endpoint" +require_relative "endpoints/policy_group_policy_endpoint" +require_relative "endpoints/principal_endpoint" +require_relative "endpoints/role_endpoint" +require_relative "endpoints/role_environments_endpoint" +require_relative "endpoints/sandboxes_endpoint" +require_relative "endpoints/sandbox_endpoint" +require_relative "endpoints/searches_endpoint" +require_relative "endpoints/search_endpoint" +require_relative "endpoints/system_recovery_endpoint" +require_relative "endpoints/user_association_requests_endpoint" +require_relative "endpoints/user_association_requests_count_endpoint" +require_relative "endpoints/user_association_request_endpoint" +require_relative "endpoints/user_organizations_endpoint" +require_relative "endpoints/file_store_file_endpoint" +require_relative "endpoints/not_found_endpoint" +require_relative "endpoints/version_endpoint" +require_relative "endpoints/server_api_version_endpoint" +require_relative "endpoints/universe_endpoint" module ChefZero diff --git a/lib/chef_zero/socketless_server_map.rb b/lib/chef_zero/socketless_server_map.rb index f433ed21..c7a208e7 100644 --- a/lib/chef_zero/socketless_server_map.rb +++ b/lib/chef_zero/socketless_server_map.rb @@ -18,7 +18,7 @@ require "thread" require "singleton" -require "chef_zero/dist" +require_relative "dist" module ChefZero diff --git a/lib/chef_zero/solr/query/phrase.rb b/lib/chef_zero/solr/query/phrase.rb index 666b3c22..ed7cc658 100644 --- a/lib/chef_zero/solr/query/phrase.rb +++ b/lib/chef_zero/solr/query/phrase.rb @@ -1,4 +1,4 @@ -require "chef_zero/solr/query/regexpable_query" +require_relative "regexpable_query" module ChefZero module Solr diff --git a/lib/chef_zero/solr/query/term.rb b/lib/chef_zero/solr/query/term.rb index b98d2810..f90b750c 100644 --- a/lib/chef_zero/solr/query/term.rb +++ b/lib/chef_zero/solr/query/term.rb @@ -1,4 +1,4 @@ -require "chef_zero/solr/query/regexpable_query" +require_relative "regexpable_query" module ChefZero module Solr diff --git a/lib/chef_zero/solr/solr_parser.rb b/lib/chef_zero/solr/solr_parser.rb index 8de63e62..843a1b52 100644 --- a/lib/chef_zero/solr/solr_parser.rb +++ b/lib/chef_zero/solr/solr_parser.rb @@ -1,9 +1,9 @@ -require "chef_zero/solr/query/binary_operator" -require "chef_zero/solr/query/unary_operator" -require "chef_zero/solr/query/term" -require "chef_zero/solr/query/phrase" -require "chef_zero/solr/query/range_query" -require "chef_zero/solr/query/subquery" +require_relative "query/binary_operator" +require_relative "query/unary_operator" +require_relative "query/term" +require_relative "query/phrase" +require_relative "query/range_query" +require_relative "query/subquery" module ChefZero module Solr From 30dc4f1b2b7f93c866b29d54e8b701031f1fa824 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Sun, 29 Dec 2019 18:08:45 -0800 Subject: [PATCH 2/2] Add Github templates and remove old travis tests Signed-off-by: Tim Smith --- .github/CODEOWNERS | 5 +++ .github/ISSUE_TEMPLATE/BUG_TEMPLATE.md | 29 ++++++++++++++ .github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md | 40 +++++++++++++++++++ .../ENHANCEMENT_REQUEST_TEMPLATE.md | 17 ++++++++ .github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md | 11 +++++ .travis.yml | 14 ------- 6 files changed, 102 insertions(+), 14 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/BUG_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md create mode 100644 .github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..950afb76 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# Order is important. The last matching pattern has the most precedence. + +* @chef/chef-foundation-owners @chef/chef-foundation-approvers @chef/chef-foundation-reviewers +.expeditor/ @chef/jex-team +*.md @chef/docs-team diff --git a/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md new file mode 100644 index 00000000..87ac9b4f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md @@ -0,0 +1,29 @@ +--- +name: � Bug Report +about: If something isn't working as expected �. +labels: "Status: Untriaged, Type: Bug" +--- + +# Version: + +[Version of the project installed] + +# Environment: + +[Details about the environment such as the Operating System, cookbook details, etc...] + +# Scenario: + +[What you are trying to achieve and you can't?] + +# Steps to Reproduce: + +[If you are filing an issue what are the things we need to do in order to repro your problem?] + +# Expected Result: + +[What are you expecting to happen as the consequence of above reproduction steps?] + +# Actual Result: + +[What actually happens after the reproduction steps?] diff --git a/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md b/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md new file mode 100644 index 00000000..9508b095 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md @@ -0,0 +1,40 @@ +--- +name: Design Proposal +about: I have a significant change I would like to propose and discuss before starting +labels: "Status: Untriaged, Type: Design Proposal" +--- + +### When a Change Needs a Design Proposal + +A design proposal should be opened any time a change meets one of the following qualifications: + +- Significantly changes the user experience of a project in a way that impacts users. +- Significantly changes the underlying architecture of the project in a way that impacts other developers. +- Changes the development or testing process of the project such as a change of CI systems or test frameworks. + +### Why We Use This Process + +- Allows all interested parties (including any community member) to discuss large impact changes to a project. +- Serves as a durable paper trail for discussions regarding project architecture. +- Forces design discussions to occur before PRs are created. +- Reduces PR refactoring and rejected PRs. + +--- + + + +## Motivation + + + +## Specification + + + +## Downstream Impact + + diff --git a/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md b/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..65bf5a06 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +--- +name: 🚀 Enhancement Request +about: I have a suggestion (and may want to implement it 🙂)! +labels: "Status: Untriaged" +--- + +### Describe the Enhancement: + + +### Describe the Need: + + +### Current Alternative + + +### Can We Help You Implement This?: + diff --git a/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md new file mode 100644 index 00000000..921a5f0b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md @@ -0,0 +1,11 @@ +--- +name: 🤗 Support Question +about: If you have a question 💬, please check out our Slack! +--- + +We use GitHub issues to track bugs and feature requests. If you need help please post to our Mailing List or join the Chef Community Slack. + + * Chef Community Slack at http://community-slack.chef.io/. + * Chef Mailing List https://discourse.chef.io/ + + Support issues opened here will be closed and redirected to Slack or Discourse. diff --git a/.travis.yml b/.travis.yml index 1c82a676..9edbac17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,6 @@ branches: only: - master -# Early warning system to catch if Rubygems breaks something -before_install: - - gem update --system - - gem install bundler - language: ruby cache: bundler bundler_args: --jobs 7 --without debug @@ -31,12 +26,3 @@ matrix: - rvm: 2.5.3 script: bundle exec rake chef_spec env: TEST=chef_spec - - rvm: 2.5.3 - script: bundle exec rake spec - env: TEST=rake_spec - - rvm: 2.4.5 - script: bundle exec rake spec - env: TEST=rake_spec - - rvm: 2.5.3 - script: bundle exec rake style - env: TEST=chefstyle