cfn-bridge 0.0.8 → 0.0.9

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: a532265fcd86617535bdf28d4a1f0a0005d44963
4
- data.tar.gz: f7b05834327e4fd2c80a0ddef54e1cc8bc3567fb
3
+ metadata.gz: c599dc50916a17cbdac3cc434096571eabda5e17
4
+ data.tar.gz: f8fd491ff238e7e9d6d25325564be0a83b43d7f6
5
5
  SHA512:
6
- metadata.gz: cb5beac93d0c47f58c28d77118e7bcd8be992efdff1cadb029fd5317b7712be95791ad54d238202d77e43da76c9fa43571de889b3c062b976838120d5814c8b4
7
- data.tar.gz: 0b8405151bf3f07066f5ed7a70e513742ebfe6b1f6fd516f20c83c5fa9b8ffbe0a886545f022b6ae545e23739f11e894001690ffef696ba38e01802f3c7a1ec9
6
+ metadata.gz: 27e437009e7f6af07d487c8e75f736fc1916a3c5588223a56e5fb265aa2c051b987919df5db7c8cfec6287236c5078a10d29c09ba1970650205a4ebde5b12ee6
7
+ data.tar.gz: 7be976117430b59d4ab1216434121f75a7df62d80bc07aac66e305b7ee88e5f7cbd91640b6269306f18ae11c67b293e16f90996735aaef1e7cb02c2ae52677d0
data/README.md CHANGED
@@ -62,8 +62,6 @@ Let's look at our `SubscribeQueueToTopic` to get a sense of how custom resources
62
62
 
63
63
  ```ruby
64
64
  ARN = 'Arn'
65
- ENDPOINT = 'Endpoint'
66
- PROTOCOL = 'Protocol'
67
65
 
68
66
  TOPIC_ARN = 'TopicArn'
69
67
  QUEUE_NAME = 'QueueName'
@@ -75,7 +73,7 @@ REQUIRED_FIELDS = [
75
73
  ]
76
74
  ```
77
75
 
78
- This list of constants are first the outputs produced by the resource (`ARN`, `ENDPOINT` and `PROTOCOL`) and then the inputs that are used to create it, `TOPIC_ARN`, `QUEUE_NAME` and `RAW_MESSAGE_DELIVERY`. The inputs are the fields we use to create the resource, since this resource is meant to subscribe an SQS queue to an SNS topic, we accept the topic ARN, the queue name and an optional `raw message delivery` field that instructs the subscription to send the raw message only and not the message with the other SNS fields.
76
+ This list of constants are first the outputs produced by the resource (`ARN`) and then the inputs that are used to create it, `TOPIC_ARN`, `QUEUE_NAME` and `RAW_MESSAGE_DELIVERY`. The inputs are the fields we use to create the resource, since this resource is meant to subscribe an SQS queue to an SNS topic, we accept the topic ARN, the queue name and an optional `raw message delivery` field that instructs the subscription to send the raw message only and not the message with the other SNS fields.
79
77
 
80
78
  ### Implementing the `create` operation
81
79
 
@@ -98,8 +96,6 @@ def create(request)
98
96
  FIELDS::PHYSICAL_RESOURCE_ID => subscription.arn,
99
97
  FIELDS::DATA => {
100
98
  ARN => subscription.arn,
101
- ENDPOINT => subscription.endpoint,
102
- PROTOCOL => subscription.protocol,
103
99
  },
104
100
  }
105
101
  end
@@ -132,8 +128,6 @@ And let's look at the one we're returning at the current `create` method:
132
128
  FIELDS::PHYSICAL_RESOURCE_ID => subscription.arn,
133
129
  FIELDS::DATA => {
134
130
  ARN => subscription.arn,
135
- ENDPOINT => subscription.endpoint,
136
- PROTOCOL => subscription.protocol,
137
131
  },
138
132
  }
139
133
  ```
@@ -148,7 +142,6 @@ The `Data` field should contain fields that might be useful for the cloud format
148
142
 
149
143
  Since it wouldn't make much sense to update a subscription (you're either subscribed to something or you're not) we don't have an `update` method here, but if it makes sense for your resource, the update method follows the same pattern as `create`, just make sure you're *not changing the physical resource id* as it will be ignored. It's usually much simpler not to implement updates and always require the resource to be deleted and created again.
150
144
 
151
-
152
145
  ### Implementing the `delete` operation
153
146
 
154
147
  The `delete` method is much simpler than `create`:
@@ -9,8 +9,6 @@ module CloudFormation
9
9
  class SubscribeQueueToTopic < Base
10
10
 
11
11
  ARN = 'Arn'
12
- ENDPOINT = 'Endpoint'
13
- PROTOCOL = 'Protocol'
14
12
 
15
13
  TOPIC_ARN = 'TopicArn'
16
14
  QUEUE_NAME = 'QueueName'
@@ -37,8 +35,6 @@ module CloudFormation
37
35
  FIELDS::PHYSICAL_RESOURCE_ID => subscription.arn,
38
36
  FIELDS::DATA => {
39
37
  ARN => subscription.arn,
40
- ENDPOINT => subscription.endpoint,
41
- PROTOCOL => subscription.protocol,
42
38
  },
43
39
  }
44
40
  end
@@ -1,5 +1,5 @@
1
1
  module CloudFormation
2
2
  module Bridge
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
@@ -80,11 +80,7 @@ describe CloudFormation::Bridge::Resources::SubscribeQueueToTopic do
80
80
 
81
81
  received_message = JSON.parse(message.body)["Message"]
82
82
 
83
- expected_outputs = stack_outputs(topics_stack)
84
-
85
83
  expect(received_message).to eq(message_body)
86
- expect(expected_outputs["SubscriptionProtocol"]).to eq('sqs')
87
- expect(expected_outputs["FirstQueueArn"]).to eq(expected_outputs["SubscriptionEndpoint"])
88
84
  end
89
85
  end
90
86
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-bridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maurício Linhares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2014-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler