eventhub-command 0.3.9 → 0.3.10
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 +4 -4
- data/lib/eh/commands/db.rb +5 -5
- data/lib/eh/version.rb +1 -1
- 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: 31956e06ddf87f5b42edb274d41b2ad09f1ce6a2
|
4
|
+
data.tar.gz: b666d07a5ca7004cbbef827ff88b60f380ce2d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e558e0d7740178635eaa30c4b759d6e77d1a7b56bc9b1205802b1f977ac9deb4c7c4680917f066f40c3ea850961bc2907c7cdaf727cc6e3666713f8780a8ef5
|
7
|
+
data.tar.gz: fb19ef1c3cefd937bbce9cc2de907fba96cc2dcf7af1ea801bfd9c913e8b8d69da34402035909da49b61fbd9b968c6c66fd244dd7dc52bb8a91e3c293a9daede
|
data/lib/eh/commands/db.rb
CHANGED
@@ -10,9 +10,9 @@ command :db do |command|
|
|
10
10
|
c.action do |global_options, options, args|
|
11
11
|
base = Eh::Settings.current.db_backups_dir
|
12
12
|
stamp = Time.now.strftime('%Y%m%d%H%M%S')
|
13
|
-
target = options[:file] || "#{stamp}-console-dump.sql"
|
13
|
+
target = options[:file] || "#{stamp}-console-dump.sql.compressed"
|
14
14
|
|
15
|
-
cmd = "mkdir -p #{base} && cd #{base} && pg_dump -U#{options[:user]} #{options[:db]} -f#{target}"
|
15
|
+
cmd = "mkdir -p #{base} && cd #{base} && pg_dump -Fc -U#{options[:user]} #{options[:db]} -f#{target}"
|
16
16
|
if options[:verbose]
|
17
17
|
puts "will execute '#{cmd}'"
|
18
18
|
end
|
@@ -32,10 +32,10 @@ command :db do |command|
|
|
32
32
|
if source.nil?
|
33
33
|
raise ArgumentError.new("No source file found in #{base} and none passed via --file")
|
34
34
|
end
|
35
|
-
puts "This
|
35
|
+
puts "This can destroy the contents of #{options[:db]}. Is this OK? [yes/NO]:"
|
36
36
|
answer = $stdin.gets.chomp.downcase
|
37
37
|
if answer == 'yes'
|
38
|
-
cmd = "
|
38
|
+
cmd = "pg_restore -Fc -U #{options[:user]} -d #{options[:db]} #{source}"
|
39
39
|
if options[:verbose]
|
40
40
|
puts "will execute '#{cmd}'"
|
41
41
|
end
|
@@ -47,7 +47,7 @@ command :db do |command|
|
|
47
47
|
end
|
48
48
|
|
49
49
|
command.command :cleanup_dumps do |c|
|
50
|
-
c.flag([:keep], type: Integer, desc: "How many dumps to keep", default_value:
|
50
|
+
c.flag([:keep], type: Integer, desc: "How many dumps to keep", default_value: 25)
|
51
51
|
c.action do |global_options, options, args|
|
52
52
|
keep = options[:keep]
|
53
53
|
base = Eh::Settings.current.db_backups_dir
|
data/lib/eh/version.rb
CHANGED
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.
|
4
|
+
version: 0.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pascal Betz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-06-
|
12
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|