program_information 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of program_information might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/README.md +9 -0
- data/bin/program_information +14 -0
- data/doc/CONVENTIONS.md +22 -0
- data/doc/README.gen +9 -0
- data/lib/program_information/constants/array_test_with_this_as_input.rb +120 -0
- data/lib/program_information/constants/colours.rb +42 -0
- data/lib/program_information/constants/constants.rb +55 -0
- data/lib/program_information/constants/regex.rb +85 -0
- data/lib/program_information/initialize.rb +34 -0
- data/lib/program_information/menu.rb +29 -0
- data/lib/program_information/program_information.rb +568 -0
- data/lib/program_information/project/project_base_directory.rb +22 -0
- data/lib/program_information/report.rb +48 -0
- data/lib/program_information/requires/require_the_program_information_project.rb +9 -0
- data/lib/program_information/reset.rb +46 -0
- data/lib/program_information/run.rb +18 -0
- data/lib/program_information/toplevel_methods/e.rb +14 -0
- data/lib/program_information/toplevel_methods/opnn.rb +27 -0
- data/lib/program_information/toplevel_methods/remove_archive_type.rb +32 -0
- data/lib/program_information/toplevel_methods/return_proper_pipe_token_to_this_input.rb +167 -0
- data/lib/program_information/toplevel_methods/return_short_name.rb +38 -0
- data/lib/program_information/toplevel_methods.rb +159 -0
- data/lib/program_information/version/version.rb +22 -0
- data/lib/program_information/www/embeddable_interface.rb +61 -0
- data/lib/program_information.rb +5 -0
- data/program_information.gemspec +50 -0
- data/test/testing_program_information.rb +49 -0
- metadata +115 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
require 'cliner'
|
6
|
+
require 'colours/autoinclude'
|
7
|
+
require 'program_information'
|
8
|
+
|
9
|
+
cliner {
|
10
|
+
e 'Testing project ProgramInformation next.'
|
11
|
+
}; e
|
12
|
+
|
13
|
+
# =========================================================================== #
|
14
|
+
# === TEST_THESE_PROGRAMS
|
15
|
+
#
|
16
|
+
# It is recommended to move more complicated input to the bottom
|
17
|
+
# of this array. That way we can focus on it quickly.
|
18
|
+
# =========================================================================== #
|
19
|
+
TEST_THESE_PROGRAMS = ProgramInformation::ARRAY_TEST_THIS_AS_INPUT.reject(&:empty?)
|
20
|
+
|
21
|
+
# =========================================================================== #
|
22
|
+
# === test
|
23
|
+
# =========================================================================== #
|
24
|
+
def test(i)
|
25
|
+
cliner
|
26
|
+
e
|
27
|
+
e 'Now testing input `'+sfancy(i)+'`.'
|
28
|
+
e
|
29
|
+
begin
|
30
|
+
ProgramInformation::ProgramInformation.new(i).report(:do_report)
|
31
|
+
rescue Exception => error
|
32
|
+
pp error
|
33
|
+
end
|
34
|
+
# _ = ProgramInformation::ProgramInformation.new(entry, true, true)
|
35
|
+
e
|
36
|
+
cliner
|
37
|
+
e # Trailing newline.
|
38
|
+
end
|
39
|
+
|
40
|
+
# =========================================================================== #
|
41
|
+
# Iterate over TEST_THESE_PROGRAMS.
|
42
|
+
# =========================================================================== #
|
43
|
+
TEST_THESE_PROGRAMS.each {|entry| test(entry) }
|
44
|
+
|
45
|
+
TEST_THESE_PROGRAMS.each {|entry|
|
46
|
+
original_entry = entry.dup
|
47
|
+
entry = ProgramInformation.return_proper_pipe_token_to_this_input(entry)
|
48
|
+
e simp(original_entry.ljust(54))+' -> '+sfancy(entry)
|
49
|
+
}
|
metadata
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: program_information
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.9
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Robert A. Heiler
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-08-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: colours
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: remove_file_suffix
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: |2+
|
42
|
+
|
43
|
+
This library is called program_information.
|
44
|
+
|
45
|
+
It allows you to return the real name and the version of strings
|
46
|
+
such as "htop-1.0.2.tar.xz".
|
47
|
+
|
48
|
+
The name would be "htop" and the version would be "1.0.2".
|
49
|
+
|
50
|
+
This project here was needed for the Cookbooks project and the
|
51
|
+
RBT project.
|
52
|
+
|
53
|
+
It has since then become somewhat useful on its own.
|
54
|
+
|
55
|
+
email: shevy@inbox.lt
|
56
|
+
executables: []
|
57
|
+
extensions: []
|
58
|
+
extra_rdoc_files: []
|
59
|
+
files:
|
60
|
+
- README.md
|
61
|
+
- bin/program_information
|
62
|
+
- doc/CONVENTIONS.md
|
63
|
+
- doc/README.gen
|
64
|
+
- lib/program_information.rb
|
65
|
+
- lib/program_information/constants/array_test_with_this_as_input.rb
|
66
|
+
- lib/program_information/constants/colours.rb
|
67
|
+
- lib/program_information/constants/constants.rb
|
68
|
+
- lib/program_information/constants/regex.rb
|
69
|
+
- lib/program_information/initialize.rb
|
70
|
+
- lib/program_information/menu.rb
|
71
|
+
- lib/program_information/program_information.rb
|
72
|
+
- lib/program_information/project/project_base_directory.rb
|
73
|
+
- lib/program_information/report.rb
|
74
|
+
- lib/program_information/requires/require_the_program_information_project.rb
|
75
|
+
- lib/program_information/reset.rb
|
76
|
+
- lib/program_information/run.rb
|
77
|
+
- lib/program_information/toplevel_methods.rb
|
78
|
+
- lib/program_information/toplevel_methods/e.rb
|
79
|
+
- lib/program_information/toplevel_methods/opnn.rb
|
80
|
+
- lib/program_information/toplevel_methods/remove_archive_type.rb
|
81
|
+
- lib/program_information/toplevel_methods/return_proper_pipe_token_to_this_input.rb
|
82
|
+
- lib/program_information/toplevel_methods/return_short_name.rb
|
83
|
+
- lib/program_information/version/version.rb
|
84
|
+
- lib/program_information/www/embeddable_interface.rb
|
85
|
+
- program_information.gemspec
|
86
|
+
- test/testing_program_information.rb
|
87
|
+
homepage: https://rubygems.org/gems/program_information
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 2.5.8
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 3.2.24
|
105
|
+
requirements: []
|
106
|
+
rubygems_version: 3.2.24
|
107
|
+
signing_key:
|
108
|
+
specification_version: 4
|
109
|
+
summary: This library is called program_information. It allows you to return the
|
110
|
+
real name and the version of strings such as "htop-1.0.2.tar.xz". The name would
|
111
|
+
be "htop" and the version would be "1.0.2". This project here was needed for the
|
112
|
+
Cookbooks project and the RBT project. It has since then become somewhat useful
|
113
|
+
on its own.
|
114
|
+
test_files: []
|
115
|
+
...
|