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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +91 -15
  3. data/doc/README.gen +42 -14
  4. data/doc/todo/TODO_FOR_THE_ENVIRONMENT_INFORMATION_PROJECT.md +16 -12
  5. data/lib/environment_information/base/base.rb +483 -99
  6. data/lib/environment_information/colours/colours.rb +92 -66
  7. data/lib/environment_information/commandline/commandline.rb +137 -0
  8. data/lib/environment_information/constants/constants.rb +372 -11
  9. data/lib/environment_information/project/project.rb +1 -1
  10. data/lib/environment_information/query/constants.rb +46 -0
  11. data/lib/environment_information/query/help.rb +88 -0
  12. data/lib/environment_information/query/menu.rb +487 -0
  13. data/lib/environment_information/query/misc.rb +2006 -0
  14. data/lib/environment_information/query/query.rb +245 -0
  15. data/lib/environment_information/query/reset.rb +202 -0
  16. data/lib/environment_information/query/run.rb +70 -0
  17. data/lib/environment_information/requires/require_the_environment_information_project.rb +2 -7
  18. data/lib/environment_information/requires/require_the_toplevel_methods.rb +1 -3
  19. data/lib/environment_information/toplevel_methods/toplevel_methods.rb +2258 -0
  20. data/lib/environment_information/version/version.rb +2 -2
  21. data/lib/environment_information/www/sinatra_interface.rb +20 -17
  22. data/lib/environment_information/www/webobject_interface.cgi +6 -7
  23. data/lib/environment_information/yaml/colours.yml +3 -3
  24. data/lib/environment_information/yaml/query_to_use_for_all_components.yml +284 -0
  25. data/lib/environment_information/yaml/{array_tracked_programs.yml → track_these_components.yml} +77 -11
  26. metadata +18 -60
  27. data/lib/environment_information/class/class.rb +0 -2580
  28. data/lib/environment_information/class/colours.rb +0 -282
  29. data/lib/environment_information/colours/sfancy.rb +0 -19
  30. data/lib/environment_information/colours/simp.rb +0 -19
  31. data/lib/environment_information/constants/array_tracked_components.rb +0 -210
  32. data/lib/environment_information/constants/encoding.rb +0 -21
  33. data/lib/environment_information/constants/error_line.rb +0 -17
  34. data/lib/environment_information/constants/file_constants.rb +0 -102
  35. data/lib/environment_information/constants/misc.rb +0 -86
  36. data/lib/environment_information/constants/namespace.rb +0 -14
  37. data/lib/environment_information/constants/newline.rb +0 -16
  38. data/lib/environment_information/constants/regex.rb +0 -30
  39. data/lib/environment_information/constants/temp_directory.rb +0 -52
  40. data/lib/environment_information/misc_components/README.md +0 -3
  41. data/lib/environment_information/misc_components/cflags.rb +0 -36
  42. data/lib/environment_information/misc_components/cpuinfo.rb +0 -64
  43. data/lib/environment_information/misc_components/operating_system.rb +0 -54
  44. data/lib/environment_information/misc_components/operating_system_bit_type.rb +0 -42
  45. data/lib/environment_information/misc_components/ram.rb +0 -30
  46. data/lib/environment_information/misc_components/rubygems_installation_directory.rb +0 -54
  47. data/lib/environment_information/misc_components/screen_resolution.rb +0 -50
  48. data/lib/environment_information/queries/README.md +0 -2
  49. data/lib/environment_information/queries/complex_version.rb +0 -273
  50. data/lib/environment_information/queries/pkg_config.rb +0 -125
  51. data/lib/environment_information/queries/simple_version.rb +0 -272
  52. data/lib/environment_information/requires/require_the_individual_misc_components.rb +0 -30
  53. data/lib/environment_information/toplevel_methods/autogenerate_all_relevant_methods.rb +0 -153
  54. data/lib/environment_information/toplevel_methods/cd.rb +0 -16
  55. data/lib/environment_information/toplevel_methods/e.rb +0 -43
  56. data/lib/environment_information/toplevel_methods/hash.rb +0 -65
  57. data/lib/environment_information/toplevel_methods/internet_is_available.rb +0 -30
  58. data/lib/environment_information/toplevel_methods/is_on_roebe.rb +0 -16
  59. data/lib/environment_information/toplevel_methods/menu.rb +0 -90
  60. data/lib/environment_information/toplevel_methods/misc.rb +0 -324
  61. data/lib/environment_information/toplevel_methods/n_subcommands.rb +0 -31
  62. data/lib/environment_information/toplevel_methods/prefix_to_use.rb +0 -39
  63. data/lib/environment_information/toplevel_methods/register_this_component_is_missing.rb +0 -61
  64. data/lib/environment_information/toplevel_methods/remote_url_of_this_program.rb +0 -45
  65. data/lib/environment_information/toplevel_methods/replay_from_the_stored_file.rb +0 -84
  66. data/lib/environment_information/toplevel_methods/return_alias_to.rb +0 -30
  67. data/lib/environment_information/toplevel_methods/return_pkgconfig_based_programs.rb +0 -28
  68. data/lib/environment_information/toplevel_methods/return_remote_gtk2_version.rb +0 -54
  69. data/lib/environment_information/toplevel_methods/return_simple_version_based_programs.rb +0 -28
  70. data/lib/environment_information/toplevel_methods/return_version_of_this_program.rb +0 -182
  71. data/lib/environment_information/toplevel_methods/show_all_available_components.rb +0 -192
  72. data/lib/environment_information/toplevel_methods/write_what_into.rb +0 -24
  73. data/lib/environment_information/yaml/array_default_programs_on_linux.yml +0 -15
  74. data/lib/environment_information/yaml/array_lfs_core_programs.yml +0 -37
  75. data/lib/environment_information/yaml/array_science_cluster.yml +0 -12
  76. data/lib/environment_information/yaml/array_tracked_non_programs.yml +0 -13
  77. data/lib/environment_information/yaml/array_tracked_xorg_components.yml +0 -37
  78. data/lib/environment_information/yaml/query_to_use_for_the_individual_components.yml +0 -284
