nanoc-cli 4.12.8 → 4.12.10

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: 7b1cf68ac090fa2dd06e13f442217c6cccc371758ea21d07a11a21135520d94c
4
- data.tar.gz: 95aacadb615bc66b00e11e1ee041acea4cda3c2b3f870a6c06cc6d3e498a2195
3
+ metadata.gz: e9d01c5fafe6b66585b8a1442990f1349886e45cf18bc3fb2c686dfc18e06e55
4
+ data.tar.gz: d14895adb548f3dce0ac80b43203978b381a027b0de3aa66120a74e5def9cd48
5
5
  SHA512:
6
- metadata.gz: 18d3bf2e0818f3271296fac135710b482836838ec5eb937ff60078d97971d2d71a795d8d53f9a27608d7ecc7c78ae62d57e1479c0fd5c344ad69abfd04cc08b4
7
- data.tar.gz: b028da04b55c9078be38662afedfe43bbe5ca35b7c128e4f7134f385d5c23f23fbcb4a854903a25ff58fe49ae3a68eb02b3b7a8e21b74ecfe02d1e84069ed1df
6
+ metadata.gz: cae28cb3a5e7f2d2277b45c7c9db6d56c292ed00840a17e15105d93af09e88d0fe2b804afcf9bb9b0d0560837bd57cb5cfb1ac9bfc8ba0dcdb7e151eaa77c9cf
7
+ data.tar.gz: e1cdc9d298475d48eabf05cad121b2210c32cc5011862ee64b980c7cca57a03a59bbd82fa2a8485b6ec7c85606dccb12cb6a0c8b407950863dd4a48bd238a614
@@ -105,25 +105,26 @@ module Nanoc::CLI::Commands
105
105
  raise Nanoc::Core::Errors::InternalInconsistency, "unexpected pred type #{pred.inspect}"
106
106
  end
107
107
 
108
- pred_identifier =
108
+ details =
109
109
  case pred
110
110
  when Nanoc::Core::Document
111
- pred.identifier.to_s
111
+ [pred.identifier.to_s]
112
112
  when Nanoc::Core::Configuration, nil
113
- nil
113
+ []
114
114
  when Nanoc::Core::IdentifiableCollection
115
- case dep.props.raw_content
116
- when true
117
- 'matching any'
118
- else
119
- "matching any of #{dep.props.raw_content.sort.join(', ')}"
120
- end
115
+ describe_identifiable_collection_dependency(dep)
121
116
  else
122
117
  raise Nanoc::Core::Errors::InternalInconsistency, "unexpected pred type #{pred.inspect}"
123
118
  end
124
119
 
125
120
  if pred
126
- puts " [ #{format '%6s', type} ] (#{dep.props}) #{pred_identifier}"
121
+ print " [ #{format '%7s', type} ] (#{dep.props})"
122
+
123
+ if details.any?
124
+ print ' '
125
+ end
126
+
127
+ puts details.join("\n ")
127
128
  else
128
129
  puts ' ( removed )'
129
130
  end
@@ -132,6 +133,47 @@ module Nanoc::CLI::Commands
132
133
  end
133
134
  end
134
135
 
136
+ def describe_identifiable_collection_dependency(dep)
137
+ outcome = []
138
+
139
+ case dep.props.raw_content
140
+ when true
141
+ outcome << 'matching any identifier'
142
+ when Set
143
+ dep.props.raw_content.sort.each do |x|
144
+ outcome << "matching identifier #{x}"
145
+ end
146
+ end
147
+
148
+ if dep.props.attributes
149
+ case dep.props.attributes
150
+ when true
151
+ outcome << 'matching any attribute'
152
+ when Set
153
+ dep.props.attributes.each do |elem|
154
+ case elem
155
+ when Symbol
156
+ outcome << "matching attribute #{elem.inspect} (any value)"
157
+ when Array
158
+ outcome << "matching attribute pair #{elem[0].inspect} => #{elem[1].inspect}"
159
+ else
160
+ raise(
161
+ Nanoc::Core::Errors::InternalInconsistency,
162
+ "unexpected prop attribute element #{elem.inspect}",
163
+ )
164
+ end
165
+ end
166
+ else
167
+ raise(
168
+ Nanoc::Core::Errors::InternalInconsistency,
169
+ "unexpected prop attribute #{dep.props.attributes.inspect}",
170
+ )
171
+ end
172
+ end
173
+
174
+ outcome
175
+ end
176
+
135
177
  def print_item_rep_paths(items, reps)
136
178
  print_header('Item representation paths')
137
179
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module CLI
5
- VERSION = '4.12.8'
5
+ VERSION = '4.12.10'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.12.8
4
+ version: 4.12.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-03 00:00:00.000000000 Z
11
+ date: 2022-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 4.12.8
47
+ version: 4.12.10
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 4.12.8
54
+ version: 4.12.10
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: zeitwerk
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.3.22
124
+ rubygems_version: 3.3.24
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: CLI for Nanoc