google_safe_browsing 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ module GoogleSafeBrowsing
23
23
  # @param (String) url a url string to be looked up
24
24
  # @return (String, nil) the friendly list name if found, or `nil`
25
25
  def self.lookup(url)
26
- urls = Canonicalize.urls_for_lookup(url)
26
+ urls = Canonicalize.urls_for_lookup(url.force_encoding('ASCII-8BIT'))
27
27
  return nil if urls.empty?
28
28
 
29
29
  hashes = HashHelper.urls_to_hashes(urls)
@@ -14,7 +14,8 @@ module GoogleSafeBrowsing
14
14
  # @param (String) uncanonicalized url string
15
15
  # @return (String) canonicalized url string
16
16
  def self.url(raw_url)
17
- #puts raw_url
17
+ raw_url = raw_url.to_s
18
+
18
19
  #remove tabs, carriage returns and line feeds
19
20
  raw_url.gsub!("\t",'')
20
21
  raw_url.gsub!("\r",'')
@@ -1,3 +1,3 @@
1
1
  module GoogleSafeBrowsing
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_safe_browsing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-15 00:00:00.000000000 Z
12
+ date: 2012-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -151,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
151
  version: '0'
152
152
  segments:
153
153
  - 0
154
- hash: -2770515471050143529
154
+ hash: 809089230686412521
155
155
  required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  none: false
157
157
  requirements:
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  segments:
162
162
  - 0
163
- hash: -2770515471050143529
163
+ hash: 809089230686412521
164
164
  requirements: []
165
165
  rubyforge_project:
166
166
  rubygems_version: 1.8.24