nanoc 4.6.4 → 4.7.0

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +12 -4
  4. data/NEWS.md +7 -0
  5. data/README.md +1 -1
  6. data/lib/nanoc/base/feature.rb +1 -1
  7. data/lib/nanoc/base/services/compiler.rb +18 -11
  8. data/lib/nanoc/base/services/compiler/phases.rb +2 -0
  9. data/lib/nanoc/base/services/compiler/phases/abstract.rb +34 -0
  10. data/lib/nanoc/base/services/compiler/phases/cache.rb +8 -5
  11. data/lib/nanoc/base/services/compiler/phases/mark_done.rb +8 -5
  12. data/lib/nanoc/base/services/compiler/phases/recalculate.rb +6 -2
  13. data/lib/nanoc/base/services/compiler/phases/resume.rb +9 -7
  14. data/lib/nanoc/base/services/compiler/phases/write.rb +8 -5
  15. data/lib/nanoc/base/services/compiler/stages/compile_reps.rb +1 -1
  16. data/lib/nanoc/cli.rb +8 -0
  17. data/lib/nanoc/cli/commands/compile.rb +81 -27
  18. data/lib/nanoc/cli/commands/nanoc.rb +2 -1
  19. data/lib/nanoc/cli/error_handler.rb +1 -0
  20. data/lib/nanoc/filters.rb +1 -0
  21. data/lib/nanoc/filters/erubi.rb +27 -0
  22. data/lib/nanoc/rule_dsl/rule_context.rb +16 -2
  23. data/lib/nanoc/telemetry/labelled_counter.rb +9 -9
  24. data/lib/nanoc/telemetry/labelled_summary.rb +15 -11
  25. data/lib/nanoc/version.rb +1 -1
  26. data/spec/nanoc/base/compiler_spec.rb +2 -0
  27. data/spec/nanoc/base/services/compiler/phases/abstract_spec.rb +49 -0
  28. data/spec/nanoc/base/services/compiler/phases/cache_spec.rb +13 -9
  29. data/spec/nanoc/cli/commands/compile/timing_recorder_spec.rb +101 -5
  30. data/spec/nanoc/rule_dsl/rule_context_spec.rb +63 -13
  31. data/spec/nanoc/telemetry/labelled_counter_spec.rb +10 -10
  32. data/spec/nanoc/telemetry/labelled_summary_spec.rb +36 -23
  33. data/spec/nanoc/telemetry/stopwatch_spec.rb +2 -0
  34. data/spec/nanoc/telemetry_spec.rb +14 -14
  35. data/spec/spec_helper.rb +3 -0
  36. data/test/base/test_compiler.rb +0 -38
  37. data/test/checking/checks/test_html.rb +0 -4
  38. data/test/filters/test_erubi.rb +73 -0
  39. data/test/fixtures/vcr_cassettes/html_run_ok.yml +27 -98
  40. data/test/helper.rb +3 -0
  41. 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(filter: :erb)).to eq(0)
7
- expect(subject.value(filter: :haml)).to eq(0)
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(filter: :erb) }
16
+ subject { counter.increment(:erb) }
17
17
 
18
18
  it 'increments the matching value' do
19
19
  expect { subject }
20
- .to change { counter.value(filter: :erb) }
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(filter: :haml)).to eq(0)
26
+ expect(counter.value(:haml)).to eq(0)
27
27
  expect { subject }
28
- .not_to change { counter.value(filter: :haml) }
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({ filter: :erb } => 1)
35
+ .to(erb: 1)
36
36
  end
37
37
  end
38
38
 
39
39
  describe '#get' do
40
- subject { counter.get(filter: :erb) }
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(filter: :erb) }
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(filter: :haml) }
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 '#labels' do
5
- subject { summary.labels }
4
+ describe '#empty?' do
5
+ subject { summary.empty? }
6
6
 
7
7
  context 'empty summary' do
8
- it { is_expected.to eq([]) }
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, filter: :erb)
14
- summary.observe(5.3, filter: :erb)
15
- summary.observe(3.0, filter: :haml)
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.to eq([{ filter: :erb }, { filter: :haml }]) }
18
+ it { is_expected.not_to be }
19
19
  end
20
20
  end
21
21
 
