lambda_convert 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lambda_convert/cli.rb +19 -17
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec904ee282cb8ab57051dc9c2add258f690bfb8a
4
- data.tar.gz: 0b795afa9b435d58c2f36b8c7b0c86ed68044f6d
3
+ metadata.gz: 57f70ce184afbeb3debbef49fa829a7d518b7fb6
4
+ data.tar.gz: 8c4ea13a8f7b2e512233a5c701d993710ea89154
5
5
  SHA512:
6
- metadata.gz: fe5a60653a5ad932860fbbb59fd88ecbddfe9ddf7ace5d3ec985a645dc0ae8262c3baa8d75c7492a7ba33fcd6437bffc22ed9fcfae3ab76d45330c7eecf2b5e9
7
- data.tar.gz: 9f2f3bc73241b227a786e44ea30e8584593d62198a745badb343d6d6a465cc68fc916de448e9d532fdca92afa5963e4f8f04f791708e7bbd48baa775b98fcfff
6
+ metadata.gz: 4c38ab5f589bfe0284bea6add6458f8f87471bad41617a15285ea094ca160df9e0a5fded154496c3a95c5a91970b21197876e15b02778f74e6996b940c9c20ba
7
+ data.tar.gz: 96286dd77ccf7b90014ae6f706800380ecdc2f5bd0ea1e54a4fc2b99f834a991c9910f32f91fe359bfe7402b63faed891d312af039e1efb5d3a9e1a5b671c2d4
@@ -78,23 +78,25 @@ module LambdaConvert
78
78
  )
79
79
  logger.info('Done')
80
80
  ensure
81
- logger.info(
82
- "Delete files #{input_key} and #{output_key} from #{s3_bucket}"
83
- )
84
- s3.delete_objects(
85
- bucket: s3_bucket,
86
- delete: {
87
- objects: [
88
- {
89
- key: input_key
90
- },
91
- {
92
- key: output_key
93
- }
94
- ],
95
- quiet: true
96
- }
97
- )
81
+ if !s3.nil? && !input_key.nil? && !output_key.nil?
82
+ logger.info(
83
+ "Delete files #{input_key} and #{output_key} from #{s3_bucket}"
84
+ )
85
+ s3.delete_objects(
86
+ bucket: s3_bucket,
87
+ delete: {
88
+ objects: [
89
+ {
90
+ key: input_key
91
+ },
92
+ {
93
+ key: output_key
94
+ }
95
+ ],
96
+ quiet: true
97
+ }
98
+ )
99
+ end
98
100
  end
99
101
 
100
102
  def self.local_convert
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lambda_convert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fang-Pen Lin