PwnedCheck 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pwnedcheck.rb +8 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cef2fd9ace3699de5b1b3784fb3ff9acce2c15bb
|
4
|
+
data.tar.gz: 18328f2a6fedba33f6f509d2e6dd21851fd91922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f706a82147b5b5a662cf22e7c15ec16ef22710f225fb262dcb312e16bf430698e3a6bf5e5eb72df5ece4e95216e1a194cd93a339df2e8fe7b99f88676f141bcd
|
7
|
+
data.tar.gz: 539c6658ba9d44e157443de2855b7bf6ac8d5830b4b2b78a34ed0e8e39b5b7250e36fcf2cbca190ce57413dcfaaf248884ec7e439b83e5cc011dda510d8668cd
|
data/lib/pwnedcheck.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# @author Carl Sampson <chs@chs.us>
|
1
2
|
require 'mechanize'
|
2
3
|
require 'addressable/uri'
|
3
4
|
require 'json'
|
@@ -11,13 +12,15 @@ module PwnedCheck
|
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
|
-
# Check
|
15
|
+
# Check an address against http://haveibeenpwned.com
|
15
16
|
#
|
16
|
-
#
|
17
|
-
#
|
17
|
+
# == Parameters:
|
18
|
+
# address::
|
19
|
+
# An email address to check
|
20
|
+
#
|
21
|
+
# == Returns::
|
22
|
+
# An array of sites the email address was found on or a BadRequest exception
|
18
23
|
#
|
19
|
-
# Arguments:
|
20
|
-
# address: String
|
21
24
|
def self.check(address)
|
22
25
|
agent = Mechanize.new
|
23
26
|
begin
|