nanoc 4.7.5 → 4.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -3
  3. data/Gemfile.lock +18 -13
  4. data/NEWS.md +7 -1
  5. data/Rakefile +2 -2
  6. data/lib/nanoc/base/entities/action_sequence.rb +3 -12
  7. data/lib/nanoc/base/entities/configuration.rb +3 -3
  8. data/lib/nanoc/base/entities/identifiable_collection.rb +2 -4
  9. data/lib/nanoc/base/memoization.rb +1 -0
  10. data/lib/nanoc/base/repos/config_loader.rb +1 -1
  11. data/lib/nanoc/base/services/compilation_context.rb +3 -3
  12. data/lib/nanoc/base/services/compiler.rb +2 -3
  13. data/lib/nanoc/base/services/compiler/stages/cleanup.rb +1 -1
  14. data/lib/nanoc/base/services/filter.rb +4 -12
  15. data/lib/nanoc/base/services/item_rep_router.rb +3 -3
  16. data/lib/nanoc/base/services/outdatedness_checker.rb +1 -2
  17. data/lib/nanoc/base/services/outdatedness_rules/attributes_modified.rb +1 -2
  18. data/lib/nanoc/base/services/outdatedness_rules/code_snippets_modified.rb +1 -2
  19. data/lib/nanoc/base/services/outdatedness_rules/configuration_modified.rb +1 -2
  20. data/lib/nanoc/base/services/outdatedness_rules/paths_modified.rb +5 -5
  21. data/lib/nanoc/base/services/outdatedness_rules/rules_modified.rb +3 -3
  22. data/lib/nanoc/base/services/outdatedness_rules/uses_always_outdated_filter.rb +4 -4
  23. data/lib/nanoc/checking/checks/external_links.rb +0 -2
  24. data/lib/nanoc/cli.rb +1 -1
  25. data/lib/nanoc/cli/commands/compile_listeners/timing_recorder.rb +7 -5
  26. data/lib/nanoc/cli/commands/create-site.rb +1 -1
  27. data/lib/nanoc/cli/commands/nanoc.rb +1 -4
  28. data/lib/nanoc/cli/commands/show-plugins.rb +1 -1
  29. data/lib/nanoc/cli/error_handler.rb +2 -1
  30. data/lib/nanoc/deploying/deployers/git.rb +7 -7
  31. data/lib/nanoc/extra/link_collector.rb +2 -2
  32. data/lib/nanoc/filters/asciidoc.rb +1 -1
  33. data/lib/nanoc/filters/colorize_syntax.rb +46 -19
  34. data/lib/nanoc/filters/relativize_paths.rb +33 -9
  35. data/lib/nanoc/rule_dsl/action_sequence_calculator.rb +15 -7
  36. data/lib/nanoc/version.rb +1 -1
  37. data/nanoc.gemspec +1 -1
  38. data/spec/nanoc/base/checksummer_spec.rb +2 -2
  39. data/spec/nanoc/base/entities/action_sequence_spec.rb +0 -36
  40. data/spec/nanoc/base/entities/identifier_spec.rb +1 -1
  41. data/spec/nanoc/base/entities/outdatedness_status_spec.rb +1 -1
  42. data/spec/nanoc/base/entities/processing_actions/snapshot_spec.rb +1 -1
  43. data/spec/nanoc/base/entities/props_spec.rb +13 -13
  44. data/spec/nanoc/base/memoization_spec.rb +31 -0
  45. data/spec/nanoc/base/services/executor_spec.rb +2 -2
  46. data/spec/nanoc/base/services/item_rep_selector_spec.rb +12 -12
  47. data/spec/nanoc/base/services/outdatedness_checker_spec.rb +23 -23
  48. data/spec/nanoc/base/views/post_compile_item_view_spec.rb +1 -1
  49. data/spec/nanoc/cli/commands/deploy_spec.rb +8 -8
  50. data/spec/nanoc/filters/less_spec.rb +11 -11
  51. data/spec/nanoc/helpers/capturing_spec.rb +2 -2
  52. data/spec/nanoc/helpers/tagging_spec.rb +5 -5
  53. data/spec/nanoc/integration/outdatedness_integration_spec.rb +29 -29
  54. data/spec/nanoc/integration/partial_recompilation_spec.rb +8 -8
  55. data/spec/nanoc/regressions/gh_1015_spec.rb +1 -1
  56. data/spec/nanoc/regressions/gh_1022_spec.rb +1 -1
  57. data/spec/nanoc/regressions/gh_1031_spec.rb +3 -3
  58. data/spec/nanoc/regressions/gh_1035_spec.rb +1 -1
  59. data/spec/nanoc/regressions/gh_1037a_spec.rb +2 -2
  60. data/spec/nanoc/regressions/gh_1037b_spec.rb +1 -1
  61. data/spec/nanoc/regressions/gh_1040_spec.rb +1 -1
  62. data/spec/nanoc/regressions/gh_1045_spec.rb +3 -3
  63. data/spec/nanoc/regressions/gh_1047_spec.rb +3 -3
  64. data/spec/nanoc/regressions/gh_1064_spec.rb +1 -1
  65. data/spec/nanoc/regressions/gh_1067_spec.rb +3 -3
  66. data/spec/nanoc/regressions/gh_1082a_spec.rb +1 -1
  67. data/spec/nanoc/regressions/gh_1082b_spec.rb +1 -1
  68. data/spec/nanoc/regressions/gh_1082c_spec.rb +1 -1
  69. data/spec/nanoc/regressions/gh_1082d_spec.rb +1 -1
  70. data/spec/nanoc/regressions/gh_1093_spec.rb +1 -1
  71. data/spec/nanoc/regressions/gh_1094_spec.rb +1 -1
  72. data/spec/nanoc/regressions/gh_1097_spec.rb +1 -1
  73. data/spec/nanoc/regressions/gh_1100_spec.rb +1 -1
  74. data/spec/nanoc/regressions/gh_1102_spec.rb +3 -3
  75. data/spec/nanoc/regressions/gh_1107_spec.rb +1 -1
  76. data/spec/nanoc/regressions/gh_1130_spec.rb +1 -1
  77. data/spec/nanoc/regressions/gh_1134_spec.rb +2 -2
  78. data/spec/nanoc/regressions/gh_1145_spec.rb +1 -1
  79. data/spec/nanoc/regressions/gh_804_spec.rb +1 -1
  80. data/spec/nanoc/regressions/gh_809_spec.rb +1 -1
  81. data/spec/nanoc/regressions/gh_841_spec.rb +1 -1
  82. data/spec/nanoc/regressions/gh_867_spec.rb +1 -1
  83. data/spec/nanoc/regressions/gh_882_spec.rb +3 -3
  84. data/spec/nanoc/regressions/gh_885_spec.rb +2 -2
  85. data/spec/nanoc/regressions/gh_891_spec.rb +2 -2
  86. data/spec/nanoc/regressions/gh_913_spec.rb +1 -1
  87. data/spec/nanoc/regressions/gh_924_spec.rb +2 -2
  88. data/spec/nanoc/regressions/gh_928_spec.rb +1 -1
  89. data/spec/nanoc/regressions/gh_937_spec.rb +2 -2
  90. data/spec/nanoc/regressions/gh_942_spec.rb +1 -1
  91. data/spec/nanoc/regressions/gh_947_spec.rb +1 -1
  92. data/spec/nanoc/regressions/gh_948_spec.rb +1 -1
  93. data/spec/nanoc/regressions/gh_951_spec.rb +1 -1
  94. data/spec/nanoc/regressions/gh_954_spec.rb +1 -1
  95. data/spec/nanoc/regressions/gh_970a_spec.rb +1 -1
  96. data/spec/nanoc/regressions/gh_970b_spec.rb +7 -7
  97. data/spec/nanoc/regressions/gh_974_spec.rb +1 -1
  98. data/spec/nanoc/regressions/gh_981_spec.rb +3 -3
  99. data/spec/nanoc/rule_dsl/action_sequence_calculator_spec.rb +43 -4
  100. data/test/base/core_ext/array_spec.rb +2 -2
  101. data/test/base/test_compiler.rb +6 -6
  102. data/test/base/test_filter.rb +0 -8
  103. data/test/base/test_site.rb +1 -1
  104. data/test/checking/test_runner.rb +2 -2
  105. data/test/cli/commands/test_check.rb +2 -2
  106. data/test/cli/commands/test_compile.rb +6 -6
  107. data/test/cli/commands/test_create_site.rb +12 -12
  108. data/test/cli/commands/test_help.rb +2 -2
  109. data/test/cli/commands/test_info.rb +1 -1
  110. data/test/cli/commands/test_prune.rb +6 -6
  111. data/test/cli/test_cleaning_stream.rb +1 -1
  112. data/test/cli/test_cli.rb +9 -9
  113. data/test/data_sources/test_filesystem.rb +8 -8
  114. data/test/extra/core_ext/test_pathname.rb +1 -1
  115. data/test/extra/test_link_collector.rb +3 -3
  116. data/test/extra/test_piper.rb +3 -3
  117. data/test/filters/colorize_syntax/test_common.rb +25 -1
  118. data/test/filters/test_relativize_paths.rb +38 -0
  119. data/test/helper.rb +1 -1
  120. data/test/helpers/test_capturing.rb +8 -8
  121. data/test/rule_dsl/test_action_provider.rb +2 -2
  122. data/test/rule_dsl/test_rule.rb +1 -1
  123. data/test/test_gem.rb +1 -1
  124. metadata +4 -4
