Skip to content

Commit 21abb17

Browse files
bioxdamacus
andauthored
feat: Expose api_url of droplet_kit client as an env var (#111)
Co-authored-by: Dan Webb <[email protected]>
1 parent 66585dc commit 21abb17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/kitchen/driver/digitalocean.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ class Digitalocean < Kitchen::Driver::SSHBase
4444
default_config :firewalls, nil
4545
default_config :vpcs, nil
4646

47+
default_config :api_url do
48+
ENV["DIGITALOCEAN_API_URL"] || "https://api.digitalocean.com"
49+
end
50+
4751
default_config :region do
4852
ENV["DIGITALOCEAN_REGION"] || "nyc1"
4953
end
@@ -175,7 +179,7 @@ def default_name
175179
def client
176180
debug_client_config
177181

178-
DropletKit::Client.new(access_token: config[:digitalocean_access_token])
182+
DropletKit::Client.new(access_token: config[:digitalocean_access_token], api_url: config[:api_url])
179183
end
180184

181185
def create_server

0 commit comments

Comments
 (0)