Skip to content

Commit

Permalink
Change response code validation
Browse files Browse the repository at this point in the history
* HTTParty has altered the DSL for Ruby 2.0
* Rather than `response.code.ok?`, will use `response.code == 200`
  • Loading branch information
Adarsh Pandit committed Jul 16, 2013
1 parent f8e33cc commit c6d92e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/uri_validator.rb
Expand Up @@ -27,7 +27,7 @@ def valid_uri?(uri)

def head_request_ok?(uri)
response = HTTParty.head(uri)
return response.ok?
return response.code == 200
rescue SocketError, Errno::ECONNREFUSED
return false
end
Expand Down

0 comments on commit c6d92e4

Please sign in to comment.