@@ -11,17 +11,17 @@ EOS
11
11
  it 'does not reuse old content' do
12
12
  File.write('content/foo.md', 'I am old foo!')
13
13
  File.write('content/bar.md', 'I am old bar!')
14
- Nanoc::CLI.run(%w(compile))
14
+ Nanoc::CLI.run(%w[compile])
15
15
  expect(File.read('output/foo.md')).to eql('I am old foo!')
16
16
  expect(File.read('output/bar.md')).to eql('I am old bar!')
17
17
 
18
18
  File.write('content/foo.md', 'I am foo!')
19
19
  File.write('content/bar.md', '<%= @items["/foo.*"].compiled_content %><%= raise "boom" %>')
20
- expect { Nanoc::CLI.run(%w(compile)) }.to raise_error(Nanoc::Int::Errors::CompilationError)
20
+ expect { Nanoc::CLI.run(%w[compile]) }.to raise_error(Nanoc::Int::Errors::CompilationError)
21
21
  expect(File.read('output/foo.md')).to eql('I am foo!')
22
22
 
23
23
  File.write('content/bar.md', '[<%= @items["/foo.*"].compiled_content %>]')
24
- Nanoc::CLI.run(%w(compile))
24
+ Nanoc::CLI.run(%w[compile])
25
25
  expect(File.read('output/foo.md')).to eql('I am foo!')
