timequiz 1.0 → 1.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 +4 -4
- data/changes.txt +5 -0
- data/lib/argparser.rb +1 -0
- data/lib/extstring.rb +2 -1
- data/lib/version.rb +3 -3
- data/timequiz.gemspec +5 -4
- metadata +8 -7
- data/lib/file_checking.rb +0 -83
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dac86187e1ed798d87accd6cedab49cbffb769000c44da2e325c7558c15879ea
|
|
4
|
+
data.tar.gz: 18f0bcaf694b2a0a4cd9b35d0b7cbdfb30f3407e89ee88602d8574a049ed5cf1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd407d824d85ddb4f8bea586dc9c943b09de3a7b20bd68fa82f637567965d6266cacff51cb26aa42a020f5953924f1df129e700ff5f71d1edd30e1c6ce74d210
|
|
7
|
+
data.tar.gz: 2e091802751e1f73bc72c807d041d6ac1f17de4a3c7c225164dce13be5c2f6396cd005edbbf21044d903c8bcbaa60abfbdc5deadf78fe81c53a07f10116fd6b0
|
data/changes.txt
ADDED
data/lib/argparser.rb
CHANGED
data/lib/extstring.rb
CHANGED
|
@@ -149,6 +149,7 @@ if __FILE__ == $0
|
|
|
149
149
|
s << "2) Man gab uns mancherlei auf Erden.\nZum Denken gab man uns die Stirn."
|
|
150
150
|
s << "2a) Man gab uns Herz- und Leibbeschwerden.\nDoch auch den Himmel und den Zwirn."
|
|
151
151
|
s << "3) Himmel, Ding und Zwirn."
|
|
152
|
-
s.wrap(
|
|
152
|
+
s.wrap(80, /\d\)/)
|
|
153
|
+
puts s
|
|
153
154
|
puts s.box(:min_width=>20, :left => 20)
|
|
154
155
|
end
|
data/lib/version.rb
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
=end
|
|
17
17
|
|
|
18
18
|
APPNAME = 'Timequiz'
|
|
19
|
-
VERSION = '1.
|
|
20
|
-
SUMMARY = '
|
|
19
|
+
VERSION = '1.1'
|
|
20
|
+
SUMMARY = 'Play a history game'
|
|
21
21
|
AUTHOR = 'Michael Uplawski'
|
|
22
22
|
AUTHOR_MAIL = '<michael.uplawski@uplawski.eu>'
|
|
23
|
-
YEARS = 2017 - 2026
|
|
23
|
+
YEARS = '2017 - 2026'
|
data/timequiz.gemspec
CHANGED
|
@@ -6,17 +6,18 @@ Gem::Specification.new do |s|
|
|
|
6
6
|
s.name = File.basename(__FILE__, '.gemspec')
|
|
7
7
|
s.date = Date.today.strftime('%F')
|
|
8
8
|
s.summary = SUMMARY
|
|
9
|
-
s.description = "
|
|
9
|
+
s.description = "A game that makes you put historical events in chronological order."
|
|
10
10
|
s.authors = ["Michael Uplawski"]
|
|
11
11
|
s.email = 'michael.uplawski@uplawski.eu'
|
|
12
|
-
s.files = %w~timequiz~.collect{|f| 'bin/' << f} + %w~basic_logging.rb version.rb
|
|
12
|
+
s.files = %w~timequiz~.collect{|f| 'bin/' << f} + %w~basic_logging.rb version.rb adder.rb argparser.rb busy_indicator.rb color_output.rb console.rb constants.rb event.rb events.rb extstring.rb user_input.rb timequiz.rb~.collect{|f| 'lib/' << f} + %w~timequiz.gemspec changes.txt README.md~.collect{|f|f} + %w~man/timequiz.6.gz html/timequiz.html pdf/timequiz.pdf rst/timequiz.rst license.txt~.collect{|f| 'doc/' << f}
|
|
13
13
|
#s.requirements = ''
|
|
14
14
|
#s.add_runtime_dependency ''
|
|
15
15
|
s.executables = 'timequiz'
|
|
16
|
-
s.license = '
|
|
16
|
+
s.license = 'WTFPL'
|
|
17
17
|
s.required_ruby_version = '>= 2.7'
|
|
18
18
|
s.metadata = {
|
|
19
19
|
"homepage_uri" => 'https://www.uplawski.eu/software/timequiz/',
|
|
20
|
-
"documentation_uri" => 'https://www.uplawski.eu/software/timequiz/man_timequiz.html'
|
|
20
|
+
"documentation_uri" => 'https://www.uplawski.eu/software/timequiz/man_timequiz.html',
|
|
21
|
+
"changelog_uri" => 'https://www.uplawski.eu/software/timequiz/changes.txt'
|
|
21
22
|
}
|
|
22
23
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: timequiz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '1.
|
|
4
|
+
version: '1.1'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Uplawski
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-09-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
|
-
description:
|
|
12
|
+
description: A game that makes you put historical events in chronological order.
|
|
13
13
|
email: michael.uplawski@uplawski.eu
|
|
14
14
|
executables:
|
|
15
15
|
- timequiz
|
|
@@ -18,6 +18,7 @@ extra_rdoc_files: []
|
|
|
18
18
|
files:
|
|
19
19
|
- README.md
|
|
20
20
|
- bin/timequiz
|
|
21
|
+
- changes.txt
|
|
21
22
|
- doc/html/timequiz.html
|
|
22
23
|
- doc/license.txt
|
|
23
24
|
- doc/man/timequiz.6.gz
|
|
@@ -33,16 +34,16 @@ files:
|
|
|
33
34
|
- lib/event.rb
|
|
34
35
|
- lib/events.rb
|
|
35
36
|
- lib/extstring.rb
|
|
36
|
-
- lib/file_checking.rb
|
|
37
37
|
- lib/timequiz.rb
|
|
38
38
|
- lib/user_input.rb
|
|
39
39
|
- lib/version.rb
|
|
40
40
|
- timequiz.gemspec
|
|
41
41
|
licenses:
|
|
42
|
-
-
|
|
42
|
+
- WTFPL
|
|
43
43
|
metadata:
|
|
44
44
|
homepage_uri: https://www.uplawski.eu/software/timequiz/
|
|
45
45
|
documentation_uri: https://www.uplawski.eu/software/timequiz/man_timequiz.html
|
|
46
|
+
changelog_uri: https://www.uplawski.eu/software/timequiz/changes.txt
|
|
46
47
|
rdoc_options: []
|
|
47
48
|
require_paths:
|
|
48
49
|
- lib
|
|
@@ -57,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
57
58
|
- !ruby/object:Gem::Version
|
|
58
59
|
version: '0'
|
|
59
60
|
requirements: []
|
|
60
|
-
rubygems_version: 4.0.
|
|
61
|
+
rubygems_version: 4.0.18
|
|
61
62
|
specification_version: 4
|
|
62
|
-
summary:
|
|
63
|
+
summary: Play a history game
|
|
63
64
|
test_files: []
|
data/lib/file_checking.rb
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#encoding: UTF-8
|
|
2
|
-
=begin
|
|
3
|
-
/***************************************************************************
|
|
4
|
-
* ©2017-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
|
5
|
-
* *
|
|
6
|
-
* This program is free software; you can redistribute it and/or modify *
|
|
7
|
-
* it under the terms of the WTFPL 2.0 or later, see *
|
|
8
|
-
* http://www.wtfpl.net/about/ *
|
|
9
|
-
* *
|
|
10
|
-
* This program is distributed in the hope that it will be useful, *
|
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
|
13
|
-
* *
|
|
14
|
-
***************************************************************************/
|
|
15
|
-
=end
|
|
16
|
-
|
|
17
|
-
=begin
|
|
18
|
-
A module to facilitate frequently occuring checks on
|
|
19
|
-
file-system objects. You can certainly do without this,
|
|
20
|
-
but maybe you find it useful.
|
|
21
|
-
=end
|
|
22
|
-
module File_Checking
|
|
23
|
-
|
|
24
|
-
@@text_messages = {
|
|
25
|
-
:exist? => "does not exist!",
|
|
26
|
-
:exist => "does not exist!",
|
|
27
|
-
:readable? => "is not readable!",
|
|
28
|
-
:readable => "is not readable!",
|
|
29
|
-
:executable? => "is not executable!",
|
|
30
|
-
:executable => "is not executable!",
|
|
31
|
-
:writable? => "is not writable!",
|
|
32
|
-
:writable => "is not writable!",
|
|
33
|
-
:directory? => "is not a directory!",
|
|
34
|
-
:directory => "is not a directory!",
|
|
35
|
-
:file? => "is not a file!",
|
|
36
|
-
:file => "is not a file!",
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
# Checks if the file with the name from the first
|
|
40
|
-
# parameter has the properties, listed in the second.
|
|
41
|
-
# The messages parameter is an array of one or several
|
|
42
|
-
# of :exist?, :readable?, :writable?, :directory? or
|
|
43
|
-
# their string-representations, respectively.
|
|
44
|
-
# Returns nil in case of success, otherwise an
|
|
45
|
-
# informative message, describing the first negative
|
|
46
|
-
# test-result.
|
|
47
|
-
def file_check(file, *messages)
|
|
48
|
-
File_Checking.file_check(file, *messages)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
# Checks if the file with the name from the first
|
|
52
|
-
# parameter has the properties, listed in the second.
|
|
53
|
-
# The messages parameter is an array of one or all
|
|
54
|
-
# of :exist?, :readable?, :writable?, :directory? or
|
|
55
|
-
# their string-representations, respectively.
|
|
56
|
-
# Returns nil in case of success, otherwise an
|
|
57
|
-
# informative message, describing the first negative
|
|
58
|
-
# test-result.
|
|
59
|
-
def self.file_check(file, *messages)
|
|
60
|
-
msg = nil
|
|
61
|
-
if(file && messages.respond_to?(:to_ary) && !messages.empty?)
|
|
62
|
-
messages.each do |k|
|
|
63
|
-
if(! k.to_s.end_with?('?'))
|
|
64
|
-
k = (k.to_s << '?').to_sym
|
|
65
|
-
end
|
|
66
|
-
@log.debug ('checking ' << k.to_s) if @log
|
|
67
|
-
if(msg == nil && File.respond_to?(k) && ! File.send(k, file.to_s))
|
|
68
|
-
msg = "#{file} #{@@text_messages[k.to_sym]}"
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
msg
|
|
73
|
-
end
|
|
74
|
-
alias :check_file :file_check
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
=begin
|
|
78
|
-
# example
|
|
79
|
-
|
|
80
|
-
include File_Checking
|
|
81
|
-
msg = file_check('some_file.txt', [:exist?, :readable?, 'writable'])
|
|
82
|
-
puts msg if msg
|
|
83
|
-
=end
|