awspec 0.24.0 → 0.24.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awspec/stub/s3_bucket.rb +4 -14
- data/lib/awspec/type/s3_bucket.rb +2 -1
- data/lib/awspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a10eaa86514c0ae91094657961105fcb5f9ac41a
|
4
|
+
data.tar.gz: 57bcad942d927c04524a515b12c08c046a43c0dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8e94a86368a27e40ae57255d2a30f097fea631e0c2779ac6ca887d2efdca42db992a409516353d72a1c20138fe47ee900639b14a09baa955115266204a2da82
|
7
|
+
data.tar.gz: b349d5f781dc8272957504f1941351268bf8cbd4a13ad3ce44b71d9803d914279731876dc13c58d5c74cbf69026b7ebfe21fa006ed81e9e7c1676d2ea1abb224
|
@@ -54,20 +54,10 @@ Aws.config[:s3] = {
|
|
54
54
|
]
|
55
55
|
},
|
56
56
|
get_bucket_policy: {
|
57
|
-
policy:
|
58
|
-
{
|
59
|
-
|
60
|
-
|
61
|
-
{
|
62
|
-
"Sid": "AllowPublicRead",
|
63
|
-
"Effect": "Allow",
|
64
|
-
"Principal": "*",
|
65
|
-
"Action": "s3:GetObject",
|
66
|
-
"Resource": "arn:aws:s3:::my-bucket/*"
|
67
|
-
}
|
68
|
-
]
|
69
|
-
}
|
70
|
-
POLICY
|
57
|
+
policy: '{"Version":"2012-10-17","Statement":' \
|
58
|
+
'[{"Sid":"AllowPublicRead","Effect":"Allow",' \
|
59
|
+
'"Principal":"*","Action":"s3:GetObject",' \
|
60
|
+
'"Resource":"arn:aws:s3:::my-bucket/*"}]}'
|
71
61
|
}
|
72
62
|
}
|
73
63
|
}
|
@@ -55,7 +55,8 @@ module Awspec::Type
|
|
55
55
|
|
56
56
|
def has_policy?(policy)
|
57
57
|
bp = find_bucket_policy(@id)
|
58
|
-
|
58
|
+
# newlines, spaces, etc.. are removed from policy which is returned from API
|
59
|
+
bp ? (bp.policy.read == policy.gsub(/(\n|\r|\r\n|\s|\t)/, '')) : false
|
59
60
|
end
|
60
61
|
|
61
62
|
private
|
data/lib/awspec/version.rb
CHANGED