miasma-aws 0.3.2 → 0.3.4

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: cadebc8b9b2a81baa2689de3b9a7daca8c83c6b6
4
- data.tar.gz: ce0db9491da3d2f587614ccc8eeec2999edb3ab5
3
+ metadata.gz: 0cc0b7f33082a8144660f29aac8f48f73f2df07c
4
+ data.tar.gz: 7a6122fa2188e2b7d516de4497d21aa5d6247f42
5
5
  SHA512:
6
- metadata.gz: 3dfde7d719d9656683909749ceb68714aa202b54fac148411287afb7d0b1248083cb80b65eb2f6a22a1c01be4362ee9a315524e6947b5b76afce5b6dfbbf7f58
7
- data.tar.gz: a635deed02cf099c275e85e95d9b13aaeba945b84994ae8748bb0838a354dd97417fd446a1a6d8ba57e9925d4dde798b76bff34967dd2e79372bb77d87f9910e
6
+ metadata.gz: 106e62613c03de1fb70e1cf28d0ffd183ba4ca1036dc2621d18d6a1b10c0b79f4e2090cb3464c735b5ae2ce69a76d15398a962fe5e1331512aae12c608911c27
7
+ data.tar.gz: a5126856fe8f37891bceaf382482690c32d185926d1239d06221388789c25294b1be63628d59d7fcd4673dd96ff7c35fc85599e662d6b6c7cffd1bcf86112ce6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.3.4
2
+ * [fix] Support template url for stack models (#39)
3
+
1
4
  # v0.3.2
2
5
  * [fix] Do not pass configuration file settings to STS (#37)
3
6
  * [fix] Properly fetch new events (#38)
@@ -1,4 +1,4 @@
1
1
  module MiasmaAws
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.3.2')
3
+ VERSION = Gem::Version.new('0.3.4')
4
4
  end
@@ -169,10 +169,14 @@ module Miasma
169
169
  if(stack.on_failure)
170
170
  params['OnFailure'] = stack.on_failure == 'nothing' ? 'DO_NOTHING' : stack.on_failure.upcase
171
171
  end
172
- if(!stack.dirty?(:template) && stack.persisted?)
173
- params['UsePreviousTemplate'] = true
172
+ if(stack.template_url)
173
+ params['TemplateURL'] = stack.template_url
174
174
  else
175
- params['TemplateBody'] = MultiJson.dump(stack.template)
175
+ if(!stack.dirty?(:template) && stack.persisted?)
176
+ params['UsePreviousTemplate'] = true
177
+ else
178
+ params['TemplateBody'] = MultiJson.dump(stack.template)
179
+ end
176
180
  end
177
181
  if(stack.persisted?)
178
182
  result = request(
@@ -267,12 +271,16 @@ module Miasma
267
271
  # @return [NilClass, String] nil if valid, string error message if invalid
268
272
  def stack_template_validate(stack)
269
273
  begin
274
+ if(stack.template_url)
275
+ params = Smash.new('TemplateURL' => stack.template_url)
276
+ else
277
+ params = Smash.new('TemplateBody' => MultiJson.dump(stack.template))
278
+ end
270
279
  result = request(
271
280
  :method => :post,
272
281
  :path => '/',
273
- :form => Smash.new(
274
- 'Action' => 'ValidateTemplate',
275
- 'TemplateBody' => MultiJson.dump(stack.template)
282
+ :form => params.merge(
283
+ 'Action' => 'ValidateTemplate'
276
284
  )
277
285
  )
278
286
  nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miasma-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: miasma