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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fe5cf56128088fe546a213930363d8a3d75d4cc
4
- data.tar.gz: b5ff044461719a1af646e5a9abb8876e8bcf1cf7
3
+ metadata.gz: 03d67719b676adf5b7c222a923acdeadf2dd507e
4
+ data.tar.gz: fefa9bb02d8b2d1fd92fea9032b7ea1110515a55
5
5
  SHA512:
6
- metadata.gz: e3008157ce9de21acf2253584df5aa1358231ae8136c118ccaed24542ec682c1f20500d3bbce4aec12abe77575fe45745eb1d969346939312a6e9e9dd9799cdb
7
- data.tar.gz: 11880444fab90a815b17ed907514c811ea6e32bfafde7220af7ae0285a87a2587cc6559538f45a63dbc9649c2fa38f99647080c3974243c58be9f9c158b15cea
6
+ metadata.gz: 7f8aad12b52cad29f1690675086147d2c351b3385fe98d929768fd43007e5dafea73cdf1c3bdc7258ccb32f9a3345dad68f5d708e63c839663424e1683dbdfc2
7
+ data.tar.gz: 48e33ffdc605913a2e4fbfbb4177d5f4c6caf942642e5222cc0d660558409e07a71f890caa38327c0481f0f91dba6c0e8a9226e92fe82ec3e34f4f692d49aab9
@@ -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
 
@@ -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 provider
39
- @provider ||= 'Rackspace'
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(:provider => provider)
46
+ @storage ||= Fog::Storage.new(storage_args)
44
47
  end
45
48
  end
46
49
  end
@@ -1,3 +1,3 @@
1
1
  module DbBackups
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
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.9
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-21 00:00:00.000000000 Z
11
+ date: 2013-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: optitron