google_safe_browsing 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/google_safe_browsing/add_shavar.rb +1 -0
- data/lib/google_safe_browsing/http_helper.rb +4 -1
- data/lib/google_safe_browsing/shavar.rb +4 -2
- data/lib/google_safe_browsing/sub_shavar.rb +1 -0
- data/lib/google_safe_browsing/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d187e5a85e975ac9103be2439146189032756e4
|
4
|
+
data.tar.gz: 8e779fea3a2d207d27f3ffeb4c2ed3b876844628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3475dcb3a3dbce00cf27e7a0e120b784d30c9a241e434a2891c2bbcc8319ab092f30c7351c613e8da1e930886ceb0662d022e207028eecb33daf1aa699a449e
|
7
|
+
data.tar.gz: d87d6f0764b760f68aa490948e01b252fdf7ef56fc485d963b24fd59e828ca794d753000494c74de77df90653d3dc78c2eac77f988c6f820d5652b3cc3c1791a
|
data/README.md
CHANGED
@@ -4,9 +4,11 @@ This gem allows easy Google Safe Browsing APIv2 usage with optional integration
|
|
4
4
|
into Rails 3 apps.
|
5
5
|
|
6
6
|
[![Build
|
7
|
-
Status](https://travis-ci.org/mobiledefense/google_safe_browsing.png)](https://travis-ci.org
|
7
|
+
Status](https://travis-ci.org/mobiledefense/google_safe_browsing.png)](https://travis-ci.org/mobiledefense/google_safe_browsing)
|
8
8
|
[![Code
|
9
9
|
Climate](https://codeclimate.com/github/mobiledefense/google_safe_browsing.png)](https://codeclimate.com/github/mobiledefense/google_safe_browsing)
|
10
|
+
[![PullReview
|
11
|
+
stats](https://www.pullreview.com/github/mobiledefense/google_safe_browsing/badges/master.svg?)](https://www.pullreview.com/github/mobiledefense/google_safe_browsing/reviews/master)
|
10
12
|
|
11
13
|
It includes:
|
12
14
|
|
@@ -19,6 +19,7 @@ module GoogleSafeBrowsing
|
|
19
19
|
body << BinaryHelper.hex_to_bin(h[0..7])
|
20
20
|
end
|
21
21
|
|
22
|
+
|
22
23
|
body
|
23
24
|
end
|
24
25
|
|
@@ -80,6 +81,8 @@ module GoogleSafeBrowsing
|
|
80
81
|
response = yield uri
|
81
82
|
end while self.please_rekey?(response.body)
|
82
83
|
|
84
|
+
return unless response.body
|
85
|
+
|
83
86
|
lines = response.body.split("\n")
|
84
87
|
mac = lines.shift
|
85
88
|
if mac[0..1] == 'm:'
|
@@ -110,7 +113,7 @@ module GoogleSafeBrowsing
|
|
110
113
|
end
|
111
114
|
|
112
115
|
def self.please_rekey?(body)
|
113
|
-
if body.split("\n").include? REKEY_PREFIX
|
116
|
+
if body.to_s.split("\n").include? REKEY_PREFIX
|
114
117
|
GoogleSafeBrowsing.config.client_key = nil
|
115
118
|
GoogleSafeBrowsing.config.wrapped_key = nil
|
116
119
|
true
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module GoogleSafeBrowsing
|
2
2
|
module Shavar
|
3
|
-
|
4
|
-
|
3
|
+
module ClassMethods
|
4
|
+
def delete_chunks_from_list(list, chunk_list)
|
5
|
+
where(list: list, chunk_number: chunk_list.to_a).delete_all
|
6
|
+
end
|
5
7
|
end
|
6
8
|
end
|
7
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_safe_browsing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Marshall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|