kelbim 0.3.1.beta → 0.3.1.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/kelbim +1 -1
- data/lib/kelbim/policy-types.rb +19 -8
- data/lib/kelbim/version.rb +1 -1
- data/lib/kelbim/wrapper/policy.rb +4 -0
- 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: 22165f5f97872d15363922b62b96e54f456df68e
|
4
|
+
data.tar.gz: 802e0593b150f7c251a21e9f6e39094c93fd4853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44286e575763ce0906581e16ce88c1432313dc5d135412ba7472fe67827ab192dd2efb28b75429464c0443fbb6d5e647787c5683e15dc5562dc03b960bc208e5
|
7
|
+
data.tar.gz: 95f1231e72915d67a10272446005a1585101f24fed8868af854774d9e6fb91bc67da3560ec3fefa1d44733b529a540adc477b776e6b0a850e74bef77ae7554ed
|
data/bin/kelbim
CHANGED
data/lib/kelbim/policy-types.rb
CHANGED
@@ -11,9 +11,13 @@ module Kelbim
|
|
11
11
|
|
12
12
|
EXPANDERS = {
|
13
13
|
:ssl_negotiation => proc {|attrs|
|
14
|
-
attrs.
|
15
|
-
|
16
|
-
|
14
|
+
if attrs.key?('Reference-Security-Policy')
|
15
|
+
{ reference: attrs['Reference-Security-Policy'] }
|
16
|
+
else
|
17
|
+
attrs.select {|name, value|
|
18
|
+
value[0] =~ /\Atrue\Z/i
|
19
|
+
}.map {|n, v| n }
|
20
|
+
end
|
17
21
|
},
|
18
22
|
:app_cookie_stickiness => proc {|attrs| h = {}; attrs.map {|k, v| h[k] = [v].flatten[0] }; h },
|
19
23
|
:lb_cookie_stickiness => proc {|attrs| h = {}; attrs.map {|k, v| h[k] = [v].flatten[0] }; h },
|
@@ -21,13 +25,20 @@ module Kelbim
|
|
21
25
|
|
22
26
|
UNEXPANDERS = {
|
23
27
|
:ssl_negotiation => proc {|attrs|
|
24
|
-
|
28
|
+
if attrs.kind_of?(Hash)
|
29
|
+
if attrs.key?(:reference)
|
30
|
+
reference = attrs[:reference].is_a?(Array) ? attrs[:reference] : [attrs[:reference]]
|
31
|
+
{ 'Reference-Security-Policy' => reference }
|
32
|
+
end
|
33
|
+
else
|
34
|
+
unexpanded = {}
|
25
35
|
|
26
|
-
|
27
|
-
|
28
|
-
|
36
|
+
attrs.each do |name|
|
37
|
+
unexpanded[name] = ['true']
|
38
|
+
end
|
29
39
|
|
30
|
-
|
40
|
+
unexpanded
|
41
|
+
end
|
31
42
|
},
|
32
43
|
:app_cookie_stickiness => proc {|attrs| h = {}; attrs.map {|k, v| h[k] = [v].flatten }; h },
|
33
44
|
:lb_cookie_stickiness => proc {|attrs| h = {}; attrs.map {|k, v| h[k] = [v].flatten }; h },
|
data/lib/kelbim/version.rb
CHANGED
@@ -26,6 +26,10 @@ module Kelbim
|
|
26
26
|
@policy.name == dsl_name_or_attrs
|
27
27
|
else
|
28
28
|
aws_attrs = PolicyTypes.expand(@policy.type, @policy.attributes)
|
29
|
+
aws_attrs.each do |name, value|
|
30
|
+
value = value[0] if value.length < 2
|
31
|
+
aws_attrs[name] = value
|
32
|
+
end
|
29
33
|
aws_attrs.sort == dsl_name_or_attrs.sort
|
30
34
|
end
|
31
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kelbim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.1.
|
4
|
+
version: 0.3.1.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winebarrel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-v1
|