db_backups 0.0.9 → 0.0.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/bin/db_backups +9 -1
- data/lib/db_backups/container.rb +7 -4
- data/lib/db_backups/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: 03d67719b676adf5b7c222a923acdeadf2dd507e
|
|
4
|
+
data.tar.gz: fefa9bb02d8b2d1fd92fea9032b7ea1110515a55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f8aad12b52cad29f1690675086147d2c351b3385fe98d929768fd43007e5dafea73cdf1c3bdc7258ccb32f9a3345dad68f5d708e63c839663424e1683dbdfc2
|
|
7
|
+
data.tar.gz: 48e33ffdc605913a2e4fbfbb4177d5f4c6caf942642e5222cc0d660558409e07a71f890caa38327c0481f0f91dba6c0e8a9226e92fe82ec3e34f4f692d49aab9
|
data/bin/db_backups
CHANGED
|
@@ -15,6 +15,10 @@ class DbBackups::CLI < Optitron::CLI
|
|
|
15
15
|
:in => %w{staging uat production} ,
|
|
16
16
|
:default => 'production'
|
|
17
17
|
|
|
18
|
+
class_opt :rackspace_region,
|
|
19
|
+
'(defaults to ord - Chicago)',
|
|
20
|
+
:default => 'ord'
|
|
21
|
+
|
|
18
22
|
desc 'Index backups'
|
|
19
23
|
def index
|
|
20
24
|
puts container
|
|
@@ -97,8 +101,12 @@ class DbBackups::CLI < Optitron::CLI
|
|
|
97
101
|
@environment ||= params[:environment]
|
|
98
102
|
end
|
|
99
103
|
|
|
104
|
+
def rackspace_region
|
|
105
|
+
@rackspace_region ||= params[:rackspace_region]
|
|
106
|
+
end
|
|
107
|
+
|
|
100
108
|
def container
|
|
101
|
-
@container ||= DbBackups::Container.new(app, environment)
|
|
109
|
+
@container ||= DbBackups::Container.new(app, environment, :rackspace_region => rackspace_region)
|
|
102
110
|
end
|
|
103
111
|
end
|
|
104
112
|
|
data/lib/db_backups/container.rb
CHANGED
|
@@ -8,9 +8,10 @@ module DbBackups
|
|
|
8
8
|
|
|
9
9
|
attr_reader :app, :environment
|
|
10
10
|
|
|
11
|
-
def initialize(app, environment)
|
|
11
|
+
def initialize(app, environment, opts={})
|
|
12
12
|
@app = app
|
|
13
13
|
@environment = environment
|
|
14
|
+
@opts = opts
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
def [](index)
|
|
@@ -35,12 +36,14 @@ module DbBackups
|
|
|
35
36
|
@container ||= storage.directories.get(container_name)
|
|
36
37
|
end
|
|
37
38
|
|
|
38
|
-
def
|
|
39
|
-
@
|
|
39
|
+
def storage_args
|
|
40
|
+
@storage_args ||= {
|
|
41
|
+
:provider => 'Rackspace'
|
|
42
|
+
}.merge(@opts)
|
|
40
43
|
end
|
|
41
44
|
|
|
42
45
|
def storage
|
|
43
|
-
@storage ||= Fog::Storage.new(
|
|
46
|
+
@storage ||= Fog::Storage.new(storage_args)
|
|
44
47
|
end
|
|
45
48
|
end
|
|
46
49
|
end
|
data/lib/db_backups/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: db_backups
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-06-
|
|
11
|
+
date: 2013-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: optitron
|