Skip to content

Commit

Permalink
Merge pull request #17 from StackPointCloud/master
Browse files Browse the repository at this point in the history
Set custom user-agent
  • Loading branch information
edevenport authored Oct 24, 2017
2 parents 1217dfc + f006f1d commit b882e3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/chef/knife/profitbricks_base.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'chef/knife'
require 'knife-profitbricks/version'

class Chef
class Knife
Expand Down Expand Up @@ -36,6 +37,8 @@ def connection
config.url = Chef::Config[:knife][:profitbricks_url]
config.debug = Chef::Config[:knife][:profitbricks_debug] || false
config.global_classes = false
config.headers = Hash.new
config.headers['User-Agent'] = "Chef/#{::Chef::VERSION} knife-profitbricks/#{::Knife::ProfitBricks::VERSION}"
end
end

Expand Down Expand Up @@ -63,7 +66,7 @@ def get_image(image_name, image_type, image_location)
min_image = image
end
end
min_image
min_image
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/knife-profitbricks/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Knife
module ProfitBricks
VERSION = '2.0.0'
VERSION = '2.0.1'
MAJOR, MINOR, TINY = VERSION.split('.')
end
end

0 comments on commit b882e3e

Please sign in to comment.