heroku_s3_backups 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 531da22f26527e8f7b45b0a22ed1e54c8d3987ad9a0cead4807f0358d104b7f4
4
- data.tar.gz: 591a02426d6204682beef2797e07cd297b6dc92006707ceaff5f8ef733e2bfa0
3
+ metadata.gz: 30af0c9bc6a1781af32673bd76b0c09b13f557e8036bd2e1adde45b4a740bc6d
4
+ data.tar.gz: 5a7044c7662fa60119f4ec3cbc0093041ed107ba7752723fc781746b2c756dcb
5
5
  SHA512:
6
- metadata.gz: 1f1f076b913557126fff69538f7f0168fa3d50ca3bb83b5ab79cf05945b3a32b8f267a52635d55805a948c7b8b0947add24c0c6702d82e136d9da63d82544a6b
7
- data.tar.gz: 41365674bfbf2008e3d1de7aa82342d4c14c59b2e600e86c06d957e7d74071fadd436726c0a3276cbe8c2e7ad0b53e84ce528779498cd876f2630e4ccf2c130f
6
+ metadata.gz: 4647e5deba4cabe9c4cb29415e2411fbf0502282ba6d910ffda663ed226d1f6c508b68a45a949405221d962cbaabd6a8af142c18a2cd220fefe9e40a52c7c532
7
+ data.tar.gz: 6940c24f0149ec6f799228df2f1c89ea02d19a8daaf54f5cfd7316ebb273a3f72503565f0b829abd303eb1f7094901e9d73da325b8265d0294d508030fdd8a9d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heroku_s3_backups (0.1.1)
4
+ heroku_s3_backups (0.1.2)
5
5
  s3 (~> 0.3)
6
6
 
7
7
  GEM
@@ -38,6 +38,7 @@ DEPENDENCIES
38
38
  heroku_s3_backups!
39
39
  rake (~> 10.0)
40
40
  rspec (~> 3.0)
41
+ rspec-mocks (~> 3.7)
41
42
 
42
43
  BUNDLED WITH
43
44
  1.16.1
data/README.md CHANGED
@@ -6,10 +6,12 @@ This gem allows you to easily backup your PG database in Heroku to an S3 bucket.
6
6
 
7
7
 
8
8
  ## Requirements
9
- - Heroku CLI
10
- - S3
9
+ - [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) if you're running this locally
10
+ - [Heroku Buildpack CLI](https://github.com/heroku/heroku-buildpack-cli) if you're running this on a Heroku application
11
+ - [S3](https://github.com/qoobaa/s3)
11
12
  - {optional} Heroku Scheduler(automated backups)
12
13
 
14
+
13
15
  ## Installation
14
16
 
15
17
  Add this line to your application's Gemfile:
@@ -33,8 +35,20 @@ The following environment variables must be set:
33
35
  - S3_PRODUCTION_BACKUP_BUCKET - Bucket to backup db to
34
36
  - HEROKU_API_KEY - Auth token for Heroku to access the app’s DB settings(ie pg:backup). This can be generated by running `heroku auth:token` from the CLI.
35
37
 
38
+ If you're running this script on a Heroku application, ensure
39
+
40
+ Example of the API keys being set:
41
+ ```
42
+ S3_ACCESS_KEY_ID="abcd1234"
43
+ S3_SECRET_ACCESS_KEY="qwerty4321"
44
+ S3_PRODUCTION_BACKUP_BUCKET="backups/production"
45
+ HEROKU_API_KEY="1234-abcd"
46
+ ```
47
+
36
48
  To run:
37
- `HerokuS3Backups.new("name-of-application").backup("folder/to/backup/to")`
49
+ `HerokuS3Backups::Heroku.new("name-of-application").backup("path/to/backup/folder")`
50
+
51
+ If you're running this in a Heroku application, ensure that you have the [Heroku Buildpack CLI](https://github.com/heroku/heroku-buildpack-cli) installed.
38
52
 
39
53
  ## Automating backups
40
54
  To automate backups in Heroku, you can create a rake task and add the ‘Heroku Scheduler’
@@ -42,7 +56,7 @@ add-on to have it run the task in preset intervals.
42
56
 
43
57
  Example:
44
58
  1) Create a rake task in `db.rake` named `s3_production_backup`
45
- 2) Have the task run `HerokuS3Backups.new("name-of-application").backup("folder/to/backup/to")`
59
+ 2) Have the task run `HerokuS3Backups::Heroku.new("name-of-application").backup("path/to/backup/folder")`
46
60
  3) Set Heroku scheduler to run `rake db:s3_production_backup`
47
61
 
48
62
  ## Development
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "bundler", "~> 1.16"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "rspec", "~> 3.0"
26
-
26
+ spec.add_development_dependency "rspec-mocks", "~> 3.7"
27
+
27
28
  spec.add_runtime_dependency "s3", "~> 0.3"
28
29
  end
@@ -1,3 +1,3 @@
1
1
  module HerokuS3Backups
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -3,10 +3,10 @@ require "heroku_s3_backups/version"
3
3
  require "heroku_cli.rb"
4
4
  module HerokuS3Backups
5
5
  class Heroku
6
+ attr_accessor :app_name
6
7
  include HerokuCLI
7
8
 
8
9
  # @param {string} app_name
9
- # @param {string} backup_location
10
10
  # @return nil
11
11
  def initialize(app_name)
12
12
  @app_name = app_name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_s3_backups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - joerodrig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-mocks
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.7'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.7'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: s3
57
71
  requirement: !ruby/object:Gem::Requirement