google_safe_browsing_redis 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/google_safe_browsing.rb +6 -1
  2. metadata +1 -1
@@ -50,7 +50,7 @@ class GoogleSafeBrowsing
50
50
  # perform a lookup on a url
51
51
  def lookup(url)
52
52
  say("Checking url: #{url}")
53
- url, parts = Canonicalize::canonicalize(url)
53
+ url, parts = canonicalize(url)
54
54
  hosts, paths = get_possible_hosts_paths(parts)
55
55
 
56
56
  # get all possible host+path combination hash prefixes
@@ -76,6 +76,11 @@ class GoogleSafeBrowsing
76
76
  return ''
77
77
  end
78
78
 
79
+ # returns the canonicalized url, and a hash of its parts
80
+ def canonicalize(url)
81
+ return Canonicalize::canonicalize(url)
82
+ end
83
+
79
84
  # convert an array of strings into an array of 32 bit hash prefixes
80
85
  def get_hash_prefixes(items)
81
86
  prefixes = []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_safe_browsing_redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: