Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Removing the <|extra|> marker because it's only used in DNS custom code
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor authored and modular-magician committed Sep 26, 2018
1 parent 0474492 commit f7592bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
15 changes: 6 additions & 9 deletions lib/puppet/provider/gdns_resource_record_set/google.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,18 @@ def debug(message)
super(message)
end

def self.collection(data, extra = '', extra_data = {})
def self.collection(data)
URI.join(
'https://www.googleapis.com/dns/v1/',
expand_variables(
[
'projects/{{project}}/managedZones/{{managed_zone}}/changes',
extra
].join,
data, extra_data
'projects/{{project}}/managedZones/{{managed_zone}}/changes',
data
)
)
end

def collection(data, extra = '', extra_data = {})
self.class.collection(data, extra, extra_data)
def collection(data)
self.class.collection(data)
end

def self.self_link(data)
Expand Down Expand Up @@ -321,7 +318,7 @@ def wait_for_change_to_complete(change_id, resource)

def get_change_status(change_id, resource)
change_req = ::Google::Dns::Network::Get.new(
collection(resource, '/{{id}}', id: change_id), fetch_auth(resource)
"#{collection(resource)}/#{change_id}", fetch_auth(resource)
)
return_if_change_object(change_req.send)['status']
end
Expand Down
9 changes: 3 additions & 6 deletions spec/gdns_resource_record_set_provider_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -807,15 +807,12 @@ def expect_network_create_change(change_id, id, done, expected_body,
.and_return(request)
end

def collection(data, extra = '', extra_data = {})
def collection(data)
URI.join(
'https://www.googleapis.com/dns/v1/',
expand_variables(
[
'projects/{{project}}/managedZones/{{managed_zone}}/changes',
extra
].join,
data, extra_data
'projects/{{project}}/managedZones/{{managed_zone}}/changes',
data
)
)
end
Expand Down

0 comments on commit f7592bb

Please sign in to comment.