awspec 1.12.3 → 1.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/_resource_types/sns_topic.md +32 -0
- data/doc/resource_types.md +21 -0
- data/lib/awspec/generator/doc/type/sns_topic.rb +1 -1
- data/lib/awspec/helper/finder/sqs.rb +5 -0
- data/lib/awspec/stub/sqs.rb +5 -0
- data/lib/awspec/type/sns_topic.rb +1 -0
- data/lib/awspec/type/sqs.rb +6 -0
- data/lib/awspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cbf742d6798a1af84303ae4e02b784f0315159edde20f42935c8dd6a94f8691
|
4
|
+
data.tar.gz: 72ff7241198823d08f65185d59d8cc47f45f56a0f97b37c542690796cd985eb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5c305643fadbe181998b9345da1683a3d3ab8013dc57292adcceb73e375eb87a2f1c903946382bfc4b767520adb99be32bab05c136987a5795a8a4d39674d1f
|
7
|
+
data.tar.gz: d17b7c98cfc54324d54acee1abaedaa4494008a06fe4df25659ca57aeb22aab15e66bcc151a652dd007c55fa0dde47a9ad5860651a0ce5a6f24266cb771e81d6
|
@@ -60,6 +60,18 @@ describe sns_topic(topic_arn) do
|
|
60
60
|
end
|
61
61
|
```
|
62
62
|
|
63
|
+
### subscriptions
|
64
|
+
|
65
|
+
More like a helper method for fixtures. You could add any logic required to
|
66
|
+
identify a specific method.
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
let (:subscriber) do
|
70
|
+
all = subject.subscriptions
|
71
|
+
return all[0].to_s # keys are stored as symbols
|
72
|
+
end
|
73
|
+
```
|
74
|
+
|
63
75
|
### include_subscribed
|
64
76
|
|
65
77
|
```ruby
|
@@ -68,6 +80,26 @@ describe sns_topic(topic_arn) do
|
|
68
80
|
end
|
69
81
|
```
|
70
82
|
|
83
|
+
### have_subscription
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
describe sns_topic(topic_arn) do
|
87
|
+
let(:subscription_arn) do
|
88
|
+
subscription_arn: subscribed, # this is required
|
89
|
+
end
|
90
|
+
|
91
|
+
describe '#subscribed' do
|
92
|
+
it do
|
93
|
+
should have_subscription(subscribed)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
An [automatic matcher](https://www.rubydoc.info/github/rspec/rspec-expectations/RSpec/Matchers) created due the predicate `has_subscription?` existing method of `Awspec::Type::SnsTopic` class.
|
100
|
+
|
101
|
+
It validates if a given AWS SNS ARN subscription exists in the SNS Topic.
|
102
|
+
|
71
103
|
### have_subscription_attributes
|
72
104
|
|
73
105
|
```ruby
|
data/doc/resource_types.md
CHANGED
@@ -2880,6 +2880,25 @@ end
|
|
2880
2880
|
|
2881
2881
|
### have_subscription
|
2882
2882
|
|
2883
|
+
```ruby
|
2884
|
+
describe sns_topic(topic_arn) do
|
2885
|
+
let(:subscription_arn) do
|
2886
|
+
subscription_arn: subscribed, # this is required
|
2887
|
+
end
|
2888
|
+
|
2889
|
+
describe '#subscribed' do
|
2890
|
+
it do
|
2891
|
+
should have_subscription(subscribed)
|
2892
|
+
end
|
2893
|
+
end
|
2894
|
+
end
|
2895
|
+
```
|
2896
|
+
|
2897
|
+
An [automatic matcher](https://www.rubydoc.info/github/rspec/rspec-expectations/RSpec/Matchers) created due the predicate `has_subscription?` existing method of `Awspec::Type::SnsTopic` class.
|
2898
|
+
|
2899
|
+
It validates if a given AWS SNS ARN subscription exists in the SNS Topic.
|
2900
|
+
|
2901
|
+
|
2883
2902
|
### have_subscription_attributes
|
2884
2903
|
|
2885
2904
|
```ruby
|
@@ -2936,6 +2955,8 @@ describe sqs('my-queue') do
|
|
2936
2955
|
end
|
2937
2956
|
```
|
2938
2957
|
|
2958
|
+
### have_tag
|
2959
|
+
|
2939
2960
|
### its(:queue_arn), its(:approximate_number_of_messages), its(:approximate_number_of_messages_not_visible), its(:approximate_number_of_messages_delayed), its(:created_timestamp), its(:last_modified_timestamp), its(:visibility_timeout), its(:maximum_message_size), its(:message_retention_period), its(:delay_seconds), its(:receive_message_wait_time_seconds), its(:queue_url)
|
2940
2961
|
## <a name="ssm_parameter">ssm_parameter</a>
|
2941
2962
|
|
@@ -8,7 +8,7 @@ module Awspec::Generator
|
|
8
8
|
@type = Awspec::Type::SnsTopic.new('my-sns')
|
9
9
|
@ret = @type.resource_via_client
|
10
10
|
@matchers = %w(include_subscribed have_subscription_attributes)
|
11
|
-
@ignore_matchers = []
|
11
|
+
@ignore_matchers = ['have_subscription_filter']
|
12
12
|
@describes = %w(policy owner pending_subscriptions topic_arn effective_delivery_policy display_name
|
13
13
|
confirmed_subscriptions deleted_subscriptions name)
|
14
14
|
end
|
data/lib/awspec/stub/sqs.rb
CHANGED
data/lib/awspec/type/sqs.rb
CHANGED
data/lib/awspec/version.rb
CHANGED
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.12.
|
4
|
+
version: 1.12.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|