nanoc-cli 4.13.5 → 4.14.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90693f6d82a8c891f00eef0c9a278aea65cd2d34438a54da8d0b0178090ecc82
4
- data.tar.gz: 9abcbdcb6c42399ebbfa66363b3dc14d8a7ccc0979cbe5402262a1fc60ba05af
3
+ metadata.gz: ff228ae51f7b66c13b237fb565261fdebea9f3bd57ac51e51092a7a51b0a070d
4
+ data.tar.gz: 0b585b3f4b1fd4d79d87ea4de695609eb01f68ddd36116bc10131e5639079b0b
5
5
  SHA512:
6
- metadata.gz: 5916c0fe675ceb20d1c5f98c0d893ce67a1e467091c76b3623f94448480dc294f64a618840f38c5c51c4545d280fcf77330c1cb90d1b2fe1d07c8f95391992c9
7
- data.tar.gz: 917d7976b55aa59b2c00d3a0c41492af724ef2b5970d68a38663485c68a2ded4b93787533110f6923f9ec65ea83d067ac3beccbbf0879ac4c28a3f1024418a91
6
+ metadata.gz: 2050b772a4da2a8a5a35805656fb9ece78ca22d4eee0924533242f4e04864bbecc84b4e85e661a1b0fdf9f0fc8cca4c8593ddbb6935a11c956668507a6237fb8
7
+ data.tar.gz: 45c2dbc02430a54fd2ca1cbd616a14fd74f368424580e0ecd5f5c495c336362f0df8d2254a7359efd1487efe5ce925f36432312aa269979cbfd044035edc18b6
@@ -65,7 +65,7 @@ module Nanoc
65
65
  # @see IO#<<
66
66
  def <<(str)
67
67
  _nanoc_swallow_broken_pipe_errors_while do
68
- @stream << (_nanoc_clean(str))
68
+ @stream << _nanoc_clean(str)
69
69
  end
70
70
  end
71
71
 
@@ -26,8 +26,6 @@ module Nanoc::CLI::CompileListeners
26
26
  def wrapped_stop
27
27
  stop
28
28
 
29
- Nanoc::Core::NotificationCenter.sync
30
-
31
29
  @_notification_names.each do |name|
32
30
  Nanoc::Core::NotificationCenter.remove(name, self)
33
31
  end
@@ -27,8 +27,8 @@ module Nanoc::CLI::CompileListeners
27
27
  log('compilation', '')
28
28
  end
29
29
 
30
- on(:compilation_suspended) do |rep, target_rep, snapshot_name|
31
- log('compilation', "Suspended compilation of #{rep}: depends on #{target_rep}, snapshot #{snapshot_name}")
30
+ on(:compilation_suspended) do |rep|
31
+ log('compilation', "Suspended compilation of #{rep}")
32
32
  end
33
33
 
34
34
  on(:cached_content_used) do |rep|
@@ -36,18 +36,21 @@ module Nanoc::CLI::CompileListeners
36
36
  @outdatedness_rules_summary.observe(duration, name: klass.to_s.sub(/.*::/, ''))
37
37
  end
38
38
 
39
- filter_stopwatches = {}
39
+ stopwatches_stack = []
40
40
 
41
- on(:filtering_started) do |rep, _filter_name|
42
- stopwatch_stack = filter_stopwatches.fetch(rep) { filter_stopwatches[rep] = [] }
43
- stopwatch_stack << DDMetrics::Stopwatch.new
44
- stopwatch_stack.last.start
41
+ on(:filtering_started) do |_rep, _filter_name|
42
+ # Add new stopwatch and start it
43
+ stopwatch = DDMetrics::Stopwatch.new
44
+ stopwatches_stack << stopwatch
45
+ stopwatch.start
45
46
  end
46
47
 
47
- on(:filtering_ended) do |rep, filter_name|
48
- stopwatch = filter_stopwatches.fetch(rep).pop
48
+ on(:filtering_ended) do |_rep, filter_name|
49
+ # Get topmost stopwatch and stop it
50
+ stopwatch = stopwatches_stack.pop
49
51
  stopwatch.stop
50
52
 
53
+ # Record duration
51
54
  @filters_summary.observe(stopwatch.duration, name: filter_name.to_s)
52
55
  end
53
56
 
@@ -59,14 +62,6 @@ module Nanoc::CLI::CompileListeners
59
62
  @store_stores_summary.observe(duration, name: klass.to_s)
60
63
  end
61
64
 
62
- on(:compilation_suspended) do |rep, _target_rep, _snapshot_name|
63
- filter_stopwatches.fetch(rep).each(&:stop)
64
- end
65
-
66
- on(:compilation_started) do |rep|
67
- filter_stopwatches.fetch(rep, []).each(&:start)
68
- end
69
-
70
65
  setup_phase_notifications
71
66
  end
72
67
 
@@ -8,11 +8,11 @@ module Nanoc::CLI
8
8
  # Enables error handling in the given block.
9
9
  #
10
10
  # @return [void]
11
- def self.handle_while(exit_on_error: true, &block)
11
+ def self.handle_while(exit_on_error: true, &)
12
12
  if @disabled
13
13
  yield
14
14
  else
15
- new.handle_while(exit_on_error:, &block)
15
+ new.handle_while(exit_on_error:, &)
16
16
  end
17
17
  end
18
18
 
@@ -203,6 +203,7 @@ module Nanoc::CLI
203
203
  'nanoc/live' => 'nanoc-live',
204
204
  'nokogiri' => 'nokogiri',
205
205
  'pandoc-ruby' => 'pandoc-ruby',
206
+ 'perfect_toml' => 'perfect_toml',
206
207
  'pry' => 'pry',
207
208
  'rack' => 'rack',
208
209
  'rack/cache' => 'rack-cache',
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module CLI
5
- VERSION = '4.13.5'
5
+ VERSION = '4.14.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.13.5
4
+ version: 4.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - '='
59
59
  - !ruby/object:Gem::Version
60
- version: 4.13.5
60
+ version: 4.14.1
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - '='
66
66
  - !ruby/object:Gem::Version
67
- version: 4.13.5
67
+ version: 4.14.1
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: pry
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -132,7 +132,7 @@ licenses:
132
132
  - MIT
133
133
  metadata:
134
134
  rubygems_mfa_required: 'true'
135
- source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-cli-v4.13.5/nanoc-cli
135
+ source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-cli-v4.14.1/nanoc-cli
136
136
  rdoc_options: []
137
137
  require_paths:
138
138
  - lib
@@ -140,14 +140,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
142
142
  - !ruby/object:Gem::Version
143
- version: '3.1'
143
+ version: '3.2'
144
144
  required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.6.7
150
+ rubygems_version: 3.7.2
151
151
  specification_version: 4
152
152
  summary: CLI for Nanoc
153
153
  test_files: []