chef-zero 14.0.13 → 14.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -6
- data/Rakefile +9 -1
- data/chef-zero.gemspec +1 -4
- data/lib/chef_zero.rb +1 -1
- data/lib/chef_zero/chef_data/cookbook_data.rb +1 -1
- data/lib/chef_zero/chef_data/data_normalizer.rb +9 -7
- data/lib/chef_zero/chef_data/default_creator.rb +8 -5
- data/lib/chef_zero/data_store/data_already_exists_error.rb +1 -1
- data/lib/chef_zero/data_store/data_error.rb +1 -1
- data/lib/chef_zero/data_store/data_not_found_error.rb +1 -1
- data/lib/chef_zero/data_store/default_facade.rb +4 -4
- data/lib/chef_zero/data_store/interface_v2.rb +1 -1
- data/lib/chef_zero/data_store/memory_store.rb +3 -3
- data/lib/chef_zero/data_store/memory_store_v2.rb +22 -14
- data/lib/chef_zero/data_store/raw_file_store.rb +6 -4
- data/lib/chef_zero/data_store/v1_to_v2_adapter.rb +11 -1
- data/lib/chef_zero/data_store/v2_to_v1_adapter.rb +1 -1
- data/lib/chef_zero/endpoints/acl_endpoint.rb +3 -2
- data/lib/chef_zero/endpoints/acls_endpoint.rb +5 -4
- data/lib/chef_zero/endpoints/actor_default_key_endpoint.rb +2 -1
- data/lib/chef_zero/endpoints/actor_endpoint.rb +3 -3
- data/lib/chef_zero/endpoints/actor_key_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/actor_keys_endpoint.rb +3 -2
- data/lib/chef_zero/endpoints/actors_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/authenticate_user_endpoint.rb +2 -1
- data/lib/chef_zero/endpoints/container_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/containers_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/controls_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/cookbook_artifact_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/cookbook_artifact_identifier_endpoint.rb +3 -3
- data/lib/chef_zero/endpoints/cookbook_artifacts_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/cookbook_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/cookbook_version_endpoint.rb +7 -5
- data/lib/chef_zero/endpoints/cookbooks_base.rb +4 -2
- data/lib/chef_zero/endpoints/cookbooks_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/data_bag_endpoint.rb +3 -3
- data/lib/chef_zero/endpoints/data_bag_item_endpoint.rb +3 -3
- data/lib/chef_zero/endpoints/data_bags_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/environment_cookbook_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/environment_cookbook_versions_endpoint.rb +13 -10
- data/lib/chef_zero/endpoints/environment_cookbooks_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/environment_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/environment_nodes_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/environment_recipes_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/environment_role_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/file_store_file_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/group_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/groups_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/license_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/node_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/node_identifiers_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/nodes_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/not_found_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/organization_association_request_endpoint.rb +2 -1
- data/lib/chef_zero/endpoints/organization_association_requests_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/organization_authenticate_user_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/organization_endpoint.rb +3 -2
- data/lib/chef_zero/endpoints/organization_user_base.rb +1 -1
- data/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/organization_user_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/organization_user_key_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/organization_user_keys_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/organization_users_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/organization_validator_key_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/organizations_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/policies_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/policy_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/policy_group_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/policy_group_policy_endpoint.rb +3 -3
- data/lib/chef_zero/endpoints/policy_groups_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/policy_revision_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/policy_revisions_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/principal_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/rest_list_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/rest_object_endpoint.rb +3 -2
- data/lib/chef_zero/endpoints/role_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/role_environments_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/sandbox_endpoint.rb +3 -3
- data/lib/chef_zero/endpoints/sandboxes_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/search_endpoint.rb +8 -8
- data/lib/chef_zero/endpoints/searches_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/server_api_version_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/system_recovery_endpoint.rb +3 -3
- data/lib/chef_zero/endpoints/universe_endpoint.rb +2 -2
- data/lib/chef_zero/endpoints/user_association_request_endpoint.rb +2 -1
- data/lib/chef_zero/endpoints/user_association_requests_count_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/user_association_requests_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/user_organizations_endpoint.rb +1 -1
- data/lib/chef_zero/endpoints/version_endpoint.rb +2 -2
- data/lib/chef_zero/rest_base.rb +15 -15
- data/lib/chef_zero/rest_request.rb +4 -4
- data/lib/chef_zero/rest_router.rb +2 -2
- data/lib/chef_zero/rspec.rb +3 -2
- data/lib/chef_zero/server.rb +87 -83
- data/lib/chef_zero/socketless_server_map.rb +2 -1
- data/lib/chef_zero/solr/query/phrase.rb +2 -2
- data/lib/chef_zero/solr/query/range_query.rb +3 -3
- data/lib/chef_zero/solr/query/term.rb +1 -1
- data/lib/chef_zero/solr/solr_parser.rb +12 -10
- data/lib/chef_zero/version.rb +1 -1
- data/spec/run_oc_pedant.rb +5 -3
- data/spec/search_spec.rb +2 -2
- data/spec/socketless_server_map_spec.rb +1 -1
- data/spec/support/oc_pedant.rb +1 -1
- metadata +3 -31
data/lib/chef_zero/version.rb
CHANGED
data/spec/run_oc_pedant.rb
CHANGED
@@ -32,6 +32,7 @@ DEFAULT_LOG_LEVEL = :warn
|
|
32
32
|
def log_level
|
33
33
|
return ENV["LOG_LEVEL"].downcase.to_sym if ENV["LOG_LEVEL"]
|
34
34
|
return :debug if ENV["DEBUG"]
|
35
|
+
|
35
36
|
DEFAULT_LOG_LEVEL
|
36
37
|
end
|
37
38
|
|
@@ -39,7 +40,7 @@ def start_chef_server(opts = {})
|
|
39
40
|
opts = DEFAULT_SERVER_OPTIONS.merge(opts)
|
40
41
|
opts[:log_level] = log_level
|
41
42
|
|
42
|
-
ChefZero::Server.new(opts).tap
|
43
|
+
ChefZero::Server.new(opts).tap(&:start_background)
|
43
44
|
end
|
44
45
|
|
45
46
|
def start_cheffs_server(chef_repo_path)
|
@@ -49,12 +50,12 @@ def start_cheffs_server(chef_repo_path)
|
|
49
50
|
require "chef/chef_fs/chef_fs_data_store"
|
50
51
|
require "chef_zero/server"
|
51
52
|
|
52
|
-
Dir.mkdir(chef_repo_path)
|
53
|
+
Dir.mkdir(chef_repo_path) unless File.exist?(chef_repo_path)
|
53
54
|
|
54
55
|
# 11.6 and below had a bug where it couldn't create the repo children automatically
|
55
56
|
if Chef::VERSION.to_f < 11.8
|
56
57
|
%w{clients cookbooks data_bags environments nodes roles users}.each do |child|
|
57
|
-
Dir.mkdir("#{chef_repo_path}/#{child}")
|
58
|
+
Dir.mkdir("#{chef_repo_path}/#{child}") unless File.exist?("#{chef_repo_path}/#{child}")
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
@@ -84,6 +85,7 @@ end
|
|
84
85
|
|
85
86
|
def args_from_env(key)
|
86
87
|
return [] unless ENV[key]
|
88
|
+
|
87
89
|
ENV[key].split
|
88
90
|
end
|
89
91
|
|
data/spec/search_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require "chef_zero/socketless_server_map"
|
|
2
2
|
|
3
3
|
describe "Socketless Mode" do
|
4
4
|
|
5
|
-
let(:server_map) { ChefZero::SocketlessServerMap.instance.tap
|
5
|
+
let(:server_map) { ChefZero::SocketlessServerMap.instance.tap(&:reset!) }
|
6
6
|
|
7
7
|
let(:server) { instance_double("ChefZero::Server") }
|
8
8
|
|
data/spec/support/oc_pedant.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.0.
|
4
|
+
version: 14.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-log
|
@@ -98,34 +98,6 @@ dependencies:
|
|
98
98
|
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: 2.0.6
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: rake
|
103
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - ">="
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '0'
|
108
|
-
type: :development
|
109
|
-
prerelease: false
|
110
|
-
version_requirements: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: '0'
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: rspec
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0'
|
122
|
-
type: :development
|
123
|
-
prerelease: false
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0'
|
129
101
|
description: Self-contained, easy-setup, fast-start in-memory Chef server for testing
|
130
102
|
and solo setup purposes
|
131
103
|
email: oss@chef.io
|
@@ -266,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
266
238
|
requirements:
|
267
239
|
- - ">="
|
268
240
|
- !ruby/object:Gem::Version
|
269
|
-
version: 2.4
|
241
|
+
version: '2.4'
|
270
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
243
|
requirements:
|
272
244
|
- - ">="
|