Skip to content

Commit

Permalink
Fix issue where passing no options gives a NilError
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryguy committed Dec 3, 2019
1 parent cbbb0c1 commit c6b733c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible_tower_client/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Connection
attr_reader :connection

def initialize(options = nil)
raise "Credentials are required" unless options[:username] && options[:password]
raise ":username and :password are required" if options.nil? || !options[:username] || !options[:password]
raise ":base_url is required" unless options[:base_url]
logger = options[:logger] || AnsibleTowerClient.logger
verify_ssl = options[:verify_ssl] || OpenSSL::SSL::VERIFY_PEER
Expand Down

0 comments on commit c6b733c

Please sign in to comment.