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
@@ -547,12 +547,12 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
547
547
 
548
548
  # Write sample files
549
549
  FileUtils.mkdir_p('foo')
550
- %w(foo.html foo.yaml bar.entry.html foo/qux.yaml).each do |filename|
550
+ %w[foo.html foo.yaml bar.entry.html foo/qux.yaml].each do |filename|
551
551
  File.open(filename, 'w') { |io| io.write('test') }
552
552
  end
553
553
 
554
554
  # Write stray files
555
- %w(foo.html~ foo.yaml.orig bar.entry.html.bak).each do |filename|
555
+ %w[foo.html~ foo.yaml.orig bar.entry.html.bak].each do |filename|
556
556
  File.open(filename, 'w') { |io| io.write('test') }
557
557
  end
558
558
 
@@ -574,12 +574,12 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
574
574
 
575
575
  # Write sample files
576
576
  FileUtils.mkdir_p('foo')
577
- %w(foo.html foo.yaml bar.html.erb foo/qux.yaml).each do |filename|
577
+ %w[foo.html foo.yaml bar.html.erb foo/qux.yaml].each do |filename|
578
578
  File.open(filename, 'w') { |io| io.write('test') }
579
579
  end
580
580
 
581
581
  # Write stray files
582
- %w(foo.html~ foo.yaml.orig bar.entry.html.bak).each do |filename|
582
+ %w[foo.html~ foo.yaml.orig bar.entry.html.bak].each do |filename|
583
583
  File.open(filename, 'w') { |io| io.write('test') }
584
584
  end
585
585
 
@@ -600,7 +600,7 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
600
600
  data_source = Nanoc::DataSources::Filesystem.new(nil, nil, nil, nil)
601
601
 
602
602
  # Write sample files
603
- %w(aaa/foo.html bbb/foo.html ccc/foo.html).each do |filename|
603
+ %w[aaa/foo.html bbb/foo.html ccc/foo.html].each do |filename|
604
604
  FileUtils.mkdir_p(File.dirname(filename))
605
605
  File.open(filename, 'w') { |io| io.write('test') }
606
606
  end
@@ -620,7 +620,7 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
620
620
  data_source = Nanoc::DataSources::Filesystem.new(nil, nil, nil, config)
621
621
 
622
622
  # Write sample files
623
- %w(stuff/foo.html stuff/foo.md stuff/foo.yaml).each do |filename|
623
+ %w[stuff/foo.html stuff/foo.md stuff/foo.yaml].each do |filename|
624
624
  FileUtils.mkdir_p(File.dirname(filename))
625
625
  File.open(filename, 'w') { |io| io.write('test') }
626
626
  end
@@ -631,7 +631,7 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
631
631
  assert_equal 2, res.values[0].size
632
632
  assert_equal 'yaml', res.values[0][0]
633
633
  assert_equal Array, res.values[0][1].class
634
- assert_equal %w(html md), res.values[0][1].sort
634
+ assert_equal %w[html md], res.values[0][1].sort
635
635
  end
636
636
 
637
637
  def test_all_split_files_in_with_multiple_content_files
@@ -639,7 +639,7 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
639
639
  data_source = Nanoc::DataSources::Filesystem.new(nil, nil, nil, nil)
640
640
 
641
641
  # Write sample files
642
- %w(foo.html foo.xhtml foo.txt foo.yaml bar.html qux.yaml).each do |filename|
642
+ %w[foo.html foo.xhtml foo.txt foo.yaml bar.html qux.yaml].each do |filename|
643
643
  File.open(filename, 'w') { |io| io.write('test') }
644
644
  end
645
645
 
@@ -2,7 +2,7 @@ require 'helper'
2
2
 
3
3
  class Nanoc::Extra::CoreExtPathnameTest < Nanoc::TestCase
4
4
  def test_components
5
- assert_equal %w(/ a bb ccc dd e), Pathname.new('/a/bb/ccc/dd/e').__nanoc_components
5
+ assert_equal %w[/ a bb ccc dd e], Pathname.new('/a/bb/ccc/dd/e').__nanoc_components
6
6
  end
7
7
 
8
8
  def test_include_component
