lib/pwned.rb in pwned-2.2.0 vs lib/pwned.rb in pwned-2.3.0

- old
+ new

@@ -33,10 +33,13 @@ # @param password [String] The password you want to check against the API. # @param [Hash] request_options Options that can be passed to +Net::HTTP.start+ when # calling the API # @option request_options [Symbol] :headers ({ "User-Agent" => "Ruby Pwned::Password #{Pwned::VERSION}" }) # HTTP headers to include in the request + # @option request_options [Symbol] :ignore_env_proxy (false) The library + # will try to infer an HTTP proxy from the `http_proxy` environment + # variable. If you do not want this behaviour, set this option to true. # @return [Boolean] Whether the password appears in the data breaches or not. # @since 1.1.0 def self.pwned?(password, request_options={}) Pwned::Password.new(password, request_options).pwned? end @@ -51,9 +54,12 @@ # @param password [String] The password you want to check against the API. # @param [Hash] request_options Options that can be passed to +Net::HTTP.start+ when # calling the API # @option request_options [Symbol] :headers ({ "User-Agent" => "Ruby Pwned::Password #{Pwned::VERSION}" }) # HTTP headers to include in the request + # @option request_options [Symbol] :ignore_env_proxy (false) The library + # will try to infer an HTTP proxy from the `http_proxy` environment + # variable. If you do not want this behaviour, set this option to true. # @return [Integer] The number of times the password has appeared in the data # breaches. # @since 1.1.0 def self.pwned_count(password, request_options={}) Pwned::Password.new(password, request_options).pwned_count