nunchaku 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nunchaku/checker.rb +6 -2
- data/lib/nunchaku/version.rb +1 -1
- 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: 1e92c036e6b6e93afe206cf82cd0c2939a15dad2
|
4
|
+
data.tar.gz: b0b5aff8b604c2f1ac754ff39c1ca69c5d7598e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fb9256f04e6eecdb6de89c7a69131ae9c7d3863be8ce68fdc0a2290e8a6bbb2d8c49952c2498e459dd79fc7caefce80fb3e968631bb754ba644c0cd5c09758a
|
7
|
+
data.tar.gz: 884965beefece9d566bd29b3c6302237a527fa682bec60da422529ab79898ea3d55edd53cd200efcc07559f9efdb0f593d57ed8ddfee676b17cab8f5f1e4fdb3
|
data/lib/nunchaku/checker.rb
CHANGED
@@ -36,11 +36,15 @@ module Nunchaku
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def vnu_request_querystring
|
39
|
-
s = "#{checker_uri}?out=json&doc=#{@url}"
|
40
|
-
s += "&useragent=#{@user_agent}" if @user_agent
|
39
|
+
s = "#{checker_uri}?out=json&doc=#{escaped @url}"
|
40
|
+
s += "&useragent=#{escaped @user_agent}" if @user_agent
|
41
41
|
s
|
42
42
|
end
|
43
43
|
|
44
|
+
def escaped(str)
|
45
|
+
CGI::escape str
|
46
|
+
end
|
47
|
+
|
44
48
|
def defaults
|
45
49
|
{ checker_uri: 'http://validator.w3.org/nu/' }
|
46
50
|
end
|
data/lib/nunchaku/version.rb
CHANGED