mypg 0.0.3 → 0.0.4
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/mypg.rb +12 -8
- data/lib/mypg/version.rb +1 -1
- data/lib/tasks/backup.rake +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc7f4c691e4fef57c6675853e0aaa5b2f8fa7ea7
|
|
4
|
+
data.tar.gz: 05de3f361764d038d90599a16f51b754e2e1c36f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eba6dc4bbbfbf83bb4845492e23fd61e73ce156a75b5d466fc6e7fbf753a6e9f7155113b60c07abe61e5586bcaaf6349c52c5fed271638cb4cec0375839111f5
|
|
7
|
+
data.tar.gz: 3c2f1826f67652db16d7339b50ab0785d1413e419ded01c9dfd56528e1869d4d8057ea5ec2c41246a21e90071206510b52489d65a052a94bd58625565650aaae
|
data/lib/mypg.rb
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
require 'mypg/railtie'
|
|
2
2
|
|
|
3
3
|
module Mypg
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
class << self
|
|
5
|
+
def target_directory
|
|
6
|
+
if yaml
|
|
7
|
+
yaml['target_directory']
|
|
8
|
+
end
|
|
9
|
+
end
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
def files_to_keep
|
|
12
|
+
if yaml && yaml['files_to_keep']
|
|
13
|
+
yaml['files_to_keep']
|
|
14
|
+
else
|
|
15
|
+
7
|
|
16
|
+
end
|
|
13
17
|
end
|
|
14
18
|
end
|
|
15
19
|
|
data/lib/mypg/version.rb
CHANGED
data/lib/tasks/backup.rake
CHANGED
|
@@ -36,7 +36,7 @@ namespace :db do
|
|
|
36
36
|
|
|
37
37
|
print "You're in #{Rails.env.titleize}! Are you sure? ".red.bold
|
|
38
38
|
|
|
39
|
-
system "psql -h localhost -U #{config['username']} -d #{config['database']} -W < #{file}"
|
|
39
|
+
system "psql -h #{config['host'] || 'localhost'} -U #{config['username']} -d #{config['database']} -W < #{file}"
|
|
40
40
|
|
|
41
41
|
puts "Done!".green.bold
|
|
42
42
|
else
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mypg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Felipe Bazzarella
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colored
|
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
63
63
|
version: '0'
|
|
64
64
|
requirements: []
|
|
65
65
|
rubyforge_project:
|
|
66
|
-
rubygems_version: 2.
|
|
66
|
+
rubygems_version: 2.1.4
|
|
67
67
|
signing_key:
|
|
68
68
|
specification_version: 4
|
|
69
69
|
summary: Dump and restore PostgreSQL's structure and data.
|