nanoc 4.6.4 → 4.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +12 -4
- data/NEWS.md +7 -0
- data/README.md +1 -1
- data/lib/nanoc/base/feature.rb +1 -1
- data/lib/nanoc/base/services/compiler.rb +18 -11
- data/lib/nanoc/base/services/compiler/phases.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases/abstract.rb +34 -0
- data/lib/nanoc/base/services/compiler/phases/cache.rb +8 -5
- data/lib/nanoc/base/services/compiler/phases/mark_done.rb +8 -5
- data/lib/nanoc/base/services/compiler/phases/recalculate.rb +6 -2
- data/lib/nanoc/base/services/compiler/phases/resume.rb +9 -7
- data/lib/nanoc/base/services/compiler/phases/write.rb +8 -5
- data/lib/nanoc/base/services/compiler/stages/compile_reps.rb +1 -1
- data/lib/nanoc/cli.rb +8 -0
- data/lib/nanoc/cli/commands/compile.rb +81 -27
- data/lib/nanoc/cli/commands/nanoc.rb +2 -1
- data/lib/nanoc/cli/error_handler.rb +1 -0
- data/lib/nanoc/filters.rb +1 -0
- data/lib/nanoc/filters/erubi.rb +27 -0
- data/lib/nanoc/rule_dsl/rule_context.rb +16 -2
- data/lib/nanoc/telemetry/labelled_counter.rb +9 -9
- data/lib/nanoc/telemetry/labelled_summary.rb +15 -11
- data/lib/nanoc/version.rb +1 -1
- data/spec/nanoc/base/compiler_spec.rb +2 -0
- data/spec/nanoc/base/services/compiler/phases/abstract_spec.rb +49 -0
- data/spec/nanoc/base/services/compiler/phases/cache_spec.rb +13 -9
- data/spec/nanoc/cli/commands/compile/timing_recorder_spec.rb +101 -5
- data/spec/nanoc/rule_dsl/rule_context_spec.rb +63 -13
- data/spec/nanoc/telemetry/labelled_counter_spec.rb +10 -10
- data/spec/nanoc/telemetry/labelled_summary_spec.rb +36 -23
- data/spec/nanoc/telemetry/stopwatch_spec.rb +2 -0
- data/spec/nanoc/telemetry_spec.rb +14 -14
- data/spec/spec_helper.rb +3 -0
- data/test/base/test_compiler.rb +0 -38
- data/test/checking/checks/test_html.rb +0 -4
- data/test/filters/test_erubi.rb +73 -0
- data/test/fixtures/vcr_cassettes/html_run_ok.yml +27 -98
- data/test/helper.rb +3 -0
- metadata +6 -2
@@ -3,8 +3,8 @@ describe Nanoc::Telemetry::LabelledCounter do
|
|
3
3
|
|
4
4
|
describe 'new counter' do
|
5
5
|
it 'starts at 0' do
|
6
|
-
expect(subject.value(
|
7
|
-
expect(subject.value(
|
6
|
+
expect(subject.value(:erb)).to eq(0)
|
7
|
+
expect(subject.value(:haml)).to eq(0)
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'has no values' do
|
@@ -13,43 +13,43 @@ describe Nanoc::Telemetry::LabelledCounter do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
describe '#increment' do
|
16
|
-
subject { counter.increment(
|
16
|
+
subject { counter.increment(:erb) }
|
17
17
|
|
18
18
|
it 'increments the matching value' do
|
19
19
|
expect { subject }
|
20
|
-
.to change { counter.value(
|
20
|
+
.to change { counter.value(:erb) }
|
21
21
|
.from(0)
|
22
22
|
.to(1)
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'does not increment any other value' do
|
26
|
-
expect(counter.value(
|
26
|
+
expect(counter.value(:haml)).to eq(0)
|
27
27
|
expect { subject }
|
28
|
-
.not_to change { counter.value(
|
28
|
+
.not_to change { counter.value(:haml) }
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'correctly changes #values' do
|
32
32
|
expect { subject }
|
33
33
|
.to change { counter.values }
|
34
34
|
.from({})
|
35
|
-
.to(
|
35
|
+
.to(erb: 1)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
describe '#get' do
|
40
|
-
subject { counter.get(
|
40
|
+
subject { counter.get(:erb) }
|
41
41
|
|
42
42
|
context 'not incremented' do
|
43
43
|
its(:value) { is_expected.to eq(0) }
|
44
44
|
end
|
45
45
|
|
46
46
|
context 'incremented' do
|
47
|
-
before { counter.increment(
|
47
|
+
before { counter.increment(:erb) }
|
48
48
|
its(:value) { is_expected.to eq(1) }
|
49
49
|
end
|
50
50
|
|
51
51
|
context 'other incremented' do
|
52
|
-
before { counter.increment(
|
52
|
+
before { counter.increment(:haml) }
|
53
53
|
its(:value) { is_expected.to eq(0) }
|
54
54
|
end
|
55
55
|
end
|
@@ -1,63 +1,76 @@
|
|
1
1
|
describe Nanoc::Telemetry::LabelledSummary do
|
2
2
|
subject(:summary) { described_class.new }
|
3
3
|
|
4
|
-
describe '#
|
5
|
-
subject { summary.
|
4
|
+
describe '#empty?' do
|
5
|
+
subject { summary.empty? }
|
6
6
|
|
7
7
|
context 'empty summary' do
|
8
|
-
it { is_expected.to
|
8
|
+
it { is_expected.to be }
|
9
9
|
end
|
10
10
|
|
11
11
|
context 'some observations' do
|
12
12
|
before do
|
13
|
-
summary.observe(7.2,
|
14
|
-
summary.observe(5.3,
|
15
|
-
summary.observe(3.0,
|
13
|
+
summary.observe(7.2, :erb)
|
14
|
+
summary.observe(5.3, :erb)
|
15
|
+
summary.observe(3.0, :haml)
|
16
16
|
end
|
17
17
|
|
18
|
-
it { is_expected.
|
18
|
+
it { is_expected.not_to be }
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
describe '#get' do
|
23
|
-
subject { summary.get(
|
23
|
+
subject { summary.get(:erb) }
|
24
24
|
|
25
25
|
context 'empty summary' do
|
26
26
|
its(:count) { is_expected.to eq(0) }
|
27
27
|
end
|
28
28
|
|
29
29
|
context 'one observation with that label' do
|
30
|
-
before { summary.observe(0.1,
|
30
|
+
before { summary.observe(0.1, :erb) }
|
31
31
|
its(:count) { is_expected.to eq(1) }
|
32
32
|
end
|
33
33
|
|
34
34
|
context 'one observation with a different label' do
|
35
|
-
before { summary.observe(0.1,
|
35
|
+
before { summary.observe(0.1, :haml) }
|
36
36
|
its(:count) { is_expected.to eq(0) }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
describe '#map' do
|
41
|
+
before do
|
42
|
+
subject.observe(2.1, :erb)
|
43
|
+
subject.observe(4.1, :erb)
|
44
|
+
subject.observe(5.3, :haml)
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'yields label and summary' do
|
48
|
+
res = subject.map { |label, summary| [label, summary.avg.round(3)] }
|
49
|
+
expect(res).to eql([[:erb, 3.1], [:haml, 5.3]])
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
40
53
|
describe '#quantile' do
|
41
54
|
before do
|
42
|
-
subject.observe(2.1,
|
43
|
-
subject.observe(4.1,
|
44
|
-
subject.observe(5.3,
|
55
|
+
subject.observe(2.1, :erb)
|
56
|
+
subject.observe(4.1, :erb)
|
57
|
+
subject.observe(5.3, :haml)
|
45
58
|
end
|
46
59
|
|
47
60
|
it 'has proper quantiles for :erb' do
|
48
|
-
expect(subject.quantile(0.00,
|
49
|
-
expect(subject.quantile(0.25,
|
50
|
-
expect(subject.quantile(0.50,
|
51
|
-
expect(subject.quantile(0.90,
|
52
|
-
expect(subject.quantile(0.99,
|
61
|
+
expect(subject.quantile(0.00, :erb)).to be_within(0.000001).of(2.1)
|
62
|
+
expect(subject.quantile(0.25, :erb)).to be_within(0.000001).of(2.6)
|
63
|
+
expect(subject.quantile(0.50, :erb)).to be_within(0.000001).of(3.1)
|
64
|
+
expect(subject.quantile(0.90, :erb)).to be_within(0.000001).of(3.9)
|
65
|
+
expect(subject.quantile(0.99, :erb)).to be_within(0.000001).of(4.08)
|
53
66
|
end
|
54
67
|
|
55
68
|
it 'has proper quantiles for :erb' do
|
56
|
-
expect(subject.quantile(0.00,
|
57
|
-
expect(subject.quantile(0.25,
|
58
|
-
expect(subject.quantile(0.50,
|
59
|
-
expect(subject.quantile(0.90,
|
60
|
-
expect(subject.quantile(0.99,
|
69
|
+
expect(subject.quantile(0.00, :haml)).to be_within(0.000001).of(5.3)
|
70
|
+
expect(subject.quantile(0.25, :haml)).to be_within(0.000001).of(5.3)
|
71
|
+
expect(subject.quantile(0.50, :haml)).to be_within(0.000001).of(5.3)
|
72
|
+
expect(subject.quantile(0.90, :haml)).to be_within(0.000001).of(5.3)
|
73
|
+
expect(subject.quantile(0.99, :haml)).to be_within(0.000001).of(5.3)
|
61
74
|
end
|
62
75
|
end
|
63
76
|
end
|
@@ -3,24 +3,24 @@ describe Nanoc::Telemetry do
|
|
3
3
|
|
4
4
|
example do
|
5
5
|
expect(subject.counter(:filters).values).to eq({})
|
6
|
-
expect(subject.counter(:filters).get(
|
7
|
-
expect(subject.counter(:filters).value(
|
6
|
+
expect(subject.counter(:filters).get(:erb).value).to eq(0)
|
7
|
+
expect(subject.counter(:filters).value(:erb)).to eq(0)
|
8
8
|
|
9
|
-
subject.counter(:filters).increment(
|
10
|
-
expect(subject.counter(:filters).values).to eq(
|
11
|
-
expect(subject.counter(:filters).get(
|
12
|
-
expect(subject.counter(:filters).value(
|
9
|
+
subject.counter(:filters).increment(:erb)
|
10
|
+
expect(subject.counter(:filters).values).to eq(erb: 1)
|
11
|
+
expect(subject.counter(:filters).get(:erb).value).to eq(1)
|
12
|
+
expect(subject.counter(:filters).value(:erb)).to eq(1)
|
13
13
|
end
|
14
14
|
|
15
15
|
example do
|
16
|
-
subject.summary(:filters).observe(0.1,
|
17
|
-
expect(subject.summary(:filters).quantile(0.0,
|
18
|
-
expect(subject.summary(:filters).quantile(0.5,
|
19
|
-
expect(subject.summary(:filters).quantile(1.0,
|
16
|
+
subject.summary(:filters).observe(0.1, :erb)
|
17
|
+
expect(subject.summary(:filters).quantile(0.0, :erb)).to be_within(0.00001).of(0.1)
|
18
|
+
expect(subject.summary(:filters).quantile(0.5, :erb)).to be_within(0.00001).of(0.1)
|
19
|
+
expect(subject.summary(:filters).quantile(1.0, :erb)).to be_within(0.00001).of(0.1)
|
20
20
|
|
21
|
-
subject.summary(:filters).observe(1.1,
|
22
|
-
expect(subject.summary(:filters).quantile(0.0,
|
23
|
-
expect(subject.summary(:filters).quantile(0.5,
|
24
|
-
expect(subject.summary(:filters).quantile(1.0,
|
21
|
+
subject.summary(:filters).observe(1.1, :erb)
|
22
|
+
expect(subject.summary(:filters).quantile(0.0, :erb)).to be_within(0.00001).of(0.1)
|
23
|
+
expect(subject.summary(:filters).quantile(0.5, :erb)).to be_within(0.00001).of(0.6)
|
24
|
+
expect(subject.summary(:filters).quantile(1.0, :erb)).to be_within(0.00001).of(1.1)
|
25
25
|
end
|
26
26
|
end
|
data/spec/spec_helper.rb
CHANGED
data/test/base/test_compiler.rb
CHANGED
@@ -1,44 +1,6 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
class Nanoc::Int::CompilerTest < Nanoc::TestCase
|
4
|
-
def new_compiler(site = nil)
|
5
|
-
site ||= Nanoc::Int::Site.new(
|
6
|
-
config: nil,
|
7
|
-
code_snippets: [],
|
8
|
-
data_source: Nanoc::Int::InMemDataSource.new([], []),
|
9
|
-
)
|
10
|
-
|
11
|
-
reps = Nanoc::Int::ItemRepRepo.new
|
12
|
-
|
13
|
-
action_provider = Nanoc::Int::ActionProvider.named(:rule_dsl).for(site)
|
14
|
-
|
15
|
-
objects = site.items.to_a + site.layouts.to_a
|
16
|
-
|
17
|
-
params = {
|
18
|
-
compiled_content_cache: Nanoc::Int::CompiledContentCache.new(items: site.items),
|
19
|
-
checksum_store: Nanoc::Int::ChecksumStore.new(site: site, objects: objects),
|
20
|
-
rule_memory_store: Nanoc::Int::RuleMemoryStore.new,
|
21
|
-
dependency_store: Nanoc::Int::DependencyStore.new(
|
22
|
-
site.items.to_a + site.layouts.to_a,
|
23
|
-
),
|
24
|
-
action_provider: action_provider,
|
25
|
-
reps: reps,
|
26
|
-
outdatedness_store: Nanoc::Int::OutdatednessStore.new(site: site, reps: reps),
|
27
|
-
}
|
28
|
-
|
29
|
-
params[:outdatedness_checker] =
|
30
|
-
Nanoc::Int::OutdatednessChecker.new(
|
31
|
-
site: site,
|
32
|
-
checksum_store: params[:checksum_store],
|
33
|
-
dependency_store: params[:dependency_store],
|
34
|
-
rule_memory_store: params[:rule_memory_store],
|
35
|
-
action_provider: action_provider,
|
36
|
-
reps: reps,
|
37
|
-
)
|
38
|
-
|
39
|
-
Nanoc::Int::Compiler.new(site, params)
|
40
|
-
end
|
41
|
-
|
42
4
|
def test_compile_rep_should_write_proper_snapshots_real
|
43
5
|
with_site do |site|
|
44
6
|
File.write('content/moo.txt', '<%= 1 %> <%%= 2 %> <%%%= 3 %>')
|
@@ -4,10 +4,6 @@ class Nanoc::Checking::Checks::HTMLTest < Nanoc::TestCase
|
|
4
4
|
def test_run_ok
|
5
5
|
require 'w3c_validators'
|
6
6
|
|
7
|
-
if ::W3CValidators::VERSION =~ /\A1\.3|1\.3\.1\z/
|
8
|
-
skip 'broken (see https://github.com/w3c-validators/w3c_validators/issues/25)'
|
9
|
-
end
|
10
|
-
|
11
7
|
VCR.use_cassette('html_run_ok') do
|
12
8
|
with_site do |site|
|
13
9
|
# Create files
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class Nanoc::Filters::ErubiTest < Nanoc::TestCase
|
4
|
+
def test_filter_with_instance_variable
|
5
|
+
if_have 'erubi' do
|
6
|
+
# Create filter
|
7
|
+
filter = ::Nanoc::Filters::Erubi.new(location: 'a cheap motel')
|
8
|
+
|
9
|
+
# Run filter
|
10
|
+
result = filter.setup_and_run('<%= "I was hiding in #{@location}." %>')
|
11
|
+
assert_equal('I was hiding in a cheap motel.', result)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_filter_with_instance_method
|
16
|
+
if_have 'erubi' do
|
17
|
+
# Create filter
|
18
|
+
filter = ::Nanoc::Filters::Erubi.new(location: 'a cheap motel')
|
19
|
+
|
20
|
+
# Run filter
|
21
|
+
result = filter.setup_and_run('<%= "I was hiding in #{location}." %>')
|
22
|
+
assert_equal('I was hiding in a cheap motel.', result)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_filter_error
|
27
|
+
if_have 'erubi' do
|
28
|
+
# Create filter
|
29
|
+
filter = ::Nanoc::Filters::Erubi.new
|
30
|
+
|
31
|
+
# Run filter
|
32
|
+
raised = false
|
33
|
+
begin
|
34
|
+
filter.setup_and_run('<%= this isn\'t really ruby so it\'ll break, muahaha %>')
|
35
|
+
rescue SyntaxError => e
|
36
|
+
assert_match 'syntax error', e.message
|
37
|
+
raised = true
|
38
|
+
end
|
39
|
+
assert raised
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_filter_with_yield
|
44
|
+
if_have 'erubi' do
|
45
|
+
# Create filter
|
46
|
+
filter = ::Nanoc::Filters::Erubi.new(content: 'a cheap motel')
|
47
|
+
|
48
|
+
# Run filter
|
49
|
+
result = filter.setup_and_run('<%= "I was hiding in #{yield}." %>')
|
50
|
+
assert_equal('I was hiding in a cheap motel.', result)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_filter_with_yield_without_content
|
55
|
+
if_have 'erubi' do
|
56
|
+
# Create filter
|
57
|
+
filter = ::Nanoc::Filters::Erubi.new(location: 'a cheap motel')
|
58
|
+
|
59
|
+
# Run filter
|
60
|
+
assert_raises LocalJumpError do
|
61
|
+
filter.setup_and_run('<%= "I was hiding in #{yield}." %>')
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_filter_with_erbout
|
67
|
+
if_have 'erubi' do
|
68
|
+
filter = ::Nanoc::Filters::Erubi.new
|
69
|
+
result = filter.setup_and_run('stuff<% _erbout << _erbout %>')
|
70
|
+
assert_equal 'stuffstuff', result
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -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<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>Hello</title></head><body><h1>Hi!</h1></body>\r\n--349832898984244898448024464570528145--\r\n"
|
8
|
+
string: <!DOCTYPE html><html><head><meta charset="utf-8"><title>Hello</title></head><body><h1>Hi!</h1></body>
|
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:
|
@@ -20,105 +17,37 @@ http_interactions:
|
|
20
17
|
- Ruby
|
21
18
|
response:
|
22
19
|
status:
|
23
|
-
code:
|
24
|
-
message:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
25
22
|
headers:
|
26
|
-
Date:
|
27
|
-
- Sat, 17 Dec 2016 08:36:04 GMT
|
28
23
|
Server:
|
29
|
-
-
|
30
|
-
|
31
|
-
-
|
24
|
+
- nginx/1.11.10
|
25
|
+
Date:
|
26
|
+
- Fri, 10 Mar 2017 20:24:28 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
32
29
|
Transfer-Encoding:
|
33
30
|
- chunked
|
34
|
-
|
35
|
-
-
|
36
|
-
Public-Key-Pins:
|
37
|
-
- pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
|
38
|
-
pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
|
39
|
-
X-Frame-Options:
|
40
|
-
- deny
|
41
|
-
X-Xss-Protection:
|
42
|
-
- 1; mode=block
|
43
|
-
body:
|
44
|
-
encoding: UTF-8
|
45
|
-
string: "Status: 302 Found\r\nLocation: https://validator.w3.org/nu/?doc=output%2Fblah.html\r\n\r\nContent-Type:
|
46
|
-
application/soap+xml; charset=UTF-8\nX-W3C-Validator-Recursion: 1\nX-W3C-Validator-Status:
|
47
|
-
Valid\nX-W3C-Validator-Errors: 0\nX-W3C-Validator-Warnings: 1\n\n<?xml version=\"1.0\"
|
48
|
-
encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
|
49
|
-
env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
|
50
|
-
\ \n <m:uri>output/blah.html</m:uri>\n <m:checkedby>http://validator.w3.org/</m:checkedby>\n
|
51
|
-
\ <m:doctype>HTML5</m:doctype>\n <m:charset>utf-8</m:charset>\n <m:validity>true</m:validity>\n
|
52
|
-
\ <m:warnings>\n <m:warningcount>1</m:warningcount>\n <m:warninglist>\n
|
53
|
-
\ <m:warning>\n <m:message>This interface to HTML5
|
54
|
-
document checking is obsolete. Use an interface to https://validator.w3.org/nu/
|
55
|
-
instead.</m:message>\n <m:messageid>obsolete-interface</m:messageid>\n
|
56
|
-
\ <m:explanation> <![CDATA[\n <div class=\"ve
|
57
|
-
obsolete-interface\">\n <p>\n The
|
58
|
-
method you used to check this document relies on an obsolete interface\n that
|
59
|
-
will become permanently unavailable in the near future.\n The
|
60
|
-
currently-supported method is to instead use the W3C Nu Html Checker at\n
|
61
|
-
\ <a href=\"https://validator.w3.org/nu/\">https://validator.w3.org/nu/</a>.\n
|
62
|
-
\ See the documentation on the W3C Nu Html Checker's\n
|
63
|
-
\ <a href=\"https://github.com/validator/validator/wiki/Service:-Input:-GET\">GET
|
64
|
-
interface</a>,\n <a href=\"https://github.com/validator/validator/wiki/Service:-Input:-POST-body\">POST
|
65
|
-
interface</a>,\n and\n <a href=\"https://github.com/validator/validator/wiki/Service:-Common-parameters\">the
|
66
|
-
parameters</a>\n that both interfaces provide, such
|
67
|
-
as the\n <a href=\"https://github.com/validator/validator/wiki/Output%3A-JSON\">out=json</a>,\n
|
68
|
-
\ <a href=\"https://github.com/validator/validator/wiki/Output:-XML\">out=xml</a>,\n
|
69
|
-
\ and\n <a href=\"https://github.com/validator/validator/wiki/Output:-GNU\">out=gnu</a>\n
|
70
|
-
\ parameters/output-formats.\n </p>\n
|
71
|
-
\ <p>\n For comments or questions
|
72
|
-
about this message, send mail to\n <a href=\"mailto:www-validator@w3.org\">www-validator@w3.org</a>\n
|
73
|
-
\ or to\n <a href=\"https://twitter.com/w3c\">@w3c</a>
|
74
|
-
on twitter.\n </p>\n </div>\n ]]>\n
|
75
|
-
\ </m:explanation>\n <m:source></m:source>\n
|
76
|
-
\ </m:warning>\n </m:warninglist>\n </m:warnings>\n <m:errors>\n
|
77
|
-
\ <m:errorcount>0</m:errorcount>\n <m:errorlist>\n\n </m:errorlist>\n
|
78
|
-
\ </m:errors>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
|
79
|
-
http_version:
|
80
|
-
recorded_at: Sat, 17 Dec 2016 08:36:05 GMT
|
81
|
-
- request:
|
82
|
-
method: post
|
83
|
-
uri: https://validator.w3.org/check
|
84
|
-
body:
|
85
|
-
encoding: UTF-8
|
86
|
-
string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
|
87
|
-
name=\"url\"\r\n\r\nhttps://validator.w3.org/nu/#file\r\n--349832898984244898448024464570528145--\r\n"
|
88
|
-
headers:
|
89
|
-
Content-Type:
|
90
|
-
- multipart/form-data; boundary=349832898984244898448024464570528145
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
91
33
|
Accept-Encoding:
|
92
|
-
- gzip
|
93
|
-
|
94
|
-
- "
|
95
|
-
|
96
|
-
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
headers:
|
102
|
-
Date:
|
103
|
-
- Sat, 17 Dec 2016 08:36:05 GMT
|
104
|
-
Server:
|
105
|
-
- Apache/2.4.10 (Debian)
|
106
|
-
Location:
|
107
|
-
- http://validator.w3.org/check?uri=https%3A%2F%2Fvalidator.w3.org%2Fnu%2F%23file
|
108
|
-
Content-Length:
|
109
|
-
- '0'
|
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
|
110
43
|
Strict-Transport-Security:
|
111
|
-
- max-age=
|
112
|
-
Public-Key-Pins:
|
113
|
-
- pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
|
114
|
-
pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
|
115
|
-
X-Frame-Options:
|
116
|
-
- deny
|
117
|
-
X-Xss-Protection:
|
118
|
-
- 1; mode=block
|
44
|
+
- max-age=31536000; includeSubDomains; preload
|
119
45
|
body:
|
120
46
|
encoding: UTF-8
|
121
|
-
string: '
|
47
|
+
string: '{"messages":[],"source":{"type":"text/html","encoding":"UTF-8","code":"<!DOCTYPE
|
48
|
+
html><html><head><meta charset=\"utf-8\"><title>Hello</title></head><body><h1>Hi!</h1></body>"}}
|
49
|
+
|
50
|
+
'
|
122
51
|
http_version:
|
123
|
-
recorded_at:
|
52
|
+
recorded_at: Fri, 10 Mar 2017 20:24:28 GMT
|
124
53
|
recorded_with: VCR 3.0.3
|