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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51b6df8cfb1404572342f5012c1779ae1abf0f5dedfbe9bbe85f59f9d36830a3
4
- data.tar.gz: 134c6eeab2b181816a7e7211392f5472d9dbf497fad9c5a3b424521f747fcda4
3
+ metadata.gz: 271585a5bebd47f62edd42c039b8e14edaa04a80bbbfcbdb557b18a46671a7d9
4
+ data.tar.gz: 5d3f29782891d8df38b846fcde19370e72c77a737fa587f67f865f3bfb3ff32e
5
5
  SHA512:
6
- metadata.gz: 28d830c27a14463aee454123475caee162ff31f62bc2c9bdda6ff7628e6b1fe24af883dbcf78c64071683a51eac4492367ff68f500eb2feaea45e7c5e8583a5e
7
- data.tar.gz: 352b9c4184dc973953dde9322bdb71f9cd54dce7f2f56acb2acbcc47edda8dc29b94fb975d9f1f87b104b49004eb5dbe026287c420d1d58f8c139b3de6a184e9
6
+ metadata.gz: e29414cf9d56b03e68709cf754d028bd182dd95ec6d511a81ab7370ce8a74deaaccf388a7124c6c70364c74ab323f7b2527ca2c67c1feea8fce5afa9073ac2dc
7
+ data.tar.gz: 6aabee35cefa8288a981e4e9428019463357e73e1392e8bfdba9b7f5fb6462f6efb34451dd5c26c305ae50b29615405181a465003103ed6e39748dc0c3360c14
@@ -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.4"
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", "< 4.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"
@@ -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| URI.decode(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| URI.escape(v) }.join("/")}"
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] = URI.unescape(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
@@ -1,3 +1,3 @@
1
1
  module ChefZero
2
- VERSION = "14.0.17".freeze
2
+ VERSION = "15.0.0".freeze
3
3
  end
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.17
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: 2019-12-30 00:00:00.000000000 Z
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: '4.0'
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: '4.0'
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.4'
241
+ version: '2.6'
242
242
  required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  requirements:
244
244
  - - ">="