environment_information 1.4.124 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +91 -15
- data/doc/README.gen +42 -14
- data/doc/todo/TODO_FOR_THE_ENVIRONMENT_INFORMATION_PROJECT.md +16 -12
- data/lib/environment_information/base/base.rb +483 -99
- data/lib/environment_information/colours/colours.rb +92 -66
- data/lib/environment_information/commandline/commandline.rb +137 -0
- data/lib/environment_information/constants/constants.rb +372 -11
- data/lib/environment_information/project/project.rb +1 -1
- data/lib/environment_information/query/constants.rb +46 -0
- data/lib/environment_information/query/help.rb +88 -0
- data/lib/environment_information/query/menu.rb +487 -0
- data/lib/environment_information/query/misc.rb +2006 -0
- data/lib/environment_information/query/query.rb +245 -0
- data/lib/environment_information/query/reset.rb +202 -0
- data/lib/environment_information/query/run.rb +70 -0
- data/lib/environment_information/requires/require_the_environment_information_project.rb +2 -7
- data/lib/environment_information/requires/require_the_toplevel_methods.rb +1 -3
- data/lib/environment_information/toplevel_methods/toplevel_methods.rb +2258 -0
- data/lib/environment_information/version/version.rb +2 -2
- data/lib/environment_information/www/sinatra_interface.rb +20 -17
- data/lib/environment_information/www/webobject_interface.cgi +6 -7
- data/lib/environment_information/yaml/colours.yml +3 -3
- data/lib/environment_information/yaml/query_to_use_for_all_components.yml +284 -0
- data/lib/environment_information/yaml/{array_tracked_programs.yml → track_these_components.yml} +77 -11
- metadata +18 -60
- data/lib/environment_information/class/class.rb +0 -2580
- data/lib/environment_information/class/colours.rb +0 -282
- data/lib/environment_information/colours/sfancy.rb +0 -19
- data/lib/environment_information/colours/simp.rb +0 -19
- data/lib/environment_information/constants/array_tracked_components.rb +0 -210
- data/lib/environment_information/constants/encoding.rb +0 -21
- data/lib/environment_information/constants/error_line.rb +0 -17
- data/lib/environment_information/constants/file_constants.rb +0 -102
- data/lib/environment_information/constants/misc.rb +0 -86
- data/lib/environment_information/constants/namespace.rb +0 -14
- data/lib/environment_information/constants/newline.rb +0 -16
- data/lib/environment_information/constants/regex.rb +0 -30
- data/lib/environment_information/constants/temp_directory.rb +0 -52
- data/lib/environment_information/misc_components/README.md +0 -3
- data/lib/environment_information/misc_components/cflags.rb +0 -36
- data/lib/environment_information/misc_components/cpuinfo.rb +0 -64
- data/lib/environment_information/misc_components/operating_system.rb +0 -54
- data/lib/environment_information/misc_components/operating_system_bit_type.rb +0 -42
- data/lib/environment_information/misc_components/ram.rb +0 -30
- data/lib/environment_information/misc_components/rubygems_installation_directory.rb +0 -54
- data/lib/environment_information/misc_components/screen_resolution.rb +0 -50
- data/lib/environment_information/queries/README.md +0 -2
- data/lib/environment_information/queries/complex_version.rb +0 -273
- data/lib/environment_information/queries/pkg_config.rb +0 -125
- data/lib/environment_information/queries/simple_version.rb +0 -272
- data/lib/environment_information/requires/require_the_individual_misc_components.rb +0 -30
- data/lib/environment_information/toplevel_methods/autogenerate_all_relevant_methods.rb +0 -153
- data/lib/environment_information/toplevel_methods/cd.rb +0 -16
- data/lib/environment_information/toplevel_methods/e.rb +0 -43
- data/lib/environment_information/toplevel_methods/hash.rb +0 -65
- data/lib/environment_information/toplevel_methods/internet_is_available.rb +0 -30
- data/lib/environment_information/toplevel_methods/is_on_roebe.rb +0 -16
- data/lib/environment_information/toplevel_methods/menu.rb +0 -90
- data/lib/environment_information/toplevel_methods/misc.rb +0 -324
- data/lib/environment_information/toplevel_methods/n_subcommands.rb +0 -31
- data/lib/environment_information/toplevel_methods/prefix_to_use.rb +0 -39
- data/lib/environment_information/toplevel_methods/register_this_component_is_missing.rb +0 -61
- data/lib/environment_information/toplevel_methods/remote_url_of_this_program.rb +0 -45
- data/lib/environment_information/toplevel_methods/replay_from_the_stored_file.rb +0 -84
- data/lib/environment_information/toplevel_methods/return_alias_to.rb +0 -30
- data/lib/environment_information/toplevel_methods/return_pkgconfig_based_programs.rb +0 -28
- data/lib/environment_information/toplevel_methods/return_remote_gtk2_version.rb +0 -54
- data/lib/environment_information/toplevel_methods/return_simple_version_based_programs.rb +0 -28
- data/lib/environment_information/toplevel_methods/return_version_of_this_program.rb +0 -182
- data/lib/environment_information/toplevel_methods/show_all_available_components.rb +0 -192
- data/lib/environment_information/toplevel_methods/write_what_into.rb +0 -24
- data/lib/environment_information/yaml/array_default_programs_on_linux.yml +0 -15
- data/lib/environment_information/yaml/array_lfs_core_programs.yml +0 -37
- data/lib/environment_information/yaml/array_science_cluster.yml +0 -12
- data/lib/environment_information/yaml/array_tracked_non_programs.yml +0 -13
- data/lib/environment_information/yaml/array_tracked_xorg_components.yml +0 -37
- data/lib/environment_information/yaml/query_to_use_for_the_individual_components.yml +0 -284
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a8bf0346d36d12f3c11c33bce38d7c832830de80c9567b4eb884560c14abdb7
|
4
|
+
data.tar.gz: 41e3be2709db623d4b4bfd58caa2043695c0457598f36eff641d91becbeaa050
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 369716812e9c94c49a9a46c2a0cbfc721da9a4e453f4b8a6395e68d7585d0857f5474329eedf594afab916261eecca32089178864b85c9a576c7b3d07c1de3d3
|
7
|
+
data.tar.gz: 63c18de3c21023d5996867436f1e2c9083798759c6fee393a37cbcb7a75f8204ec8d71f6bc9036439863c90ef30872de89ff4bdc9d556de71ecc4a01086090bc
|
data/README.md
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
[![forthebadge](https://forthebadge.com/images/badges/made-with-ruby.svg)](https://www.ruby-lang.org/en/)
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/environment_information.svg)](https://badge.fury.io/rb/environment_information)
|
4
4
|
|
5
|
-
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">
|
5
|
+
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">11.04.2024</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">15:40:51</span> o'clock.
|
6
6
|
|
7
7
|
## About the environment_information gem
|
8
8
|
|
9
9
|
This project is called **EnvironmentInformation** (**environment information**).
|
10
10
|
|
11
|
-
Its primary goal is
|
12
|
-
presently running on
|
11
|
+
Its primary goal is <b>to gather information about the environment that ruby is
|
12
|
+
presently running on</b> - in other words, **the host system** and its
|
13
13
|
capabilities.
|
14
14
|
|
15
15
|
This gathered information can then be shown to the user on the commandline,
|
@@ -20,10 +20,9 @@ quickly show all versions of different programs on the target computer
|
|
20
20
|
system.
|
21
21
|
|
22
22
|
To provide a short overview how this may look, taken on the **KDE konsole**
|
23
|
-
and
|
23
|
+
and <b>bash</b>, have a look at the following image on a black background:
|
24
24
|
|
25
|
-
|
26
|
-
[screenshot1]: https://i.imgur.com/KiXIIVV.png
|
25
|
+
<img src="https://i.imgur.com/KiXIIVV.png" style="margin-left: 1em">
|
27
26
|
|
28
27
|
Invocation example:
|
29
28
|
|
@@ -58,7 +57,7 @@ main executable called **envi** (**bin/envi**) via:
|
|
58
57
|
|
59
58
|
What is meant with the term **environment**?
|
60
59
|
|
61
|
-
|
60
|
+
<b>Definition</b>:
|
62
61
|
|
63
62
|
The term **environment**, within the context of the **environment_information gem**,
|
64
63
|
is **the (software) environment** that can be discovered by the ruby version
|
@@ -83,7 +82,7 @@ in a **standalone .html file**, if you so desire to. This .html file
|
|
83
82
|
could then be used for static display of the information (but may
|
84
83
|
become quickly outdated, so keep this in mind as well).
|
85
84
|
|
86
|
-
The
|
85
|
+
The <b>Environment information</b> project may include any of the
|
87
86
|
following as its output:
|
88
87
|
|
89
88
|
- The **GCC Version** in use on the given computer host system.
|
@@ -91,9 +90,9 @@ following as its output:
|
|
91
90
|
- Which Ruby Version is used.
|
92
91
|
- Which Rubygem version is used.
|
93
92
|
- The path to the rubygem directory.
|
94
|
-
- What the Host CPU Model is (on Linux at the least).
|
95
|
-
- What is the the
|
96
|
-
- Which
|
93
|
+
- What the <b>Host CPU Model</b> is (on Linux at the least).
|
94
|
+
- What is the the <b>GTK</b>, <b>GLIB</b> and <b>gdk-pixbuf</b> version, respectively.
|
95
|
+
- Which <b>dhcpcd version</b> is available.
|
97
96
|
- What Xorg components are available, such as libX11, libxcm, libxp,
|
98
97
|
libxau.
|
99
98
|
|
@@ -219,7 +218,7 @@ of GTK, Glib, Atk and Pango, by passing in "f" or "full" or "--full"
|
|
219
218
|
on the commandline, without the quotation marks.
|
220
219
|
|
221
220
|
See the help section to this this script, which can be invoked by
|
222
|
-
passing "help" or "--help" as argument to envi.
|
221
|
+
passing "<b>help</b>" or "--help" as argument to envi.
|
223
222
|
|
224
223
|
You can also pass this information through a block (as a Hash inside
|
225
224
|
of that block), if you would like to:
|
@@ -360,7 +359,6 @@ but imagine if you work on Linux runlevel 3, without
|
|
360
359
|
a GUI. In this case this can be convenient to have
|
361
360
|
in one terminal as you work.
|
362
361
|
|
363
|
-
|
364
362
|
## fenvi
|
365
363
|
|
366
364
|
There is an executable at **bin/fast_envi**, as part of this gem, which
|
@@ -434,7 +432,7 @@ avoid using a shell script, such as this one:
|
|
434
432
|
|
435
433
|
http://www.linuxfromscratch.org/lfs/view/development/chapter02/hostreqs.html
|
436
434
|
|
437
|
-
The name
|
435
|
+
The name <b>fake-symbol</b> is given because via the commandline
|
438
436
|
you can only pass e. g. a String, not a Symbol, as bash does
|
439
437
|
not know what a Symbol is. So if a string has a leading :
|
440
438
|
then the EnvironmentInformation project will assume that the
|
@@ -492,7 +490,7 @@ would like to, through this:
|
|
492
490
|
|
493
491
|
## Sinatra interface
|
494
492
|
|
495
|
-
Since as of
|
493
|
+
Since as of <b>May 2019</b> there is now a small sinatra "interface"
|
496
494
|
available.
|
497
495
|
|
498
496
|
To start it, try:
|
@@ -705,6 +703,13 @@ This listing can be seen in the **file**:
|
|
705
703
|
|
706
704
|
These are the following programs:
|
707
705
|
|
706
|
+
cpuinfo
|
707
|
+
operating_system
|
708
|
+
operating_system_bit_type
|
709
|
+
cflags
|
710
|
+
ram
|
711
|
+
rubygems_installation_directory
|
712
|
+
screen_resolution
|
708
713
|
adwaitaicontheme
|
709
714
|
atk
|
710
715
|
automake
|
@@ -725,6 +730,7 @@ These are the following programs:
|
|
725
730
|
cmake
|
726
731
|
colord
|
727
732
|
coreutils
|
733
|
+
cryptsetup
|
728
734
|
curl
|
729
735
|
dbus
|
730
736
|
dhcpcd
|
@@ -783,6 +789,7 @@ These are the following programs:
|
|
783
789
|
gsl
|
784
790
|
gstreamer
|
785
791
|
gstpluginsbase
|
792
|
+
gstpluginsgood
|
786
793
|
gtk2
|
787
794
|
gtk3
|
788
795
|
guile
|
@@ -921,7 +928,46 @@ These are the following programs:
|
|
921
928
|
xterm
|
922
929
|
xvid
|
923
930
|
xz
|
931
|
+
zenity
|
924
932
|
zlib
|
933
|
+
hmmer
|
934
|
+
pbbam
|
935
|
+
relion
|
936
|
+
samtools
|
937
|
+
viennarna
|
938
|
+
libevdev
|
939
|
+
libinput
|
940
|
+
libx11
|
941
|
+
libxaw3d
|
942
|
+
libxau
|
943
|
+
libxcb
|
944
|
+
libxcm
|
945
|
+
libxcursor
|
946
|
+
libxdamage
|
947
|
+
libxi
|
948
|
+
libxkbfile
|
949
|
+
libxmu
|
950
|
+
libxpm
|
951
|
+
libxpresent
|
952
|
+
libxtst
|
953
|
+
libxt
|
954
|
+
libxv
|
955
|
+
libxvmc
|
956
|
+
randrproto
|
957
|
+
xextproto
|
958
|
+
xkbcomp
|
959
|
+
xrandr
|
960
|
+
xstdcmap
|
961
|
+
xf86bigfontproto
|
962
|
+
xf86dgaproto
|
963
|
+
xf86driproto
|
964
|
+
cpuinfo
|
965
|
+
operating_system
|
966
|
+
operating_system_bit_type
|
967
|
+
cflags
|
968
|
+
ram
|
969
|
+
rubygems_installation_directory
|
970
|
+
screen_resolution
|
925
971
|
|
926
972
|
|
927
973
|
You can also display these programs dynamically, such as through the
|
@@ -1276,6 +1322,36 @@ to have a collection of different widget sets that all work
|
|
1276
1322
|
on as many different operating systems as possible. Stay
|
1277
1323
|
tuned for more updates in this regard in the future.
|
1278
1324
|
|
1325
|
+
## Generating a .html file
|
1326
|
+
|
1327
|
+
You can pass the flag <b>--generate-html-file</b> to the main class,
|
1328
|
+
in order to generate a standalone .html file. Note that the
|
1329
|
+
commandline output will still be shown, so it may be a bit
|
1330
|
+
spammy. I use this to mostly find out which versions
|
1331
|
+
are available, and to additionally generate a .html file in
|
1332
|
+
case this has to be uploaded or shown to someone else
|
1333
|
+
via the browser.
|
1334
|
+
|
1335
|
+
## The method .add() in class EnvironmentInformation::Query
|
1336
|
+
|
1337
|
+
The method <b>.add()</b> in that class is used to add the particular
|
1338
|
+
components that you wish to display. By default all components
|
1339
|
+
will be added, but you can override this behaviour via
|
1340
|
+
various commandline flags.
|
1341
|
+
|
1342
|
+
## Disabling individual components
|
1343
|
+
|
1344
|
+
If you want to NOT show certain components, for whatever the
|
1345
|
+
reason, you can use this commandline flag:
|
1346
|
+
|
1347
|
+
--disable=htop,awk
|
1348
|
+
|
1349
|
+
This would NOT show <b>htop</b> and <b>awk</b>.
|
1350
|
+
|
1351
|
+
If you input an unregistered name then class Query will
|
1352
|
+
not notify you about this and simply ignore it - at the
|
1353
|
+
least this is the current behaviour.
|
1354
|
+
|
1279
1355
|
|
1280
1356
|
## Contact information and mandatory 2FA (no longer) coming up in 2022 / 2023
|
1281
1357
|
|
data/doc/README.gen
CHANGED
@@ -4,8 +4,8 @@ DEFAULT_HEADER
|
|
4
4
|
|
5
5
|
This project is called **EnvironmentInformation** (**environment information**).
|
6
6
|
|
7
|
-
Its primary goal is
|
8
|
-
presently running on
|
7
|
+
Its primary goal is <b>to gather information about the environment that ruby is
|
8
|
+
presently running on</b> - in other words, **the host system** and its
|
9
9
|
capabilities.
|
10
10
|
|
11
11
|
This gathered information can then be shown to the user on the commandline,
|
@@ -16,10 +16,9 @@ quickly show all versions of different programs on the target computer
|
|
16
16
|
system.
|
17
17
|
|
18
18
|
To provide a short overview how this may look, taken on the **KDE konsole**
|
19
|
-
and
|
19
|
+
and <b>bash</b>, have a look at the following image on a black background:
|
20
20
|
|
21
|
-
|
22
|
-
[screenshot1]: https://i.imgur.com/KiXIIVV.png
|
21
|
+
<img src="https://i.imgur.com/KiXIIVV.png" style="margin-left: 1em">
|
23
22
|
|
24
23
|
Invocation example:
|
25
24
|
|
@@ -54,7 +53,7 @@ main executable called **envi** (**bin/envi**) via:
|
|
54
53
|
|
55
54
|
What is meant with the term **environment**?
|
56
55
|
|
57
|
-
|
56
|
+
<b>Definition</b>:
|
58
57
|
|
59
58
|
The term **environment**, within the context of the **environment_information gem**,
|
60
59
|
is **the (software) environment** that can be discovered by the ruby version
|
@@ -79,7 +78,7 @@ in a **standalone .html file**, if you so desire to. This .html file
|
|
79
78
|
could then be used for static display of the information (but may
|
80
79
|
become quickly outdated, so keep this in mind as well).
|
81
80
|
|
82
|
-
The
|
81
|
+
The <b>Environment information</b> project may include any of the
|
83
82
|
following as its output:
|
84
83
|
|
85
84
|
- The **GCC Version** in use on the given computer host system.
|
@@ -87,9 +86,9 @@ following as its output:
|
|
87
86
|
- Which Ruby Version is used.
|
88
87
|
- Which Rubygem version is used.
|
89
88
|
- The path to the rubygem directory.
|
90
|
-
- What the Host CPU Model is (on Linux at the least).
|
91
|
-
- What is the the
|
92
|
-
- Which
|
89
|
+
- What the <b>Host CPU Model</b> is (on Linux at the least).
|
90
|
+
- What is the the <b>GTK</b>, <b>GLIB</b> and <b>gdk-pixbuf</b> version, respectively.
|
91
|
+
- Which <b>dhcpcd version</b> is available.
|
93
92
|
- What Xorg components are available, such as libX11, libxcm, libxp,
|
94
93
|
libxau.
|
95
94
|
|
@@ -215,7 +214,7 @@ of GTK, Glib, Atk and Pango, by passing in "f" or "full" or "--full"
|
|
215
214
|
on the commandline, without the quotation marks.
|
216
215
|
|
217
216
|
See the help section to this this script, which can be invoked by
|
218
|
-
passing "help" or "--help" as argument to envi.
|
217
|
+
passing "<b>help</b>" or "--help" as argument to envi.
|
219
218
|
|
220
219
|
You can also pass this information through a block (as a Hash inside
|
221
220
|
of that block), if you would like to:
|
@@ -356,7 +355,6 @@ but imagine if you work on Linux runlevel 3, without
|
|
356
355
|
a GUI. In this case this can be convenient to have
|
357
356
|
in one terminal as you work.
|
358
357
|
|
359
|
-
|
360
358
|
## fenvi
|
361
359
|
|
362
360
|
There is an executable at **bin/fast_envi**, as part of this gem, which
|
@@ -430,7 +428,7 @@ avoid using a shell script, such as this one:
|
|
430
428
|
|
431
429
|
http://www.linuxfromscratch.org/lfs/view/development/chapter02/hostreqs.html
|
432
430
|
|
433
|
-
The name
|
431
|
+
The name <b>fake-symbol</b> is given because via the commandline
|
434
432
|
you can only pass e. g. a String, not a Symbol, as bash does
|
435
433
|
not know what a Symbol is. So if a string has a leading :
|
436
434
|
then the EnvironmentInformation project will assume that the
|
@@ -488,7 +486,7 @@ would like to, through this:
|
|
488
486
|
|
489
487
|
## Sinatra interface
|
490
488
|
|
491
|
-
Since as of
|
489
|
+
Since as of <b>May 2019</b> there is now a small sinatra "interface"
|
492
490
|
available.
|
493
491
|
|
494
492
|
To start it, try:
|
@@ -1055,4 +1053,34 @@ to have a collection of different widget sets that all work
|
|
1055
1053
|
on as many different operating systems as possible. Stay
|
1056
1054
|
tuned for more updates in this regard in the future.
|
1057
1055
|
|
1056
|
+
## Generating a .html file
|
1057
|
+
|
1058
|
+
You can pass the flag <b>--generate-html-file</b> to the main class,
|
1059
|
+
in order to generate a standalone .html file. Note that the
|
1060
|
+
commandline output will still be shown, so it may be a bit
|
1061
|
+
spammy. I use this to mostly find out which versions
|
1062
|
+
are available, and to additionally generate a .html file in
|
1063
|
+
case this has to be uploaded or shown to someone else
|
1064
|
+
via the browser.
|
1065
|
+
|
1066
|
+
## The method .add() in class EnvironmentInformation::Query
|
1067
|
+
|
1068
|
+
The method <b>.add()</b> in that class is used to add the particular
|
1069
|
+
components that you wish to display. By default all components
|
1070
|
+
will be added, but you can override this behaviour via
|
1071
|
+
various commandline flags.
|
1072
|
+
|
1073
|
+
## Disabling individual components
|
1074
|
+
|
1075
|
+
If you want to NOT show certain components, for whatever the
|
1076
|
+
reason, you can use this commandline flag:
|
1077
|
+
|
1078
|
+
--disable=htop,awk
|
1079
|
+
|
1080
|
+
This would NOT show <b>htop</b> and <b>awk</b>.
|
1081
|
+
|
1082
|
+
If you input an unregistered name then class Query will
|
1083
|
+
not notify you about this and simply ignore it - at the
|
1084
|
+
least this is the current behaviour.
|
1085
|
+
|
1058
1086
|
ADD_CONTACT_INFORMATION
|
@@ -1,3 +1,19 @@
|
|
1
|
+
------------------------------------------------------------------------------
|
2
|
+
(1)
|
3
|
+
|
4
|
+
- if we rewrite the project, properly add:
|
5
|
+
|
6
|
+
- disabling of saving files, AND
|
7
|
+
- checking permissions
|
8
|
+
^^^^^^^^
|
9
|
+
------------------------------------------------------------------------
|
10
|
+
(2) About the environment_information gem
|
11
|
+
^^^^ add jruby bindings to it;
|
12
|
+
for now in jruby/
|
13
|
+
^^^^^^^^^
|
14
|
+
|
15
|
+
^^^ at the least test it via jruby.
|
16
|
+
|
1
17
|
------------------------------------------------------------------------------
|
2
18
|
- add in envi the ability to query from another base-prefix
|
3
19
|
e. g. /home/Programs/.
|
@@ -38,18 +54,6 @@ dynamically.
|
|
38
54
|
but before we do so, perhaps add a way to query the binary
|
39
55
|
from any path... e. g. /Programs/Htop/Current/ or so
|
40
56
|
------------------------------------------------------------------------------
|
41
|
-
(8)
|
42
|
-
|
43
|
-
- if we rewrite the project, properly add disabling of saving
|
44
|
-
files AND checking permissions
|
45
|
-
------------------------------------------------------------------------------
|
46
57
|
test absolute prefixes again
|
47
58
|
------------------------------------------------------------------------------
|
48
59
|
(10) add a new log for environment information
|
49
|
-
|
50
|
-
|
51
|
-
------------------------------------------------------------------------
|
52
|
-
About the environment_information gem
|
53
|
-
^^^^ add jruby bindings to it;
|
54
|
-
for now in jruby/
|
55
|
-
^^^^^^^^^
|