assert_valid_markup 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/CHANGELOG +0 -0
  2. data/VERSION +1 -1
  3. data/lib/assert_valid_markup.rb +11 -1
  4. metadata +4 -3
File without changes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.2
1
+ 0.6.4
@@ -164,7 +164,17 @@ class Test::Unit::TestCase
164
164
  response = File.open filename {|f| Marshal.load(f) } unless ENV['NO_CACHE_VALIDATION'] rescue nil
165
165
  end
166
166
  if ! response
167
- response = Net::HTTP.start('validator.w3.org').post2('/check', "fragment=#{CGI.escape(fragment)}&output=json")
167
+ if defined?(FakeWeb)
168
+ old_net_connect = FakeWeb.allow_net_connect?
169
+ FakeWeb.allow_net_connect = true
170
+ end
171
+ begin
172
+ response = Net::HTTP.start('validator.w3.org').post2('/check', "fragment=#{CGI.escape(fragment)}&output=json")
173
+ ensure
174
+ if defined?(FakeWeb)
175
+ FakeWeb.allow_net_connect = old_net_connect
176
+ end
177
+ end
168
178
  File.open filename, 'w+' do |f| Marshal.dump response, f end
169
179
  end
170
180
  markup_is_valid = response['x-w3c-validator-status']=='Valid'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 2
9
- version: 0.6.2
8
+ - 4
9
+ version: 0.6.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matt Conway
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-29 00:00:00 -04:00
17
+ date: 2010-03-30 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -75,6 +75,7 @@ extra_rdoc_files:
75
75
  - LICENSE
76
76
  - README.rdoc
77
77
  files:
78
+ - CHANGELOG
78
79
  - LICENSE
79
80
  - README.rdoc
80
81
  - VERSION