26
26
  expect(File.read('output/bar.md')).to eql('[I am foo!]')
27
27
  end
@@ -12,7 +12,7 @@ EOS
12
12
  end
13
13
 
14
14
  it 'does not reuse old content' do
15
- Nanoc::CLI.run(%w(compile))
15
+ Nanoc::CLI.run(%w[compile])
16
16
  expect(File.read('output/foo.erb')).to eql('*Bar!*')
17
17
  end
18
18
  end
@@ -20,15 +20,15 @@ EOS
20
20
 
21
21
  it 'recompiles when env changes' do
22
22
  ENV['NANOC_ENV'] = nil
23
- Nanoc::CLI.run(%w(compile))
23
+ Nanoc::CLI.run(%w[compile])
24
24
  expect(File.read('output/foo.erb')).to eql('build=dev')
25
25
 
26
26
  ENV['NANOC_ENV'] = nil
27
- Nanoc::CLI.run(%w(compile -e prod))
27
+ Nanoc::CLI.run(%w[compile -e prod])
28
28
  expect(File.read('output/foo.erb')).to eql('build=prod')
29
29
 
30
30
  ENV['NANOC_ENV'] = nil
31
- Nanoc::CLI.run(%w(compile))
31
+ Nanoc::CLI.run(%w[compile])
32
32
  expect(File.read('output/foo.erb')).to eql('build=dev')
33
33
  end
34
34
  end
@@ -12,7 +12,7 @@ EOS
12
12
  end
13
13
 
14
14
  it 'requires /b to be compiled first' do