@@ -24,7 +24,7 @@ class Nanoc::Extra::LinkCollectorTest < Nanoc::TestCase
24
24
  end
25
25
 
26
26
  # Create validator
27
- collector = Nanoc::Extra::LinkCollector.new(%w(file-a.html file-b.html))
27
+ collector = Nanoc::Extra::LinkCollector.new(%w[file-a.html file-b.html])
28
28
 
29
29
  # Test
30
30
  hrefs_with_filenames = collector.filenames_per_href
@@ -60,7 +60,7 @@ class Nanoc::Extra::LinkCollectorTest < Nanoc::TestCase
60
60
  end
61
61
 
62
62
  # Create validator
63
- collector = Nanoc::Extra::LinkCollector.new(%w(file-a.html file-b.html), :external)
63
+ collector = Nanoc::Extra::LinkCollector.new(%w[file-a.html file-b.html], :external)
64
64
 
65
65
  # Test
66
66
  hrefs_with_filenames = collector.filenames_per_href
@@ -93,7 +93,7 @@ class Nanoc::Extra::LinkCollectorTest < Nanoc::TestCase
93
93
  end
94
94
 
95
95
  # Create validator
96
- collector = Nanoc::Extra::LinkCollector.new(%w(file-a.html file-b.html), :internal)
96
+ collector = Nanoc::Extra::LinkCollector.new(%w[file-a.html file-b.html], :internal)
97
97
 
98
98
  # Test
99
99
  hrefs_with_filenames = collector.filenames_per_href
@@ -5,7 +5,7 @@ class Nanoc::Extra::PiperTest < Nanoc::TestCase
5
5
  stdout = StringIO.new
6
6
  stderr = StringIO.new
7
7
 
8
- cmd = %w(ls -l)
8
+ cmd = %w[ls -l]
9
9
 
10
10
  File.open('foo.txt', 'w') { |io| io.write('hi') }
11
11
  File.open('bar.txt', 'w') { |io| io.write('ho') }
@@ -23,7 +23,7 @@ class Nanoc::Extra::PiperTest < Nanoc::TestCase
23
23
  stderr = StringIO.new
24
24
 
25
25
  input = 'Hello World!'
26
- cmd = %w(cat)
26
+ cmd = %w[cat]
27
27
 
28
28
  piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr)
29
29
  piper.run(cmd, input)
@@ -36,7 +36,7 @@ class Nanoc::Extra::PiperTest < Nanoc::TestCase
36
36
  stdout = StringIO.new
37
37
  stderr = StringIO.new
38
38
 
39
- cmd = %w(cat kafhawilgoiwaejagoualjdsfilofiewaguihaifeowuiga)
39
+ cmd = %w[cat kafhawilgoiwaejagoualjdsfilofiewaguihaifeowuiga]
40
40
 
41
41
  piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr)
42
42
  assert_raises(Nanoc::Extra::Piper::Error) do
@@ -51,6 +51,30 @@ EOS
51
51
  end
52
52
  end
53
53
 
