nanoc 4.6.1 → 4.6.2
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/Appraisals +1 -1
- data/Gemfile.lock +22 -22
- data/NEWS.md +12 -0
- data/lib/nanoc/base/entities/document.rb +7 -0
- data/lib/nanoc/base/entities/identifiable_collection.rb +12 -9
- data/lib/nanoc/base/entities/item_rep.rb +24 -28
- data/lib/nanoc/base/entities/processing_actions/snapshot.rb +15 -11
- data/lib/nanoc/base/entities/rule_memory.rb +15 -5
- data/lib/nanoc/base/entities/site.rb +15 -10
- data/lib/nanoc/base/entities/snapshot_def.rb +8 -2
- data/lib/nanoc/base/repos.rb +3 -0
- data/lib/nanoc/base/repos/aggregate_data_source.rb +20 -0
- data/lib/nanoc/base/repos/in_mem_data_source.rb +13 -0
- data/lib/nanoc/base/repos/prefixed_data_source.rb +19 -0
- data/lib/nanoc/base/repos/site_loader.rb +8 -16
- data/lib/nanoc/base/repos/snapshot_repo.rb +10 -5
- data/lib/nanoc/base/services/action_provider.rb +12 -0
- data/lib/nanoc/base/services/compiler/phases/recalculate.rb +5 -2
- data/lib/nanoc/base/services/compiler/phases/write.rb +1 -3
- data/lib/nanoc/base/services/compiler/stages/preprocess.rb +6 -3
- data/lib/nanoc/base/services/executor.rb +2 -4
- data/lib/nanoc/base/services/filter.rb +7 -12
- data/lib/nanoc/base/services/item_rep_router.rb +40 -16
- data/lib/nanoc/base/services/item_rep_writer.rb +19 -3
- data/lib/nanoc/base/services/pruner.rb +1 -1
- data/lib/nanoc/base/views/item_rep_view.rb +12 -3
- data/lib/nanoc/base/views/mutable_identifiable_collection_view.rb +1 -1
- data/lib/nanoc/base/views/mutable_item_collection_view.rb +1 -1
- data/lib/nanoc/base/views/mutable_layout_collection_view.rb +1 -1
- data/lib/nanoc/checking/checks/html.rb +1 -1
- data/lib/nanoc/checking/checks/stale.rb +2 -1
- data/lib/nanoc/checking/checks/w3c_validator.rb +1 -0
- data/lib/nanoc/cli/commands/compile.rb +3 -2
- data/lib/nanoc/cli/commands/show-data.rb +4 -2
- data/lib/nanoc/data_sources/filesystem.rb +1 -1
- data/lib/nanoc/helpers/filtering.rb +1 -2
- data/lib/nanoc/helpers/rendering.rb +1 -2
- data/lib/nanoc/helpers/xml_sitemap.rb +2 -2
- data/lib/nanoc/rule_dsl/action_provider.rb +7 -0
- data/lib/nanoc/rule_dsl/rule_context.rb +4 -1
- data/lib/nanoc/rule_dsl/rule_memory_calculator.rb +33 -13
- data/lib/nanoc/spec.rb +5 -6
- data/lib/nanoc/version.rb +1 -1
- data/spec/nanoc/base/checksummer_spec.rb +19 -9
- data/spec/nanoc/base/compiler_spec.rb +4 -8
- data/spec/nanoc/base/entities/document_spec.rb +20 -0
- data/spec/nanoc/base/entities/identifiable_collection_spec.rb +12 -0
- data/spec/nanoc/base/entities/item_rep_spec.rb +1 -1
- data/spec/nanoc/base/entities/processing_actions/snapshot_spec.rb +19 -13
- data/spec/nanoc/base/entities/rule_memory_spec.rb +39 -3
- data/spec/nanoc/base/entities/site_spec.rb +15 -10
- data/spec/nanoc/base/filter_spec.rb +28 -1
- data/spec/nanoc/base/item_rep_writer_spec.rb +4 -2
- data/spec/nanoc/base/repos/outdatedness_store_spec.rb +1 -2
- data/spec/nanoc/base/repos/snapshot_repo_spec.rb +4 -4
- data/spec/nanoc/base/repos/store_spec.rb +5 -1
- data/spec/nanoc/base/services/compiler/stages/compile_reps_spec.rb +9 -10
- data/spec/nanoc/base/services/executor_spec.rb +2 -2
- data/spec/nanoc/base/services/item_rep_router_spec.rb +83 -39
- data/spec/nanoc/base/services/outdatedness_checker_spec.rb +1 -2
- data/spec/nanoc/base/services/outdatedness_rules_spec.rb +2 -3
- data/spec/nanoc/base/services/pruner_spec.rb +2 -2
- data/spec/nanoc/base/views/identifiable_collection_view_spec.rb +46 -28
- data/spec/nanoc/base/views/item_rep_view_spec.rb +72 -15
- data/spec/nanoc/base/views/item_view_spec.rb +20 -14
- data/spec/nanoc/base/views/mutable_identifiable_collection_view_spec.rb +10 -4
- data/spec/nanoc/base/views/mutable_item_collection_view_spec.rb +10 -5
- data/spec/nanoc/base/views/mutable_layout_collection_view_spec.rb +10 -5
- data/spec/nanoc/cli/commands/compile/file_action_printer_spec.rb +1 -1
- data/spec/nanoc/cli/commands/compile/timing_recorder_spec.rb +1 -1
- data/spec/nanoc/cli/commands/show_data_spec.rb +9 -7
- data/spec/nanoc/cli/commands/show_rules_spec.rb +16 -10
- data/spec/nanoc/regressions/gh_1037a_spec.rb +29 -0
- data/spec/nanoc/regressions/gh_1037b_spec.rb +18 -0
- data/spec/nanoc/regressions/gh_1082a_spec.rb +18 -0
- data/spec/nanoc/regressions/gh_1082b_spec.rb +20 -0
- data/spec/nanoc/regressions/gh_1082c_spec.rb +19 -0
- data/spec/nanoc/regressions/gh_1082d_spec.rb +17 -0
- data/spec/nanoc/regressions/gh_1093_spec.rb +49 -0
- data/spec/nanoc/regressions/gh_1097_spec.rb +21 -0
- data/spec/nanoc/regressions/gh_1100_spec.rb +20 -0
- data/spec/nanoc/regressions/gh_1102_spec.rb +26 -0
- data/spec/nanoc/regressions/gh_776_spec.rb +1 -5
- data/spec/nanoc/rule_dsl/recording_executor_spec.rb +14 -14
- data/spec/nanoc/rule_dsl/rule_context_spec.rb +22 -13
- data/spec/nanoc/rule_dsl/rule_memory_calculator_spec.rb +38 -54
- data/spec/spec_helper.rb +1 -1
- data/test/base/test_compiler.rb +3 -4
- data/test/base/test_item_array.rb +4 -15
- data/test/checking/checks/test_html.rb +4 -3
- data/test/cli/commands/test_compile.rb +2 -2
- data/test/filters/test_relativize_paths.rb +28 -28
- data/test/fixtures/vcr_cassettes/html_run_error.yml +25 -76
- data/test/helpers/test_xml_sitemap.rb +22 -19
- metadata +16 -2
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
http_interactions:
|
|
3
3
|
- request:
|
|
4
4
|
method: post
|
|
5
|
-
uri: https://validator.
|
|
5
|
+
uri: https://validator.nu/?out=json&parser=html&showsource=yes
|
|
6
6
|
body:
|
|
7
7
|
encoding: UTF-8
|
|
8
|
-
string: "
|
|
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"
|
|
8
|
+
string: "<h2>Hi!</h1>"
|
|
12
9
|
headers:
|
|
13
10
|
Content-Type:
|
|
14
|
-
-
|
|
11
|
+
- text/html; charset=utf-8
|
|
15
12
|
Accept-Encoding:
|
|
16
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
17
14
|
Accept:
|
|
@@ -23,80 +20,32 @@ http_interactions:
|
|
|
23
20
|
code: 200
|
|
24
21
|
message: OK
|
|
25
22
|
headers:
|
|
26
|
-
Date:
|
|
27
|
-
- Sat, 17 Dec 2016 08:33:18 GMT
|
|
28
23
|
Server:
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
X-W3c-Validator-Errors:
|
|
35
|
-
- '2'
|
|
36
|
-
X-W3c-Validator-Warnings:
|
|
37
|
-
- '4'
|
|
24
|
+
- nginx/1.11.10
|
|
25
|
+
Date:
|
|
26
|
+
- Sat, 04 Mar 2017 21:33:40 GMT
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
38
29
|
Transfer-Encoding:
|
|
39
30
|
- chunked
|
|
40
|
-
|
|
41
|
-
-
|
|
31
|
+
Connection:
|
|
32
|
+
- keep-alive
|
|
33
|
+
Accept-Encoding:
|
|
34
|
+
- gzip
|
|
35
|
+
Access-Control-Allow-Origin:
|
|
36
|
+
- "*"
|
|
37
|
+
Access-Control-Allow-Headers:
|
|
38
|
+
- content-type
|
|
39
|
+
Expires:
|
|
40
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
|
41
|
+
Cache-Control:
|
|
42
|
+
- no-cache
|
|
42
43
|
Strict-Transport-Security:
|
|
43
|
-
- max-age=
|
|
44
|
-
Public-Key-Pins:
|
|
45
|
-
- pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
|
|
46
|
-
pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
|
|
47
|
-
X-Frame-Options:
|
|
48
|
-
- deny
|
|
49
|
-
X-Xss-Protection:
|
|
50
|
-
- 1; mode=block
|
|
44
|
+
- max-age=31536000; includeSubDomains; preload
|
|
51
45
|
body:
|
|
52
|
-
encoding:
|
|
53
|
-
string:
|
|
54
|
-
|
|
55
|
-
\ \n <m:uri>output/blah.html</m:uri>\n <m:checkedby>http://validator.w3.org/</m:checkedby>\n
|
|
56
|
-
\ <m:doctype></m:doctype>\n <m:charset>utf-8</m:charset>\n <m:validity>false</m:validity>\n
|
|
57
|
-
\ <m:warnings>\n <m:warningcount>4</m:warningcount>\n <m:warninglist>\n
|
|
58
|
-
\ \n\n\n\n\n <m:warning><m:messageid>W04</m:messageid><m:message>No
|
|
59
|
-
Character Encoding Found!\n \n Falling back to \n \n UTF-8.\n
|
|
60
|
-
\ </m:message></m:warning>\n\n\n\n <m:warning><m:messageid>W06</m:messageid><m:message>Unable
|
|
61
|
-
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
|
|
62
|
-
\ <m:warning><m:messageid>W27</m:messageid><m:message>No Character encoding
|
|
63
|
-
declared at document level</m:message></m:warning>\n\n\n\n\n\n\n\n </m:warninglist>\n
|
|
64
|
-
\ </m:warnings>\n <m:errors>\n <m:errorcount>2</m:errorcount>\n
|
|
65
|
-
\ <m:errorlist>\n\n <m:error>\n <m:line>1</m:line>\n
|
|
66
|
-
\ <m:col>1</m:col>\n <m:message>no document type
|
|
67
|
-
declaration; will parse without validation</m:message>\n <m:messageid>187</m:messageid>\n
|
|
68
|
-
\ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
|
|
69
|
-
\ <a\n href=\"feedback.html?uri=;errmsg_id=187#errormsg\"\n\ttitle=\"Suggest
|
|
70
|
-
improvements on this error message through our feedback channels\" \n >✉</a>\n
|
|
71
|
-
\ </p>\n\n <div class=\"ve mid-187\">\n <p>The document type could
|
|
72
|
-
not be determined, because the document had no correct DOCTYPE declaration.
|
|
73
|
-
The document does not look like HTML, therefore automatic fallback could not
|
|
74
|
-
be performed, and the document was only checked against basic markup syntax.</p>\n
|
|
75
|
-
\ <p>Learn <a href=\"docs/help.html#faq-doctype\">how to add a doctype to
|
|
76
|
-
your document</a> \n from our <acronym title=\"Frequently Asked Questions\">FAQ</acronym>,
|
|
77
|
-
or use the validator's\n <code>Document Type</code> option to validate
|
|
78
|
-
your document against a specific Document Type.</p>\n </div>\n\n ]]>\n
|
|
79
|
-
\ </m:explanation>\n <m:source><![CDATA[<strong
|
|
80
|
-
title=\"Position where error was detected.\"><</strong>h2>Hi!</h1>]]></m:source>\n
|
|
81
|
-
\ </m:error>\n \n <m:error>\n <m:line>1</m:line>\n
|
|
82
|
-
\ <m:col>12</m:col>\n <m:message>end tag for
|
|
83
|
-
element "H1" which is not open</m:message>\n <m:messageid>79</m:messageid>\n
|
|
84
|
-
\ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
|
|
85
|
-
\ <a\n href=\"feedback.html?uri=;errmsg_id=79#errormsg\"\n\ttitle=\"Suggest
|
|
86
|
-
improvements on this error message through our feedback channels\" \n >✉</a>\n
|
|
87
|
-
\ </p>\n\n <div class=\"ve mid-79\">\n <p>\n The Validator found
|
|
88
|
-
an end tag for the above element, but that element is\n not currently
|
|
89
|
-
open. This is often caused by a leftover end tag from an\n element that
|
|
90
|
-
was removed during editing, or by an implicitly closed\n element (if
|
|
91
|
-
you have an error related to an element being used where it\n is not
|
|
92
|
-
allowed, this is almost certainly the case). In the latter case\n this
|
|
93
|
-
error will disappear as soon as you fix the original problem.\n </p>\n
|
|
94
|
-
\ <p>\n If this error occurred in a script section of your document,
|
|
95
|
-
you should probably\n read this <a href=\"docs/help.html#faq-javascript\">FAQ
|
|
96
|
-
entry</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
|
|
97
|
-
\ <m:source><![CDATA[<h2>Hi!</h1<strong title=\"Position
|
|
98
|
-
where error was detected.\">></strong>]]></m:source>\n </m:error>\n
|
|
99
|
-
\ \n </m:errorlist>\n </m:errors>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
|
|
46
|
+
encoding: ASCII-8BIT
|
|
47
|
+
string: !binary |-
|
|
48
|
+
eyJtZXNzYWdlcyI6W3sidHlwZSI6ImVycm9yIiwibGFzdExpbmUiOjEsImxhc3RDb2x1bW4iOjQsImZpcnN0Q29sdW1uIjoxLCJtZXNzYWdlIjoiU3RhcnQgdGFnIHNlZW4gd2l0aG91dCBzZWVpbmcgYSBkb2N0eXBlIGZpcnN0LiBFeHBlY3RlZCBlLmcuIOKAnDwhRE9DVFlQRSBodG1sPuKAnS4iLCJleHRyYWN0IjoiPGgyPkhpITwvaCIsImhpbGl0ZVN0YXJ0IjowLCJoaWxpdGVMZW5ndGgiOjR9LHsidHlwZSI6ImVycm9yIiwibGFzdExpbmUiOjEsImxhc3RDb2x1bW4iOjQsImZpcnN0Q29sdW1uIjoxLCJtZXNzYWdlIjoiRWxlbWVudCDigJxoZWFk4oCdIGlzIG1pc3NpbmcgYSByZXF1aXJlZCBpbnN0YW5jZSBvZiBjaGlsZCBlbGVtZW50IOKAnHRpdGxl4oCdLiIsImV4dHJhY3QiOiI8aDI+SGkhPC9oIiwiaGlsaXRlU3RhcnQiOjAsImhpbGl0ZUxlbmd0aCI6NH0seyJ0eXBlIjoiZXJyb3IiLCJsYXN0TGluZSI6MSwibGFzdENvbHVtbiI6MTIsImZpcnN0Q29sdW1uIjo4LCJtZXNzYWdlIjoiRW5kIHRhZyDigJxoMeKAnSBzZWVuLCBidXQgdGhlcmUgd2VyZSBvcGVuIGVsZW1lbnRzLiIsImV4dHJhY3QiOiI8aDI+SGkhPC9oMT4iLCJoaWxpdGVTdGFydCI6NywiaGlsaXRlTGVuZ3RoIjo1fV0sInNvdXJjZSI6eyJ0eXBlIjoidGV4dC9odG1sIiwiZW5jb2RpbmciOiJVVEYtOCIsImNvZGUiOiI8aDI+SGkhPC9oMT4ifX0K
|
|
100
49
|
http_version:
|
|
101
|
-
recorded_at: Sat,
|
|
50
|
+
recorded_at: Sat, 04 Mar 2017 21:33:40 GMT
|
|
102
51
|
recorded_with: VCR 3.0.3
|
|
@@ -19,30 +19,33 @@ class Nanoc::Helpers::XMLSitemapTest < Nanoc::TestCase
|
|
|
19
19
|
def test_xml_sitemap
|
|
20
20
|
if_have 'builder', 'nokogiri' do
|
|
21
21
|
# Create items
|
|
22
|
-
|
|
22
|
+
items = []
|
|
23
23
|
|
|
24
24
|
# Create item 1
|
|
25
25
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 1', {}, '/item-one/'), @view_context)
|
|
26
|
-
|
|
26
|
+
items << item
|
|
27
27
|
create_item_rep(item.unwrap, :one_a, '/item-one/a/')
|
|
28
28
|
create_item_rep(item.unwrap, :one_b, '/item-one/b/')
|
|
29
29
|
|
|
30
30
|
# Create item 2
|
|
31
31
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 2', { is_hidden: true }, '/item-two/'), @view_context)
|
|
32
|
-
|
|
32
|
+
items << item
|
|
33
33
|
|
|
34
34
|
# Create item 3
|
|
35
35
|
attrs = { mtime: Time.parse('2004-07-12 00:00:00 +02:00'), changefreq: 'daily', priority: 0.5 }
|
|
36
36
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 3', attrs, '/item-three/'), @view_context)
|
|
37
|
-
|
|
37
|
+
items << item
|
|
38
38
|
create_item_rep(item.unwrap, :three_a, '/item-three/a/')
|
|
39
39
|
create_item_rep(item.unwrap, :three_b, '/item-three/b/')
|
|
40
40
|
|
|
41
41
|
# Create item 4
|
|
42
42
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 4', {}, '/item-four/'), @view_context)
|
|
43
|
-
|
|
43
|
+
items << item
|
|
44
44
|
create_item_rep(item.unwrap, :four_a, nil)
|
|
45
45
|
|
|
46
|
+
# Create items
|
|
47
|
+
@items = Nanoc::Int::IdentifiableCollection.new({}, items)
|
|
48
|
+
|
|
46
49
|
# Create sitemap item
|
|
47
50
|
@item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('sitemap content', {}, '/sitemap/'), @view_context)
|
|
48
51
|
|
|
@@ -80,13 +83,14 @@ class Nanoc::Helpers::XMLSitemapTest < Nanoc::TestCase
|
|
|
80
83
|
def test_sitemap_with_items_as_param
|
|
81
84
|
if_have 'builder', 'nokogiri' do
|
|
82
85
|
# Create items
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
items = []
|
|
87
|
+
items << nil
|
|
85
88
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 1', {}, '/item-one/'), @view_context)
|
|
86
|
-
|
|
89
|
+
items << item
|
|
87
90
|
create_item_rep(item.unwrap, :one_a, '/item-one/a/')
|
|
88
91
|
create_item_rep(item.unwrap, :one_b, '/item-one/b/')
|
|
89
|
-
|
|
92
|
+
items << nil
|
|
93
|
+
@items = Nanoc::Int::IdentifiableCollection.new({})
|
|
90
94
|
|
|
91
95
|
# Create sitemap item
|
|
92
96
|
@item = Nanoc::Int::Item.new('sitemap content', {}, '/sitemap/')
|
|
@@ -117,9 +121,8 @@ class Nanoc::Helpers::XMLSitemapTest < Nanoc::TestCase
|
|
|
117
121
|
def test_filter
|
|
118
122
|
if_have 'builder', 'nokogiri' do
|
|
119
123
|
# Create items
|
|
120
|
-
@items = Nanoc::Int::IdentifiableCollection.new({})
|
|
121
124
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 1', {}, '/item-one/'), @view_context)
|
|
122
|
-
@items
|
|
125
|
+
@items = Nanoc::Int::IdentifiableCollection.new({}, [item])
|
|
123
126
|
create_item_rep(item.unwrap, :one_a, '/item-one/a/')
|
|
124
127
|
create_item_rep(item.unwrap, :one_b, '/item-one/b/')
|
|
125
128
|
|
|
@@ -148,19 +151,20 @@ class Nanoc::Helpers::XMLSitemapTest < Nanoc::TestCase
|
|
|
148
151
|
def test_sorted
|
|
149
152
|
if_have 'builder', 'nokogiri' do
|
|
150
153
|
# Create items
|
|
151
|
-
|
|
154
|
+
items = []
|
|
152
155
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 1', {}, '/george/'), @view_context)
|
|
153
|
-
|
|
156
|
+
items << item
|
|
154
157
|
create_item_rep(item.unwrap, :a_alice, '/george/alice/')
|
|
155
158
|
create_item_rep(item.unwrap, :b_zoey, '/george/zoey/')
|
|
156
159
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 1', {}, '/walton/'), @view_context)
|
|
157
|
-
|
|
160
|
+
items << item
|
|
158
161
|
create_item_rep(item.unwrap, :a_eve, '/walton/eve/')
|
|
159
162
|
create_item_rep(item.unwrap, :b_bob, '/walton/bob/')
|
|
160
163
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 1', {}, '/lucas/'), @view_context)
|
|
161
|
-
|
|
164
|
+
items << item
|
|
162
165
|
create_item_rep(item.unwrap, :a_trudy, '/lucas/trudy/')
|
|
163
166
|
create_item_rep(item.unwrap, :b_mallory, '/lucas/mallory/')
|
|
167
|
+
@items = Nanoc::Int::IdentifiableCollection.new({}, items)
|
|
164
168
|
|
|
165
169
|
# Create sitemap item
|
|
166
170
|
@item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('sitemap content', {}, '/sitemap/'), @view_context)
|
|
@@ -189,9 +193,8 @@ class Nanoc::Helpers::XMLSitemapTest < Nanoc::TestCase
|
|
|
189
193
|
def test_url_escape
|
|
190
194
|
if_have 'builder', 'nokogiri' do
|
|
191
195
|
# Create items
|
|
192
|
-
@items = Nanoc::Int::IdentifiableCollection.new({})
|
|
193
196
|
item = Nanoc::ItemWithRepsView.new(Nanoc::Int::Item.new('some content 1', {}, '/george/'), @view_context)
|
|
194
|
-
@items
|
|
197
|
+
@items = Nanoc::Int::IdentifiableCollection.new({}, [item])
|
|
195
198
|
create_item_rep(item.unwrap, :default, '/cool projects/проверка')
|
|
196
199
|
|
|
197
200
|
# Create sitemap item
|
|
@@ -217,8 +220,8 @@ class Nanoc::Helpers::XMLSitemapTest < Nanoc::TestCase
|
|
|
217
220
|
|
|
218
221
|
def create_item_rep(item, name, path)
|
|
219
222
|
rep = Nanoc::Int::ItemRep.new(item, name)
|
|
220
|
-
rep.paths = { last: path }
|
|
221
|
-
rep.raw_paths = { last: path }
|
|
223
|
+
rep.paths = { last: (path ? [path] : []) }
|
|
224
|
+
rep.raw_paths = { last: (path ? [path] : []) }
|
|
222
225
|
@reps << rep
|
|
223
226
|
rep
|
|
224
227
|
end
|
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: 4.6.
|
|
4
|
+
version: 4.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Defreyne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-03-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cri
|
|
@@ -161,13 +161,16 @@ files:
|
|
|
161
161
|
- lib/nanoc/base/feature.rb
|
|
162
162
|
- lib/nanoc/base/memoization.rb
|
|
163
163
|
- lib/nanoc/base/repos.rb
|
|
164
|
+
- lib/nanoc/base/repos/aggregate_data_source.rb
|
|
164
165
|
- lib/nanoc/base/repos/checksum_store.rb
|
|
165
166
|
- lib/nanoc/base/repos/compiled_content_cache.rb
|
|
166
167
|
- lib/nanoc/base/repos/config_loader.rb
|
|
167
168
|
- lib/nanoc/base/repos/data_source.rb
|
|
168
169
|
- lib/nanoc/base/repos/dependency_store.rb
|
|
170
|
+
- lib/nanoc/base/repos/in_mem_data_source.rb
|
|
169
171
|
- lib/nanoc/base/repos/item_rep_repo.rb
|
|
170
172
|
- lib/nanoc/base/repos/outdatedness_store.rb
|
|
173
|
+
- lib/nanoc/base/repos/prefixed_data_source.rb
|
|
171
174
|
- lib/nanoc/base/repos/rule_memory_store.rb
|
|
172
175
|
- lib/nanoc/base/repos/site_loader.rb
|
|
173
176
|
- lib/nanoc/base/repos/snapshot_repo.rb
|
|
@@ -339,6 +342,7 @@ files:
|
|
|
339
342
|
- spec/nanoc/base/entities/configuration_spec.rb
|
|
340
343
|
- spec/nanoc/base/entities/content_spec.rb
|
|
341
344
|
- spec/nanoc/base/entities/document_spec.rb
|
|
345
|
+
- spec/nanoc/base/entities/identifiable_collection_spec.rb
|
|
342
346
|
- spec/nanoc/base/entities/identifier_spec.rb
|
|
343
347
|
- spec/nanoc/base/entities/item_rep_spec.rb
|
|
344
348
|
- spec/nanoc/base/entities/item_spec.rb
|
|
@@ -426,11 +430,21 @@ files:
|
|
|
426
430
|
- spec/nanoc/regressions/gh_1022_spec.rb
|
|
427
431
|
- spec/nanoc/regressions/gh_1031_spec.rb
|
|
428
432
|
- spec/nanoc/regressions/gh_1035_spec.rb
|
|
433
|
+
- spec/nanoc/regressions/gh_1037a_spec.rb
|
|
434
|
+
- spec/nanoc/regressions/gh_1037b_spec.rb
|
|
429
435
|
- spec/nanoc/regressions/gh_1040_spec.rb
|
|
430
436
|
- spec/nanoc/regressions/gh_1045_spec.rb
|
|
431
437
|
- spec/nanoc/regressions/gh_1047_spec.rb
|
|
432
438
|
- spec/nanoc/regressions/gh_1064_spec.rb
|
|
433
439
|
- spec/nanoc/regressions/gh_1067_spec.rb
|
|
440
|
+
- spec/nanoc/regressions/gh_1082a_spec.rb
|
|
441
|
+
- spec/nanoc/regressions/gh_1082b_spec.rb
|
|
442
|
+
- spec/nanoc/regressions/gh_1082c_spec.rb
|
|
443
|
+
- spec/nanoc/regressions/gh_1082d_spec.rb
|
|
444
|
+
- spec/nanoc/regressions/gh_1093_spec.rb
|
|
445
|
+
- spec/nanoc/regressions/gh_1097_spec.rb
|
|
446
|
+
- spec/nanoc/regressions/gh_1100_spec.rb
|
|
447
|
+
- spec/nanoc/regressions/gh_1102_spec.rb
|
|
434
448
|
- spec/nanoc/regressions/gh_761_spec.rb
|
|
435
449
|
- spec/nanoc/regressions/gh_767_spec.rb
|
|
436
450
|
- spec/nanoc/regressions/gh_769_spec.rb
|