Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Chef/Inspec User-Agent to Azure API calls #120

Merged
28 commits merged into from
Sep 18, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Checkstyle
Signed-off-by: Ruairi Fennell <rfennell@chef.io>
Ruairi Fennell committed Aug 15, 2018
commit a731fec02e85651220097fcd5816d72be6182923
18 changes: 9 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -33,11 +33,11 @@ namespace :azure do
Rake::Task['check_env'].invoke

sh(
'az', 'login',
'--service-principal',
'-u', ENV['AZURE_CLIENT_ID'],
'-p', ENV['AZURE_CLIENT_SECRET'],
'--tenant', ENV['AZURE_TENANT_ID']
'az', 'login',
'--service-principal',
'-u', ENV['AZURE_CLIENT_ID'],
'-p', ENV['AZURE_CLIENT_SECRET'],
'--tenant', ENV['AZURE_TENANT_ID']
)
end
end
@@ -213,9 +213,9 @@ namespace :docs do
task :resource_links do
puts "\n"
Dir.entries('docs/resources').sort
.reject { |file| File.directory?(file) }
.collect { |file| "- [#{file.split('.')[0]}](docs/resources/#{file})" }
.map { |link| puts link }
.reject { |file| File.directory?(file) }
.collect { |file| "- [#{file.split('.')[0]}](docs/resources/#{file})" }
.map { |link| puts link }
puts "\n"
end
end
@@ -240,4 +240,4 @@ namespace :attributes do
end
end

Rake.application.top_level_tasks << :output_options
Rake.application.top_level_tasks << :output_options
2 changes: 1 addition & 1 deletion libraries/support/azure/management.rb
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ def network_watchers(resource_group)
def resource_groups
get(
url: link(location: 'resourcegroups', provider: false),
api_version: '2018-02-01'
api_version: '2018-02-01',
)
end

4 changes: 2 additions & 2 deletions libraries/support/azure/rest.rb
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ class Rest

def initialize(client)
@host = client.base_url
@resource = "#{client.base_url}"
@resource += "/" unless @resource[-1, 1] == "/"
@resource = client.base_url.to_s
@resource += '/' unless @resource[-1, 1] == '/'
@credentials = client.credentials
end