22
22
  describe '#get' do
23
- subject { summary.get(filter: :erb) }
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, filter: :erb) }
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, filter: :haml) }
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, filter: :erb)
43
- subject.observe(4.1, filter: :erb)
44
- subject.observe(5.3, filter: :haml)
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, filter: :erb)).to be_within(0.000001).of(2.1)
49
- expect(subject.quantile(0.25, filter: :erb)).to be_within(0.000001).of(2.6)
50
- expect(subject.quantile(0.50, filter: :erb)).to be_within(0.000001).of(3.1)
51
- expect(subject.quantile(0.90, filter: :erb)).to be_within(0.000001).of(3.9)
52
- expect(subject.quantile(0.99, filter: :erb)).to be_within(0.000001).of(4.08)
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, filter: :haml)).to be_within(0.000001).of(5.3)
57
- expect(subject.quantile(0.25, filter: :haml)).to be_within(0.000001).of(5.3)
58
- expect(subject.quantile(0.50, filter: :haml)).to be_within(0.000001).of(5.3)
59
- expect(subject.quantile(0.90, filter: :haml)).to be_within(0.000001).of(5.3)
60
- expect(subject.quantile(0.99, filter: :haml)).to be_within(0.000001).of(5.3)
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
@@ -1,6 +1,8 @@
1
1
  describe Nanoc::Telemetry::Stopwatch do
2
2
  subject(:stopwatch) { described_class.new }
3
3
 
4
+ after { Timecop.return }
5
+
4
6
  it 'is zero by default' do
5
7
  expect(stopwatch.duration).to eq(0.0)
6
8
  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(identifier: :erb).value).to eq(0)
7
- expect(subject.counter(:filters).value(identifier: :erb)).to eq(0)
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(identifier: :erb)
10
- expect(subject.counter(:filters).values).to eq({ identifier: :erb } => 1)
11
- expect(subject.counter(:filters).get(identifier: :erb).value).to eq(1)
12
- expect(subject.counter(:filters).value(identifier: :erb)).to eq(1)
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, identifier: :erb)
17
- expect(subject.summary(:filters).quantile(0.0, identifier: :erb)).to be_within(0.00001).of(0.1)
18
- expect(subject.summary(:filters).quantile(0.5, identifier: :erb)).to be_within(0.00001).of(0.1)
19
- expect(subject.summary(:filters).quantile(1.0, identifier: :erb)).to be_within(0.00001).of(0.1)
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, identifier: :erb)
22
- expect(subject.summary(:filters).quantile(0.0, identifier: :erb)).to be_within(0.00001).of(0.1)
23
- expect(subject.summary(:filters).quantile(0.5, identifier: :erb)).to be_within(0.00001).of(0.6)
24
- expect(subject.summary(:filters).quantile(1.0, identifier: :erb)).to be_within(0.00001).of(1.1)
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
@@ -1,6 +1,9 @@
1
1
  require 'simplecov'
2
2
  SimpleCov.start
3
3
 
4
+ require 'codecov'
5
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
6
+
4
7
  require 'nanoc'
5
8
  require 'nanoc/cli'
6
9
  require 'nanoc/spec'
@@ -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.w3.org/check
5
+ uri: https://validator.nu/?out=json&parser=html&showsource=yes
6
6
  body:
7
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"
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
- - multipart/form-data; boundary=349832898984244898448024464570528145
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: 307
24
- message: Temporary Redirect
20
+ code: 200
21
+ message: OK
25
22
  headers:
26
- Date:
27
- - Sat, 17 Dec 2016 08:36:04 GMT
28
23
  Server:
29
- - Apache/2.4.10 (Debian)
30
- Location:
31
- - https://validator.w3.org/nu/#file
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
- Strict-Transport-Security:
35
- - max-age=15552015; preload
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;q=1.0,deflate;q=0.6,identity;q=0.3
93
- Accept:
94
- - "*/*"
95
- User-Agent:
96
- - Ruby
97
- response:
98
- status:
99
- code: 302
100
- message: Found
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=15552015; preload
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: Sat, 17 Dec 2016 08:36:06 GMT
52
+ recorded_at: Fri, 10 Mar 2017 20:24:28 GMT
124
53
  recorded_with: VCR 3.0.3