google-safe-browsing-lookup 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/google-safe-browsing-lookup.rb +4 -4
- metadata +10 -10
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -29,7 +29,7 @@ class SafeBrowsingLookup
|
|
29
29
|
#
|
30
30
|
# +key+:: API key
|
31
31
|
# +debug+:: Set to true to print debug & error output to the standard output. false (disabled) by default.
|
32
|
-
# +
|
32
|
+
# +error+:: Set to true to print error output to the standard output. false (disabled) by default.
|
33
33
|
def initialize(key='', debug=false, error=false)
|
34
34
|
@key = key || ''
|
35
35
|
@debug = debug || false
|
@@ -43,11 +43,11 @@ class SafeBrowsingLookup
|
|
43
43
|
raise ArgumentError, "Missing API key" if (@key == '')
|
44
44
|
end
|
45
45
|
|
46
|
-
# Lookup a list URLs against the Google Safe Browsing v2 lists.
|
46
|
+
# Lookup a list of URLs against the Google Safe Browsing v2 lists.
|
47
47
|
#
|
48
|
-
# Returns a hash <url>: <Gooogle match>. The possible
|
48
|
+
# Returns a hash <url>: <Gooogle match>. The possible values for <Gooogle match> are: "ok" (no match), "malware", "phishing", "malware,phishing" (match both lists) and "error".
|
49
49
|
#
|
50
|
-
# +urls+:: List of URLs to lookup. The Lookup API allows only 10,000 URL checks a day.
|
50
|
+
# +urls+:: List of URLs to lookup. The Lookup API allows only 10,000 URL checks a day. If you need more, find a Ruby implementation of the full Google Safe Browsing v2 API. Each requests must contain 500 URLs at most. The lookup() method will split the list of URLS in blocks of 500 URLs if needed.
|
51
51
|
def lookup(urls='')
|
52
52
|
if (urls.respond_to?('each') == false)
|
53
53
|
urls = Array.new(1, urls)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-safe-browsing-lookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
16
|
-
requirement: &
|
16
|
+
requirement: &192622840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *192622840
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &192639400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *192639400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &192638880 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.6.4
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *192638880
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rcov
|
49
|
-
requirement: &
|
49
|
+
requirement: &192638340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *192638340
|
58
58
|
description: Google Safe Browsing v2 Lookup is a lighter alternative to the full API.
|
59
59
|
The service allows users to check up to 10,000 URLs a day against their list og
|
60
60
|
phishing and malicious sites. A free API key is required.
|
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
segments:
|
90
90
|
- 0
|
91
|
-
hash:
|
91
|
+
hash: -3349121500631348724
|
92
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
93
|
none: false
|
94
94
|
requirements:
|