cloudformation-tool 0.5.4 → 0.5.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 719d1392da88b04a9b1ac703e2f53e45eb4c503e
4
- data.tar.gz: 1b5d926090a8b5354aa73340df43d8081f83a2e0
3
+ metadata.gz: 39ae25171377129aada7e6a6d089eb9f081b05bf
4
+ data.tar.gz: 153b0821c6888b55c499482fdfd55df83483c906
5
5
  SHA512:
6
- metadata.gz: 418b750c8b9ab04c029ab098e1d11849dbce7e970cf51a83a38a20e1018f91cd52c11f60914bf17dab241589fa5b775ffb65b3bd6d3457a6721f465e928461c3
7
- data.tar.gz: 3ec1c95e7b20db70f28f1b923a9b67287e64eddceebd846338feac3fdf5094a22c031d1b38602225fa84e9a65739a123b1db771056332047e4c207ea4486ecc9
6
+ metadata.gz: 52fc415aa77133a863e0bef3ed0270d64aebb9e796422e622a5c885495c8ebb48cf920eefb9616d8bab3d1028cdc65601f8f4047228b9c0fa180d7d7d8936fde
7
+ data.tar.gz: 71e8b1bc34031cf60aaa368485b00316d6e521ae52d688209dc4aa9e577021ee2a0193ea6c2d83798abc69fcc6f9405a23bfa9930c7135a7dcb096a69bd5e123
@@ -10,7 +10,7 @@ module CloudFormationTool
10
10
  log "Downloading Lambda code from #{url}"
11
11
  res = fetch(url)
12
12
 
13
- @s3_url = URI(upload(make_filename(url.split('.').last), res.body, res['content-type'], false))
13
+ @s3_url = URI(upload(make_filename(url.split('.').last), res.body, mime_type: res['content-type'], gzip: false))
14
14
  log "uploaded Lambda function to #{@s3_url}"
15
15
  end
16
16
 
@@ -46,7 +46,7 @@ module CloudFormationTool
46
46
 
47
47
  def create(template, params = {})
48
48
  tmpl = CloudFormation.parse(template).to_yaml(params)
49
- url = upload(make_filename('yaml'), tmpl, false)
49
+ url = upload(make_filename('yaml'), tmpl, gzip: false)
50
50
  return update(url, template, params) if exist?
51
51
  log "Creating stack '#{name}' from '#{template}' params #{params.inspect}"
52
52
  resp = awscf.create_stack({
@@ -51,7 +51,7 @@ module CloudFormationTool
51
51
  end
52
52
  if yamlout.size > 16384 # still to big, we should upload to S3 and create an include file
53
53
  url = upload make_filename('init'),
54
- yamlout, 'text/cloud-config', usegzip
54
+ yamlout, mime_type: 'text/cloud-config', gzip: usegzip
55
55
  log "Wrote cloud config to #{url}"
56
56
  [ "#include", url ].join "\n"
57
57
  else
@@ -13,7 +13,7 @@ module CloudFormationTool
13
13
  end
14
14
  end
15
15
 
16
- def upload(path, content, mime_type = 'text/yaml', gziped = true)
16
+ def upload(path, content, mime_type: 'text/yaml', gzip: true)
17
17
  md5 = Digest::MD5.hexdigest content
18
18
  prefix = "#{md5[0]}/#{md5[1..2]}/#{md5}"
19
19
  b = Aws::S3::Bucket.new(s3_bucket_name(region), client: awss3(region))
@@ -33,7 +33,7 @@ module CloudFormationTool
33
33
  content_type: mime_type,
34
34
  storage_class: 'REDUCED_REDUNDANCY'
35
35
  }
36
- file_opts.merge!({content_encoding: 'gzip'}) if gziped
36
+ file_opts.merge!({content_encoding: 'gzip'}) if gzip
37
37
  o.put(file_opts)
38
38
  else
39
39
  log "re-using cached object"
@@ -1,3 +1,3 @@
1
1
  module CloudFormationTool
2
- VERSION = '0.5.4'
2
+ VERSION = '0.5.5'
3
3
  end
@@ -31,7 +31,7 @@ module CloudFormationTool
31
31
  end
32
32
 
33
33
  def profile
34
- $__profile ||= find_profile(nil, ENV['AWS_DEFAULT_PROFILE'] || 'default')
34
+ $__profile ||= find_profile(nil, ENV['AWS_PROFILE'] || ENV['AWS_DEFAULT_PROFILE'] || 'default')
35
35
  end
36
36
 
37
37
  def awscreds
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudformation-tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oded Arbel