capobvious 0.3.pre19 → 0.3.pre20

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTcxOTQ1NDhlMDE2MWViNjM2YTJlZmU1NDVmZGI0MTljZTZkOGM1Yw==
5
- data.tar.gz: !binary |-
6
- N2E0NDViOTliYTY2YjViNjcyOTdmMDZjYjNlZjk4NGFlZTk2ODFlYQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NjViMmU5NThmMmRkNDJmOGRjMGQ5ZjA3YWQzODgzYThlNmRhZTM4MWExYmJh
10
- MTE1NmM4ZGVlMjM5ZWY3MmJlOTE3ODc5YWRkNTg2Y2EyZjc3MjZiMTgzYzA5
11
- MjkwYWZjNjBjOTcxMzBiMjU2OWUzMzdiNzc5OTNmYWY4MTYwZTU=
12
- data.tar.gz: !binary |-
13
- Y2UwZWNjNmQ5NWY2YzFjZDE4MDNiYTg4Njc5OTIwNTVhYTNjNTJmYmI4ODNl
14
- MzBkY2IwYTRiYmJkOWIzMzhiYjkyNjA1NjY3Nzc3Yzk5YzcxYWNlZDFlZDIw
15
- MTY5NGQ2YTQxZjRhYWMwOTI0MWE2NzQwYmY3ZjExODA5ODAwMTQ=
2
+ SHA1:
3
+ metadata.gz: 5298c0d742a0213839998e0a4b5b77c1be67ec7e
4
+ data.tar.gz: b08bed09cccf60623fe104c8ad132f7029511b9a
5
+ SHA512:
6
+ metadata.gz: 5349f784aa918732aec4eac7f5e063e8e0b1ac217bfeeaf9f146e7048a3b4384ae1ecca014bd5aab24ed24a958055807544982716bad21aea7457e8c056ce9c2
7
+ data.tar.gz: 0ae8015b23022ddb9b14ccea0b2a16bc82decbbd30cdc6a91008fec25ac65e1eed527268782efbcad695f3db54032c44841fb149d16d181a2ac1079cf8395efa
@@ -19,7 +19,14 @@ Capistrano::Configuration.instance(:must_exist).load do
19
19
  if yml[:adapter] == "postgresql"
20
20
  logger.info("Backup database #{yml[:database]}", "Backup:db")
21
21
  command << "export PGPASSWORD=\"#{yml[:password]}\""
22
- command << "pg_dump -U #{yml[:username]} #{yml[:database]} | bzip2 -c | cat"
22
+ options = {'-U' => yml[:username]}
23
+ options['host'] = yml[:host] if yml[:host]
24
+
25
+ options_s = ""
26
+ options.each do |k,v|
27
+ options_s += "#{k} #{v}"
28
+ end
29
+ command << "pg_dump #{options_s} #{yml[:database]} | bzip2 -c | cat"
23
30
  else
24
31
  puts "Cannot backup, adapter #{yml[:adapter]} is not implemented for backup yet"
25
32
  end
@@ -60,7 +67,17 @@ Capistrano::Configuration.instance(:must_exist).load do
60
67
  run "mkdir -p #{shared_path}/backup"
61
68
  if yml[:adapter] == "postgresql"
62
69
  logger.important("Backup database #{yml[:database]}", "Backup:db")
63
- run "export PGPASSWORD=\"#{yml[:password]}\" && pg_dump -U #{yml[:username]} --no-owner #{yml[:database]} > #{dump_file_path}"
70
+
71
+ options = {'-U' => yml[:username]}
72
+ options['-h'] = yml[:host] if yml[:host]
73
+ options['-p'] = yml[:port] if yml[:port]
74
+ options_s = []
75
+ options.each do |k,v|
76
+ options_s << "#{k} #{v}"
77
+ end
78
+ options_s = options_s.join(' ')
79
+
80
+ run "export PGPASSWORD=\"#{yml[:password]}\" && pg_dump #{options_s} --no-owner #{yml[:database]} > #{dump_file_path}"
64
81
  run "cd #{shared_path}/backup && #{arch_create} #{output_file} #{file_name} && rm #{dump_file_path}"
65
82
  else
66
83
  puts "Cannot backup, adapter #{yml[:adapter]} is not implemented for backup yet"
@@ -1,3 +1,3 @@
1
1
  module Capobvious
2
- VERSION = '0.3.pre19'
2
+ VERSION = '0.3.pre20'
3
3
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capobvious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.pre19
4
+ version: 0.3.pre20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Gruzd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-02 00:00:00.000000000 Z
11
+ date: 2013-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: capistrano
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - ~>
@@ -18,24 +19,23 @@ dependencies:
18
19
  version: 2.15.4
19
20
  type: :runtime
20
21
  prerelease: false
21
- name: capistrano
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.15.4
27
27
  - !ruby/object:Gem::Dependency
28
+ name: rvm-capistrano
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- name: rvm-capistrano
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Capfile that we use every day
@@ -77,17 +77,17 @@ require_paths:
77
77
  - lib
78
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>'
85
+ - - '>'
86
86
  - !ruby/object:Gem::Version
87
87
  version: 1.3.1
88
88
  requirements: []
89
89
  rubyforge_project: capobvious
90
- rubygems_version: 2.0.7
90
+ rubygems_version: 2.0.6
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Cap recipes