environment_information 1.4.29

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of environment_information might be problematic. Click here for more details.

Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1061 -0
  3. data/bin/envi +7 -0
  4. data/bin/fast_envi +7 -0
  5. data/doc/README.gen +893 -0
  6. data/doc/TODO_FOR_THE_ENVIRONMENT_INFORMATION_PROJECT.md +54 -0
  7. data/environment_information.gemspec +130 -0
  8. data/lib/environment_information/base/base.rb +113 -0
  9. data/lib/environment_information/class/add.rb +186 -0
  10. data/lib/environment_information/class/colours.rb +283 -0
  11. data/lib/environment_information/class/constants.rb +35 -0
  12. data/lib/environment_information/class/environment_information.rb +51 -0
  13. data/lib/environment_information/class/help.rb +86 -0
  14. data/lib/environment_information/class/html.rb +78 -0
  15. data/lib/environment_information/class/initialize.rb +178 -0
  16. data/lib/environment_information/class/menu.rb +436 -0
  17. data/lib/environment_information/class/misc.rb +821 -0
  18. data/lib/environment_information/class/opn.rb +33 -0
  19. data/lib/environment_information/class/register_sigint.rb +20 -0
  20. data/lib/environment_information/class/reset.rb +213 -0
  21. data/lib/environment_information/class/ruby.rb +79 -0
  22. data/lib/environment_information/class/run.rb +61 -0
  23. data/lib/environment_information/class/show_display_and_report.rb +310 -0
  24. data/lib/environment_information/colours/colours.rb +150 -0
  25. data/lib/environment_information/colours/sfancy.rb +19 -0
  26. data/lib/environment_information/colours/simp.rb +19 -0
  27. data/lib/environment_information/constants/array_tracked_components.rb +207 -0
  28. data/lib/environment_information/constants/constants.rb +17 -0
  29. data/lib/environment_information/constants/encoding.rb +21 -0
  30. data/lib/environment_information/constants/error_line.rb +17 -0
  31. data/lib/environment_information/constants/file_constants.rb +102 -0
  32. data/lib/environment_information/constants/misc.rb +86 -0
  33. data/lib/environment_information/constants/namespace.rb +14 -0
  34. data/lib/environment_information/constants/newline.rb +16 -0
  35. data/lib/environment_information/constants/regex.rb +30 -0
  36. data/lib/environment_information/constants/temp_directory.rb +52 -0
  37. data/lib/environment_information/gui/gtk/bindings.rb +300 -0
  38. data/lib/environment_information/misc_components/README.md +3 -0
  39. data/lib/environment_information/misc_components/cflags.rb +36 -0
  40. data/lib/environment_information/misc_components/cpuinfo.rb +64 -0
  41. data/lib/environment_information/misc_components/operating_system.rb +54 -0
  42. data/lib/environment_information/misc_components/operating_system_bit_type.rb +42 -0
  43. data/lib/environment_information/misc_components/ram.rb +30 -0
  44. data/lib/environment_information/misc_components/rubygems_installation_directory.rb +54 -0
  45. data/lib/environment_information/misc_components/screen_resolution.rb +50 -0
  46. data/lib/environment_information/project/project.rb +27 -0
  47. data/lib/environment_information/queries/README.md +2 -0
  48. data/lib/environment_information/queries/complex_version.rb +263 -0
  49. data/lib/environment_information/queries/pkg_config.rb +125 -0
  50. data/lib/environment_information/queries/simple_version.rb +211 -0
  51. data/lib/environment_information/requires/require_asciitable.rb +15 -0
  52. data/lib/environment_information/requires/require_the_constants.rb +7 -0
  53. data/lib/environment_information/requires/require_the_environment_information_project.rb +23 -0
  54. data/lib/environment_information/requires/require_the_individual_misc_components.rb +30 -0
  55. data/lib/environment_information/requires/require_the_toplevel_methods.rb +22 -0
  56. data/lib/environment_information/toplevel_methods/autogenerate_all_relevant_methods.rb +152 -0
  57. data/lib/environment_information/toplevel_methods/cd.rb +16 -0
  58. data/lib/environment_information/toplevel_methods/e.rb +30 -0
  59. data/lib/environment_information/toplevel_methods/hash.rb +60 -0
  60. data/lib/environment_information/toplevel_methods/internet_is_available.rb +30 -0
  61. data/lib/environment_information/toplevel_methods/is_on_roebe.rb +16 -0
  62. data/lib/environment_information/toplevel_methods/menu.rb +90 -0
  63. data/lib/environment_information/toplevel_methods/misc.rb +264 -0
  64. data/lib/environment_information/toplevel_methods/n_subcommands.rb +31 -0
  65. data/lib/environment_information/toplevel_methods/prefix_to_use.rb +39 -0
  66. data/lib/environment_information/toplevel_methods/register_this_component_is_missing.rb +61 -0
  67. data/lib/environment_information/toplevel_methods/remote_url_of_this_program.rb +45 -0
  68. data/lib/environment_information/toplevel_methods/replay_from_the_stored_file.rb +84 -0
  69. data/lib/environment_information/toplevel_methods/return_pkgconfig_based_programs.rb +28 -0
  70. data/lib/environment_information/toplevel_methods/return_remote_gtk2_version.rb +54 -0
  71. data/lib/environment_information/toplevel_methods/return_simple_version_based_programs.rb +28 -0
  72. data/lib/environment_information/toplevel_methods/return_version_of_this_program.rb +186 -0
  73. data/lib/environment_information/toplevel_methods/show_all_available_components.rb +192 -0
  74. data/lib/environment_information/toplevel_methods/write_what_into.rb +24 -0
  75. data/lib/environment_information/version/version.rb +25 -0
  76. data/lib/environment_information/www/sinatra_interface.rb +213 -0
  77. data/lib/environment_information/www/webobject_interface.cgi +29 -0
  78. data/lib/environment_information/yaml/array_default_programs_on_linux.yml +14 -0
  79. data/lib/environment_information/yaml/array_lfs_core_programs.yml +35 -0
  80. data/lib/environment_information/yaml/array_science_cluster.yml +12 -0
  81. data/lib/environment_information/yaml/array_tracked_non_programs.yml +13 -0
  82. data/lib/environment_information/yaml/array_tracked_programs.yml +165 -0
  83. data/lib/environment_information/yaml/array_tracked_xorg_components.yml +34 -0
  84. data/lib/environment_information/yaml/query_to_use_for_the_individual_components.yml +215 -0
  85. data/lib/environment_information.rb +5 -0
  86. data/test/testing_environment_information.rb +26 -0
  87. data/test/testing_missing_components.rb +9 -0
  88. data/test/testing_prefix_for_the_environment_information_project.rb +20 -0
  89. metadata +195 -0
