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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d7b3b6b74c36ca95830a7a52a9bf9caf34c0866ecbadb855ba4031dfe3d2e1c
4
- data.tar.gz: 1ca07b8a229dd6f285cf02fd2f44429ba97f1a89cd5c38547391783db1905f77
3
+ metadata.gz: 8ae1bc084c3cd404f53f6c9881d8dff9fb166e149fe10affe48a622edb41a12a
4
+ data.tar.gz: 91ffae818c21a9058f1d34928f7dcffb5c80f0530d2964cc8fea9d4548751c8d
5
5
  SHA512:
6
- metadata.gz: f617bccf1fec24fa5ddfa1c4c0966d517640f0c71a1eb21194e4d05bdaee14826d92ebb161cd2fa819780dccfc7cb0897c52005fa98e124586f5c6a9b2947961
7
- data.tar.gz: c1e1493f91542908b1498b740451ed1ef3b0f89661466650135b539a8e3bf89611b8de15ba96f02deba69c2c4ca47f18ce523d926d19c058110c72ece2321e1c
6
+ metadata.gz: 3bf20c90a080274edd1fdbf1f56d122995732572d41bc27859102406c532d0ab00571e0f366abc365338569489bee999ba2c627c743f21aadd56f0d8052bf889
7
+ data.tar.gz: 99aa25ed38f9638c48781b041dfc289b384ca1c717ab95cddf30e630b5cd1ab72186ec7a23833b3cb38ad2f4da93ff505497f66a717f76c776801d84d430fc44
@@ -1,9 +1,9 @@
1
1
  sudo: false
2
2
 
3
3
  rvm:
4
- - "2.0"
5
4
  - "2.1"
6
5
  - "2.2"
7
6
  - "2.3"
8
7
  - "2.4"
9
8
  - "2.5"
9
+ - "2.6"
@@ -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', '~> 10.5'
33
- spec.add_development_dependency 'rspec', '~> 2.0'
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
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Api
3
- VERSION = '1.2.1'.freeze
3
+ VERSION = '1.2.3'.freeze
4
4
  end
5
5
  end
@@ -9,6 +9,8 @@ end
9
9
  # Require library up front
10
10
  require 'aptible/api'
11
11
 
12
+ require 'rspec/its'
13
+
12
14
  RSpec.configure do |config|
13
15
  config.before { Aptible::Api.configuration.reset }
14
16
  end
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.1
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-06-24 00:00:00.000000000 Z
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: '10.5'
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: '10.5'
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: '2.0'
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: '2.0'
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