54
+ def test_full_page_html5
55
+ # Create filter
56
+ filter = ::Nanoc::Filters::ColorizeSyntax.new
57
+
58
+ # Get input and expected output
59
+ input = <<EOS
60
+ <!DOCTYPE html>
61
+ <html>
62
+ <head>
63
+ <meta charset="utf-8">
64
+ <title>Foo</title>
65
+ </head>
66
+ <body>
67
+ <pre title="moo"><code class="language-ruby"># comment</code></pre>
68
+ </body>
69
+ </html>
70
+ EOS
71
+ expected_output_regex = %r{^<!DOCTYPE html>\s*<html>\s*<head>\s*<meta charset="utf-8">\s*<title>Foo</title>\s*</head>\s*<body>\s*<pre title="moo"><code class="language-ruby"># comment</code></pre>\s*</body>\s*</html>}
72
+
73
+ # Run filter
74
+ actual_output = filter.setup_and_run(input, syntax: :html5, default_colorizer: :dummy, is_fullpage: true)
75
+ assert_match expected_output_regex, actual_output
76
+ end
77
+
54
78
  def test_colorize_syntax_with_missing_executables
55
79
  if_have 'nokogiri' do
56
80
  begin
@@ -64,7 +88,7 @@ EOS
64
88
  input = '<pre><code class="language-ruby">puts "foo"</code></pre>'
65
89
 
66
90
  # Run filter
67
- %i(albino pygmentize simon_highlight).each do |colorizer|
91
+ %i[albino pygmentize simon_highlight].each do |colorizer|
68
92
  begin
69
93
  input = '<pre><code class="language-ruby">puts "foo"</code></pre>'
70
94
  filter.setup_and_run(
@@ -117,6 +117,44 @@ EOS
117
117
  assert_match(expected1, actual_content)
118
118
  end
119
119
 
120
+ def test_filter_html5_with_boilerplate
121
+ # Create filter with mock item
122
+ filter = Nanoc::Filters::RelativizePaths.new
123
+
124
+ # Mock item
125
+ filter.instance_eval do
126
+ @item_rep = Nanoc::Int::ItemRep.new(
127
+ Nanoc::Int::Item.new(
128
+ 'content',
129
+ {},
130
+ '/foo/bar/baz/',
131
+ ),
132
+ :blah,
133
+ )
134
+ @item_rep.paths[:last] = ['/foo/bar/baz/']
135
+ end
136
+
137
+ # Set content
138
+ raw_content = <<EOS
139
+ <!DOCTYPE html>
140
+ <html>
141
+ <head>
142
+ <title>Hello</title>
143
+ </head>
144
+ <body>
145
+ <a href=/foo>foo</a>
146
+ </body>
147
+ </html>
148
+ EOS
149
+ expected0 = %r{<a href="\.\./\.\.">foo</a>}
150
+ expected1 = %r{\A\s*<!DOCTYPE html\s*>\s*<html>\s*<head>\s*<title>Hello</title>\s*</head>\s*<body>\s*<a href="../..">foo</a>\s*</body>\s*</html>\s*\Z}m
151
+
152
+ # Test
153
+ actual_content = filter.setup_and_run(raw_content, type: :html5)
154
+ assert_match(expected0, actual_content)
155
+ assert_match(expected1, actual_content)
156
+ end
157
+
120
158
  def test_filter_html_multiple
121
159
  # Create filter with mock item
122
160
  filter = Nanoc::Filters::RelativizePaths.new
data/test/helper.rb CHANGED
@@ -249,7 +249,7 @@ EOS
249
249
  end
250
250
 
251
251
  def command?(cmd)
252
- which, null = on_windows? ? %w(where NUL) : ['which', '/dev/null']
252
+ which, null = on_windows? ? %w[where NUL] : ['which', '/dev/null']
253
253
  system("#{which} #{cmd} > #{null} 2>&1")
254
254
  end
255
255
 
@@ -46,14 +46,14 @@ class Nanoc::Helpers::CapturingTest < Nanoc::TestCase
46
46
  File.open('content/includee.erb', 'w') do |io|
47
47
  io.write '{<% content_for :blah do %>Old content<% end %>}'
48
48
  end
49
- Nanoc::CLI.run(%w(compile))
49
+ Nanoc::CLI.run(%w[compile])
50
50
  assert_equal '[Old content]', File.read('output/includer/index.html')
51
51
 
52
52
  # Compile again
53
53
  File.open('content/includee.erb', 'w') do |io|
54
54
  io.write '{<% content_for :blah do %>New content<% end %>}'
55
55
  end
56
- Nanoc::CLI.run(%w(compile))
56
+ Nanoc::CLI.run(%w[compile])
57
57
  assert_equal '[New content]', File.read('output/includer/index.html')
58
58
  end
59
59
  end
@@ -85,7 +85,7 @@ EOS
85
85
 
86
86
  result = ::ERB.new(content).result(binding)
87
87
 
88
- expected = %w(head before basic after foot)
88
+ expected = %w[head before basic after foot]
89
89
  actual = result.scan(/[a-z]+/)
90
90
  assert_equal expected, actual
91
91
  end
@@ -113,14 +113,14 @@ EOS
113
113
  File.open('content/includee.erb', 'w') do |io|
114
114
  io.write '{<% content_for :blah do %>Old content<% end %>}'
115
115
  end
116
- Nanoc::CLI.run(%w(compile))
116
+ Nanoc::CLI.run(%w[compile])
117
117
  assert_equal '{[nil-Old content]}', File.read('output/includer/index.html')
118
118
 
119
119
  # Compile again
120
120
  File.open('content/includee.erb', 'w') do |io|
121
121
  io.write '{<% content_for :blah do %>New content<% end %>}'
122
122
  end
123
- Nanoc::CLI.run(%w(compile))
123
+ Nanoc::CLI.run(%w[compile])
124
124
  assert_equal '{[nil-New content]}', File.read('output/includer/index.html')
125
125
  end
126
126
  end
@@ -141,7 +141,7 @@ EOS
141
141
  io.write "route '*' do ; item.identifier + 'index.html' ; end\n"
142
142
  end
143
143
 
144
- Nanoc::CLI.run(%w(compile))
144
+ Nanoc::CLI.run(%w[compile])
145
145
  assert_equal 'Foo!', File.read('output/self/index.html')
146
146
  end
147
147
  end
@@ -164,7 +164,7 @@ EOS
164
164
  File.open('content/includer.erb', 'w') do |io|
165
165
  io.write 'Old-<%= content_for(@items["/includee/"], :blah) %>'
166
166
  end
167
- Nanoc::CLI.run(%w(compile))
167
+ Nanoc::CLI.run(%w[compile])
168
168
  assert_equal '{}', File.read('output/includee/index.html')
169
169
  assert_equal 'Old-Content', File.read('output/includer/index.html')
170
170
 
@@ -172,7 +172,7 @@ EOS
172
172
  File.open('content/includer.erb', 'w') do |io|
173
173
  io.write 'New-<%= content_for(@items["/includee/"], :blah) %>'
174
174
  end
175
- Nanoc::CLI.run(%w(compile))
175
+ Nanoc::CLI.run(%w[compile])
176
176
  assert_equal '{}', File.read('output/includee/index.html')
177
177
  assert_equal 'New-Content', File.read('output/includer/index.html')
178
178
  end
@@ -20,7 +20,7 @@ class Nanoc::RuleDSL::ActionProviderTest < Nanoc::TestCase
20
20
 
21
21
  def test_per_rules_file_preprocessor
22
22
  # Create site
23
- Nanoc::CLI.run %w(create_site foo)
23
+ Nanoc::CLI.run %w[create_site foo]
24
24
  FileUtils.cd('foo') do
25
25
  # Create a bonus rules file
26
26
  File.write(
@@ -51,7 +51,7 @@ class Nanoc::RuleDSL::ActionProviderTest < Nanoc::TestCase
51
51
 
52
52
  def test_per_rules_file_postprocessor
53
53
  # Create site
54
- Nanoc::CLI.run %w(create_site foo)
54
+ Nanoc::CLI.run %w[create_site foo]
55
55
  FileUtils.cd('foo') do
56
56
  # Create a bonus rules file
57
57
  File.write(
@@ -16,7 +16,7 @@ class Nanoc::Int::RuleTest < Nanoc::TestCase
16
16
  def test_matches
17
17
  pattern = Nanoc::Int::Pattern.from(%r{/(.*)/(.*)/})
18
18
  identifier = '/anything/else/'
19
- expected = %w(anything else)
19
+ expected = %w[anything else]
20
20
 
21
21
  rule = Nanoc::RuleDSL::Rule.new(pattern, :string, proc {})
22
22
 
data/test/test_gem.rb CHANGED
@@ -15,7 +15,7 @@ class Nanoc::GemTest < Nanoc::TestCase
15
15
  stdout = StringIO.new
16
16
  stderr = StringIO.new
17
17
  piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr)
18
- piper.run(%w(gem build nanoc.gemspec), nil)
18
+ piper.run(%w[gem build nanoc.gemspec], nil)
19
19
  files_after = Set.new Dir['**/*']
20
20
 
21
21
  # Check new files
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.7.5
4
+ version: 4.7.6
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-04-01 00:00:00.000000000 Z
11
+ date: 2017-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.3'
19
+ version: '2.8'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.3'
26
+ version: '2.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: hamster
29
29
  requirement: !ruby/object:Gem::Requirement