judges 0.14.0 → 0.15.1

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: 4e0f862acb1777b529b8c2547dc093020b1a345a5346677c42da550ebc0a26f3
4
- data.tar.gz: 112b3b28257d620993031f4a647a9b2665e425249fd4de92b05100e304aec20a
3
+ metadata.gz: 1167a70af81049059fa23cd0fc3aa55d8121be63a485a1505722f121fe6e0cf2
4
+ data.tar.gz: 01ba49b74c442f68a50c00ffb05ae02ec6c47083c267488d65ba61c2dadff7c0
5
5
  SHA512:
6
- metadata.gz: 427f79f2e3445a9bbb7ca02384ad3676f0a663cd428430ecbcf8f79f7d03496513c513960585a7a4d303a3cab756aca307d99a0209a256fb7baeb194bbd428ef
7
- data.tar.gz: 8c38481a417786e9ddc516fa7b323433d481d827607bae63aedb47381ccb37ea9633fd5241002dd7b32abac4e6319b9fb808cee5c44f09b1a452682cf4e287d4
6
+ metadata.gz: 757c3f6e51cde316d20c969401590a70f7689cc7b940ce7b163c5a035163b7302ab713bdfdd887ea29151c4daa849d4dc981dbacd93ccc791d55691e0b3fad5b
7
+ data.tar.gz: 9949da5d8596b9ff74e0229f6b787b1bc94bd15732cab181e12aa1bdf1bc3102004a85e6220ad171858e96aa1e76a8991019a83117ff17eec2b33d18e294fab4
data/Gemfile.lock CHANGED
@@ -89,7 +89,7 @@ GEM
89
89
  erubi (1.13.0)
90
90
  ethon (0.16.0)
91
91
  ffi (>= 1.15.0)
92
- factbase (0.0.57)
92
+ factbase (0.0.60)
93
93
  backtrace (~> 0.3)
94
94
  decoor (~> 0.0)
95
95
  json (~> 2.7)
@@ -149,7 +149,7 @@ GEM
149
149
  stringio
150
150
  public_suffix (6.0.0)
151
151
  racc (1.8.0)
152
- rack (3.1.4)
152
+ rack (3.1.6)
153
153
  rack-session (2.0.0)
154
154
  rack (>= 3.0.0)
155
155
  rack-test (2.1.0)
data/assets/index.xsl CHANGED
@@ -28,6 +28,7 @@ SOFTWARE.
28
28
  <xsl:param name="date"/>
29
29
  <xsl:param name="version"/>
30
30
  <xsl:param name="columns"/>
31
+ <xsl:param name="hidden"/>
31
32
  <xsl:template name="javascript">
32
33
  <xsl:param name="url"/>
33
34
  <script type="text/javascript" src="{$url}">
@@ -168,15 +169,24 @@ SOFTWARE.
168
169
  <xsl:otherwise>
169
170
  <td>
170
171
  <xsl:for-each select="$f/*">
172
+ <xsl:variable name="visible" select="string-length(substring-before(concat(',', $hidden, ','), concat(name(), ','))) != 0"/>
171
173
  <xsl:if test="string-length(substring-before(concat(',', $columns, ','), concat(name(), ','))) = 0">
172
- <xsl:if test="position() &gt; 1">
173
- <xsl:text>, </xsl:text>
174
+ <xsl:choose>
175
+ <xsl:when test="not($visible)">
176
+ <xsl:value-of select="name()"/>
177
+ </xsl:when>
178
+ <xsl:otherwise>
179
+ <span style="color:gray;">
180
+ <xsl:value-of select="name()"/>
181
+ </span>
182
+ </xsl:otherwise>
183
+ </xsl:choose>
184
+ <xsl:if test="$visible">
185
+ <xsl:text>:</xsl:text>
186
+ <xsl:call-template name="value">
187
+ <xsl:with-param name="v" select="."/>
188
+ </xsl:call-template>
174
189
  </xsl:if>
175
- <xsl:value-of select="name()"/>
176
- <xsl:text>:</xsl:text>
177
- <xsl:call-template name="value">
178
- <xsl:with-param name="v" select="."/>
179
- </xsl:call-template>
180
190
  </xsl:if>
181
191
  </xsl:for-each>
182
192
  </td>
@@ -212,6 +222,9 @@ SOFTWARE.
212
222
  <xsl:when test="$v/@t = 'I'">
213
223
  <xsl:text>#212F3C</xsl:text>
214
224
  </xsl:when>
225
+ <xsl:when test="$v/@t = 'F'">
226
+ <xsl:text>#E74C3C</xsl:text>
227
+ </xsl:when>
215
228
  </xsl:choose>
216
229
  </xsl:attribute>
217
230
  <xsl:value-of select="$v"/>
data/bin/judges CHANGED
@@ -119,6 +119,8 @@ class App
119
119
  c.flag([:query], default_value: '(always)')
120
120
  c.desc 'Comma separated list of columns to show in HTML output (no spaces!)'
121
121
  c.flag([:columns], default_value: 'when,what')
122
+ c.desc 'Comma separated list of hidden columns, not to be rendered (no spaces!)'
123
+ c.flag([:hidden], default_value: '_id,_time,_version')
122
124
  c.desc 'Print even if target file already exists and is older than the factbase'
123
125
  c.switch([:force], default_value: false)
124
126
  c.action do |global, options, args|
data/judges.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
27
27
  s.required_ruby_version = '>=3.2'
28
28
  s.name = 'judges'
29
- s.version = '0.14.0'
29
+ s.version = '0.15.1'
30
30
  s.license = 'MIT'
31
31
  s.summary = 'Command-Line Tool for a Factbase'
32
32
  s.description =
@@ -90,7 +90,8 @@ class Judges::Print
90
90
  Nokogiri::XSLT.quote_params(
91
91
  'name' => 'print',
92
92
  'date' => Time.now.utc.iso8601,
93
- 'columns' => opts['columns'] || 'when,what',
93
+ 'columns' => opts['columns'] || 'when,what,who',
94
+ 'hidden' => opts['hidden'] || '_id,_version,_time',
94
95
  'version' => Judges::VERSION
95
96
  )
96
97
  )
@@ -102,7 +102,7 @@ class Judges::Update
102
102
  elapsed(@loog) do
103
103
  c = one_judge(fb, p, global, options)
104
104
  churn += c
105
- throw :"👍 The judge #{p.name} modified #{c} facts"
105
+ throw :"👍 The judge #{p.name} modified #{c} facts out of #{fb.size}"
106
106
  end
107
107
  rescue StandardError, SyntaxError => e
108
108
  @loog.warn(Backtrace.new(e))
data/lib/judges.rb CHANGED
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2024 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Judges
28
- VERSION = '0.14.0'
28
+ VERSION = '0.15.1'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judges
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-02 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace