chef-zero 4.6.2 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/chef-zero.gemspec +5 -5
- data/lib/chef_zero/endpoints/actors_endpoint.rb +21 -11
- data/lib/chef_zero/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f89ef968f192c0b01a3a0f73ba1e673cfe039849
|
4
|
+
data.tar.gz: 99690e56fc15973521597083a17607c943cbab7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c05358fe42b17650dc0be8081ffb6d86512999402e919411ba1483692b978e36b91426a12cd2da12c5f63b69f079beaf0ffc06be770848ae006cfeb03e4514
|
7
|
+
data.tar.gz: a22b58b10510bc1b6782ad4074202d0d2db5810ffd5b5098a15d3782498017aae7b0b5c206aa067d1e1d690ed4abc9315acdc44f4a4885fb611222acc0d9b3a0
|
data/chef-zero.gemspec
CHANGED
@@ -8,17 +8,17 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.summary = 'Self-contained, easy-setup, fast-start in-memory Chef server for testing and solo setup purposes'
|
9
9
|
s.description = s.summary
|
10
10
|
s.author = 'John Keiser'
|
11
|
-
s.email = 'jkeiser@
|
12
|
-
s.homepage = 'http://www.
|
11
|
+
s.email = 'jkeiser@chef.io'
|
12
|
+
s.homepage = 'http://www.chef.io'
|
13
13
|
s.license = 'Apache 2.0'
|
14
14
|
|
15
15
|
s.required_ruby_version = ">= 2.1.0"
|
16
16
|
|
17
|
-
s.add_dependency 'mixlib-log',
|
18
|
-
s.add_dependency 'hashie',
|
17
|
+
s.add_dependency 'mixlib-log', '~> 1.3'
|
18
|
+
s.add_dependency 'hashie', '>= 2.0', '< 4.0'
|
19
19
|
s.add_dependency 'uuidtools', '~> 2.1'
|
20
20
|
s.add_dependency 'ffi-yajl', '~> 2.2'
|
21
|
-
s.add_dependency 'rack'
|
21
|
+
s.add_dependency 'rack', '< 2' # 2.0 requires Ruby 2.2+
|
22
22
|
|
23
23
|
s.add_development_dependency 'pry'
|
24
24
|
s.add_development_dependency 'pry-byebug'
|
@@ -8,17 +8,12 @@ module ChefZero
|
|
8
8
|
def get(request)
|
9
9
|
response = super(request)
|
10
10
|
|
11
|
-
if
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
record = parse_json(record)
|
18
|
-
new_results[name] = url if record['email'] == request.query_params['email']
|
19
|
-
end
|
20
|
-
end
|
21
|
-
response[2] = to_json(new_results)
|
11
|
+
# apply query filters: if one applies, stop processing rest
|
12
|
+
# (precendence matches chef-server: https://github.com/chef/chef-server/blob/268a0c9/src/oc_erchef/apps/chef_objects/src/chef_user.erl#L554-L559)
|
13
|
+
if value = request.query_params['external_authentication_uid']
|
14
|
+
response[2] = filter('external_authentication_uid', value, request, response[2])
|
15
|
+
elsif value = request.query_params['email']
|
16
|
+
response[2] = filter('email', value, request, response[2])
|
22
17
|
end
|
23
18
|
|
24
19
|
if request.query_params['verbose']
|
@@ -85,6 +80,21 @@ module ChefZero
|
|
85
80
|
result
|
86
81
|
end
|
87
82
|
end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
def filter(key, value, request, resp)
|
87
|
+
results = parse_json(resp)
|
88
|
+
new_results = {}
|
89
|
+
results.each do |name, url|
|
90
|
+
record = get_data(request, request.rest_path + [ name ], :nil)
|
91
|
+
if record
|
92
|
+
record = parse_json(record)
|
93
|
+
new_results[name] = url if record[key] == value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
to_json(new_results)
|
97
|
+
end
|
88
98
|
end
|
89
99
|
end
|
90
100
|
end
|
data/lib/chef_zero/version.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: 4.
|
4
|
+
version: 4.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-log
|
@@ -76,16 +76,16 @@ dependencies:
|
|
76
76
|
name: rack
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - "<"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '2'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '2'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: pry
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,7 +172,7 @@ dependencies:
|
|
172
172
|
version: '0'
|
173
173
|
description: Self-contained, easy-setup, fast-start in-memory Chef server for testing
|
174
174
|
and solo setup purposes
|
175
|
-
email: jkeiser@
|
175
|
+
email: jkeiser@chef.io
|
176
176
|
executables:
|
177
177
|
- chef-zero
|
178
178
|
extensions: []
|
@@ -296,7 +296,7 @@ files:
|
|
296
296
|
- spec/socketless_server_map_spec.rb
|
297
297
|
- spec/support/oc_pedant.rb
|
298
298
|
- spec/support/stickywicket.pem
|
299
|
-
homepage: http://www.
|
299
|
+
homepage: http://www.chef.io
|
300
300
|
licenses:
|
301
301
|
- Apache 2.0
|
302
302
|
metadata: {}
|
@@ -322,3 +322,4 @@ specification_version: 4
|
|
322
322
|
summary: Self-contained, easy-setup, fast-start in-memory Chef server for testing
|
323
323
|
and solo setup purposes
|
324
324
|
test_files: []
|
325
|
+
has_rdoc:
|