be_valid_asset 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +4 -4
- data/lib/be_valid_asset/be_valid_xhtml.rb +2 -1
- data/spec/be_valid_asset/be_valid_xhtml_spec.rb +5 -9
- metadata +30 -12
data/README.markdown
CHANGED
@@ -8,14 +8,14 @@ Installation
|
|
8
8
|
|
9
9
|
To use be\_valid\_asset in your project, install the gem:
|
10
10
|
|
11
|
-
gem install
|
11
|
+
gem install be_valid_asset
|
12
12
|
|
13
|
-
or as a plugin
|
13
|
+
or install as a plugin
|
14
14
|
|
15
15
|
./script/plugin install git://github.com/unboxed/be_valid_asset.git
|
16
16
|
|
17
17
|
Add the following to the `spec/support/be_valid_asset.rb`:
|
18
|
-
(for older
|
18
|
+
(for older versions of RSpec you'll need to require it from `spec_helper.rb`)
|
19
19
|
|
20
20
|
include BeValidAsset
|
21
21
|
|
@@ -134,7 +134,7 @@ This will cause it to output the failing line, and n surrounding lines (defaults
|
|
134
134
|
BeValidAsset::Configuration.feed_validator_host = 'validator.w3.org'
|
135
135
|
BeValidAsset::Configuration.feed_validator_path = '/feed/check.cgi'
|
136
136
|
|
137
|
-
If you are doing more than the occasional check, you should
|
137
|
+
If you are doing more than the occasional check, you should run your own copy of the validator, and use that.
|
138
138
|
Instructions here: [http://validator.w3.org/docs/install.html](http://validator.w3.org/docs/install.html), [http://jigsaw.w3.org/css-validator/DOWNLOAD.html](http://jigsaw.w3.org/css-validator/DOWNLOAD.html) or [http://validator.w3.org/feed/about.html#where](http://validator.w3.org/feed/about.html#where)
|
139
139
|
|
140
140
|
### Caching
|
@@ -34,8 +34,6 @@ describe 'be_valid_xhtml' do
|
|
34
34
|
e.message.should match(/expected xhtml to be valid, but validation produced these errors/)
|
35
35
|
e.message.should match(/Invalid markup: line 12: end tag for "b" omitted, but OMITTAG NO was specified/)
|
36
36
|
e.message.should match(/Invalid markup: line 12: end tag for element "b" which is not open/)
|
37
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: b line 12 and p/)
|
38
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: p line 12 and b/)
|
39
37
|
}
|
40
38
|
end
|
41
39
|
|
@@ -47,8 +45,6 @@ describe 'be_valid_xhtml' do
|
|
47
45
|
e.message.should match(/expected xhtml to be valid, but validation produced these errors/)
|
48
46
|
e.message.should match(/Invalid markup: line 12: end tag for "b" omitted, but OMITTAG NO was specified/)
|
49
47
|
e.message.should match(/Invalid markup: line 12: end tag for element "b" which is not open/)
|
50
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: b line 12 and p/)
|
51
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: p line 12 and b/)
|
52
48
|
}
|
53
49
|
end
|
54
50
|
|
@@ -195,8 +191,6 @@ describe 'be_valid_xhtml' do
|
|
195
191
|
e.message.should match(/expected xhtml to be valid, but validation produced these errors/)
|
196
192
|
e.message.should match(/Invalid markup: line 12: end tag for "b" omitted, but OMITTAG NO was specified/)
|
197
193
|
e.message.should match(/Invalid markup: line 12: end tag for element "b" which is not open/)
|
198
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: b line 12 and p/)
|
199
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: p line 12 and b/)
|
200
194
|
}
|
201
195
|
Dir.glob(BeValidAsset::Configuration.cache_path + '/*').size.should eql(count + 1)
|
202
196
|
end
|
@@ -212,8 +206,6 @@ describe 'be_valid_xhtml' do
|
|
212
206
|
e.message.should match(/expected xhtml to be valid, but validation produced these errors/)
|
213
207
|
e.message.should match(/Invalid markup: line 12: end tag for "b" omitted, but OMITTAG NO was specified/)
|
214
208
|
e.message.should match(/Invalid markup: line 12: end tag for element "b" which is not open/)
|
215
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: b line 12 and p/)
|
216
|
-
e.message.should match(/Invalid markup: line 12: XML Parsing Error: Opening and ending tag mismatch: p line 12 and b/)
|
217
209
|
}
|
218
210
|
end
|
219
211
|
|
@@ -287,4 +279,8 @@ describe 'be_valid_xhtml' do
|
|
287
279
|
ENV.delete('http_proxy')
|
288
280
|
end
|
289
281
|
end
|
290
|
-
|
282
|
+
|
283
|
+
it "should have a be_valid_html alias method" do
|
284
|
+
method(:be_valid_html).should == method(:be_valid_xhtml)
|
285
|
+
end
|
286
|
+
end
|
metadata
CHANGED
@@ -1,28 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: be_valid_asset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
- 2
|
10
|
+
version: 1.1.2
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
|
12
|
+
authors:
|
13
|
+
- Alex Tomlins
|
14
|
+
- Sebastian de Castelberg
|
15
|
+
- Ben Brinckerhoff
|
8
16
|
autorequire:
|
9
17
|
bindir: bin
|
10
18
|
cert_chain: []
|
11
19
|
|
12
|
-
date:
|
20
|
+
date: 2011-09-03 00:00:00 +01:00
|
13
21
|
default_executable:
|
14
22
|
dependencies:
|
15
23
|
- !ruby/object:Gem::Dependency
|
16
24
|
name: rspec
|
17
|
-
|
18
|
-
|
19
|
-
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
20
28
|
requirements:
|
21
29
|
- - ">="
|
22
30
|
- !ruby/object:Gem::Version
|
31
|
+
hash: 3
|
32
|
+
segments:
|
33
|
+
- 0
|
23
34
|
version: "0"
|
24
|
-
|
25
|
-
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
description: Provides be_valid_xhtml, be_valid_css and be_valid_feed matchers for rspec controller and view tests.
|
26
38
|
email: github@unboxedconsulting.com
|
27
39
|
executables: []
|
28
40
|
|
@@ -64,21 +76,27 @@ rdoc_options: []
|
|
64
76
|
require_paths:
|
65
77
|
- lib
|
66
78
|
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
67
80
|
requirements:
|
68
81
|
- - ">="
|
69
82
|
- !ruby/object:Gem::Version
|
83
|
+
hash: 3
|
84
|
+
segments:
|
85
|
+
- 0
|
70
86
|
version: "0"
|
71
|
-
version:
|
72
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
73
89
|
requirements:
|
74
90
|
- - ">="
|
75
91
|
- !ruby/object:Gem::Version
|
92
|
+
hash: 3
|
93
|
+
segments:
|
94
|
+
- 0
|
76
95
|
version: "0"
|
77
|
-
version:
|
78
96
|
requirements: []
|
79
97
|
|
80
98
|
rubyforge_project:
|
81
|
-
rubygems_version: 1.3.
|
99
|
+
rubygems_version: 1.3.7
|
82
100
|
signing_key:
|
83
101
|
specification_version: 3
|
84
102
|
summary: Markup validation for RSpec
|