nanoc 4.8.1 → 4.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8537bc61d500ed5bae70dcae626b5991fd43dea7
4
- data.tar.gz: 565524a4ffb2733eb6b05fe547c3ee7e2b0788e9
3
+ metadata.gz: 1d77db1ef0d5fababb5232e354b5e1bed88749d7
4
+ data.tar.gz: 5b3cd5972c29fa74a0bea92a59212861e24eb5c7
5
5
  SHA512:
6
- metadata.gz: b174cadc89845ac6b8e7fec2cea4f9feb4022eef44653a6f505c9eb00d10c59c9ba3fc73d5b2f61cb9a928248fac433944d81e780eb0934dd309939def7ecd2a
7
- data.tar.gz: 78c42adc2b1bc34501aaae163baffc6ab839b45f81d80430a924cca13d0d3a63573702c0a02bcdce4e788a7a5cf560c5250c09617fa065f1c0cc124086412516
6
+ metadata.gz: 0a5d0f6f801a97f57efce1d06c872dada0ff50a9c3f88f068b4c5a617509b81e513473b08a5c5dabb864ede7e18d96d3c6c465c46a259d5f3f06411782134b1b
7
+ data.tar.gz: 07a596f5a268ce116ac1d9dc1897ea0d1211bb051a5413965d2029d780008b3350668fe5224b4bb999eea52c505a83e3fc0b18db785ee7ea437470eda0fc37ae
data/NEWS.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Nanoc news
2
2
 
3
+ ## 4.8.2 (2017-08-19)
4
+
5
+ Fixed:
6
+
7
+ * Fixed compatibility issue with guard-nanoc
8
+
3
9
  ## 4.8.1 (2017-08-06)
4
10
 
5
11
  Enhancements:
data/lib/nanoc/cli.rb CHANGED
@@ -21,6 +21,12 @@ require_relative 'cli/cleaning_stream'
21
21
  require_relative 'cli/stream_cleaners'
22
22
  require_relative 'cli/error_handler'
23
23
 
24
+ require_relative 'cli/commands/compile_listeners/abstract'
25
+ require_relative 'cli/commands/compile_listeners/debug_printer'
26
+ require_relative 'cli/commands/compile_listeners/diff_generator'
27
+ require_relative 'cli/commands/compile_listeners/file_action_printer'
28
+ require_relative 'cli/commands/compile_listeners/timing_recorder'
29
+
24
30
  # @api private
25
31
  module Nanoc::CLI
26
32
  # @return [Boolean] true if debug output is enabled, false if not
@@ -7,12 +7,6 @@ description <<~EOS
7
7
  EOS
8
8
  flag nil, :diff, 'generate diff'
9
9
 
10
- require_relative 'compile_listeners/abstract'
11
- require_relative 'compile_listeners/debug_printer'
12
- require_relative 'compile_listeners/diff_generator'
13
- require_relative 'compile_listeners/file_action_printer'
14
- require_relative 'compile_listeners/timing_recorder'
15
-
16
10
  module Nanoc::CLI::Commands
17
11
  class Compile < ::Nanoc::CLI::CommandRunner
18
12
  attr_accessor :listener_classes
data/lib/nanoc/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nanoc
4
4
  # The current Nanoc version.
5
- VERSION = '4.8.1'
5
+ VERSION = '4.8.2'
6
6
  end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe Nanoc::CLI do
4
+ let(:all_commands) do
5
+ ObjectSpace.each_object(Cri::Command)
6
+ end
7
+
8
+ let(:exceptions) do
9
+ # FIXME: Get rid of these exceptions by Nanoc 5.0
10
+ [
11
+ ['deploy', ['C']],
12
+ ['help', ['v']],
13
+ ['check', ['d']],
14
+ ]
15
+ end
16
+
17
+ def ancestors_of_command(command)
18
+ if command.is_a?(Cri::Command)
19
+ [command] + ancestors_of_command(command.supercommand)
20
+ else
21
+ []
22
+ end
23
+ end
24
+
25
+ def short_options_for_command(command)
26
+ ancestors = ancestors_of_command(command)
27
+ ancestors.flat_map { |a| a.option_definitions.to_a.map { |od| od[:short] } }.compact
28
+ end
29
+
30
+ it 'has no commands that have conflicting options' do
31
+ all_commands.each do |command|
32
+ short_options = short_options_for_command(command)
33
+
34
+ duplicate_options = short_options.select { |o| short_options.count(o) > 1 }.uniq
35
+
36
+ next if exceptions.include?([command.name, duplicate_options])
37
+
38
+ expect(duplicate_options).to(
39
+ be_empty,
40
+ "The #{command.name} command’s option shorthands #{duplicate_options.uniq} are used by multiple options",
41
+ )
42
+ end
43
+ end
44
+ 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.8.1
4
+ version: 4.8.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-08-06 00:00:00.000000000 Z
11
+ date: 2017-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri
@@ -464,6 +464,7 @@ files:
464
464
  - spec/nanoc/cli/commands/show_rules_spec.rb
465
465
  - spec/nanoc/cli/commands/view_spec.rb
466
466
  - spec/nanoc/cli/stream_cleaners/utf8_spec.rb
467
+ - spec/nanoc/cli_spec.rb
467
468
  - spec/nanoc/data_sources/filesystem_spec.rb
468
469
  - spec/nanoc/deploying/fog_spec.rb
469
470
  - spec/nanoc/deploying/git_spec.rb