aptible-api 1.2.17 → 1.2.21

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: e221c4079ecd99cac13848e82c578dd900e66c64dc9d4d51eb8360de1bd74bbb
4
- data.tar.gz: 50dba7afd79d223e4d5bfdaddf895b7026b9dcafaf6ee4d47f1d107a9e79f268
3
+ metadata.gz: daf48189e78596cdcfd89d982cd5a4075b1819f26abc3a3b08572b4b53ce26e6
4
+ data.tar.gz: 457c66e5032f996c0679910d0bbdee276a059629befb02a47e7dd971c1d5962b
5
5
  SHA512:
6
- metadata.gz: 8ca505dc67980c8e0aa538f607453f65cecffded03387ee4455a2b063a749165590c8d9f7625ee1dba8a1ee6fa030b6a0e6455c652fcd3ea349bd116e84894dc
7
- data.tar.gz: 81212840ea5ad15d9452c5812ce00679b4dd4b8800affa7fb1d945a858384d05fc947f0ceb1eb0f3ac0b79c3d0fd8de9fbe8c3db447cac80fa3201a3b7ea81bd
6
+ metadata.gz: a87cd40f0f5f365e1de32e4190bd0b276d54d18c8d2e5f22405b5f988cd8fc04ccdb35459731438b7b0ddbf5f054f3aa5b05eee60e1ba750ebd53a8c522866b9
7
+ data.tar.gz: 118b807fc06480c80e96fdc3b52e1362196ee3fc58baa0a04c9b261890806d08c6b225267930a71ff517f850b950a1c2431999cb0efc6ca0d8ac63e501d6876b
data/Gemfile CHANGED
@@ -1,6 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'pry', github: 'fancyremarker/pry', branch: 'aptible'
3
+ gem 'pry',
4
+ git: 'https://github.com/fancyremarker/pry.git',
5
+ branch: 'aptible'
6
+
4
7
  gem 'activesupport', '~> 4.0'
5
8
 
6
9
  # Specify your gem's dependencies in aptible-api.gemspec
@@ -6,6 +6,8 @@ module Aptible
6
6
  has_many :operations
7
7
  has_many :instance_layer_memberships
8
8
  has_many :databases
9
+ has_many :services
10
+ has_many :log_drains
9
11
 
10
12
  field :id
11
13
  field :instance_id
@@ -17,6 +17,7 @@ module Aptible
17
17
  field :command
18
18
  field :container_count
19
19
  field :container_memory_limit_mb
20
+ field :instance_class
20
21
  field :created_at, type: Time
21
22
  field :updated_at, type: Time
22
23
  end
@@ -22,6 +22,24 @@ module Aptible
22
22
  def dns_layers
23
23
  stack_layers.reject! { |l| l.dns_name.blank? }
24
24
  end
25
+
26
+ # This method is necessary because we need to include a query parameter
27
+ # when requesting aws_instances.
28
+ # Copied the important bits from
29
+ # https://github.com/aptible/aptible-resource/blob/4708fb80a6c21013de07c2779ffc4928cee37d4e/lib/aptible/resource/base.rb#L138
30
+ def aws_instances_with_deprovisionable
31
+ get unless loaded
32
+
33
+ return unless links['aws_instances']
34
+
35
+ param = 'include_deprovisionable=true'
36
+ href = "#{links['aws_instances'].base_href}?#{param}"
37
+ self.class.all(
38
+ href: href,
39
+ token: token,
40
+ headers: headers
41
+ )
42
+ end
25
43
  end
26
44
  end
27
45
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Api
3
- VERSION = '1.2.17'.freeze
3
+ VERSION = '1.2.21'.freeze
4
4
  end
5
5
  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.17
4
+ version: 1.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-14 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-auth