@@ -1,282 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # Encoding: UTF-8
3
- # frozen_string_literal: true
4
- # =========================================================================== #
5
- # require 'environment_information/class/colours.rb'
6
- # =========================================================================== #
7
- require 'environment_information/base/base.rb'
8
-
9
- module EnvironmentInformation
10
-
11
- class EnvironmentInformation < ::EnvironmentInformation::Base # === EnvironmentInformation::EnvironmentInformation
12
-
13
- # ========================================================================= #
14
- # === colourize_this_in_the_right_side_colour
15
- # ========================================================================= #
16
- def colourize_this_in_the_right_side_colour(i)
17
- if use_colours?
18
- ::Colours.send(::EnvironmentInformation.colour_for_the_right_side, i)
19
- else
20
- i
21
- end
22
- end
23
-
24
- # ========================================================================= #
25
- # === cyan
26
- # ========================================================================= #
27
- def cyan(
28
- i = '', use_colours = use_colours?
29
- )
30
- if i.empty?
31
- Colours::CYAN
32
- end if use_colours
33
- end
34
-
35
- # ========================================================================= #
36
- # === blue
37
- # ========================================================================= #
38
- def blue(i = '')
39
- if i.empty?
40
- ::Colours::BLUE
41
- end if use_colours?
42
- end
43
-
44
- # ========================================================================= #
45
- # === simp
46
- # ========================================================================= #
47
- def simp(i, use_colours = use_colours?)
48
- return ::Colours.simp(i) if use_colours
49
- return i
50
- end
51
-
52
- # ========================================================================= #
53
- # === set_use_colours
54
- # ========================================================================= #
55
- def set_use_colours(i = '')
56
- ::EnvironmentInformation.set_use_colours(true)
57
- end
58
-
59
- # ========================================================================= #
60
- # === use_colours?
61
- # ========================================================================= #
62
- def use_colours?
63
- ::EnvironmentInformation.use_colours?
64
- end
65
-
66
- # ========================================================================= #
67
- # === enable_colours
68
- # ========================================================================= #
69
- def enable_colours
70
- ::EnvironmentInformation.use_colours = true
71
- end
72
-
73
- # ========================================================================= #
74
- # === disable_colours
75
- #
76
- # Call this method when you wish to disable the colours. Note that
77
- # this will disable colours on the toplevel.
78
- # ========================================================================= #
79
- def disable_colours
80
- ::EnvironmentInformation.use_colours = false
81
- end; alias no_colours disable_colours # === no_colours()
82
-
83
- # ========================================================================= #
84
- # === rev
85
- # ========================================================================= #
86
- def rev
87
- if use_colours?
88
- Colours::GREEN
89
- else
90
- ''
91
- end
92
- end
93
-
94
- # ========================================================================= #
95
- # === true_rev
96
- # ========================================================================= #
97
- def true_rev
98
- if use_colours?
99
- Colours::REV
100
- else
101
- ''
102
- end
103
- end
104
-
105
- # ========================================================================= #
106
- # === col1
107
- #
108
- # The "first" colour to be used.
109
- # ========================================================================= #
110
- def col1
111
- if use_colours?
112
- Colours::BOLD_BLUE
113
- else
114
- ''
115
- end
116
- end
117
-
118
- # ========================================================================= #
119
- # === sfile
120
- # ========================================================================= #
121
- def sfile(i)
122
- return ::Colours.sfile(i) if use_colours?
123
- return i
124
- end
125
-
126
- # ========================================================================= #
127
- # === sfancy
128
- # ========================================================================= #
129
- def sfancy(i = '')
130
- return ::Colours.sfancy(i) if use_colours?
131
- return i
132
- end
133
-
134
- # ========================================================================= #
135
- # === crimson
136
- # ========================================================================= #
137
- def crimson(i = '')
138
- if use_colours? and TRY_TO_USE_HTML_COLOURS
139
- i = ::Colours.crimson(i)
140
- end
141
- return i
142
- end
143
-
144
- # ========================================================================= #
145
- # === darkgreen
146
- # ========================================================================= #
147
- def darkgreen(i = '')
148
- if use_colours? and TRY_TO_USE_HTML_COLOURS
149
- i = ::Colours.darkgreen(i)
150
- end
151
- return i
152
- end
153
-
154
- # ========================================================================= #
155
- # === dimgray
156
- # ========================================================================= #
157
- def dimgray(i = '')
158
- if use_colours? and TRY_TO_USE_HTML_COLOURS
159
- i = ::Colours.dimgray(i)
160
- end
161
- return i
162
- end
163
-
164
- # ========================================================================= #
165
- # === royalblue
166
- # ========================================================================= #
167
- def royalblue(i = '')
168
- if use_colours? and TRY_TO_USE_HTML_COLOURS
169
- i = ::Colours.royalblue(i)
170
- end
171
- return i
172
- end
173
-
174
- # ========================================================================= #
175
- # === slateblue
176
- # ========================================================================= #
177
- def slateblue(i = '')
178
- if use_colours? and TRY_TO_USE_HTML_COLOURS
179
- i = ::Colours.slateblue(i)
180
- end
181
- return i
182
- end
183
-
184
- # ========================================================================= #
185
- # === steelblue
186
- # ========================================================================= #
187
- def steelblue(i = '')
188
- if use_colours? and TRY_TO_USE_HTML_COLOURS
189
- i = ::Colours.steelblue(i)
190
- end
191
- return i
192
- end
193
-
194
- # ========================================================================= #
195
- # === seagreen
196
- # ========================================================================= #
197
- def seagreen(i = '')
198
- if use_colours? and TRY_TO_USE_HTML_COLOURS
199
- i = ::Colours.seagreen(i)
200
- end
201
- return i
202
- end
203
-
204
- # ========================================================================= #
205
- # === olivedrab
206
- #
207
- # This one will be used for the right-hand side.
208
- # ========================================================================= #
209
- def olivedrab(i = '')
210
- if use_colours? and TRY_TO_USE_HTML_COLOURS
211
- i = ::Colours.olivedrab(i)
212
- end
213
- return i
214
- end
215
-
216
- # ========================================================================= #
217
- # === olive
218
- # ========================================================================= #
219
- def olive(i = '')
220
- if use_colours? and TRY_TO_USE_HTML_COLOURS
221
- i = ::Colours.olive(i)
222
- end
223
- return i
224
- end
225
-
226
- # ========================================================================= #
227
- # === limegreen
228
- # ========================================================================= #
229
- def limegreen(i = '')
230
- if use_colours? and TRY_TO_USE_HTML_COLOURS
231
- i = ::Colours.limegreen(i)
232
- end
233
- return i
234
- end
235
-
236
- # ========================================================================= #
237
- # === darkolivegreen
238
- # ========================================================================= #
239
- def darkolivegreen(i = '')
240
- if use_colours? and TRY_TO_USE_HTML_COLOURS
241
- i = ::Colours.darkolivegreen(i)
242
- end
243
- return i
244
- end
245
-
246
- # ========================================================================= #
247
- # === lightgreen
248
- # ========================================================================= #
249
- def lightgreen(i = '')
250
- if use_colours? and TRY_TO_USE_HTML_COLOURS
251
- i = ::Colours.lightgreen(i)
252
- end
253
- return i
254
- end
255
-
256
- # ========================================================================= #
257
- # === mediumpurple
258
- # ========================================================================= #
259
- def mediumpurple(i = '')
260
- if use_colours? and TRY_TO_USE_HTML_COLOURS
261
- i = ::Colours.mediumpurple(i)
262
- end
263
- return i
264
- end
265
-
266
- # ========================================================================= #
267
- # === teal
268
- # ========================================================================= #
269
- def teal(i = '')
270
- return ::Colours.teal(i) if use_colours?
271
- return i
272
- end
273
-
274
- # ========================================================================= #
275
- # === orange
276
- # ========================================================================= #
277
- def orange(i = '')
278
- return ::Colours.orange(i) if use_colours?
279
- return i
280
- end
281
-
282
- end; end
@@ -1,19 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # Encoding: UTF-8
3
- # frozen_string_literal: true
4
- # =========================================================================== #
5
- # require 'environment_information/colours/sfancy.rb'
6
- # =========================================================================== #
7
- module EnvironmentInformation
8
-
9
- require 'environment_information/colours/colours.rb'
10
-
11
- # ========================================================================= #
12
- # === EnvironmentInformation
13
- # ========================================================================= #
14
- def self.sfancy(i = '')
15
- return ::Colours.sfancy(i) if Object.const_defined? :Colours
16
- i
17
- end
18
-
19
- end
@@ -1,19 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # Encoding: UTF-8
3
- # frozen_string_literal: true
4
- # =========================================================================== #
5
- # require 'environment_information/colours/simp.rb'
6
- # =========================================================================== #
7
- module EnvironmentInformation
8
-
9
- require 'environment_information/colours/colours.rb'
10
-
11
- # ========================================================================= #
12
- # === EnvironmentInformation
13
- # ========================================================================= #
14
- def self.simp(i = '')
15
- return ::Colours.simp(i) if Object.const_defined? :Colours
16
- i
17
- end
18
-
19
- end
@@ -1,210 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # Encoding: UTF-8
3
- # frozen_string_literal: true
4
- # =========================================================================== #
5
- # require 'environment_information/constants/array_tracked_components.rb'
6
- # EnvironmentInformation.is_this_program_included?
7
- # =========================================================================== #
8
- module EnvironmentInformation
9
-
10
- # ========================================================================= #
11
- # The following constant will also pull in yaml-support.
12
- # ========================================================================= #
13
- require 'environment_information/constants/file_constants.rb'
14
-
15
- # ========================================================================= #
16
- # === EnvironmentInformation::ARRAY_LFS_CORE_PROGRAMS
17
- #
18
- # All the LFS core programs are registered here in this Array.
19
- # ========================================================================= #
20
- ARRAY_LFS_CORE_PROGRAMS =
21
- YAML.load_file(FILE_ARRAY_LFS_CORE_PROGRAMS)
22
-
23
- # ========================================================================= #
24
- # === EnvironmentInformation::ARRAY_XORG_COMPONENTS (xorg tag)
25
- #
26
- # All xorg-components will be collected here. Sort alphabetically, please,
27
- # and keep the entries downcased.
28
- #
29
- # xf86dga is an xorg-component, but since as of October 2018 it has
30
- # been removed and will no longer be checked - it seems to have been
31
- # abandoned, more or less.
32
- # ========================================================================= #
33
- ARRAY_XORG_COMPONENTS = YAML.load_file(FILE_ARRAY_TRACKED_XORG_COMPONENTS)
34
-
35
- # ========================================================================= #
36
- # === EnvironmentInformation::ARRAY_TRACKED_PROGRAMS
37
- #
38
- # This Array keeps track of which programs are tracked by the
39
- # EnvironmentInformation project. That listing will include ALL
40
- # registered entries, with a corresponding entry under the
41
- # directory individual_components/.
42
- #
43
- # All entries of this Array should be downcased.
44
- #
45
- # Keep this Array alphabetically sorted, please, even though this is
46
- # not an absolute necessity; it just simplifies adding and removing
47
- # entries in the long run.
48
- #
49
- # Since as of February 2020 this is maintained in a yaml file.
50
- # ========================================================================= #
51
- if File.exist? FILE_ARRAY_TRACKED_PROGRAMS
52
- ARRAY_TRACKED_PROGRAMS = YAML.load_file(FILE_ARRAY_TRACKED_PROGRAMS)
53
- else
54
- puts 'No file could be found at '+FILE_ARRAY_TRACKED_PROGRAMS+'.'
55
- ARRAY_TRACKED_PROGRAMS = [] # Default in this case.
56
- end
57
-
58
- # ========================================================================= #
59
- # === EnvironmentInformation.array_tracked_programs
60
- #
61
- # This method will return all the programs that are currently
62
- # tracked by the EnvironmentInformation project.
63
- # ========================================================================= #
64
- def self.array_tracked_programs
65
- ARRAY_TRACKED_PROGRAMS
66
- end
67
-
68
- # ========================================================================= #
69
- # === EnvironmentInformation::ARRAY_DEFAULT_PROGRAMS_ON_LINUX
70
- #
71
- # This Array keeps track of the default programs on a linux computer.
72
- # ========================================================================= #
73
- ARRAY_DEFAULT_PROGRAMS_ON_LINUX =
74
- YAML.load_file(FILE_ARRAY_DEFAULT_PROGRAMS_ON_LINUX)
75
-
76
- # ========================================================================= #
77
- # === EnvironmentInformation::ARRAY_TRACKED_NON_PROGRAMS
78
- #
79
- # The entry rubygems_installation_directory depends on the executable
80
- # called "gem", which is part of ruby.
81
- #
82
- # This Array has also been called "registered extra functionality" in
83
- # the past. The entries here are special in one way or another.
84
- # Usually these entries are NOT standalone-programs, which is
85
- # why they are tracked separately.
86
- # ========================================================================= #
87
- ARRAY_TRACKED_NON_PROGRAMS =
88
- load_file_array_tracked_non_programs
89
-
90
- # ========================================================================= #
91
- # === EnvironmentInformation::ARRAY_SCIENCE_CLUSTER (science tag)
92
- #
93
- # Science-specific applications are gathered in this array.
94
- # ========================================================================= #
95
- ARRAY_SCIENCE_CLUSTER =
96
- YAML.load_file(FILE_ARRAY_SCIENCE_CLUSTER)
97
-
98
- # ========================================================================= #
99
- # === EnvironmentInformation.science_cluster?
100
- # ========================================================================= #
101
- def self.science_cluster?
102
- ARRAY_SCIENCE_CLUSTER
103
- end
104
-
105
- # ========================================================================= #
106
- # === EnvironmentInformation::ARRAY_LFS_TEMPORARY_PROGRAMS
107
- #
108
- # All programs that are temporary, e. g. for enabling the bootstrapping
109
- # of the compiler, are stored in the following Array.
110
- # ========================================================================= #
111
- ARRAY_LFS_TEMPORARY_PROGRAMS = %i(
112
- binutils
113
- gcc
114
- linux_API_headers
115
- glibc
116
- libstdc++
117
- binutils
118
- tcl
119
- expect
120
- dejagnu
121
- m4
122
- ncurse
123
- bash
124
- bison
125
- bzip2
126
- coreutils
127
- diffutils
128
- file
129
- findutils
130
- gawk
131
- gettext
132
- grep
133
- gzip
134
- make
135
- patch
136
- perl
137
- python
138
- sed
139
- tar
140
- texinfo
141
- xz
142
- )
143
-
144
- # ========================================================================= #
145
- # === EnvironmentInformation.tracked_programs?
146
- #
147
- # Simpler toplevel-method to find out which programs are registered
148
- # within the EnvironmentInformation project.
149
- # ========================================================================= #
150
- def self.tracked_programs?
151
- ARRAY_TRACKED_PROGRAMS
152
- end
153
-
154
- # ========================================================================= #
155
- # === EnvironmentInformation.xorg_components?
156
- # ========================================================================= #
157
- def self.xorg_components?
158
- ARRAY_XORG_COMPONENTS
159
- end; self.instance_eval { alias return_all_xorg_components_as_array xorg_components? } # === EnvironmentInformation.return_all_xorg_components_as_array
160
- self.instance_eval { alias return_all_xorg_components_as_array xorg_components? } # === EnvironmentInformation.return_all_xorg_components_as_array
161
-
162
- # ========================================================================= #
163
- # === EnvironmentInformation.tracked_non_programs?
164
- #
165
- # Simpler toplevel-method to find out which non-programs are registered
166
- # within the EnvironmentInformation project.
167
- # ========================================================================= #
168
- def self.tracked_non_programs?
169
- ARRAY_TRACKED_NON_PROGRAMS
170
- end; self.instance_eval { alias registered_extra_functionality tracked_non_programs? } # === EnvironmentInformation.registered_extra_functionality
171
-
172
- # ========================================================================= #
173
- # === EnvironmentInformation.lfs_core_programs?
174
- # ========================================================================= #
175
- def self.lfs_core_programs?
176
- ARRAY_LFS_CORE_PROGRAMS
177
- end
178
-
179
- # ========================================================================= #
180
- # === EnvironmentInformation.is_this_program_included?
181
- #
182
- # This will include the two Arrays ARRAY_TRACKED_PROGRAMS and
183
- # ARRAY_XORG_COMPONENTS, but it will NOT include ARRAY_TRACKED_NON_PROGRAMS.
184
- # ========================================================================= #
185
- def self.is_this_program_included?(i)
186
- (
187
- ARRAY_TRACKED_PROGRAMS +
188
- ARRAY_XORG_COMPONENTS
189
- ).flatten.include? i.to_sym # Need a symbol.
190
- end; self.instance_eval { alias is_this_a_registered_program? is_this_program_included? } # === ::EnvironmentInformation.is_this_a_registered_program?
191
-
192
- # ========================================================================= #
193
- # === EnvironmentInformation.is_this_component_included?
194
- #
195
- # This is a more extensive check than .is_this_program_included?()
196
- # ========================================================================= #
197
- def self.is_this_component_included?(i)
198
- array = (
199
- ARRAY_TRACKED_PROGRAMS +
200
- ARRAY_XORG_COMPONENTS +
201
- ARRAY_TRACKED_NON_PROGRAMS
202
- )
203
- array.flatten.include? i.to_sym # Need a Symbol as input.
204
- end
205
-
206
- end
207
-
208
- if __FILE__ == $PROGRAM_NAME
209
- pp EnvironmentInformation.lfs_core_programs?
210
- end
@@ -1,21 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # Encoding: UTF-8
3
- # frozen_string_literal: true
4
- # =========================================================================== #
5
- # require 'environment_information/constants/encoding.rb'
6
- # =========================================================================== #
7
- module EnvironmentInformation
8
-
9
- # ========================================================================= #
10
- # === EnvironmentInformation::UTF_ENCODING
11
- #
12
- # UTF-8 is the default encoding for the EnvironmentInformation namespace.
13
- # ========================================================================= #
14
- UTF_ENCODING = 'UTF-8'
15
-
16
- # ========================================================================= #
17
- # === EnvironmentInformation::MAIN_ENCODING
18
- # ========================================================================= #
19
- MAIN_ENCODING = UTF_ENCODING
20
-
21
- end
@@ -1,17 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # Encoding: UTF-8
3
- # frozen_string_literal: true
4
- # =========================================================================== #
5
- # require 'environment_information/constants/error_line.rb'
6
- # =========================================================================== #
7
- module EnvironmentInformation
8
-
9
- # ========================================================================= #
10
- # === ERROR_LINE
11
- #
12
- # The error line is the one that can be appended to system-related
13
- # queries (e. g. via system()).
14
- # ========================================================================= #
15
- ERROR_LINE = '2>&1'
16
-
17
- end
@@ -1,102 +0,0 @@
1
- #!/usr/bin/ruby -w
2
- # Encoding: UTF-8
3
- # frozen_string_literal: true
4
- # =========================================================================== #
5
- # require 'environment_information/constants/file_constants.rb'
6
- # EnvironmentInformation.file_query_to_use_for_the_individual_components
7
- # EnvironmentInformation.query_to_use_for_the_individual_components?
8
- # =========================================================================== #
9
- module EnvironmentInformation
10
-
11
- require 'yaml'
12
- require 'environment_information/project/project.rb'
13
-
14
- # ========================================================================= #
15
- # === @query_to_use_for_the_individual_components
16
- # ========================================================================= #
17
- @query_to_use_for_the_individual_components = nil
18
-
19
- # ========================================================================= #
20
- # === EnvironmentInformation::FILE_ARRAY_TRACKED_PROGRAMS
21
- # ========================================================================= #
22
- FILE_ARRAY_TRACKED_PROGRAMS =
23
- "#{PROJECT_BASE_DIRECTORY}yaml/array_tracked_programs.yml"
24
-
25
- # ========================================================================= #
26
- # === EnvironmentInformation::FILE_ARRAY_DEFAULT_PROGRAMS_ON_LINUX
27
- # ========================================================================= #
28
- FILE_ARRAY_DEFAULT_PROGRAMS_ON_LINUX =
29
- "#{PROJECT_BASE_DIRECTORY}yaml/array_default_programs_on_linux.yml"
30
-
31
- # ========================================================================= #
32
- # === EnvironmentInformation::FILE_ARRAY_TRACKED_NON_PROGRAMS
33
- # ========================================================================= #
34
- FILE_ARRAY_TRACKED_NON_PROGRAMS =
35
- "#{PROJECT_BASE_DIRECTORY}yaml/array_tracked_non_programs.yml"
36
-
37
- # ========================================================================= #
38
- # === EnvironmentInformation.load_file_array_tracked_non_programs
39
- # ========================================================================= #
40
- def self.load_file_array_tracked_non_programs(
41
- i = FILE_ARRAY_TRACKED_NON_PROGRAMS
42
- )
43
- YAML.load_file(i)
44
- end
45
-
46
- # ========================================================================= #
47
- # === EnvironmentInformation::FILE_ARRAY_TRACKED_XORG_COMPONENTS
48
- # ========================================================================= #
49
- FILE_ARRAY_TRACKED_XORG_COMPONENTS =
50
- "#{PROJECT_BASE_DIRECTORY}yaml/array_tracked_xorg_components.yml"
51
-
52
- # ========================================================================= #
53
- # === EnvironmentInformation::FILE_ARRAY_LFS_CORE_PROGRAMS
54
- # ========================================================================= #
55
- FILE_ARRAY_LFS_CORE_PROGRAMS =
56
- "#{PROJECT_BASE_DIRECTORY}yaml/array_lfs_core_programs.yml"
57
-
58
- # ========================================================================= #
59
- # === EnvironmentInformation::FILE_ARRAY_SCIENCE_CLUSTER
60
- # ========================================================================= #
61
- FILE_ARRAY_SCIENCE_CLUSTER =
62
- "#{PROJECT_BASE_DIRECTORY}yaml/array_science_cluster.yml"
63
-
64
- # ========================================================================= #
65
- # === EnvironmentInformation::FILE_QUERY_TO_USE_FOR_THE_INDIVIDUAL_COMPONENTS
66
- # ========================================================================= #
67
- FILE_QUERY_TO_USE_FOR_THE_INDIVIDUAL_COMPONENTS =
68
- "#{PROJECT_BASE_DIRECTORY}yaml/query_to_use_for_the_individual_components.yml"
69
-
70
- # ========================================================================= #
71
- # === EnvironmentInformation.file_query_to_use_for_the_individual_components
72
- # ========================================================================= #
73
- def self.file_query_to_use_for_the_individual_components
74
- "#{PROJECT_BASE_DIRECTORY}yaml/query_to_use_for_the_individual_components.yml"
75
- end
76
-
77
- # ========================================================================= #
78
- # === EnvironmentInformation.load_file_query_to_use_for_the_individual_components
79
- # ========================================================================= #
80
- def self.load_file_query_to_use_for_the_individual_components(
81
- i = FILE_QUERY_TO_USE_FOR_THE_INDIVIDUAL_COMPONENTS
82
- )
83
- @query_to_use_for_the_individual_components = YAML.load_file(i)
84
- return @query_to_use_for_the_individual_components
85
- end; self.instance_eval { alias all_the_queries load_file_query_to_use_for_the_individual_components } # === EnvironmentInformation.all_the_queries
86
-
87
- # ========================================================================= #
88
- # === EnvironmentInformation.query_to_use_for_the_individual_components?
89
- # ========================================================================= #
90
- def self.query_to_use_for_the_individual_components?
91
- @query_to_use_for_the_individual_components
92
- end
93
-
94
- # ========================================================================= #
95
- # === FILE_THESE_PROGRAMS_CAN_BE_UPGRADED
96
- #
97
- # We may store which programs could be upgraded into a local file.
98
- # ========================================================================= #
99
- FILE_THESE_PROGRAMS_CAN_BE_UPGRADED =
100
- 'these_programs_can_be_upgraded.yml'
101
-
102
- end