nanoc 3.6.9 → 3.6.10
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.
- checksums.yaml +4 -4
- data/Gemfile +15 -8
- data/Gemfile.lock +27 -14
- data/NEWS.md +14 -0
- data/lib/nanoc/base.rb +2 -0
- data/lib/nanoc/base/checksummer.rb +82 -0
- data/lib/nanoc/base/compilation/compiler.rb +4 -3
- data/lib/nanoc/base/compilation/filter.rb +3 -10
- data/lib/nanoc/base/compilation/rules_collection.rb +6 -1
- data/lib/nanoc/base/core_ext/array.rb +1 -1
- data/lib/nanoc/base/core_ext/hash.rb +1 -2
- data/lib/nanoc/base/core_ext/pathname.rb +1 -2
- data/lib/nanoc/base/core_ext/string.rb +1 -3
- data/lib/nanoc/base/errors.rb +9 -0
- data/lib/nanoc/base/result_data/item_rep.rb +2 -7
- data/lib/nanoc/base/source_data/code_snippet.rb +1 -1
- data/lib/nanoc/base/source_data/item.rb +1 -16
- data/lib/nanoc/base/source_data/layout.rb +1 -3
- data/lib/nanoc/base/source_data/site.rb +14 -0
- data/lib/nanoc/base/temp_filename_factory.rb +53 -0
- data/lib/nanoc/cli/commands/compile.rb +6 -2
- data/lib/nanoc/cli/commands/create-site.rb +3 -0
- data/lib/nanoc/cli/error_handler.rb +9 -5
- data/lib/nanoc/extra.rb +9 -8
- data/lib/nanoc/extra/jruby_nokogiri_warner.rb +48 -0
- data/lib/nanoc/extra/link_collector.rb +2 -0
- data/lib/nanoc/extra/piper.rb +1 -1
- data/lib/nanoc/filters/colorize_syntax.rb +2 -0
- data/lib/nanoc/filters/pandoc.rb +2 -2
- data/lib/nanoc/filters/relativize_paths.rb +2 -0
- data/lib/nanoc/filters/xsl.rb +2 -0
- data/lib/nanoc/version.rb +1 -1
- data/tasks/rubocop.rake +7 -3
- data/test/base/checksummer_spec.rb +274 -0
- data/test/base/core_ext/array_spec.rb +2 -2
- data/test/base/core_ext/hash_spec.rb +7 -4
- data/test/base/core_ext/pathname_spec.rb +6 -6
- data/test/base/core_ext/string_spec.rb +2 -2
- data/test/base/temp_filename_factory_spec.rb +72 -0
- data/test/base/test_site.rb +26 -0
- data/test/cli/commands/test_prune.rb +4 -0
- data/test/extra/checking/checks/test_css.rb +28 -24
- data/test/extra/checking/checks/test_html.rb +28 -24
- data/test/extra/test_piper.rb +12 -0
- data/test/filters/test_colorize_syntax.rb +6 -6
- data/test/filters/test_erb.rb +4 -0
- data/test/filters/test_pandoc.rb +15 -0
- data/test/filters/test_relativize_paths.rb +27 -65
- data/test/filters/test_xsl.rb +7 -35
- data/test/fixtures/vcr_cassettes/css_run_error.yml +65 -0
- data/test/fixtures/vcr_cassettes/css_run_ok.yml +55 -0
- data/test/fixtures/vcr_cassettes/html_run_error.yml +94 -0
- data/test/fixtures/vcr_cassettes/html_run_ok.yml +56 -0
- data/test/helper.rb +19 -9
- metadata +11 -2
data/test/filters/test_xsl.rb
CHANGED
@@ -28,22 +28,13 @@ EOS
|
|
28
28
|
</report>
|
29
29
|
EOS
|
30
30
|
|
31
|
-
SAMPLE_XML_OUT =
|
32
|
-
<?xml version="1.0" encoding="utf-8"?>
|
33
|
-
<html>
|
34
|
-
<head>
|
35
|
-
<title>My Report</title>
|
36
|
-
</head>
|
37
|
-
<body>
|
38
|
-
<h1>My Report</h1>
|
39
|
-
</body>
|
40
|
-
</html>
|
41
|
-
EOS
|
31
|
+
SAMPLE_XML_OUT = %r{\A<\?xml version="1.0" encoding="utf-8"\?>\s*<html>\s*<head>\s*<title>My Report</title>\s*</head>\s*<body>\s*<h1>My Report</h1>\s*</body>\s*</html>\s*\Z}m
|
42
32
|
|
43
33
|
SAMPLE_XSL_WITH_PARAMS = <<-EOS
|
44
34
|
<?xml version="1.0" encoding="utf-8"?>
|
45
35
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
46
36
|
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
|
37
|
+
<xsl:param name="foo"/>
|
47
38
|
<xsl:template match="/">
|
48
39
|
<html>
|
49
40
|
<head>
|
@@ -64,17 +55,7 @@ EOS
|
|
64
55
|
</report>
|
65
56
|
EOS
|
66
57
|
|
67
|
-
SAMPLE_XML_OUT_WITH_PARAMS =
|
68
|
-
<?xml version="1.0" encoding="utf-8"?>
|
69
|
-
<html>
|
70
|
-
<head>
|
71
|
-
<title>My Report</title>
|
72
|
-
</head>
|
73
|
-
<body>
|
74
|
-
<h1>bar</h1>
|
75
|
-
</body>
|
76
|
-
</html>
|
77
|
-
EOS
|
58
|
+
SAMPLE_XML_OUT_WITH_PARAMS = %r{\A<\?xml version="1.0" encoding="utf-8"\?>\s*<html>\s*<head>\s*<title>My Report</title>\s*</head>\s*<body>\s*<h1>bar</h1>\s*</body>\s*</html>\s*\Z}m
|
78
59
|
|
79
60
|
SAMPLE_XSL_WITH_OMIT_XML_DECL = <<-EOS
|
80
61
|
<?xml version="1.0" encoding="utf-8"?>
|
@@ -101,16 +82,7 @@ EOS
|
|
101
82
|
</report>
|
102
83
|
EOS
|
103
84
|
|
104
|
-
SAMPLE_XML_OUT_WITH_OMIT_XML_DECL =
|
105
|
-
<html>
|
106
|
-
<head>
|
107
|
-
<title>My Report</title>
|
108
|
-
</head>
|
109
|
-
<body>
|
110
|
-
<h1>My Report</h1>
|
111
|
-
</body>
|
112
|
-
</html>
|
113
|
-
EOS
|
85
|
+
SAMPLE_XML_OUT_WITH_OMIT_XML_DECL = %r{\A<html>\s*<head>\s*<title>My Report</title>\s*</head>\s*<body>\s*<h1>My Report</h1>\s*</body>\s*</html>\s*\Z}m
|
114
86
|
|
115
87
|
def test_filter_as_layout
|
116
88
|
if_have 'nokogiri' do
|
@@ -132,7 +104,7 @@ EOS
|
|
132
104
|
|
133
105
|
# Run the filter and validate the results
|
134
106
|
result = filter.setup_and_run(layout.raw_content)
|
135
|
-
|
107
|
+
assert_match SAMPLE_XML_OUT, result
|
136
108
|
end
|
137
109
|
end
|
138
110
|
|
@@ -157,7 +129,7 @@ EOS
|
|
157
129
|
# Run the filter and validate the results
|
158
130
|
result = filter.setup_and_run(layout.raw_content,
|
159
131
|
:foo => 'bar')
|
160
|
-
|
132
|
+
assert_match SAMPLE_XML_OUT_WITH_PARAMS, result
|
161
133
|
end
|
162
134
|
end
|
163
135
|
|
@@ -181,7 +153,7 @@ EOS
|
|
181
153
|
|
182
154
|
# Run the filter and validate the results
|
183
155
|
result = filter.setup_and_run(layout.raw_content)
|
184
|
-
|
156
|
+
assert_match SAMPLE_XML_OUT_WITH_OMIT_XML_DECL, result
|
185
157
|
end
|
186
158
|
end
|
187
159
|
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://jigsaw.w3.org/css-validator/validator?output=soap12&profile=css3&text=h1%20%7B%20coxlor:%20rxed%3B%20%7D
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache
|
23
|
+
Date:
|
24
|
+
- Thu, 24 Apr 2014 07:25:20 GMT
|
25
|
+
Pragma:
|
26
|
+
- no-cache
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Content-Language:
|
30
|
+
- en
|
31
|
+
Content-Type:
|
32
|
+
- application/soap+xml;charset=utf-8
|
33
|
+
Server:
|
34
|
+
- Jigsaw/2.3.0-beta3
|
35
|
+
Vary:
|
36
|
+
- Accept-Language
|
37
|
+
X-W3c-Validator-Errors:
|
38
|
+
- '1'
|
39
|
+
X-W3c-Validator-Status:
|
40
|
+
- Invalid
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: "<?xml version='1.0' encoding=\"utf-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n
|
44
|
+
\ <env:Body>\n <m:cssvalidationresponse\n env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\"\n
|
45
|
+
\ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>file://localhost/TextArea</m:uri>\n
|
46
|
+
\ <m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby>\n
|
47
|
+
\ <m:csslevel>css3</m:csslevel>\n <m:date>2014-04-24T07:25:20Z</m:date>\n
|
48
|
+
\ <m:validity>false</m:validity>\n <m:result>\n <m:errors
|
49
|
+
xml:lang=\"en\">\n <m:errorcount>1</m:errorcount>\n \n
|
50
|
+
\ <m:errorlist>\n <m:uri>file://localhost/TextArea</m:uri>\n
|
51
|
+
\ \n <m:error>\n <m:line>1</m:line>\n
|
52
|
+
\ <m:errortype>parse-error</m:errortype>\n <m:context>h1</m:context>
|
53
|
+
\ \n <m:errorsubtype>\n exp\n
|
54
|
+
\ </m:errorsubtype>\n <m:skippedstring>\n
|
55
|
+
\ rxed\n </m:skippedstring>\n
|
56
|
+
\ <m:type>noexistence-at-all</m:type>\n \n
|
57
|
+
\ <m:message>\n \n Property
|
58
|
+
coxlor doesn't exist : \n </m:message>\n </m:error>\n
|
59
|
+
\ \n </m:errorlist>\n \n </m:errors>\n
|
60
|
+
\ <m:warnings xml:lang=\"en\">\n <m:warningcount>0</m:warningcount>\n
|
61
|
+
\ </m:warnings>\n </m:result>\n </m:cssvalidationresponse>\n
|
62
|
+
\ </env:Body>\n</env:Envelope>\n\n"
|
63
|
+
http_version:
|
64
|
+
recorded_at: Thu, 24 Apr 2014 07:25:20 GMT
|
65
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://jigsaw.w3.org/css-validator/validator?output=soap12&profile=css3&text=h1%20%7B%20color:%20red%3B%20%7D
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache
|
23
|
+
Date:
|
24
|
+
- Thu, 24 Apr 2014 07:25:20 GMT
|
25
|
+
Pragma:
|
26
|
+
- no-cache
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Content-Language:
|
30
|
+
- en
|
31
|
+
Content-Type:
|
32
|
+
- application/soap+xml;charset=utf-8
|
33
|
+
Server:
|
34
|
+
- Jigsaw/2.3.0-beta3
|
35
|
+
Vary:
|
36
|
+
- Accept-Language
|
37
|
+
X-W3c-Validator-Errors:
|
38
|
+
- '0'
|
39
|
+
X-W3c-Validator-Status:
|
40
|
+
- Valid
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: "<?xml version='1.0' encoding=\"utf-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n
|
44
|
+
\ <env:Body>\n <m:cssvalidationresponse\n env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\"\n
|
45
|
+
\ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>file://localhost/TextArea</m:uri>\n
|
46
|
+
\ <m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby>\n
|
47
|
+
\ <m:csslevel>css3</m:csslevel>\n <m:date>2014-04-24T07:25:20Z</m:date>\n
|
48
|
+
\ <m:validity>true</m:validity>\n <m:result>\n <m:errors
|
49
|
+
xml:lang=\"en\">\n <m:errorcount>0</m:errorcount>\n \n
|
50
|
+
\ </m:errors>\n <m:warnings xml:lang=\"en\">\n
|
51
|
+
\ <m:warningcount>0</m:warningcount>\n </m:warnings>\n
|
52
|
+
\ </m:result>\n </m:cssvalidationresponse>\n </env:Body>\n</env:Envelope>\n\n"
|
53
|
+
http_version:
|
54
|
+
recorded_at: Thu, 24 Apr 2014 07:25:20 GMT
|
55
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,94 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://validator.w3.org/check
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
|
9
|
+
name=\"output\"\r\n\r\nsoap12\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
|
10
|
+
form-data; name=\"uploaded_file\"; filename=\"output/blah.html\"\r\nContent-Type:
|
11
|
+
text/html\r\n\r\n<h2>Hi!</h1>\r\n--349832898984244898448024464570528145--\r\n"
|
12
|
+
headers:
|
13
|
+
Content-Type:
|
14
|
+
- multipart/form-data; boundary=349832898984244898448024464570528145
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
Accept:
|
18
|
+
- "*/*"
|
19
|
+
User-Agent:
|
20
|
+
- Ruby
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Thu, 24 Apr 2014 07:25:20 GMT
|
28
|
+
Server:
|
29
|
+
- Apache/2.2.16 (Debian)
|
30
|
+
X-W3c-Validator-Recursion:
|
31
|
+
- '1'
|
32
|
+
X-W3c-Validator-Status:
|
33
|
+
- Invalid
|
34
|
+
X-W3c-Validator-Errors:
|
35
|
+
- '2'
|
36
|
+
X-W3c-Validator-Warnings:
|
37
|
+
- '4'
|
38
|
+
Content-Type:
|
39
|
+
- application/soap+xml; charset=UTF-8
|
40
|
+
Connection:
|
41
|
+
- close
|
42
|
+
Transfer-Encoding:
|
43
|
+
- chunked
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
|
47
|
+
env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
|
48
|
+
\ \n <m:uri>output/blah.html</m:uri>\n <m:checkedby>http://validator.w3.org/</m:checkedby>\n
|
49
|
+
\ <m:doctype></m:doctype>\n <m:charset>utf-8</m:charset>\n <m:validity>false</m:validity>\n
|
50
|
+
\ <m:errors>\n <m:errorcount>2</m:errorcount>\n <m:errorlist>\n
|
51
|
+
\ \n <m:error>\n <m:line>1</m:line>\n <m:col>1</m:col>\n
|
52
|
+
\ <m:message>no document type declaration; will parse without
|
53
|
+
validation</m:message>\n <m:messageid>187</m:messageid>\n <m:explanation>
|
54
|
+
\ <![CDATA[\n <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=;errmsg_id=187#errormsg\"\n\ttitle=\"Suggest
|
55
|
+
improvements on this error message through our feedback channels\" \n >✉</a>\n
|
56
|
+
\ </p>\n\n <div class=\"ve mid-187\">\n <p>The document type could
|
57
|
+
not be determined, because the document had no correct DOCTYPE declaration.
|
58
|
+
The document does not look like HTML, therefore automatic fallback could not
|
59
|
+
be performed, and the document was only checked against basic markup syntax.</p>\n
|
60
|
+
\ <p>Learn <a href=\"docs/help.html#faq-doctype\">how to add a doctype to
|
61
|
+
your document</a> \n from our <acronym title=\"Frequently Asked Questions\">FAQ</acronym>,
|
62
|
+
or use the validator's\n <code>Document Type</code> option to validate
|
63
|
+
your document against a specific Document Type.</p>\n </div>\n\n ]]>\n
|
64
|
+
\ </m:explanation>\n <m:source><![CDATA[<strong
|
65
|
+
title=\"Position where error was detected.\"><</strong>h2>Hi!</h1>]]></m:source>\n
|
66
|
+
\ </m:error>\n \n <m:error>\n <m:line>1</m:line>\n
|
67
|
+
\ <m:col>12</m:col>\n <m:message>end tag for
|
68
|
+
element "H1" which is not open</m:message>\n <m:messageid>79</m:messageid>\n
|
69
|
+
\ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
|
70
|
+
\ <a\n href=\"feedback.html?uri=;errmsg_id=79#errormsg\"\n\ttitle=\"Suggest
|
71
|
+
improvements on this error message through our feedback channels\" \n >✉</a>\n
|
72
|
+
\ </p>\n\n <div class=\"ve mid-79\">\n <p>\n The Validator found
|
73
|
+
an end tag for the above element, but that element is\n not currently
|
74
|
+
open. This is often caused by a leftover end tag from an\n element that
|
75
|
+
was removed during editing, or by an implicitly closed\n element (if
|
76
|
+
you have an error related to an element being used where it\n is not
|
77
|
+
allowed, this is almost certainly the case). In the latter case\n this
|
78
|
+
error will disappear as soon as you fix the original problem.\n </p>\n
|
79
|
+
\ <p>\n If this error occurred in a script section of your document,
|
80
|
+
you should probably\n read this <a href=\"docs/help.html#faq-javascript\">FAQ
|
81
|
+
entry</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
|
82
|
+
\ <m:source><![CDATA[<h2>Hi!</h1<strong title=\"Position
|
83
|
+
where error was detected.\">></strong>]]></m:source>\n </m:error>\n
|
84
|
+
\ \n </m:errorlist>\n </m:errors>\n <m:warnings>\n <m:warningcount>4</m:warningcount>\n
|
85
|
+
\ <m:warninglist>\n \n\n\n\n <m:warning><m:messageid>W04</m:messageid><m:message>No
|
86
|
+
Character Encoding Found!\n \n Falling back to \n \n UTF-8.\n
|
87
|
+
\ </m:message></m:warning>\n\n\n\n <m:warning><m:messageid>W06</m:messageid><m:message>Unable
|
88
|
+
to Determine Parse Mode!</m:message></m:warning>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
|
89
|
+
\ <m:warning><m:messageid>W27</m:messageid><m:message>No Character encoding
|
90
|
+
declared at document level</m:message></m:warning>\n\n\n\n\n\n\n\n \n
|
91
|
+
\ </m:warninglist>\n </m:warnings>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
|
92
|
+
http_version:
|
93
|
+
recorded_at: Thu, 24 Apr 2014 07:25:21 GMT
|
94
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://validator.w3.org/check
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
|
9
|
+
name=\"output\"\r\n\r\nsoap12\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
|
10
|
+
form-data; name=\"uploaded_file\"; filename=\"output/blah.html\"\r\nContent-Type:
|
11
|
+
text/html\r\n\r\n<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>Hello</title></head><body><h1>Hi!</h1></body>\r\n--349832898984244898448024464570528145--\r\n"
|
12
|
+
headers:
|
13
|
+
Content-Type:
|
14
|
+
- multipart/form-data; boundary=349832898984244898448024464570528145
|
15
|
+
Accept-Encoding:
|
16
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
17
|
+
Accept:
|
18
|
+
- "*/*"
|
19
|
+
User-Agent:
|
20
|
+
- Ruby
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Thu, 24 Apr 2014 07:25:21 GMT
|
28
|
+
Server:
|
29
|
+
- Apache/2.2.16 (Debian)
|
30
|
+
X-W3c-Validator-Recursion:
|
31
|
+
- '1'
|
32
|
+
X-W3c-Validator-Status:
|
33
|
+
- Valid
|
34
|
+
X-W3c-Validator-Errors:
|
35
|
+
- '0'
|
36
|
+
X-W3c-Validator-Warnings:
|
37
|
+
- '1'
|
38
|
+
Content-Type:
|
39
|
+
- application/soap+xml; charset=UTF-8
|
40
|
+
Connection:
|
41
|
+
- close
|
42
|
+
Transfer-Encoding:
|
43
|
+
- chunked
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
|
47
|
+
env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
|
48
|
+
\ \n <m:uri>output/blah.html</m:uri>\n <m:checkedby>http://validator.w3.org/</m:checkedby>\n
|
49
|
+
\ <m:doctype>HTML5</m:doctype>\n <m:charset>utf-8</m:charset>\n <m:validity>true</m:validity>\n
|
50
|
+
\ <m:errors>\n <m:errorcount>0</m:errorcount>\n <m:errorlist>\n
|
51
|
+
\ \n </m:errorlist>\n </m:errors>\n <m:warnings>\n <m:warningcount>1</m:warningcount>\n
|
52
|
+
\ <m:warninglist>\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
|
53
|
+
\ \n </m:warninglist>\n </m:warnings>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
|
54
|
+
http_version:
|
55
|
+
recorded_at: Thu, 24 Apr 2014 07:25:21 GMT
|
56
|
+
recorded_with: VCR 2.9.0
|
data/test/helper.rb
CHANGED
@@ -4,15 +4,11 @@
|
|
4
4
|
require File.dirname(__FILE__) + '/gem_loader.rb'
|
5
5
|
|
6
6
|
# Load unit testing stuff
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
rescue => e
|
13
|
-
$stderr.puts "To run the nanoc unit tests, you need minitest and mocha."
|
14
|
-
raise e
|
15
|
-
end
|
7
|
+
require 'minitest/unit'
|
8
|
+
require 'minitest/spec'
|
9
|
+
require 'minitest/mock'
|
10
|
+
require 'mocha/setup'
|
11
|
+
require 'vcr'
|
16
12
|
|
17
13
|
# Load nanoc
|
18
14
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
|
@@ -24,12 +20,26 @@ require 'nanoc/tasks'
|
|
24
20
|
require 'tmpdir'
|
25
21
|
require 'stringio'
|
26
22
|
|
23
|
+
VCR.configure do |c|
|
24
|
+
c.cassette_library_dir = 'test/fixtures/vcr_cassettes'
|
25
|
+
c.hook_into :webmock
|
26
|
+
end
|
27
|
+
|
27
28
|
module Nanoc::TestHelpers
|
28
29
|
|
29
30
|
LIB_DIR = File.expand_path(File.dirname(__FILE__) + '/../lib')
|
30
31
|
|
32
|
+
def disable_nokogiri?
|
33
|
+
ENV.key?('DISABLE_NOKOGIRI')
|
34
|
+
end
|
35
|
+
|
31
36
|
def if_have(*libs)
|
32
37
|
libs.each do |lib|
|
38
|
+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby' && lib == 'nokogiri' && disable_nokogiri?
|
39
|
+
skip "Pure Java Nokogiri has issues that cause problems with nanoc (see https://github.com/nanoc/nanoc/pull/422) -- run without DISABLE_NOKOGIRI to enable Nokogiri tests"
|
40
|
+
return
|
41
|
+
end
|
42
|
+
|
33
43
|
begin
|
34
44
|
require lib
|
35
45
|
rescue LoadError
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cri
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- doc/yardoc_templates/default/layout/html/footer.erb
|
66
66
|
- lib/nanoc.rb
|
67
67
|
- lib/nanoc/base.rb
|
68
|
+
- lib/nanoc/base/checksummer.rb
|
68
69
|
- lib/nanoc/base/compilation/checksum_store.rb
|
69
70
|
- lib/nanoc/base/compilation/compiled_content_cache.rb
|
70
71
|
- lib/nanoc/base/compilation/compiler.rb
|
@@ -102,6 +103,7 @@ files:
|
|
102
103
|
- lib/nanoc/base/source_data/layout.rb
|
103
104
|
- lib/nanoc/base/source_data/site.rb
|
104
105
|
- lib/nanoc/base/store.rb
|
106
|
+
- lib/nanoc/base/temp_filename_factory.rb
|
105
107
|
- lib/nanoc/cli.rb
|
106
108
|
- lib/nanoc/cli/ansi_string_colorizer.rb
|
107
109
|
- lib/nanoc/cli/cleaning_stream.rb
|
@@ -164,6 +166,7 @@ files:
|
|
164
166
|
- lib/nanoc/extra/deployers/rsync.rb
|
165
167
|
- lib/nanoc/extra/file_proxy.rb
|
166
168
|
- lib/nanoc/extra/filesystem_tools.rb
|
169
|
+
- lib/nanoc/extra/jruby_nokogiri_warner.rb
|
167
170
|
- lib/nanoc/extra/link_collector.rb
|
168
171
|
- lib/nanoc/extra/piper.rb
|
169
172
|
- lib/nanoc/extra/pruner.rb
|
@@ -231,11 +234,13 @@ files:
|
|
231
234
|
- tasks/doc.rake
|
232
235
|
- tasks/rubocop.rake
|
233
236
|
- tasks/test.rake
|
237
|
+
- test/base/checksummer_spec.rb
|
234
238
|
- test/base/core_ext/array_spec.rb
|
235
239
|
- test/base/core_ext/date_spec.rb
|
236
240
|
- test/base/core_ext/hash_spec.rb
|
237
241
|
- test/base/core_ext/pathname_spec.rb
|
238
242
|
- test/base/core_ext/string_spec.rb
|
243
|
+
- test/base/temp_filename_factory_spec.rb
|
239
244
|
- test/base/test_checksum_store.rb
|
240
245
|
- test/base/test_code_snippet.rb
|
241
246
|
- test/base/test_compiler.rb
|
@@ -326,6 +331,10 @@ files:
|
|
326
331
|
- test/filters/test_uglify_js.rb
|
327
332
|
- test/filters/test_xsl.rb
|
328
333
|
- test/filters/test_yui_compressor.rb
|
334
|
+
- test/fixtures/vcr_cassettes/css_run_error.yml
|
335
|
+
- test/fixtures/vcr_cassettes/css_run_ok.yml
|
336
|
+
- test/fixtures/vcr_cassettes/html_run_error.yml
|
337
|
+
- test/fixtures/vcr_cassettes/html_run_ok.yml
|
329
338
|
- test/gem_loader.rb
|
330
339
|
- test/helper.rb
|
331
340
|
- test/helpers/test_blogging.rb
|