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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d18888b14d8e1858e59126b09d82f75705cc744
4
- data.tar.gz: 51e0923dc3afb735b6566a1beb4e8de83f79475f
3
+ metadata.gz: a10eaa86514c0ae91094657961105fcb5f9ac41a
4
+ data.tar.gz: 57bcad942d927c04524a515b12c08c046a43c0dc
5
5
  SHA512:
6
- metadata.gz: a29ad76af244e9feac511c78779200d3c2a400e58dddcb7f6e967441c9d3758e7a29e9f6d472f6df7ddd512637f411c55910d5547509190ba4a641fffebe96b7
7
- data.tar.gz: 75b430184399d5e2d46da464525b75b03b0a6c31ad3b34c6d54cc856f8d8459c7fed9c7bec453d2d2e5722f0ad893872a579278b5829f5619ef662e4096c5367
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: <<-POLICY
58
- {
59
- "Version": "2012-10-17",
60
- "Statement": [
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
- bp ? (bp.policy.read == policy) : false
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
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '0.24.0'
2
+ VERSION = '0.24.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW