eventhub-command 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4da56a2bac456ac5244f676a92ebd2992b12f22
4
- data.tar.gz: 01139ef38f51ba64c180567cc9dd9bb495578e4f
3
+ metadata.gz: 034f834daeb4c0cdb78f28ece401a2476856ce60
4
+ data.tar.gz: db6943677d99c2e5de4ff1fe573e3169195e7671
5
5
  SHA512:
6
- metadata.gz: c417a4b3abf4add944c5830a24f43155c5be174832f56a582b3a4c402d0ada35b2d30963a805782622b04d3092334308309171d6fc5b366bce057affabdfb461
7
- data.tar.gz: 0aefa86aca74759c02eb2d5a151524ef94b012733d2c8e35fcd2048dc6aa25b10e6e2ef599fd223dc5d64d1da9174bca574bd195f528de0e9e4c16403ddf444e
6
+ metadata.gz: 16b498eda37a837306c4a0f29bcf4797553720aa648790db179798bd64179a0c018a9af5aa7685a8dce06d3de673c8ee0ec04d980a10ced21bb1f9b90ab7c508
7
+ data.tar.gz: 9e5da5232f76c5467304fdc3389f5f1a4443b60c2c9c1fb685b8eb9564581dedc37696fca7db7e65c0dbf007744439d15af626bab38e4cbdffc0dcf6b954c268
@@ -17,6 +17,7 @@ command :db do |command|
17
17
  puts "will execute '#{cmd}'"
18
18
  end
19
19
  system cmd
20
+ puts "Dumped DB to #{target}"
20
21
  end
21
22
  end
22
23
 
@@ -31,11 +32,17 @@ command :db do |command|
31
32
  if source.nil?
32
33
  raise ArgumentError.new("No source file found in #{base} and none passed via --file")
33
34
  end
34
- cmd = "psql -U#{options[:user]} -d#{options[:db]} -f#{source}"
35
- if options[:verbose]
36
- puts "will execute '#{cmd}'"
35
+ puts "This will destroy the contents of #{options[:db]}. Is this OK? [yes/NO]:"
36
+ answer = $stdin.gets.chomp.downcase
37
+ if answer == 'yes'
38
+ cmd = "psql -U#{options[:user]} -d#{options[:db]} -f#{source}"
39
+ if options[:verbose]
40
+ puts "will execute '#{cmd}'"
41
+ end
42
+ system cmd
43
+ else
44
+ puts "Abort."
37
45
  end
38
- system cmd
39
46
  end
40
47
  end
41
48
 
data/lib/eh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eh
2
- VERSION = '0.3.8'
2
+ VERSION = '0.3.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventhub-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pascal Betz