nanoc-cli 4.12.8 → 4.12.9

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
  SHA256:
3
- metadata.gz: 7b1cf68ac090fa2dd06e13f442217c6cccc371758ea21d07a11a21135520d94c
4
- data.tar.gz: 95aacadb615bc66b00e11e1ee041acea4cda3c2b3f870a6c06cc6d3e498a2195
3
+ metadata.gz: 5d8a8f6896a3271b909b3dc379dedfd047887d018439768e72211a34d3aa98d3
4
+ data.tar.gz: a8f411071943c4f155d8bc3a236c6b19d6cd6bdb5d938f327a3200d01f50f69c
5
5
  SHA512:
6
- metadata.gz: 18d3bf2e0818f3271296fac135710b482836838ec5eb937ff60078d97971d2d71a795d8d53f9a27608d7ecc7c78ae62d57e1479c0fd5c344ad69abfd04cc08b4
7
- data.tar.gz: b028da04b55c9078be38662afedfe43bbe5ca35b7c128e4f7134f385d5c23f23fbcb4a854903a25ff58fe49ae3a68eb02b3b7a8e21b74ecfe02d1e84069ed1df
6
+ metadata.gz: 82bffc4da578b0a27c2d74cf7e8381263fd0f4d1eb185a995c8b0c0afcd67472b9216d7f0765f36a9c1438b64121967f623cd4f9c4704a88306ca76cb761d135
7
+ data.tar.gz: 330f4a48d65f629d7f6352824e43c325af5ee98c5b94358b5a0bb4661870db4fbc39914c377fbd5ff3ce9a49c6e6fc50419d525aff153a3ae36352a1d1133e6c
@@ -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.9'
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.9
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-08 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.9
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.9
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: zeitwerk
57
57
  requirement: !ruby/object:Gem::Requirement