15
- Nanoc::CLI.run(%w(compile))
15
+ Nanoc::CLI.run(%w[compile])
16
16
  expect(File.read('output/a.txt')).to eql('false')
17
17
  end
18
18
  end
@@ -14,7 +14,7 @@ EOS
14
14
  end
15
15
 
16
16
  it 'requires /b to be compiled first' do
17
- Nanoc::CLI.run(%w(compile))
17
+ Nanoc::CLI.run(%w[compile])
18
18
  expect(File.read('output/a.txt')).to eql('true')
19
19
  end
20
20
  end
@@ -12,7 +12,7 @@ EOS
12
12
  end
13
13
 
14
14
  it 'does not require any items to be compiled' do
15
- Nanoc::CLI.run(%w(compile))
15
+ Nanoc::CLI.run(%w[compile])
16
16
  expect(File.read('output/a.txt')).to eql('false')
17
17
  expect(File.read('output/b.txt')).to eql('false')
18
18
  end
@@ -11,7 +11,7 @@ EOS
11
11
  end
12
12
 
13
13
  it 'does not require any items to be compiled' do
14
- Nanoc::CLI.run(%w(compile))
14
+ Nanoc::CLI.run(%w[compile])
15
15
  expect(File.read('output/a.txt')).to eql('false')
16
16
  end
17
17
  end
@@ -43,7 +43,7 @@ EOS
43
43
  end
44
44
 
45
45
  it 'generates dependency on all reps' do
46
- Nanoc::CLI.run(%w(compile))
46
+ Nanoc::CLI.run(%w[compile])
47
47
  expect(File.read('output/index.html')).to eql('true')
48
48
  end
49
49
  end
@@ -15,7 +15,7 @@ EOS
15
15
 
16
16
  it 'raises CannotGetCompiledContentOfBinaryItem twice' do
17
17
  2.times do
18
- expect { Nanoc::CLI.run(%w(compile)) }
18
+ expect { Nanoc::CLI.run(%w[compile]) }
19
19
  .to raise_wrapped_error(an_instance_of(Nanoc::Int::Errors::CannotGetCompiledContentOfBinaryItem))
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ EOS
15
15
  end
16
16
 
17
17
  it 'generates dependency on all reps' do
18
- Nanoc::CLI.run(%w(compile))
18
+ Nanoc::CLI.run(%w[compile])
19
19
  expect(File.read('output/index.html')).to eql('true')
20
20
  end
21
21
  end
@@ -15,6 +15,6 @@ EOS
15
15
  end
16
16
 
17
17
  it 'should not crash' do
18
- Nanoc::CLI.run(%w(compile))
18
+ Nanoc::CLI.run(%w[compile])
19
19
  end
20
20
  end
@@ -11,16 +11,16 @@ EOS
11
11
  end
12
12
 
13
13
  before do
14
- Nanoc::CLI.run(%w(compile))
14
+ Nanoc::CLI.run(%w[compile])
15
15
  end
16
16
 
17
17
  it 'does not output filename more than once' do
18
18
  regex = /skip.*index\.html.*skip.*index\.html/m
19
- expect { Nanoc::CLI.run(%w(compile --verbose)) }.not_to output(regex).to_stdout
19
+ expect { Nanoc::CLI.run(%w[compile --verbose]) }.not_to output(regex).to_stdout
20
20
  end
21
21
 
22
22
  it 'outputs filename' do
23
23
  regex = /skip.*index\.html/
24
- expect { Nanoc::CLI.run(%w(compile --verbose)) }.to output(regex).to_stdout
24
+ expect { Nanoc::CLI.run(%w[compile --verbose]) }.to output(regex).to_stdout
25
25
  end
26
26
  end
@@ -8,6 +8,6 @@ EOS
8
8
  end
9
9
 
10
10
  it 'raises the proper exception' do
11
- expect { Nanoc::CLI.run(%w(compile --verbose)) }.to raise_error(SyntaxError)
11
+ expect { Nanoc::CLI.run(%w[compile --verbose]) }.to raise_error(SyntaxError)
12
12
  end
13
13
  end
@@ -14,6 +14,6 @@ EOS
14
14
  end
15
15
 
16
16
  it 'does not raise fiber error' do
