heroku-s3-backup-zinergia 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,13 +15,13 @@ class HerokuDatabaseBackupToS3
15
15
  db = ENV['DATABASE_URL'].match(/postgres:\/\/([^:]+):([^@]+)@([^\/]+)\/(.+)/)
16
16
  system "PGPASSWORD=#{db[2]} pg_dump -Fc --username=#{db[1]} --host=#{db[3]} #{db[4]} > tmp/#{name}"
17
17
  bucket_name = "#{ENV['APP_NAME']}-heroku-backups"
18
- create_bucket_if_it_does_not_exist(bucket_name)
19
-
20
18
  AWS::S3::Base.establish_connection!(
21
19
  :access_key_id => ENV['s3_access_key_id'],
22
20
  :secret_access_key => ENV['s3_secret_access_key']
23
21
  )
24
22
 
23
+ create_bucket_if_it_does_not_exist(bucket_name)
24
+
25
25
  AWS::S3::S3Object.store(name, open("tmp/#{name}"),
26
26
  bucket_name,
27
27
  :access => :private)
@@ -2,7 +2,7 @@ module Heroku
2
2
  module S3
3
3
  module Backup
4
4
  module Zinergia
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: heroku-s3-backup-zinergia
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Eric Davis