cloudformation-tool 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloud_formation_tool/cloud_formation/lambda_code.rb +1 -1
- data/lib/cloud_formation_tool/cloud_formation/stack.rb +1 -1
- data/lib/cloud_formation_tool/cloud_init.rb +1 -1
- data/lib/cloud_formation_tool/storable.rb +2 -2
- data/lib/cloud_formation_tool/version.rb +1 -1
- data/lib/cloud_formation_tool.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39ae25171377129aada7e6a6d089eb9f081b05bf
|
4
|
+
data.tar.gz: 153b0821c6888b55c499482fdfd55df83483c906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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"
|
data/lib/cloud_formation_tool.rb
CHANGED