lbhrr 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/lbhrr +9 -29
- data/lib/lbhrr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c16598588fb0dd4b1594716029304841660319bca7bbe4f07fe82c8614d3efc
|
4
|
+
data.tar.gz: c5bd2ed54c4bc0af9add6155fe51f67e460005b2df5dfa7f91a394e940d022cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05f4321bdfcc221108e26b9500dfb564474e11ffab4f6e1d2b0a1ea162a3be229121960d641faf3ed624022985bd5fbfa085c063139536236fb8f1e25b832a2b
|
7
|
+
data.tar.gz: 7f8e65ee5180f1f8aa14660609997fdcd73e27c1f53e84f8191207e692c3f5097612dfabb1eafe2046f7c0b16f49431ed8b17f99efc63515a4e14e7bf3a81ef9
|
data/exe/lbhrr
CHANGED
@@ -188,36 +188,16 @@ class LbhrrCLI < Thor
|
|
188
188
|
end
|
189
189
|
|
190
190
|
desc "drop", "Destroy an app and remove all traces"
|
191
|
-
def drop
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
`ssh #{user}@#{host} 'harbr destroy #{container_name}'`
|
199
|
-
unless manifest?
|
200
|
-
puts "no manifest found!"
|
201
|
-
return
|
202
|
-
end
|
203
|
-
|
204
|
-
current_dir = Dir.pwd
|
205
|
-
parent_dir = File.dirname(current_dir)
|
206
|
-
|
207
|
-
# Requesting confirmation
|
208
|
-
if yes? "Are you sure you want to delete the directory: #{current_dir}? [y/N]"
|
209
|
-
# Proceeding with deletion
|
210
|
-
puts "Changing directory to the parent directory..."
|
211
|
-
Dir.chdir(parent_dir)
|
212
|
-
|
213
|
-
puts "Deleting the directory: #{current_dir}"
|
214
|
-
FileUtils.rm_rf(current_dir)
|
215
|
-
|
216
|
-
Dir.chdir(parent_dir)
|
217
|
-
|
218
|
-
puts "#{current_dir} has been deleted."
|
219
|
-
|
191
|
+
def drop(name=nil)
|
192
|
+
if name.nil?
|
193
|
+
container_name = File.basename(Dir.pwd)
|
194
|
+
config = load_configuration
|
195
|
+
host = config["host"]
|
196
|
+
user = config["user"]
|
197
|
+
name = config["name"]
|
220
198
|
end
|
199
|
+
puts "Destroying app: #{name}"
|
200
|
+
`ssh #{user}@#{host} 'harbr destroy #{name}'`
|
221
201
|
|
222
202
|
puts "App #{container_name} has been successfully destroyed."
|
223
203
|
end
|
data/lib/lbhrr/version.rb
CHANGED