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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7a9c94be805b03ab590a70c96432eb9356cfd81
4
- data.tar.gz: 35b618607ae4b266c48b7076337a56ec0b57c9b9
3
+ metadata.gz: 1e92c036e6b6e93afe206cf82cd0c2939a15dad2
4
+ data.tar.gz: b0b5aff8b604c2f1ac754ff39c1ca69c5d7598e6
5
5
  SHA512:
6
- metadata.gz: 850c2993cb704bb796b92d30897324a7c85c8147dc669cf95de067039ad82f24d133d32065896327df271d0bfc258b1fba016070806b15c4b22e16478f342dc4
7
- data.tar.gz: d424456741d35d9905a3ef3709b16f74cd5d5a68ec0556fbefc9945721e66dcaa5d2bcd629e187a248cd945ecf9f7e7c56e72ef07f52f2fd8710c4d591bb5d15
6
+ metadata.gz: 9fb9256f04e6eecdb6de89c7a69131ae9c7d3863be8ce68fdc0a2290e8a6bbb2d8c49952c2498e459dd79fc7caefce80fb3e968631bb754ba644c0cd5c09758a
7
+ data.tar.gz: 884965beefece9d566bd29b3c6302237a527fa682bec60da422529ab79898ea3d55edd53cd200efcc07559f9efdb0f593d57ed8ddfee676b17cab8f5f1e4fdb3
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Nunchaku
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nunchaku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaime Iniesta