17
- Nanoc::CLI.run(%w(check wat))
17
+ Nanoc::CLI.run(%w[check wat])
18
18
  end
19
19
  end
@@ -12,7 +12,7 @@ EOS
12
12
  end
13
13
 
14
14
  it 'detects missing output file of non-default rep' do
15
- Nanoc::CLI.run(%w(compile))
15
+ Nanoc::CLI.run(%w[compile])
16
16
  expect(File.file?('output/first.html')).to be
17
17
  expect(File.file?('output/last.html')).to be
18
18
 
@@ -20,7 +20,7 @@ EOS
20
20
  expect(File.file?('output/first.html')).not_to be
21
21
  expect(File.file?('output/last.html')).to be
22
22
 
23
- Nanoc::CLI.run(%w(compile))
23
+ Nanoc::CLI.run(%w[compile])
24
24
  expect(File.file?('output/first.html')).to be
25
25
  expect(File.file?('output/last.html')).to be
26
26
  end
@@ -11,6 +11,6 @@ EOS
11
11
  end
12
12
 
13
13
  it 'detects missing output file of non-default rep' do
14
- expect { Nanoc::CLI.run(%w(--verbose)) }.to output(/erb /).to_stdout
14
+ expect { Nanoc::CLI.run(%w[--verbose]) }.to output(/erb /).to_stdout
15
15
  end
16
16
  end
@@ -17,7 +17,7 @@ EOS
17
17
  end
18
18
 
19
19
  it 'does not crash' do
