Skip to content

Commit f6ab918

Browse files
authored
Update HTTP(S) endpoint shared default (#391)
* Default https endpoints to shared: nil * Fold shared option into alb option * Bump version
1 parent 252e4bf commit f6ab918

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
aptible-cli (0.24.10)
4+
aptible-cli (0.25.0)
55
activesupport (>= 4.0, < 6.0)
66
aptible-api (~> 1.8.0)
77
aptible-auth (~> 1.2.5)

lib/aptible/cli/helpers/vhost/option_set_builder.rb

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class OptionSetBuilder
1212
ports
1313
port
1414
alb
15-
shared
1615
).freeze
1716

1817
def initialize(&block)
@@ -63,6 +62,13 @@ def declare_options(thor)
6362
'least_outstanding_requests, and ' \
6463
'weighted_random'
6564
)
65+
66+
option(
67+
:shared,
68+
type: :boolean,
69+
desc: "Share this Endpoint's load balancer with other " \
70+
'Endpoints'
71+
)
6672
end
6773
end
6874

@@ -123,15 +129,6 @@ def declare_options(thor)
123129
'on this Endpoint'
124130
)
125131
end
126-
127-
if builder.shared?
128-
option(
129-
:shared,
130-
type: :boolean,
131-
desc: "Share this Endpoint's load balancer with other " \
132-
'Endpoints'
133-
)
134-
end
135132
end
136133
end
137134

@@ -203,11 +200,7 @@ def prepare(account, options)
203200
params[:load_balancing_algorithm_type] = lba_type
204201
end
205202

206-
if shared?
207-
params[:shared] = options.delete(:shared) do
208-
create? ? false : nil
209-
end
210-
end
203+
params[:shared] = options.delete(:shared)
211204
end
212205

213206
options.delete(:environment)

lib/aptible/cli/subcommands/endpoints.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ def self.included(thor)
160160
port!
161161
tls!
162162
alb!
163-
shared!
164163
end
165164

166165
desc 'endpoints:https:create [--app APP] SERVICE',
@@ -180,7 +179,6 @@ def self.included(thor)
180179
port!
181180
tls!
182181
alb!
183-
shared!
184182
end
185183

186184
desc 'endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME',

lib/aptible/cli/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Aptible
22
module CLI
3-
VERSION = '0.24.10'.freeze
3+
VERSION = '0.25.0'.freeze
44
end
55
end

0 commit comments

Comments
 (0)