chef-zero 14.0.17 → 15.0.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 +2 -2
- data/lib/chef_zero/rest_base.rb +6 -2
- data/lib/chef_zero/rest_request.rb +6 -2
- data/lib/chef_zero/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 271585a5bebd47f62edd42c039b8e14edaa04a80bbbfcbdb557b18a46671a7d9
|
4
|
+
data.tar.gz: 5d3f29782891d8df38b846fcde19370e72c77a737fa587f67f865f3bfb3ff32e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e29414cf9d56b03e68709cf754d028bd182dd95ec6d511a81ab7370ce8a74deaaccf388a7124c6c70364c74ab323f7b2527ca2c67c1feea8fce5afa9073ac2dc
|
7
|
+
data.tar.gz: 6aabee35cefa8288a981e4e9428019463357e73e1392e8bfdba9b7f5fb6462f6efb34451dd5c26c305ae50b29615405181a465003103ed6e39748dc0c3360c14
|
data/chef-zero.gemspec
CHANGED
@@ -11,10 +11,10 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.homepage = "https://github.com/chef/chef-zero"
|
12
12
|
s.license = "Apache-2.0"
|
13
13
|
|
14
|
-
s.required_ruby_version = ">= 2.
|
14
|
+
s.required_ruby_version = ">= 2.6"
|
15
15
|
|
16
16
|
s.add_dependency "mixlib-log", ">= 2.0", "< 4.0"
|
17
|
-
s.add_dependency "hashie", ">= 2.0", "<
|
17
|
+
s.add_dependency "hashie", ">= 2.0", "< 5.0"
|
18
18
|
s.add_dependency "uuidtools", "~> 2.1"
|
19
19
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
20
20
|
s.add_dependency "rack", "~> 2.0", ">= 2.0.6"
|
data/lib/chef_zero/rest_base.rb
CHANGED
@@ -77,7 +77,7 @@ module ChefZero
|
|
77
77
|
|
78
78
|
def get_data(request, rest_path = nil, *options)
|
79
79
|
rest_path ||= request.rest_path
|
80
|
-
rest_path = rest_path.map { |v|
|
80
|
+
rest_path = rest_path.map { |v| self.class.rfc2396_parser.unescape(v) }
|
81
81
|
begin
|
82
82
|
data_store.get(rest_path, request)
|
83
83
|
rescue DataStore::DataNotFoundError
|
@@ -284,7 +284,7 @@ module ChefZero
|
|
284
284
|
end
|
285
285
|
|
286
286
|
def self.build_uri(base_uri, rest_path)
|
287
|
-
"#{base_uri}/#{rest_path.map { |v|
|
287
|
+
"#{base_uri}/#{rest_path.map { |v| rfc2396_parser.escape(v) }.join("/")}"
|
288
288
|
end
|
289
289
|
|
290
290
|
def populate_defaults(request, response)
|
@@ -324,5 +324,9 @@ module ChefZero
|
|
324
324
|
name.size > 255 ||
|
325
325
|
name =~ /[+ !]/
|
326
326
|
end
|
327
|
+
|
328
|
+
def self.rfc2396_parser
|
329
|
+
@parser ||= URI::RFC2396_Parser.new
|
330
|
+
end
|
327
331
|
end
|
328
332
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require "rack/request"
|
2
|
+
require "cgi"
|
2
3
|
|
3
4
|
module ChefZero
|
4
5
|
class RestRequest
|
5
|
-
|
6
6
|
def initialize(env, rest_base_prefix = [])
|
7
7
|
@env = env
|
8
8
|
@rest_base_prefix = rest_base_prefix
|
@@ -61,7 +61,7 @@ module ChefZero
|
|
61
61
|
@query_params ||= begin
|
62
62
|
params = Rack::Request.new(env).GET
|
63
63
|
params.keys.each do |key|
|
64
|
-
params[key] =
|
64
|
+
params[key] = self.class.rfc2396_parser.unescape(params[key])
|
65
65
|
end
|
66
66
|
params
|
67
67
|
end
|
@@ -80,5 +80,9 @@ module ChefZero
|
|
80
80
|
end
|
81
81
|
result
|
82
82
|
end
|
83
|
+
|
84
|
+
def self.rfc2396_parser
|
85
|
+
@parser ||= URI::RFC2396_Parser.new
|
86
|
+
end
|
83
87
|
end
|
84
88
|
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
|
+
version: 15.0.0
|
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:
|
11
|
+
date: 2020-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-log
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '2.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '5.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '2.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '5.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: uuidtools
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
238
|
requirements:
|
239
239
|
- - ">="
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version: '2.
|
241
|
+
version: '2.6'
|
242
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
243
|
requirements:
|
244
244
|
- - ">="
|