20
- expect { Nanoc::CLI.run(%w(check donkey)) }.to(
20
+ expect { Nanoc::CLI.run(%w[check donkey]) }.to(
21
21
  raise_error(Nanoc::Int::Errors::GenericTrivial, 'One or more checks failed').and(
22
22
  output(/Issues found!\n \(global\):\n \[ (\e\[31m)?ERROR(\e\[0m)? \] donkey - Not enough donkeys\n \/catlady.md:\n \[ (\e\[31m)?ERROR(\e\[0m)? \] donkey - Too many cats\n/).to_stdout,
23
23
  ),
@@ -12,6 +12,6 @@ EOS
12
12
  Nanoc::CLI.run(['compile'])
13
13
 
14
14
  regex = /Running check stale… (\e\[32m)?ok(\e\[0m)?/
15
- expect { Nanoc::CLI.run(%w(check stale)) }.to output(regex).to_stdout
15
+ expect { Nanoc::CLI.run(%w[check stale]) }.to output(regex).to_stdout
16
16
  end
17
17
  end
@@ -10,6 +10,6 @@ EOS
10
10
  end
11
11
 
12
12
  it 'preprocesses before running the check' do
13
- Nanoc::CLI.run(%w(check stale))
13
+ Nanoc::CLI.run(%w[check stale])
14
14
  end
15
15
  end
@@ -10,6 +10,6 @@ EOS
10
10
  end
11
11
 
12
12
  it 'preprocesses before running show-data' do
13
- expect { Nanoc::CLI.run(%w(show-data)) }.not_to output(/foo/).to_stdout
13
+ expect { Nanoc::CLI.run(%w[show-data]) }.not_to output(/foo/).to_stdout
14
14
  end
15
15
  end
@@ -18,12 +18,12 @@ EOS
18
18
  end
19
19
 
20
20
  example do
21
- Nanoc::CLI.run(%w(compile))
21
+ Nanoc::CLI.run(%w[compile])
22
22
 
23
23
  File.write('content/bar.md', 'I am bar! Modified!')
24
- expect { Nanoc::CLI.run(%w(compile)) }.to output(%r{^Modified: /bar.md - default$}).to_stdout
24
+ expect { Nanoc::CLI.run(%w[compile]) }.to output(%r{^Modified: /bar.md - default$}).to_stdout
25
25
 
26
26
  File.write('content/bar.md', 'I am bar! Modified again!')
27
- expect { Nanoc::CLI.run(%w(compile)) }.not_to output(%r{^Modified: /foo.md - default$}).to_stdout
27
+ expect { Nanoc::CLI.run(%w[compile]) }.not_to output(%r{^Modified: /foo.md - default$}).to_stdout
28
28
  end
29
29
  end
@@ -18,11 +18,11 @@ EOS
18
18
  end
19
19
 
20
20
  example do
21
- Nanoc::CLI.run(%w(compile))
21
+ Nanoc::CLI.run(%w[compile])
22
22
  before = File.read('output/index.html')
23
23
 
24
24
  sleep(0.1)
25
- Nanoc::CLI.run(%w(compile))
25
+ Nanoc::CLI.run(%w[compile])
26
26
  after = File.read('output/index.html')
27
27
  expect(after).to eql(before)
28
28
  expect(after).to match(/\Ahi! - \d+/)
@@ -16,11 +16,11 @@ EOS
16
16
  end
17
17
 
18
18
  example do
19
- Nanoc::CLI.run(%w(compile))
19
+ Nanoc::CLI.run(%w[compile])
20
20
  expect(File.read('output/hello.html')).to include('giraffes?')
21
21
 
22
22
  File.write('layouts/foo.erb', 'donkeys? <%= yield %>')
23
- Nanoc::CLI.run(%w(compile))
23
+ Nanoc::CLI.run(%w[compile])
24
24
  expect(File.read('output/hello.html')).to include('donkeys?')
25
25
  end
26
26
  end
@@ -17,7 +17,7 @@ EOS
17
17
 
18
18
  example do
19
19
  2.times do
20
- Nanoc::CLI.run(%w(compile))
20
+ Nanoc::CLI.run(%w[compile])
21
21
  expect(File.read('output/hello.html')).to eq('hi!')
22
22
  end
23
23
  end
@@ -56,7 +56,7 @@ EOS
56
56
  end
57
57
 
58
58
  before do
59
- Nanoc::CLI.run(%w(compile))
59
+ Nanoc::CLI.run(%w[compile])
60
60
  end
61
61
 
62
62
  example do
@@ -81,7 +81,7 @@ EOS
81
81
  </xsl:stylesheet>
82
82
  EOS
83
83
 
84
- expect { Nanoc::CLI.run(%w(compile)) }
84
+ expect { Nanoc::CLI.run(%w[compile]) }
85
85
  .to change { File.read('output/index.xhtml') }
86
86
  .from(/<title>Original Title/)
87
87
  .to(/<title>Changed Title/)
@@ -1,5 +1,5 @@
1
1
  describe 'GH-928', site: true, stdio: true do
2
2
  example do
3
- expect { Nanoc::CLI.run(%w(check --list)) }.to output(%r{^ css$}).to_stdout
3
+ expect { Nanoc::CLI.run(%w[check --list]) }.to output(%r{^ css$}).to_stdout
4
4
  end
5
5
  end
@@ -16,10 +16,10 @@ EOS
16
16
  end
17
17
 
18
18
  it 'does not use cache when switching environments' do
19
- Nanoc::CLI.run(%w(compile))
19
+ Nanoc::CLI.run(%w[compile])
20
20
  expect(File.read('output/style.css')).to eq(".test { color: red; }\n")
21
21
 
22
- Nanoc::CLI.run(%w(compile --env=staging))
22
+ Nanoc::CLI.run(%w[compile --env=staging])
23
23
  expect(File.read('output/style.css')).to eq(".test {\n color: red;\n}\n")
24
24
  end
25
25
  end
@@ -15,7 +15,7 @@ EOS
15
15
 
16
16
  example do
17
17
  File.write('output/parent', 'Hahaaa! I am a file and not a directory!')
18
- Nanoc::CLI.run(%w(compile))
18
+ Nanoc::CLI.run(%w[compile])
19
19
  expect(File.read('output/parent/foo')).to eq('Foo!')
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ EOS
15
15
 
16
16
  example do
17
17
  File.write('output/foo', 'I am an older foo!')
18
- expect { Nanoc::CLI.run(%w(compile)) }.to output(%r{\s+update.* output/foo$}).to_stdout
18
+ expect { Nanoc::CLI.run(%w[compile]) }.to output(%r{\s+update.* output/foo$}).to_stdout
19
19
  expect(File.read('output/foo')).to eq('Foo!')
20
20
  end
21
21
  end
@@ -11,6 +11,6 @@ describe 'GH-948', site: true, stdio: true do
11
11
  end
12
12
 
13
13
  it 'does not crash when output dir is not present' do
14
- Nanoc::CLI.run(%w(compile))
14
+ Nanoc::CLI.run(%w[compile])
15
15
  end
16
16
  end
@@ -12,7 +12,7 @@ EOS
12
12
  end
13
13
 
14
14
  it 'copies foo.md' do
15
- Nanoc::CLI.run(%w(compile))
15
+ Nanoc::CLI.run(%w[compile])
16
16
 
17
17
  expect(File.file?('output/foo.md')).to eq(true)
18
18
  end
@@ -22,7 +22,7 @@ EOS
22
22
  end
23
23
 
24
24
  it 'properly filters foo.md' do
25
- Nanoc::CLI.run(%w(compile))
25
+ Nanoc::CLI.run(%w[compile])
26
26
 
27
27
  # Path is relativized
28
28
  expect(File.read('output/foo.html')).to eq('foo <a href="./">root</a>')
@@ -10,7 +10,7 @@ EOS
10
10
  end
11
11
 
12
12
  it 'shows reps' do
13
- expect { Nanoc::CLI.run(%w(show-rules --no-color)) }.to(
13
+ expect { Nanoc::CLI.run(%w[show-rules --no-color]) }.to(
14
14
  output(/^Item \/foo\.md:\n Rep default: \/foo\.\*$/).to_stdout,
15
15
  )
16
16
  end
@@ -15,13 +15,13 @@ end
15
15
  EOS
16
16
  end
17
17
 
18
- before { Nanoc::CLI.run(%w(compile)) }
18
+ before { Nanoc::CLI.run(%w[compile]) }
19
19
 
20
20
  it 'shows default rep outdatedness' do
21
- expect { Nanoc::CLI.run(%w(show-data --no-color)) }.to(
21
+ expect { Nanoc::CLI.run(%w[show-data --no-color]) }.to(
22
22
  output(/^item \/foo\.md, rep default:\n is not outdated/).to_stdout,
23
23
  )
24
- expect { Nanoc::CLI.run(%w(show-data --no-color)) }.to(
24
+ expect { Nanoc::CLI.run(%w[show-data --no-color]) }.to(
25
25
  output(/^item \/bar\.md, rep default:\n is not outdated/).to_stdout,
26
26
  )
27
27
  end
@@ -29,10 +29,10 @@ EOS
29
29
  it 'shows file as outdated after modification' do
30
30
  File.write('content/bar.md', 'JUST BAR!')
31
31
 
32
- expect { Nanoc::CLI.run(%w(show-data --no-color)) }.to(
32
+ expect { Nanoc::CLI.run(%w[show-data --no-color]) }.to(
33
33
  output(/^item \/foo\.md, rep default:\n is not outdated/).to_stdout,
34
34
  )
35
- expect { Nanoc::CLI.run(%w(show-data --no-color)) }.to(
35
+ expect { Nanoc::CLI.run(%w[show-data --no-color]) }.to(
36
36
  output(/^item \/bar\.md, rep default:\n is outdated:/).to_stdout,
37
37
  )
38
38
  end
@@ -40,10 +40,10 @@ EOS
40
40
  it 'shows file and dependencies as outdated after modification' do
41
41
  File.write('content/foo.md', 'FOO!')
42
42
 
43
- expect { Nanoc::CLI.run(%w(show-data --no-color)) }.to(
43
+ expect { Nanoc::CLI.run(%w[show-data --no-color]) }.to(
44
44
  output(/^item \/foo\.md, rep default:\n is outdated:/).to_stdout,
45
45
  )
46
- expect { Nanoc::CLI.run(%w(show-data --no-color)) }.to(
46
+ expect { Nanoc::CLI.run(%w[show-data --no-color]) }.to(
47
47
  output(/^item \/bar\.md, rep default:\n is outdated:/).to_stdout,
48
48
  )
49
49
  end
@@ -10,7 +10,7 @@ EOS
10
10
  end
11
11
 
12
12
  it 'writes to path corresponding to identifier' do
13
- Nanoc::CLI.run(%w(compile))
13
+ Nanoc::CLI.run(%w[compile])
14
14
 
15
15
  expect(File.file?('output/foo.md')).to eq(true)
16
16
  end