eventhub-command 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 034f834daeb4c0cdb78f28ece401a2476856ce60
4
- data.tar.gz: db6943677d99c2e5de4ff1fe573e3169195e7671
3
+ metadata.gz: 31956e06ddf87f5b42edb274d41b2ad09f1ce6a2
4
+ data.tar.gz: b666d07a5ca7004cbbef827ff88b60f380ce2d60
5
5
  SHA512:
6
- metadata.gz: 16b498eda37a837306c4a0f29bcf4797553720aa648790db179798bd64179a0c018a9af5aa7685a8dce06d3de673c8ee0ec04d980a10ced21bb1f9b90ab7c508
7
- data.tar.gz: 9e5da5232f76c5467304fdc3389f5f1a4443b60c2c9c1fb685b8eb9564581dedc37696fca7db7e65c0dbf007744439d15af626bab38e4cbdffc0dcf6b954c268
6
+ metadata.gz: 8e558e0d7740178635eaa30c4b759d6e77d1a7b56bc9b1205802b1f977ac9deb4c7c4680917f066f40c3ea850961bc2907c7cdaf727cc6e3666713f8780a8ef5
7
+ data.tar.gz: fb19ef1c3cefd937bbce9cc2de907fba96cc2dcf7af1ea801bfd9c913e8b8d69da34402035909da49b61fbd9b968c6c66fd244dd7dc52bb8a91e3c293a9daede
@@ -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 will destroy the contents of #{options[:db]}. Is this OK? [yes/NO]:"
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 = "psql -U#{options[:user]} -d#{options[:db]} -f#{source}"
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: 5)
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
@@ -1,3 +1,3 @@
1
1
  module Eh
2
- VERSION = '0.3.9'
2
+ VERSION = '0.3.10'
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.9
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-17 00:00:00.000000000 Z
12
+ date: 2015-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake