nxt_heroku_database_backup 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28617159c9c8c5a7f042d483ad10e15cf567a67f264ea900dadc20b1c889d5a7
4
- data.tar.gz: 134d7a086bb76b8f1a2e49dc2a0d403e97d10c798377b024109d21f5e40b0eb4
3
+ metadata.gz: 595af96eb6b889cece6066f8d336db654bfd3979ac9e362df00d8de5f6e827e7
4
+ data.tar.gz: 26b4d8a215d9bc6a001d26e5e447e6b73b4d29e55615b7a8a91f57ffdf761ef0
5
5
  SHA512:
6
- metadata.gz: 34a682af7f39b604a84955de7c8e0df6ae9758c704a73c869ca1f97efd25bb886664f9b68de262208e214a0dc523e7ec54379dc8cee967923cc51b2edfb5483c
7
- data.tar.gz: f64b9bb745ae8c5dd9240e57db51073b0532597c33252e73c7d42c1f105dcbe1866f79e2122d381c2befb8fbdb1a94f169be558fab631f1deb1a18b54f417bf2
6
+ metadata.gz: c60d83688c3d8c180e7413b023ca5fb56817923909e97cae80ca2ba2e9c920c598f41322f3d65e6c261915442efae061c4b3e0b247217164550ebd8f07473baa
7
+ data.tar.gz: 174aabb498e7d50cccf8720bd85cfd90165f0beaa313b2c9540f0b15c598632a738ee0c7c0925a9081ed547fa75d8f79fdcaa0ce0da1d70e1de498a67def7cd2
@@ -12,7 +12,7 @@ module NxtHerokuDatabaseBackup
12
12
  environment: -> { default_environment },
13
13
  backup_name: -> { default_backup_name },
14
14
  backup_tmp_path: -> { default_backup_tmp_path },
15
- uploader: -> { Uploader::S3.build(bucket_name: upload_destination, file_path: encrypted_backup_tmp_path) }
15
+ uploader: -> { build_uploader }
16
16
 
17
17
 
18
18
  def backup_latest_dump
@@ -33,6 +33,14 @@ module NxtHerokuDatabaseBackup
33
33
 
34
34
  private
35
35
 
36
+ def build_uploader
37
+ Uploader::S3.build(
38
+ bucket_name: upload_destination,
39
+ file_path: encrypted_backup_tmp_path,
40
+ backup_name: backup_name
41
+ )
42
+ end
43
+
36
44
  def upload_backup
37
45
  uploader.call
38
46
  end
@@ -5,14 +5,19 @@ module NxtHerokuDatabaseBackup
5
5
 
6
6
  attr_init :bucket_name, :file_path, :credentials
7
7
 
8
- def self.build(bucket_name:, file_path:, credentials: nil)
8
+ def self.build(bucket_name:, file_path:, backup_name:, credentials: nil)
9
9
  credentials ||= {
10
10
  access_key_id: ENV.fetch('DATABASE_BACKUP_AWS_ACCESS_KEY_ID'),
11
11
  secret_access_key: ENV.fetch('DATABASE_BACKUP_AWS_SECRET_ACCESS_KEY'),
12
12
  region: ENV.fetch('DATABASE_BACKUP_AWS_REGION')
13
13
  }
14
14
 
15
- new(bucket_name: bucket_name, file_path: file_path, credentials: credentials)
15
+ new(
16
+ bucket_name: bucket_name,
17
+ file_path: file_path,
18
+ backup_name: backup_name,
19
+ credentials: credentials
20
+ )
16
21
  end
17
22
 
18
23
  def call
@@ -1,3 +1,3 @@
1
1
  module NxtHerokuDatabaseBackup
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nxt_heroku_database_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Robecke