aws-cleaner 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-cleaner.rb +16 -16
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a88504d1196ccc539ecd4ad7c76bb900a760b8f2
|
4
|
+
data.tar.gz: e775a96820ae0656d0d112755cf88f33c62accde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73b82755cd2b6243c6de3e42f3d4a5555770284dcd8ec1da9633ae86580d201ab1cb86a5925152bbb7567a42cd278fb83e795796c0ea0a3646d6e1476ef673e1
|
7
|
+
data.tar.gz: 54bf287440defe954ef1a6927185fad067decfeb99feaf101905ff3b88ce03694dc8b556ceb6741209c4de54bb14a9a70e1179b4b7726724537bd2b28330290c
|
data/lib/aws-cleaner.rb
CHANGED
@@ -150,12 +150,12 @@ class AwsCleaner
|
|
150
150
|
else
|
151
151
|
raise 'Unknown templating method'
|
152
152
|
end
|
153
|
-
item.gsub
|
153
|
+
replaced_item = item.gsub(/{#{template_variable}}/, replacement)
|
154
154
|
rescue StandardError => e
|
155
155
|
puts "Error generating template: #{e.message}"
|
156
156
|
return false
|
157
157
|
else
|
158
|
-
|
158
|
+
replaced_item
|
159
159
|
end
|
160
160
|
|
161
161
|
# call an HTTP endpoint
|
@@ -175,21 +175,21 @@ class AwsCleaner
|
|
175
175
|
end
|
176
176
|
|
177
177
|
hook = { method: hook_config[:method].to_sym, url: url }
|
178
|
-
|
179
|
-
|
178
|
+
begin
|
179
|
+
RestClient::Request.execute(hook)
|
180
|
+
rescue RestClient::ExceptionWithResponse => e
|
180
181
|
return false
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
end
|
182
|
+
end
|
183
|
+
# notify chat when webhook is successful
|
184
|
+
if hook_config[:chat][:enable]
|
185
|
+
msg = AwsCleaner::Webhooks.generate_template(
|
186
|
+
hook_config[:chat][:message],
|
187
|
+
hook_config[:chat][:method],
|
188
|
+
hook_config[:chat][:variable],
|
189
|
+
config,
|
190
|
+
instance_id
|
191
|
+
)
|
192
|
+
AwsCleaner::Notify.notify_chat(msg, config)
|
193
193
|
return true
|
194
194
|
end
|
195
195
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Heydrick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|