cloudformation-tool 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cftool +6 -0
- data/lib/cloud_formation_tool/cloud_formation/lambda_code.rb +28 -12
- data/lib/cloud_formation_tool/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3c901ead020a647c6b7fca5e7c54a87ac460fa40ffea601e57fc679f4e16d48
|
4
|
+
data.tar.gz: e4a3b0af6b07b111926088777071e180bbf83fe4efc6782a97f1ed5b60683cd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b5f8f00b6a8d0c724dc1b7231b063d4b1b4c5807fd7915dcd70b272112266d7d8be75eb88f4576d9d0966b24629ea2d025c336a4f40958b9b3e7adc6fd1dbee
|
7
|
+
data.tar.gz: dc198485e2c6af34cef73e380fb69e478cf3b09b1512f76263bfb943061b90f16a2b3297bfd157baec7a50960cea8011a32381773081057b2085dbd55494f580
|
data/bin/cftool
CHANGED
@@ -4,6 +4,12 @@ require 'cloud_formation_tool'
|
|
4
4
|
|
5
5
|
begin
|
6
6
|
CloudFormationTool::CLI::Main.run
|
7
|
+
rescue SocketError => e
|
8
|
+
warn "Networking error: #{e.message}"
|
9
|
+
exit 1
|
10
|
+
rescue Seahorse::Client::NetworkingError => e
|
11
|
+
warn "Networking error: #{e.message}"
|
12
|
+
exit 1
|
7
13
|
rescue CloudFormationTool::Errors::BaseError => e
|
8
14
|
warn e.message
|
9
15
|
exit 1
|
@@ -38,19 +38,14 @@ module CloudFormationTool
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def zip_path(path)
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
end
|
41
|
+
Zip::OutputStream.write_buffer do |zf|
|
42
|
+
rdir path do |ent|
|
43
|
+
#log "Deflating #{ent}"
|
44
|
+
filepath = File.join(path,ent)
|
45
|
+
zf.put_next_entry ::Zip::Entry.new(nil, ent, nil, nil, nil, nil, nil, nil, ::Zip::DOSTime.at(File.mtime(filepath).to_i))
|
46
|
+
zf.write File.read(filepath)
|
48
47
|
end
|
49
|
-
|
50
|
-
ensure
|
51
|
-
temp_file.close!
|
52
|
-
File.unlink temp_path
|
53
|
-
end
|
48
|
+
end.string
|
54
49
|
end
|
55
50
|
|
56
51
|
def already_in_cache(uri_str)
|
@@ -129,6 +124,27 @@ module CloudFormationTool
|
|
129
124
|
}
|
130
125
|
end
|
131
126
|
end
|
127
|
+
|
128
|
+
def rdir path, prefix = '', &block
|
129
|
+
ents = []
|
130
|
+
(Dir.entries(path) - %w(. ..)).collect do |ent|
|
131
|
+
diskpath = File.join(path,ent)
|
132
|
+
localpath = prefix.length>0 ? File.join(prefix,ent) : ent
|
133
|
+
if block_given?
|
134
|
+
if File.directory? diskpath
|
135
|
+
rdir diskpath, localpath, &block
|
136
|
+
else
|
137
|
+
yield localpath
|
138
|
+
end
|
139
|
+
end
|
140
|
+
if File.directory? diskpath
|
141
|
+
rdir diskpath, localpath
|
142
|
+
else
|
143
|
+
ent
|
144
|
+
end
|
145
|
+
end.flatten
|
146
|
+
end
|
147
|
+
|
132
148
|
end
|
133
149
|
|
134
150
|
end
|
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: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oded Arbel
|
@@ -109,19 +109,19 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '2'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rubyzip
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0'
|
125
125
|
description:
|
126
126
|
email: oded.arbel@greenfieldtech.net
|
127
127
|
executables:
|