diff --git a/Gemfile b/Gemfile index ba51241..ad1b1eb 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,8 @@ if RUBY_VERSION < '2.7' else gem 'activesupport', '>= 5.2' end +# Rack 3.x requires Ruby 2.6+ (Enumerable#to_h with block) +gem 'rack', '< 3' if RUBY_VERSION < '2.6' gem "irb", "~> 1.1" # Specify your gem's dependencies in aptible-api.gemspec diff --git a/lib/aptible/api/container.rb b/lib/aptible/api/container.rb index 70c2787..cd0787f 100644 --- a/lib/aptible/api/container.rb +++ b/lib/aptible/api/container.rb @@ -3,6 +3,8 @@ module Api class Container < Resource belongs_to :release belongs_to :vhost + has_many :vhosts + has_many :container_vhost_memberships belongs_to :log_drain belongs_to :metric_drain has_many :release_alterations diff --git a/lib/aptible/api/container_vhost_membership.rb b/lib/aptible/api/container_vhost_membership.rb new file mode 100644 index 0000000..8bc2156 --- /dev/null +++ b/lib/aptible/api/container_vhost_membership.rb @@ -0,0 +1,12 @@ +module Aptible + module Api + class ContainerVhostMembership < Resource + belongs_to :container + belongs_to :vhost + + field :id + field :created_at, type: Time + field :updated_at, type: Time + end + end +end diff --git a/lib/aptible/api/resource.rb b/lib/aptible/api/resource.rb index d952e79..867f65d 100644 --- a/lib/aptible/api/resource.rb +++ b/lib/aptible/api/resource.rb @@ -24,6 +24,7 @@ def root_url require 'aptible/api/certificate' require 'aptible/api/configuration' require 'aptible/api/container' +require 'aptible/api/container_vhost_membership' require 'aptible/api/database' require 'aptible/api/database_image' require 'aptible/api/deployment' diff --git a/lib/aptible/api/version.rb b/lib/aptible/api/version.rb index 7810575..50cb095 100644 --- a/lib/aptible/api/version.rb +++ b/lib/aptible/api/version.rb @@ -1,5 +1,5 @@ module Aptible module Api - VERSION = '1.12.2'.freeze + VERSION = '1.12.3'.freeze end end