aptible-api 1.2.1 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/aptible-api.gemspec +3 -2
- data/lib/aptible/api/account.rb +8 -0
- data/lib/aptible/api/database.rb +14 -0
- data/lib/aptible/api/version.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ae1bc084c3cd404f53f6c9881d8dff9fb166e149fe10affe48a622edb41a12a
|
4
|
+
data.tar.gz: 91ffae818c21a9058f1d34928f7dcffb5c80f0530d2964cc8fea9d4548751c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bf20c90a080274edd1fdbf1f56d122995732572d41bc27859102406c532d0ab00571e0f366abc365338569489bee999ba2c627c743f21aadd56f0d8052bf889
|
7
|
+
data.tar.gz: 99aa25ed38f9638c48781b041dfc289b384ca1c717ab95cddf30e630b5cd1ab72186ec7a23833b3cb38ad2f4da93ff505497f66a717f76c776801d84d430fc44
|
data/.travis.yml
CHANGED
data/aptible-api.gemspec
CHANGED
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
30
30
|
spec.add_development_dependency 'foreman'
|
31
31
|
spec.add_development_dependency 'pry'
|
32
|
-
spec.add_development_dependency 'rake', '~>
|
33
|
-
spec.add_development_dependency 'rspec', '~>
|
32
|
+
spec.add_development_dependency 'rake', '~> 12.3.3'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.9.0'
|
34
|
+
spec.add_development_dependency 'rspec-its', '~> 1.3.0'
|
34
35
|
end
|
data/lib/aptible/api/account.rb
CHANGED
@@ -61,6 +61,14 @@ module Aptible
|
|
61
61
|
rand = ('a'..'z').to_a.sample(8).join
|
62
62
|
"#{organization_name.parameterize}-#{plan_id}-#{rand}"
|
63
63
|
end
|
64
|
+
|
65
|
+
def each_orphaned_backup
|
66
|
+
base_href = "#{links['backups'].base_href}?orphaned=true"
|
67
|
+
Backup.each_page(href: base_href, headers: headers,
|
68
|
+
token: token) do |page|
|
69
|
+
page.each { |entry| yield entry }
|
70
|
+
end
|
71
|
+
end
|
64
72
|
end
|
65
73
|
end
|
66
74
|
end
|
data/lib/aptible/api/database.rb
CHANGED
@@ -35,6 +35,20 @@ module Aptible
|
|
35
35
|
def provisioned?
|
36
36
|
status == 'provisioned'
|
37
37
|
end
|
38
|
+
|
39
|
+
def current_configuration_with_deleted
|
40
|
+
id = links['current_configuration'].href.split('/').last
|
41
|
+
Aptible::Api::Configuration.find(
|
42
|
+
id, with_deleted: true, token: token, headers: headers
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
def disk_with_deleted
|
47
|
+
id = links['disk'].href.split('/').last
|
48
|
+
Aptible::Api::Disk.find(
|
49
|
+
id, with_deleted: true, token: token, headers: headers
|
50
|
+
)
|
51
|
+
end
|
38
52
|
end
|
39
53
|
end
|
40
54
|
end
|
data/lib/aptible/api/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-auth
|
@@ -128,28 +128,42 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 12.3.3
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 12.3.3
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 3.9.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 3.9.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec-its
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.3.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.3.0
|
153
167
|
description: Ruby client for api.aptible.com
|
154
168
|
email:
|
155
169
|
- frank@macreery.com
|