@@ -0,0 +1,310 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'environment_information/class/show_display_and_report.rb'
6
+ # =========================================================================== #
7
+ require 'environment_information/base/base.rb'
8
+
9
+ module EnvironmentInformation
10
+
11
+ class EnvironmentInformation < ::EnvironmentInformation::Base # === EnvironmentInformation::EnvironmentInformation
12
+
13
+ require 'environment_information/toplevel_methods/is_on_roebe.rb'
14
+ begin
15
+ require 'rbt/requires/swift_version.rb'
16
+ rescue LoadError
17
+ if ::EnvironmentInformation.is_on_roebe?
18
+ puts 'The file rbt/toplevel_methods/swift_return_version_of_this_program.rb is not available.'
19
+ end
20
+ end
21
+
22
+ begin
23
+ require 'rbt/toplevel_methods/find_url_for.rb'
24
+ rescue LoadError
25
+ if ::EnvironmentInformation.is_on_roebe?
26
+ puts 'The file rbt/toplevel_methods/find_url_for.rb is not available.'
27
+ end
28
+ end
29
+
30
+ # ========================================================================= #
31
+ # === show_help?
32
+ # ========================================================================= #
33
+ def show_help?
34
+ @show_help
35
+ end
36
+
37
+ # ========================================================================= #
38
+ # === compare_via_gem_version
39
+ # ========================================================================= #
40
+ def compare_via_gem_version(i)
41
+ begin
42
+ Gem::Version.new(i)
43
+ rescue ArgumentError => error
44
+ e Colours.tomato(error)
45
+ e 'We will continue nonetheless ('+i+')'
46
+ return nil
47
+ end
48
+ end
49
+
50
+ require 'environment_information/toplevel_methods/e.rb'
51
+ # ========================================================================= #
52
+ # === e (e tag)
53
+ #
54
+ # The e() method is the general output-method for this class.
55
+ # ========================================================================= #
56
+ def e(i = '')
57
+ unless @be_silent
58
+ ::EnvironmentInformation.e(i, display_everything_in_short_format: @display_everything_in_short_format)
59
+ end
60
+ end
61
+
62
+ # ========================================================================= #
63
+ # === do_report_the_remote_urls
64
+ #
65
+ # Enable the reporting of the remote URLs, if available.
66
+ # ========================================================================= #
67
+ def do_report_the_remote_urls
68
+ @internal_hash[:report_the_remote_urls] = true
69
+ end
70
+
71
+ # ========================================================================= #
72
+ # === report_version
73
+ # ========================================================================= #
74
+ def report_version
75
+ require 'environment_information/toplevel_methods/menu.rb'
76
+ ::EnvironmentInformation.report_version
77
+ @do_exit_the_program = true
78
+ end
79
+
80
+ # ========================================================================= #
81
+ # === display_these_components?
82
+ #
83
+ # Note that @display_these_components is a Hash.
84
+ # ========================================================================= #
85
+ def display_these_components?
86
+ @array_report_these_programs
87
+ end; alias components? display_these_components? # === components?
88
+ alias main_dataset? display_these_components? # === main_dataset?
89
+ alias main_entry? display_these_components? # === main_entry?
90
+ alias dataset? display_these_components? # === dataset?
91
+ alias result display_these_components? # === result
92
+ alias result? display_these_components? # === result?
93
+ alias display_which_components? display_these_components? # === display_which_components?
94
+ alias array_obtain_these_programs? display_these_components? # === array_obtain_these_programs?
95
+ alias array_with_entries? display_these_components? # === array_with_entries?
96
+ alias main_array? display_these_components? # === main_array?
97
+ alias programs? display_these_components? # === programs?
98
+ alias show_these_components? display_these_components? # === show_these_components?
99
+
100
+ # ========================================================================= #
101
+ # === main_hash?
102
+ # ========================================================================= #
103
+ def main_hash?
104
+ ::EnvironmentInformation.hash?
105
+ end
106
+
107
+ # ========================================================================= #
108
+ # === register_the_available_components_and_show_them_at_once (report tag)
109
+ #
110
+ # This method can be used to register information about the various
111
+ # components. It will also instantly display the component at
112
+ # hand, to avoid "lagging" behaviour on the commandline.
113
+ # ========================================================================= #
114
+ def register_the_available_components_and_show_them_at_once(
115
+ report_these_programs = @array_report_these_programs
116
+ )
117
+ if report_these_programs.empty?
118
+ opn; e 'There are no components that can be displayed.' # And this ends here.
119
+ else
120
+ # ======================================================================= #
121
+ # Always clear the main Array before proceeding here.
122
+ # ======================================================================= #
123
+ clear_missing_components
124
+ toplevel_hash = ::EnvironmentInformation.hash?
125
+ hash_use_this_for_the_query = ::EnvironmentInformation.all_the_queries
126
+ report_these_programs.each {|this_program|
127
+ # =================================================================== #
128
+ # First, determine the left_side and the right_side.
129
+ # =================================================================== #
130
+ left_side = this_program.to_s.dup
131
+ right_side = nil
132
+ case this_program
133
+ # =================================================================== #
134
+ # === RAM
135
+ # =================================================================== #
136
+ when :ram,
137
+ /^RAM$/i
138
+ right_side = ram?.to_s.dup
139
+ right_side = right_side.dup if right_side.frozen?
140
+ # ================================================================= #
141
+ # Append 'MB RAM' in orange colour next, with some padding.
142
+ # This is just a small visual "enhancement" that I quite like.
143
+ # ================================================================= #
144
+ right_side << orange(' MB RAM')
145
+ # =================================================================== #
146
+ # === Rubygems installation directory
147
+ # =================================================================== #
148
+ when :rubygems_installation_directory,
149
+ /^rubygems( |_)?installation( |_)?directory\??$/i
150
+ right_side = rubygems_installation_directory?
151
+ # =================================================================== #
152
+ # === cflags
153
+ # =================================================================== #
154
+ when :cflags,
155
+ /^cflags$/i,
156
+ /^cflags(_|-| )?in(_|-| )?use$/i
157
+ right_side = cflags_in_use?
158
+ # =================================================================== #
159
+ # === Screen resolution
160
+ #
161
+ # This is a bit "special" in the sense that we will colourize
162
+ # the middle 'x', if found, and if colours are used.
163
+ # =================================================================== #
164
+ when :screen_resolution,
165
+ /^screen( |_)?resolution$/i
166
+ right_side = screen_resolution?
167
+ if right_side.include?('x') and use_colours?
168
+ splitted = right_side.split('x')
169
+ right_side = colourize_this_in_the_right_side_colour(splitted.first)+
170
+ royalblue('x')+
171
+ colourize_this_in_the_right_side_colour(splitted.last)
172
+ end
173
+ # =================================================================== #
174
+ # === CPU Model
175
+ # =================================================================== #
176
+ when /^cpuinfo$/i,
177
+ /^CPU(_|-| )?Model/
178
+ right_side = cpu_model?
179
+ # =================================================================== #
180
+ # === Operating system bit type
181
+ # =================================================================== #
182
+ when /^operating(_|-| )?system(_|-| )?bit(_|-| )?type$/i
183
+ right_side = bit_type?
184
+ # =================================================================== #
185
+ # === Operating system
186
+ # =================================================================== #
187
+ when /^Operating(_|-| )?system$/i,
188
+ :operating_system
189
+ right_side = ::EnvironmentInformation.operating_system
190
+ end
191
+ # =================================================================== #
192
+ # Find the corresponding entry next:
193
+ # =================================================================== #
194
+ _ = hash_use_this_for_the_query[this_program]
195
+ if hash_use_this_for_the_query.has_key? this_program
196
+ if _.to_s.start_with? 'pkg'
197
+ # =============================================================== #
198
+ # === :pkgconfig
199
+ #
200
+ # This is by far the simplest solution.
201
+ # =============================================================== #
202
+ right_side = @pkg_config_query.return_version_of(this_program)
203
+ add_this_to_the_toplevel_hash(left_side, right_side)
204
+ # ================================================================= #
205
+ # === :version
206
+ #
207
+ # Here we will handle simple versions, e. g. "lftp --version"
208
+ # entries, and similar.
209
+ # ================================================================= #
210
+ elsif _ == :version
211
+ right_side = @simple_version_query.return_version_of(this_program)
212
+ add_this_to_the_toplevel_hash(left_side, right_side)
213
+ else
214
+ # =============================================================== #
215
+ # Else we will pass through class ComplexVersion:
216
+ # =============================================================== #
217
+ right_side = @complex_version_query.return_version_of(this_program)
218
+ add_this_to_the_toplevel_hash(left_side, right_side)
219
+ end
220
+ # =================================================================== #
221
+ # The next clause has been written specifically to allow querying
222
+ # the mate-desktop components.
223
+ # =================================================================== #
224
+ elsif toplevel_hash.has_key?(this_program) and
225
+ toplevel_hash[this_program] # <- This is thus non-nil.
226
+ right_side = toplevel_hash[this_program]
227
+ end
228
+ if right_side.nil?
229
+ register_unavailable_program(this_program)
230
+ end
231
+ # =================================================================== #
232
+ # === @internal_hash[:report_the_remote_urls]
233
+ #
234
+ # Next, honour @internal_hash[:report_the_remote_urls] if it is
235
+ # set to true.
236
+ # =================================================================== #
237
+ if report_the_remote_urls? and
238
+ is_rbt_available? and
239
+ RBT.respond_to?(:remote_url_for?)
240
+ version = ''.dup
241
+ _ = this_program.to_s.delete('-').downcase.strip.to_sym
242
+ if RBT.does_include?(_)
243
+ remote_url = RBT.remote_url_for?(_, :return_as_string)
244
+ if is_a_registered_component? _
245
+ if version.frozen?
246
+ version = version.dup
247
+ end
248
+ version << lightgreen(remote_url)
249
+ if right_side # We can only continue if the program is available.
250
+ # In theory we could show the URL anyway, but for the time
251
+ # being, at the least, we will not show the URL.
252
+ right_side = right_side.dup if right_side.frozen?
253
+ right_side << " #{olive('→')} #{version}"
254
+ end
255
+ end
256
+ end
257
+ end
258
+ report_left_right(left_side, right_side)
259
+ # =================================================================== #
260
+ # Next compare the program versions with the local versions.
261
+ # =================================================================== #
262
+ if compare_program_versions? and
263
+ is_rbt_available_and_may_we_try_to_use_rbt? and
264
+ RBT.respond_to?(:swift_return_version_of_this_program) and
265
+ RBT.does_include?(left_side.to_s.strip)
266
+ # ================================================================= #
267
+ # Example:
268
+ #
269
+ # RBT.swift_return_version_of_this_program(:gettext)
270
+ #
271
+ # ================================================================= #
272
+ registered_local_version = RBT.swift_return_version_of_this_program(
273
+ left_side.to_s.strip.to_sym
274
+ ).to_s
275
+ # ================================================================= #
276
+ # We ignore gtk2 when it comes to the version-check.
277
+ # ================================================================= #
278
+ next if this_program == :gtk2
279
+ # ================================================================= #
280
+ # Next use Gem::Version to compare them, but not if the version
281
+ # is nil.
282
+ # ================================================================= #
283
+ unless right_side.nil?
284
+ # =============================================================== #
285
+ # The .delete('v') is specifically for libuv or node.
286
+ # =============================================================== #
287
+ registered_local_version = registered_local_version.to_s.
288
+ delete('v').
289
+ tr('_','.')
290
+ a = compare_via_gem_version(registered_local_version)
291
+ b = compare_via_gem_version(right_side)
292
+ if a and b and (a > b)
293
+ e slateblue(' ^^^^^ This program could be '\
294
+ 'upgraded, to the version ')+
295
+ steelblue(registered_local_version)
296
+ end if registered_local_version =~ /\d+/
297
+ end
298
+ end
299
+ }
300
+ end
301
+ end; alias display register_the_available_components_and_show_them_at_once # === display
302
+ alias report_result register_the_available_components_and_show_them_at_once # === report_result
303
+ alias display_the_components register_the_available_components_and_show_them_at_once # === display_the_components
304
+ alias display_the_dataset register_the_available_components_and_show_them_at_once # === display_the_dataset
305
+ alias work_through_the_programs register_the_available_components_and_show_them_at_once # === work_through_the_programs
306
+ alias build_up_the_main_string register_the_available_components_and_show_them_at_once # === build_up_the_main_string
307
+ alias display_the_main_components register_the_available_components_and_show_them_at_once # === build_up_the_main_string
308
+ alias report register_the_available_components_and_show_them_at_once # === report
309
+
310
+ end; end
@@ -0,0 +1,150 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'environment_information/colours/colours.rb'
6
+ # EnvironmentInformation.colour_for_the_left_side
7
+ # =========================================================================== #
8
+ module EnvironmentInformation
9
+
10
+ begin
11
+ require 'colours'
12
+ # ======================================================================= #
13
+ # === @use_colours
14
+ # ======================================================================= #
15
+ @use_colours = true
16
+ rescue LoadError
17
+ # ======================================================================= #
18
+ # If the colours-gem is not available then we will not use colours.
19
+ # The user could still overrule this at a later time, though.
20
+ # ======================================================================= #
21
+ @use_colours = false
22
+ end
23
+
24
+ # ========================================================================= #
25
+ # === EnvironmentInformation.colour_for_the_left_side (left tag)
26
+ #
27
+ # This could also be :limegreen rather than :forestgreen or vice versa.
28
+ # ========================================================================= #
29
+ def self.colour_for_the_left_side
30
+ :forestgreen
31
+ end
32
+
33
+ # ========================================================================= #
34
+ # === EnvironmentInformation.colour_for_the_right_side (right tag)
35
+ # ========================================================================= #
36
+ def self.colour_for_the_right_side
37
+ :steelblue
38
+ end
39
+
40
+ # ========================================================================= #
41
+ # === EnvironmentInformation.colour_for_program_not_found
42
+ # ========================================================================= #
43
+ def self.colour_for_program_not_found
44
+ :lightslategrey
45
+ end
46
+
47
+ # ========================================================================= #
48
+ # === EnvironmentInformation.rev
49
+ # ========================================================================= #
50
+ def self.rev
51
+ return ::Colours.rev if @use_colours
52
+ '' # Else return an empty String.
53
+ end
54
+
55
+ # ========================================================================= #
56
+ # === EnvironmentInformation.use_colours?
57
+ # ========================================================================= #
58
+ def self.use_colours?
59
+ @use_colours
60
+ end
61
+
62
+ # ========================================================================= #
63
+ # === EnvironmentInformation.set_use_colours
64
+ #
65
+ # Determine whether the EnvironmentInformation project will use
66
+ # colours or whether it will not.
67
+ # ========================================================================= #
68
+ def self.set_use_colours(i = true)
69
+ @use_colours = i
70
+ end; self.instance_eval { alias use_colours= set_use_colours } # === EnvironmentInformation.use_colours=
71
+
72
+ # ========================================================================= #
73
+ # === EnvironmentInformation.do_use_colours
74
+ # ========================================================================= #
75
+ def self.do_use_colours
76
+ @use_colours = i
77
+ end
78
+
79
+ # ========================================================================= #
80
+ # === EnvironmentInformation.mediumpurple
81
+ # ========================================================================= #
82
+ def self.mediumpurple(i = '')
83
+ if @use_colours
84
+ return ::Colours.mediumpurple(i)
85
+ end
86
+ return i
87
+ end
88
+
89
+ # ========================================================================= #
90
+ # === EnvironmentInformation.lightslategrey
91
+ # ========================================================================= #
92
+ def self.lightslategrey(i = '')
93
+ if @use_colours
94
+ return ::Colours.lightslategrey(i)
95
+ end
96
+ return i
97
+ end
98
+
99
+ # ========================================================================= #
100
+ # === EnvironmentInformation.forestgreen
101
+ # ========================================================================= #
102
+ def self.forestgreen(i = '')
103
+ if @use_colours
104
+ return ::Colours.forestgreen(i)
105
+ end
106
+ return i
107
+ end
108
+
109
+ # ========================================================================= #
110
+ # === EnvironmentInformation.lightseagreen
111
+ # ========================================================================= #
112
+ def self.lightseagreen(i = '')
113
+ if @use_colours
114
+ return ::Colours.lightseagreen(i)
115
+ end
116
+ return i
117
+ end
118
+
119
+ # ========================================================================= #
120
+ # === EnvironmentInformation.steelblue
121
+ # ========================================================================= #
122
+ def self.steelblue(i = '')
123
+ if @use_colours
124
+ return ::Colours.steelblue(i)
125
+ end
126
+ return i
127
+ end
128
+
129
+ # ========================================================================= #
130
+ # === EnvironmentInformation.royalblue
131
+ # ========================================================================= #
132
+ def self.royalblue(i = '')
133
+ if @use_colours
134
+ return ::Colours.royalblue(i)
135
+ end
136
+ return i
137
+ end
138
+
139
+ # ========================================================================= #
140
+ # === EnvironmentInformation.sfile
141
+ # ========================================================================= #
142
+ def self.sfile(i = '')
143
+ if @use_colours
144
+ ::Colours.sfile(i)
145
+ else
146
+ i
147
+ end
148
+ end
149
+
150
+ end
@@ -0,0 +1,19 @@
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
@@ -0,0 +1,19 @@
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