mys3ql 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -52,6 +52,9 @@ Second, create your config file:
52
52
  secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
53
53
  # Bucket in which to store your backups
54
54
  bucket: db_backups
55
+ # AWS region your bucket lives in.
56
+ # (I suspect you only need to specify this when your 'location' is in a different region.)
57
+ #region: eu-west-1
55
58
 
56
59
  If you only have one database to back up on your server, you can put the config file at `~/.mys3ql`. Otherwise, tell the `mys3ql` command where the config file is with the `--config=FILE` switch.
57
60
 
data/lib/mys3ql/config.rb CHANGED
@@ -63,6 +63,10 @@ module Mys3ql
63
63
  s3['bucket']
64
64
  end
65
65
 
66
+ def region
67
+ s3['region']
68
+ end
69
+
66
70
  private
67
71
 
68
72
  def mysql
data/lib/mys3ql/s3.rb CHANGED
@@ -75,7 +75,8 @@ module Mys3ql
75
75
  s = Fog::Storage.new(
76
76
  :provider => 'AWS',
77
77
  :aws_secret_access_key => @config.secret_access_key,
78
- :aws_access_key_id => @config.access_key_id
78
+ :aws_access_key_id => @config.access_key_id,
79
+ :region => @config.region
79
80
  )
80
81
  log 's3: connected'
81
82
  s
@@ -85,7 +86,7 @@ module Mys3ql
85
86
  def bucket
86
87
  @directory ||= begin
87
88
  d = s3.directories.get @config.bucket
88
- raise "S3 bucket #{@config.bucket} not found" unless d # create bucket instead?
89
+ raise "S3 bucket #{@config.bucket} not found" unless d # create bucket instead (n.b. region/location)?
89
90
  log "s3: opened bucket #{@config.bucket}"
90
91
  d
91
92
  end
@@ -1,3 +1,3 @@
1
1
  module Mys3ql
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mys3ql
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andy Stewart