conjur-api 4.20.0 → 4.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/conjur-api/version.rb +1 -1
- data/lib/conjur/annotations.rb +4 -2
- data/spec/lib/annotations_spec.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 499e973eac8164648777759b0128f502ad692bb6
|
4
|
+
data.tar.gz: 6d85fe429b8d77cb7aaca33370c0bc48179e5345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa2d3a7024f3d41e6e87f81873179a1528b5d9b6d0a5657a8e8c281d8368189b3db301d3b525d88697d049d44868bac8df6b26aa026d2da48e785ed62d4ab843
|
7
|
+
data.tar.gz: 301f2f79b84e3c8a3f13a2cdb21666d33e3cc80bc0e5144aa8974e19a248070d49c081d6ffaabc41c4b06925cbfce7b637a4b30a91b3aba36e94e12927a0c160
|
data/CHANGELOG.md
CHANGED
data/lib/conjur-api/version.rb
CHANGED
data/lib/conjur/annotations.rb
CHANGED
@@ -33,7 +33,7 @@ module Conjur
|
|
33
33
|
#
|
34
34
|
class Annotations
|
35
35
|
include Enumerable
|
36
|
-
|
36
|
+
include Conjur::Escape
|
37
37
|
# Create an `Annotations` instance for the given {Conjur::Resource}.
|
38
38
|
#
|
39
39
|
# Note that you will generally use the {Conjur::Resource#annotations} method to get
|
@@ -161,7 +161,9 @@ module Conjur
|
|
161
161
|
def update_annotation name, value
|
162
162
|
@resource.invalidate do
|
163
163
|
@annotations_hash = nil
|
164
|
-
path = [@resource.account,'annotations', @resource.kind, @resource.identifier].
|
164
|
+
path = [@resource.account,'annotations', @resource.kind, @resource.identifier].map do |seg|
|
165
|
+
fully_escape(seg)
|
166
|
+
end.join('/')
|
165
167
|
RestClient::Resource.new(Conjur::Authz::API.host, @resource.options)[path].put name: name, value: value
|
166
168
|
end
|
167
169
|
end
|
@@ -3,8 +3,9 @@ require 'helpers/request_helpers'
|
|
3
3
|
|
4
4
|
describe Conjur::Annotations do
|
5
5
|
include RequestHelpers
|
6
|
+
include Conjur::Escape
|
6
7
|
|
7
|
-
let(:identifier){ 'the-
|
8
|
+
let(:identifier){ 'the-r{source}&^-id' }
|
8
9
|
let(:kind){ 'some-kind' }
|
9
10
|
let(:account){ 'the-account' }
|
10
11
|
let(:resourceid){ [account, kind, identifier].join ':'}
|
@@ -23,7 +24,7 @@ describe Conjur::Annotations do
|
|
23
24
|
|
24
25
|
subject { annotations }
|
25
26
|
|
26
|
-
let(:url){ "#{Conjur::Authz::API.host}/#{account}/annotations/#{kind}/#{identifier}" }
|
27
|
+
let(:url){ "#{Conjur::Authz::API.host}/#{account}/annotations/#{kind}/#{fully_escape identifier}" }
|
27
28
|
|
28
29
|
def expect_put_request url, payload
|
29
30
|
expect_request(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjur-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.20.
|
4
|
+
version: 4.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafal Rzepecki
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|