program_information 1.2.3

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.

Files changed (29) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +77 -0
  3. data/bin/program_information +14 -0
  4. data/doc/CONVENTIONS.md +22 -0
  5. data/doc/README.gen +37 -0
  6. data/lib/program_information/constants/array_test_with_this_as_input.rb +121 -0
  7. data/lib/program_information/constants/colours.rb +42 -0
  8. data/lib/program_information/constants/constants.rb +55 -0
  9. data/lib/program_information/constants/regex.rb +87 -0
  10. data/lib/program_information/initialize.rb +43 -0
  11. data/lib/program_information/menu.rb +29 -0
  12. data/lib/program_information/program_information.rb +569 -0
  13. data/lib/program_information/project/project.rb +22 -0
  14. data/lib/program_information/report.rb +48 -0
  15. data/lib/program_information/requires/require_the_program_information_project.rb +9 -0
  16. data/lib/program_information/reset.rb +46 -0
  17. data/lib/program_information/run.rb +18 -0
  18. data/lib/program_information/toplevel_methods/e.rb +14 -0
  19. data/lib/program_information/toplevel_methods/opnn.rb +27 -0
  20. data/lib/program_information/toplevel_methods/remove_archive_type.rb +32 -0
  21. data/lib/program_information/toplevel_methods/return_proper_pipe_token_to_this_input.rb +169 -0
  22. data/lib/program_information/toplevel_methods/return_short_name.rb +38 -0
  23. data/lib/program_information/toplevel_methods.rb +162 -0
  24. data/lib/program_information/version/version.rb +22 -0
  25. data/lib/program_information/www/embeddable_interface.rb +61 -0
  26. data/lib/program_information.rb +5 -0
  27. data/program_information.gemspec +52 -0
  28. data/test/testing_program_information.rb +49 -0
  29. metadata +107 -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,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: program_information
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.3
5
+ platform: ruby
6
+ authors:
7
+ - Robert A. Heiler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-08-27 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: "\nThis library is called program_information.\n\nIt allows you to return
42
+ the real name and the version of strings\nsuch as \"htop-1.0.2.tar.xz\".\n\nThe
43
+ name would be \"htop\" and the version would be \"1.0.2\".\n\nThis project here
44
+ was needed for the Cookbooks project and the\nRBT project.\n\nIt has since then
45
+ become somewhat useful on its own - at \nthe least for projects that need to parse
46
+ the name and\nprogram version of given Strings.\n\n"
47
+ email: shevy@inbox.lt
48
+ executables: []
49
+ extensions: []
50
+ extra_rdoc_files: []
51
+ files:
52
+ - README.md
53
+ - bin/program_information
54
+ - doc/CONVENTIONS.md
55
+ - doc/README.gen
56
+ - lib/program_information.rb
57
+ - lib/program_information/constants/array_test_with_this_as_input.rb
58
+ - lib/program_information/constants/colours.rb
59
+ - lib/program_information/constants/constants.rb
60
+ - lib/program_information/constants/regex.rb
61
+ - lib/program_information/initialize.rb
62
+ - lib/program_information/menu.rb
63
+ - lib/program_information/program_information.rb
64
+ - lib/program_information/project/project.rb
65
+ - lib/program_information/report.rb
66
+ - lib/program_information/requires/require_the_program_information_project.rb
67
+ - lib/program_information/reset.rb
68
+ - lib/program_information/run.rb
69
+ - lib/program_information/toplevel_methods.rb
70
+ - lib/program_information/toplevel_methods/e.rb
71
+ - lib/program_information/toplevel_methods/opnn.rb
72
+ - lib/program_information/toplevel_methods/remove_archive_type.rb
73
+ - lib/program_information/toplevel_methods/return_proper_pipe_token_to_this_input.rb
74
+ - lib/program_information/toplevel_methods/return_short_name.rb
75
+ - lib/program_information/version/version.rb
76
+ - lib/program_information/www/embeddable_interface.rb
77
+ - program_information.gemspec
78
+ - test/testing_program_information.rb
79
+ homepage: https://rubygems.org/gems/program_information
80
+ licenses:
81
+ - MIT
82
+ metadata: {}
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 2.5.8
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 3.3.20
97
+ requirements: []
98
+ rubygems_version: 3.3.20
99
+ signing_key:
100
+ specification_version: 4
101
+ summary: This library is called program_information. It allows you to return the
102
+ real name and the version of strings such as "htop-1.0.2.tar.xz". The name would
103
+ be "htop" and the version would be "1.0.2". This project here was needed for the
104
+ Cookbooks project and the RBT project. It has since then become somewhat useful
105
+ on its own - at the least for projects that need to parse the name and program
106
+ version of given Strings.
107
+ test_files: []