awspec 1.17.0 → 1.17.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: 0a3421504dfb769b8367414a61de64c4ff31bf23
4
- data.tar.gz: bf6e0a3d1e1650497b3fc023d38e74b68cad19db
3
+ metadata.gz: a18ace2701d78d842a061acd472b7019bea55dc3
4
+ data.tar.gz: 69a163d1e8889e3475387abea04cc5085b2a4700
5
5
  SHA512:
6
- metadata.gz: c780579a44dbdfeefeac6b30f63240023afee5487d92cb3f22c2ebc27b9e742e9585c10280bf90413f333cf6f83609d72c7e8bd43d0c7da2ccec3d6aaf44c40f
7
- data.tar.gz: 3d7a2b8b2ee72b3819ac838806ef454e1151aa88150a1d445211b9dabfd8f80b1c2583b054ff803f81a1ad8b8aca5fb0c983eb285d1b16f3442a2ea7465e80ea
6
+ metadata.gz: da25d663cdce093220b9e3461f42d771910a4f2b26c20f783fed609de68640a4ba9ef98a1847c5b9057908a240a2b11c027325b59cd1bd354e7fb689d501e461
7
+ data.tar.gz: 82bfc1be5418e65d2020b2e9477bc8564a24e78171998da7d6f3854d6c35438b711a857905f97508dc0a032b65f855bb2cbef39c1c48d19fd9353a1d125d0a8a
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  language: ruby
2
2
  matrix:
3
3
  include:
4
+ - rvm: 2.6.2
5
+ env: RUBYGEMS_VERSION=
4
6
  - rvm: 2.5.3
5
7
  env: RUBYGEMS_VERSION=
6
8
  - rvm: 2.4.5
@@ -11,6 +11,8 @@ end
11
11
  ```ruby
12
12
  describe route53_hosted_zone('example.com.') do
13
13
  its(:resource_record_set_count) { should eq 6 }
14
+ it { should have_record_set('example.com.') }
15
+ it { should have_record_set('example.com.').type('a') }
14
16
  it { should have_record_set('example.com.').a('123.456.7.890') }
15
17
  it { should have_record_set('*.example.com.').cname('example.com') }
16
18
  it { should have_record_set('example.com.').mx('10 mail.example.com') }
@@ -2869,6 +2869,8 @@ end
2869
2869
  ```ruby
2870
2870
  describe route53_hosted_zone('example.com.') do
2871
2871
  its(:resource_record_set_count) { should eq 6 }
2872
+ it { should have_record_set('example.com.') }
2873
+ it { should have_record_set('example.com.').type('a') }
2872
2874
  it { should have_record_set('example.com.').a('123.456.7.890') }
2873
2875
  it { should have_record_set('*.example.com.').cname('example.com') }
2874
2876
  it { should have_record_set('example.com.').mx('10 mail.example.com') }
@@ -29,4 +29,8 @@ RSpec::Matchers.define :have_record_set do |name|
29
29
  @options = {} if @options.nil?
30
30
  @options[:ttl] = ttl
31
31
  end
32
+
33
+ chain :type do |type|
34
+ @type = type
35
+ end
32
36
  end
@@ -14,9 +14,15 @@ module Awspec::Type
14
14
 
15
15
  def has_record_set?(name, type, value, options = {})
16
16
  name = name.gsub(/\*/, '\\\052') # wildcard support
17
- ret = resource_via_client_record_sets.find do |record_set|
18
- # next if record_set.type != type.upcase
19
- next unless record_set.type.casecmp(type) == 0
17
+
18
+ record_sets = resource_via_client_record_sets.select { |record| record.name == name }
19
+ # Check if the given record is registered regardless of type and value
20
+ return !record_sets.empty? if (type || value).nil?
21
+
22
+ record_sets.select! { |record_set| record_set.type.casecmp(type) == 0 }
23
+ return !record_sets.empty? unless value
24
+
25
+ record_sets.each do |record_set|
20
26
  if !record_set.resource_records.empty?
21
27
  sorted = record_set.resource_records.map { |r| r.value }.sort.join("\n")
22
28
  ttl = options[:ttl] || record_set[:ttl]
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '1.17.0'
2
+ VERSION = '1.17.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-19 00:00:00.000000000 Z
11
+ date: 2019-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -716,7 +716,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
716
716
  version: '0'
717
717
  requirements: []
718
718
  rubyforge_project:
719
- rubygems_version: 2.6.14.1
719
+ rubygems_version: 2.6.14
720
720
  signing_key:
721
721
  specification_version: 4
722
722
  summary: RSpec tests for your AWS resources.