pgbackups-archive 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.
- data/Gemfile.lock +29 -27
- data/README.md +11 -2
- data/Rakefile +4 -0
- data/lib/pgbackups-archive/storage.rb +6 -6
- data/lib/pgbackups-archive/version.rb +1 -1
- data/pgbackups-archive.gemspec +4 -3
- metadata +28 -6
data/Gemfile.lock
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pgbackups-archive (0.0.
|
|
4
|
+
pgbackups-archive (0.0.4)
|
|
5
|
+
bundler (~> 1.2.1)
|
|
5
6
|
fog (>= 1.4.0)
|
|
6
|
-
heroku (
|
|
7
|
+
heroku (~> 2.32.14)
|
|
7
8
|
rake (>= 0.9.2.2)
|
|
8
9
|
|
|
9
10
|
GEM
|
|
10
11
|
remote: http://rubygems.org/
|
|
11
12
|
specs:
|
|
12
13
|
addressable (2.3.2)
|
|
13
|
-
builder (3.
|
|
14
|
+
builder (3.1.4)
|
|
15
|
+
coderay (1.0.8)
|
|
14
16
|
diff-lcs (1.1.3)
|
|
15
|
-
excon (0.
|
|
16
|
-
|
|
17
|
-
fog (1.5.0)
|
|
17
|
+
excon (0.16.7)
|
|
18
|
+
fog (1.6.0)
|
|
18
19
|
builder
|
|
19
20
|
excon (~> 0.14)
|
|
20
21
|
formatador (~> 0.2.0)
|
|
@@ -30,38 +31,38 @@ GEM
|
|
|
30
31
|
rspec-instafail (~> 0.2.0)
|
|
31
32
|
ruby-progressbar (~> 0.0.10)
|
|
32
33
|
growl (1.0.3)
|
|
33
|
-
guard (1.
|
|
34
|
+
guard (1.5.0)
|
|
34
35
|
listen (>= 0.4.2)
|
|
36
|
+
lumberjack (>= 1.0.2)
|
|
37
|
+
pry (>= 0.9.10)
|
|
35
38
|
thor (>= 0.14.6)
|
|
36
39
|
guard-rspec (1.2.1)
|
|
37
40
|
guard (>= 1.1)
|
|
38
|
-
heroku (2.
|
|
39
|
-
heroku-api (~> 0.3.
|
|
41
|
+
heroku (2.32.14)
|
|
42
|
+
heroku-api (~> 0.3.5)
|
|
40
43
|
launchy (>= 0.3.2)
|
|
41
|
-
netrc (~> 0.7.
|
|
44
|
+
netrc (~> 0.7.7)
|
|
42
45
|
rest-client (~> 1.6.1)
|
|
43
46
|
rubyzip
|
|
44
|
-
heroku-api (0.3.
|
|
45
|
-
excon (~> 0.
|
|
46
|
-
launchy (2.1.
|
|
47
|
+
heroku-api (0.3.5)
|
|
48
|
+
excon (~> 0.16.1)
|
|
49
|
+
launchy (2.1.2)
|
|
47
50
|
addressable (~> 2.3)
|
|
48
|
-
listen (0.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
rb-inotify (~> 0.8.8)
|
|
51
|
+
listen (0.5.3)
|
|
52
|
+
lumberjack (1.0.2)
|
|
53
|
+
method_source (0.8.1)
|
|
52
54
|
mime-types (1.19)
|
|
53
55
|
multi_json (1.3.6)
|
|
54
56
|
net-scp (1.0.4)
|
|
55
57
|
net-ssh (>= 1.99.1)
|
|
56
|
-
net-ssh (2.
|
|
57
|
-
netrc (0.7.
|
|
58
|
+
net-ssh (2.6.1)
|
|
59
|
+
netrc (0.7.7)
|
|
58
60
|
nokogiri (1.5.5)
|
|
61
|
+
pry (0.9.10)
|
|
62
|
+
coderay (~> 1.0.5)
|
|
63
|
+
method_source (~> 0.8)
|
|
64
|
+
slop (~> 3.3.1)
|
|
59
65
|
rake (0.9.2.2)
|
|
60
|
-
rb-fchange (0.0.5)
|
|
61
|
-
ffi
|
|
62
|
-
rb-fsevent (0.9.1)
|
|
63
|
-
rb-inotify (0.8.8)
|
|
64
|
-
ffi (>= 0.5.0)
|
|
65
66
|
rest-client (1.6.7)
|
|
66
67
|
mime-types (>= 1.16)
|
|
67
68
|
rspec (2.11.0)
|
|
@@ -69,14 +70,15 @@ GEM
|
|
|
69
70
|
rspec-expectations (~> 2.11.0)
|
|
70
71
|
rspec-mocks (~> 2.11.0)
|
|
71
72
|
rspec-core (2.11.1)
|
|
72
|
-
rspec-expectations (2.11.
|
|
73
|
+
rspec-expectations (2.11.3)
|
|
73
74
|
diff-lcs (~> 1.1.3)
|
|
74
75
|
rspec-instafail (0.2.4)
|
|
75
|
-
rspec-mocks (2.11.
|
|
76
|
+
rspec-mocks (2.11.3)
|
|
76
77
|
ruby-hmac (0.4.0)
|
|
77
78
|
ruby-progressbar (0.0.10)
|
|
78
79
|
rubyzip (0.9.9)
|
|
79
|
-
|
|
80
|
+
slop (3.3.3)
|
|
81
|
+
thor (0.16.0)
|
|
80
82
|
|
|
81
83
|
PLATFORMS
|
|
82
84
|
ruby
|
data/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Apply environment variables:
|
|
|
31
31
|
heroku config:add PGBACKUPS_BUCKET="myapp-backups"
|
|
32
32
|
heroku config:add PGBACKUPS_REGION="us-west-2"
|
|
33
33
|
|
|
34
|
-
Note: A good security measure would be to use a dedicated set of AWS credentials with a security policy only allowing access to the bucket you're specifying.
|
|
34
|
+
Note: A good security measure would be to use a dedicated set of AWS credentials with a security policy only allowing access to the bucket you're specifying. See this Pro Tip on [Assigning an AWS IAM user access to a single S3 bucket](http://coderwall.com/p/dwhlma).
|
|
35
35
|
|
|
36
36
|
Add the rake task to scheduler:
|
|
37
37
|
|
|
@@ -57,7 +57,16 @@ I shouldn't have to say this, but I will. Your backups are your responsibility.
|
|
|
57
57
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
58
58
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
|
59
59
|
4. Push to the branch (`git push origin my-new-feature`)
|
|
60
|
-
5. [Create a Pull Request](
|
|
60
|
+
5. [Create a Pull Request](https://github.com/kjohnston/pgbackups-archive/pull/new)
|
|
61
|
+
|
|
62
|
+
## Contributors
|
|
63
|
+
|
|
64
|
+
Many thanks go to the following who have contributed to making this gem even better:
|
|
65
|
+
|
|
66
|
+
* [Robert Bousquet (@bousquet)](https://github.com/bousquet)
|
|
67
|
+
* Autoload rake task into Rails 2.x once the gem has been loaded.
|
|
68
|
+
* [Daniel Morrison (@danielmorrison)](https://github.com/danielmorrison)
|
|
69
|
+
* Ruby 1.8-compatible hash syntax.
|
|
61
70
|
|
|
62
71
|
## License
|
|
63
72
|
|
data/Rakefile
CHANGED
|
@@ -10,11 +10,11 @@ class PgbackupsArchive::Storage
|
|
|
10
10
|
|
|
11
11
|
def connection
|
|
12
12
|
Fog::Storage.new({
|
|
13
|
-
provider
|
|
14
|
-
aws_access_key_id
|
|
15
|
-
aws_secret_access_key
|
|
16
|
-
region
|
|
17
|
-
persistent
|
|
13
|
+
:provider => "AWS",
|
|
14
|
+
:aws_access_key_id => ENV["PGBACKUPS_AWS_ACCESS_KEY_ID"],
|
|
15
|
+
:aws_secret_access_key => ENV["PGBACKUPS_AWS_SECRET_ACCESS_KEY"],
|
|
16
|
+
:region => ENV["PGBACKUPS_REGION"],
|
|
17
|
+
:persistent => false
|
|
18
18
|
})
|
|
19
19
|
end
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ class PgbackupsArchive::Storage
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def store
|
|
26
|
-
bucket.files.create key
|
|
26
|
+
bucket.files.create :key => @key, :body => @file, :public => false
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
end
|
data/pgbackups-archive.gemspec
CHANGED
|
@@ -12,9 +12,10 @@ Gem::Specification.new do |s|
|
|
|
12
12
|
s.summary = %q{A means of automating Heroku's pgbackups and archiving them to Amazon S3 via the fog gem.}
|
|
13
13
|
s.description = %q{A means of automating Heroku's pgbackups and archiving them to Amazon S3 via the fog gem.}
|
|
14
14
|
|
|
15
|
-
s.
|
|
16
|
-
s.
|
|
17
|
-
s.
|
|
15
|
+
s.add_dependency "bundler", "~> 1.2.1"
|
|
16
|
+
s.add_dependency "fog", ">= 1.4.0"
|
|
17
|
+
s.add_dependency "heroku", "~> 2.32.14"
|
|
18
|
+
s.add_dependency "rake", ">= 0.9.2.2"
|
|
18
19
|
|
|
19
20
|
s.files = `git ls-files`.split("\n")
|
|
20
21
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pgbackups-archive
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,8 +9,24 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-10-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: bundler
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ~>
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 1.2.1
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ~>
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 1.2.1
|
|
14
30
|
- !ruby/object:Gem::Dependency
|
|
15
31
|
name: fog
|
|
16
32
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -32,17 +48,17 @@ dependencies:
|
|
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
|
33
49
|
none: false
|
|
34
50
|
requirements:
|
|
35
|
-
- -
|
|
51
|
+
- - ~>
|
|
36
52
|
- !ruby/object:Gem::Version
|
|
37
|
-
version: 2.
|
|
53
|
+
version: 2.32.14
|
|
38
54
|
type: :runtime
|
|
39
55
|
prerelease: false
|
|
40
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
57
|
none: false
|
|
42
58
|
requirements:
|
|
43
|
-
- -
|
|
59
|
+
- - ~>
|
|
44
60
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: 2.
|
|
61
|
+
version: 2.32.14
|
|
46
62
|
- !ruby/object:Gem::Dependency
|
|
47
63
|
name: rake
|
|
48
64
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -96,12 +112,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
96
112
|
- - ! '>='
|
|
97
113
|
- !ruby/object:Gem::Version
|
|
98
114
|
version: '0'
|
|
115
|
+
segments:
|
|
116
|
+
- 0
|
|
117
|
+
hash: -749794191267838677
|
|
99
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
119
|
none: false
|
|
101
120
|
requirements:
|
|
102
121
|
- - ! '>='
|
|
103
122
|
- !ruby/object:Gem::Version
|
|
104
123
|
version: '0'
|
|
124
|
+
segments:
|
|
125
|
+
- 0
|
|
126
|
+
hash: -749794191267838677
|
|
105
127
|
requirements: []
|
|
106
128
|
rubyforge_project:
|
|
107
129
|
rubygems_version: 1.8.24
|