heroku_cloud_backup 0.0.4 → 0.0.5

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.
@@ -6,5 +6,6 @@ module HerokuCloudBackup
6
6
  class ConnectionError < HerokuCloudBackup::Errors::Error; end
7
7
  class UploadError < HerokuCloudBackup::Errors::Error; end
8
8
  class NoBackups < HerokuCloudBackup::Errors::Error; end
9
+ class Forbidden < HerokuCloudBackup::Errors::Error; end
9
10
  end
10
11
  end
@@ -1,3 +1,3 @@
1
1
  module HerokuCloudBackup
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -74,7 +74,11 @@ module HerokuCloudBackup
74
74
  raise HerokuCloudBackup::Errors::ConnectionError.new("There was an error connecting to your provider.")
75
75
  end
76
76
 
77
- directory = @connection.directories.get(@bucket_name) rescue Excon::Errors::Forbidden nil
77
+ begin
78
+ directory = @connection.directories.get(@bucket_name)
79
+ rescue Excon::Errors::Forbidden
80
+ raise HerokuCloudBackup::Errors::Forbidden.new("You do not have access to this bucket name. It's possible this bucket name is already owned by another user. Please check your credentials (access keys) or select a different bucket name.")
81
+ end
78
82
 
79
83
  if !directory
80
84
  directory = @connection.directories.create(:key => @bucket_name)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_cloud_backup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jack Chu