heroku-api-postgres 0.5.0 → 0.6.0

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: a1ec83046269c00bafdbb8df1159f6a8b806a13c5be1c727f5197a005a29740f
4
- data.tar.gz: 02fdec9164a4955498524c7abeb73158d5baaa0183abbcbe18d87a4fe22d663d
3
+ metadata.gz: fe9aab288242de34048da2c6004aa6ba32d3a9449eea979906219459f6ece458
4
+ data.tar.gz: 543429f15f6b2c11ba6604d6fb060bdcc29f1c17b2d6146c68f1c9346d439a96
5
5
  SHA512:
6
- metadata.gz: 39afb41f7e66f116a7e2fc1feb694852985ef2db6648a5bc7a7491fc0a0b1c46310fc30702a49f90b8c367e1223a36d4bc7ff295dbeb885254771c7513f6781b
7
- data.tar.gz: cbe0e2b88d02cad0e010c84b9d7d8f75ba1d0ee241d4d02bc8717a032633310e0c3b1c18ce3dc649c08c0b706e76fe725faad597c2137737efda42f8b71f98dc
6
+ metadata.gz: 6ff3619cdd7cbe3a8ebecc5f9e46edb0d44f871879fdfc33da7f0b00ee6a7258dcbcf27ff9f86f780a63aa16dd6aefbab269cabcf5b246482b1ec73473a01f7e
7
+ data.tar.gz: d69d178ca62e54a77064d566f92c0b1a018d04952dca264e5ec88f49ba9ab3f10e5fd2cae339f7e26b983c119e6dcf11055341249d93bb95e612defb5ea45af0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heroku-api-postgres (0.5.0)
4
+ heroku-api-postgres (0.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -120,6 +120,16 @@ backup = backups_client.capture(database_id)
120
120
 
121
121
  returns a [Backup](docs/models.md#backup)
122
122
 
123
+ #### Url
124
+ Returns a temporary, public accessible URL to download a backup.
125
+ Needs the `num` attribute of a Backup.
126
+
127
+ ```ruby
128
+ backup_url = backups_client.url(app_id, backup_num)
129
+ ```
130
+
131
+ returns a [BackupUrl](docs/models.md#backup_url)
132
+
123
133
 
124
134
  ### How do I get the database_id ?
125
135
  You can obtain a database id by calling the Heroku Platform API
@@ -69,3 +69,11 @@
69
69
  :retain_weeks=>1,
70
70
  :retain_months=>0 }
71
71
  ```
72
+
73
+ ## BackupUrl
74
+
75
+ ```ruby
76
+ { :expires_at => "2018-03-05 22:05:36 +0000",
77
+ :url => "https://bucket_name.s3.amazonaws.com/resource_address"
78
+ }
79
+ ```
@@ -28,7 +28,7 @@ The command returns immediately, without waiting for the capture to be completed
28
28
 
29
29
  - [ ] pg:backups:unschedule
30
30
 
31
- - [ ] pg:backups:url
31
+ - [x] pg:backups:url --> `client.backups.url(app_id, backup_num)`
32
32
 
33
33
  - [ ] pg:connection-pooling:attach
34
34
 
@@ -30,6 +30,10 @@ module Heroku
30
30
  def capture(database_id)
31
31
  @client.perform_post_request("/client/v11/databases/#{database_id}/backups")
32
32
  end
33
+
34
+ def url(app_id, backup_num)
35
+ @client.perform_post_request("/client/v11/apps/#{app_id}/transfers/#{backup_num}/actions/public-url")
36
+ end
33
37
  end
34
38
  end
35
39
  end
@@ -1,7 +1,7 @@
1
1
  module Heroku
2
2
  module Api
3
3
  module Postgres
4
- VERSION = '0.5.0'.freeze
4
+ VERSION = '0.6.0'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-api-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-04 00:00:00.000000000 Z
11
+ date: 2018-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler