judges 0.15.1 → 0.15.3

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: 1167a70af81049059fa23cd0fc3aa55d8121be63a485a1505722f121fe6e0cf2
4
- data.tar.gz: 01ba49b74c442f68a50c00ffb05ae02ec6c47083c267488d65ba61c2dadff7c0
3
+ metadata.gz: c55f53ae0053a336a2f35c02046a4def974a981bde802c79472db1692ff76e34
4
+ data.tar.gz: 0d6eff130d9e2fe484427341e31c55087d4d31aa5cd44d88bd8cbec866b4c836
5
5
  SHA512:
6
- metadata.gz: 757c3f6e51cde316d20c969401590a70f7689cc7b940ce7b163c5a035163b7302ab713bdfdd887ea29151c4daa849d4dc981dbacd93ccc791d55691e0b3fad5b
7
- data.tar.gz: 9949da5d8596b9ff74e0229f6b787b1bc94bd15732cab181e12aa1bdf1bc3102004a85e6220ad171858e96aa1e76a8991019a83117ff17eec2b33d18e294fab4
6
+ metadata.gz: f83f3a441a93594460592a1b5052d1f76b720fe0ce3b5f6d4b4834093c4092e3689407983aaa7009a285628ae25d606ba23defb098b0f11085a28010cd1ac3c5
7
+ data.tar.gz: f19e035da56f053efbef01065040d85018834538785ac6dca4c10536e0e65f7d8dd85cc3097e86fe73d49f8c00a89b53930f6571c4814cbe44c2234efc1de443
data/assets/index.xsl CHANGED
@@ -1,11 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!--
3
- MIT License
3
+ (The MIT License)
4
4
 
5
- Copyright (c) 2024 Zerocracy
5
+ Copyright (c) 2024 Yegor Bugayenko
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
8
+ of this software and associated documentation files (the 'Software'), to deal
9
9
  in the Software without restriction, including without limitation the rights
10
10
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
11
  copies of the Software, and to permit persons to whom the Software is
@@ -14,7 +14,7 @@ furnished to do so, subject to the following conditions:
14
14
  The above copyright notice and this permission notice shall be included in all
15
15
  copies or substantial portions of the Software.
16
16
 
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
18
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
19
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
20
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@@ -24,7 +24,7 @@ SOFTWARE.
24
24
  -->
25
25
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
26
26
  <xsl:output method="xml" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes"/>
27
- <xsl:param name="name"/>
27
+ <xsl:param name="title"/>
28
28
  <xsl:param name="date"/>
29
29
  <xsl:param name="version"/>
30
30
  <xsl:param name="columns"/>
@@ -40,7 +40,7 @@ SOFTWARE.
40
40
  <head>
41
41
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
42
42
  <title>
43
- <xsl:value-of select="$name"/>
43
+ <xsl:value-of select="$title"/>
44
44
  </title>
45
45
  <meta charset="UTF-8"/>
46
46
  <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
@@ -169,10 +169,11 @@ SOFTWARE.
169
169
  <xsl:otherwise>
170
170
  <td>
171
171
  <xsl:for-each select="$f/*">
172
- <xsl:variable name="visible" select="string-length(substring-before(concat(',', $hidden, ','), concat(name(), ','))) != 0"/>
172
+ <xsl:text> </xsl:text>
173
+ <xsl:variable name="visible" select="string-length(substring-before(concat(',', $hidden, ','), concat(name(), ','))) = 0"/>
173
174
  <xsl:if test="string-length(substring-before(concat(',', $columns, ','), concat(name(), ','))) = 0">
174
175
  <xsl:choose>
175
- <xsl:when test="not($visible)">
176
+ <xsl:when test="$visible">
176
177
  <xsl:value-of select="name()"/>
177
178
  </xsl:when>
178
179
  <xsl:otherwise>
data/bin/judges CHANGED
@@ -115,6 +115,8 @@ class App
115
115
  c.flag([:format], default_value: 'yaml')
116
116
  c.desc 'Generate output name of the file automatically'
117
117
  c.switch([:auto], default_value: false)
118
+ c.desc 'The title of the document to use'
119
+ c.flag([:title], default_value: 'summary')
118
120
  c.desc 'Only the facts that match the expression are printed'
119
121
  c.flag([:query], default_value: '(always)')
120
122
  c.desc 'Comma separated list of columns to show in HTML output (no spaces!)'
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.15.1'
29
+ s.version = '0.15.3'
30
30
  s.license = 'MIT'
31
31
  s.summary = 'Command-Line Tool for a Factbase'
32
32
  s.description =
data/lib/judges/baza.rb CHANGED
@@ -33,7 +33,7 @@ require_relative '../judges/elapsed'
33
33
  # License:: MIT
34
34
  class Judges::Baza
35
35
  # rubocop:disable Metrics/ParameterLists
36
- def initialize(host, port, token, ssl: true, timeout: 5, loog: Loog::NULL)
36
+ def initialize(host, port, token, ssl: true, timeout: 30, loog: Loog::NULL)
37
37
  # rubocop:enable Metrics/ParameterLists
38
38
  @host = host
39
39
  @port = port
@@ -88,7 +88,7 @@ class Judges::Print
88
88
  xslt.transform(
89
89
  Nokogiri::XML(xml),
90
90
  Nokogiri::XSLT.quote_params(
91
- 'name' => 'print',
91
+ 'title' => opts['title'],
92
92
  'date' => Time.now.utc.iso8601,
93
93
  'columns' => opts['columns'] || 'when,what,who',
94
94
  'hidden' => opts['hidden'] || '_id,_version,_time',
@@ -41,7 +41,7 @@ class Judges::Pull
41
41
  baza = Judges::Baza.new(
42
42
  opts['host'], opts['port'].to_i, opts['token'],
43
43
  ssl: opts['ssl'],
44
- timeout: (opts['timeout'] || 5).to_i,
44
+ timeout: (opts['timeout'] || 30).to_i,
45
45
  loog: @loog
46
46
  )
47
47
  name = args[0]
@@ -42,7 +42,7 @@ class Judges::Push
42
42
  baza = Judges::Baza.new(
43
43
  opts['host'], opts['port'].to_i, opts['token'],
44
44
  ssl: opts['ssl'],
45
- timeout: (opts['timeout'] || 5).to_i,
45
+ timeout: (opts['timeout'] || 30).to_i,
46
46
  loog: @loog
47
47
  )
48
48
  elapsed(@loog) do
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.15.1'
28
+ VERSION = '0.15.3'
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judges
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko