hardware_information 1.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +94 -0
  3. data/bin/hardware_information +12 -0
  4. data/doc/README.gen +47 -0
  5. data/hardware_information.gemspec +38 -0
  6. data/lib/hardware_information/class/hardware_information.rb +1048 -0
  7. data/lib/hardware_information/css/project.css +3 -0
  8. data/lib/hardware_information/gui/gtk2/purchased_hardware/purchased_hardware.rb +34 -0
  9. data/lib/hardware_information/gui/gtk2/show_input_devices/show_input_devices.rb +34 -0
  10. data/lib/hardware_information/gui/gtk3/mounted_harddiscs/mounted_harddiscs.rb +103 -0
  11. data/lib/hardware_information/gui/gtk3/purchased_hardware/purchased_hardware.rb +34 -0
  12. data/lib/hardware_information/gui/gtk3/show_input_devices/show_input_devices.rb +34 -0
  13. data/lib/hardware_information/gui/libui/mounted_harddiscs/mounted_harddiscs.rb +88 -0
  14. data/lib/hardware_information/gui/shared_code/mounted_harddiscs/mounted_harddiscs_module.rb +107 -0
  15. data/lib/hardware_information/gui/shared_code/purchased_hardware/purchased_hardware_module.rb +293 -0
  16. data/lib/hardware_information/gui/shared_code/show_input_devices/show_input_devices_module.rb +187 -0
  17. data/lib/hardware_information/misc/purchased_hardware/README.md +7 -0
  18. data/lib/hardware_information/misc/purchased_hardware/purchased_hardware.rb +169 -0
  19. data/lib/hardware_information/monitor/README.md +6 -0
  20. data/lib/hardware_information/monitor/monitor.rb +36 -0
  21. data/lib/hardware_information/project/project.rb +29 -0
  22. data/lib/hardware_information/version/version.rb +19 -0
  23. data/lib/hardware_information/www/embeddable_interface.rb +52 -0
  24. data/lib/hardware_information/www/my_hardware.cgi +7 -0
  25. data/lib/hardware_information/www/my_hardware.rb +498 -0
  26. data/lib/hardware_information/www/my_hardware_for_sinatra.rb +65 -0
  27. data/lib/hardware_information/yaml/colours_for_the_hardware_information_project.yml +30 -0
  28. data/lib/hardware_information/yaml/usb_errors/usb_errors.yml +2 -0
  29. data/lib/hardware_information.rb +7 -0
  30. metadata +91 -0
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # http://localhost/programming/ruby/src/hardware_information/lib/hardware_information/www/my_hardware_for_sinatra.rb
6
+ # =========================================================================== #
7
+ require 'cyberweb/and_sinatra_base.rb'
8
+
9
+ class HardwareInformation
10
+
11
+ class SinatraMyHardware < ::Sinatra::Base # === HardwareInformation::SinatraMyHardware
12
+
13
+ # ========================================================================= #
14
+ # === USE_THIS_PORT
15
+ # ========================================================================= #
16
+ USE_THIS_PORT = '4567'
17
+
18
+ set :port, USE_THIS_PORT
19
+
20
+ # ========================================================================= #
21
+ # === initialize
22
+ # ========================================================================= #
23
+ def initialize
24
+ super()
25
+ target = "http://localhost:#{USE_THIS_PORT}/"
26
+ Cyberweb.try_to_open_this_URL_via_the_browser(target, USE_THIS_PORT)
27
+ end
28
+
29
+ # ========================================================================= #
30
+ # === /
31
+ #
32
+ # Usage Example:
33
+ #
34
+ # http://localhost:4567/
35
+ #
36
+ # ========================================================================= #
37
+ get('/'){
38
+ return Cyberweb::WebObject.evaluate_from_the_same_named_file_then_serve(
39
+ :do_not_display_anything,
40
+ HardwareInformation.project_base_dir?+'www/my_hardware_for_sinatra.rb'
41
+ )
42
+ }
43
+
44
+ # ========================================================================= #
45
+ # === HardwareInformation::SinatraMyHardware.start_sinatra_interface
46
+ # ========================================================================= #
47
+ def self.start_sinatra_interface
48
+ ::HardwareInformation::SinatraMyHardware.run!
49
+ end
50
+
51
+ end
52
+
53
+ # =========================================================================== #
54
+ # === HardwareInformation.start_sinatra_interface
55
+ # =========================================================================== #
56
+ def self.start_sinatra_interface
57
+ puts 'Trying to start the sinatra-interface of HardwareInformation next.'
58
+ HardwareInformation::SinatraMyHardware.start_sinatra_interface
59
+ end
60
+
61
+ end
62
+
63
+ if __FILE__ == $PROGRAM_NAME
64
+ HardwareInformation::SinatraMyHardware.start_sinatra_interface
65
+ end # hardwareinformation --sinatra
@@ -0,0 +1,30 @@
1
+ # =========================================================================== #
2
+ # === colours_for_the_hardware_information_project
3
+ #
4
+ # This yaml file keeps the colours that are to be used for the
5
+ # hardware-information project, as far as the main report-action
6
+ # (on the commandline) is concerned.
7
+ #
8
+ # Keep the entries via the awkward !ruby/symbol, so that we can
9
+ # directly work with Symbols in the ruby code.
10
+ # =========================================================================== #
11
+
12
+ # =========================================================================== #
13
+ # === filesize_of_the_harddisc
14
+ # =========================================================================== #
15
+ !ruby/symbol filesize_of_the_harddisc: !ruby/symbol orchid # Use orchid as colour here.
16
+
17
+ # =========================================================================== #
18
+ # === file_system_type
19
+ # =========================================================================== #
20
+ !ruby/symbol file_system_type: !ruby/symbol steelblue # Use steelblue as colour here.
21
+
22
+ # =========================================================================== #
23
+ # === n_percent_occupied
24
+ # =========================================================================== #
25
+ !ruby/symbol n_percent_occupied: !ruby/symbol seagreen # Use seagreen as colour here.
26
+
27
+ # =========================================================================== #
28
+ # === highlighted_content
29
+ # =========================================================================== #
30
+ !ruby/symbol highlighted_content: !ruby/symbol orangered # Use orangered as colour here.
@@ -0,0 +1,2 @@
1
+ # USB error
2
+ -110: 'Timeout expired before the transfer completed'
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ require 'hardware_information/class/hardware_information.rb'
6
+ require 'hardware_information/misc/purchased_hardware/purchased_hardware.rb'
7
+ require 'hardware_information/www/embeddable_interface.rb'
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hardware_information
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.83
5
+ platform: ruby
6
+ authors:
7
+ - Robert A. Heiler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-06-06 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
+ description: |2+
28
+
29
+ This small class will output Information about your hardware,
30
+ i.e. the Processor type and so on. This presently only works
31
+ on Linux, though.
32
+
33
+ email: shevy@inbox.lt
34
+ executables: []
35
+ extensions: []
36
+ extra_rdoc_files: []
37
+ files:
38
+ - README.md
39
+ - bin/hardware_information
40
+ - doc/README.gen
41
+ - hardware_information.gemspec
42
+ - lib/hardware_information.rb
43
+ - lib/hardware_information/class/hardware_information.rb
44
+ - lib/hardware_information/css/project.css
45
+ - lib/hardware_information/gui/gtk2/purchased_hardware/purchased_hardware.rb
46
+ - lib/hardware_information/gui/gtk2/show_input_devices/show_input_devices.rb
47
+ - lib/hardware_information/gui/gtk3/mounted_harddiscs/mounted_harddiscs.rb
48
+ - lib/hardware_information/gui/gtk3/purchased_hardware/purchased_hardware.rb
49
+ - lib/hardware_information/gui/gtk3/show_input_devices/show_input_devices.rb
50
+ - lib/hardware_information/gui/libui/mounted_harddiscs/mounted_harddiscs.rb
51
+ - lib/hardware_information/gui/shared_code/mounted_harddiscs/mounted_harddiscs_module.rb
52
+ - lib/hardware_information/gui/shared_code/purchased_hardware/purchased_hardware_module.rb
53
+ - lib/hardware_information/gui/shared_code/show_input_devices/show_input_devices_module.rb
54
+ - lib/hardware_information/misc/purchased_hardware/README.md
55
+ - lib/hardware_information/misc/purchased_hardware/purchased_hardware.rb
56
+ - lib/hardware_information/monitor/README.md
57
+ - lib/hardware_information/monitor/monitor.rb
58
+ - lib/hardware_information/project/project.rb
59
+ - lib/hardware_information/version/version.rb
60
+ - lib/hardware_information/www/embeddable_interface.rb
61
+ - lib/hardware_information/www/my_hardware.cgi
62
+ - lib/hardware_information/www/my_hardware.rb
63
+ - lib/hardware_information/www/my_hardware_for_sinatra.rb
64
+ - lib/hardware_information/yaml/colours_for_the_hardware_information_project.yml
65
+ - lib/hardware_information/yaml/usb_errors/usb_errors.yml
66
+ homepage: https://rubygems.org/gems/environment_information
67
+ licenses:
68
+ - GPL-2.0
69
+ metadata: {}
70
+ post_install_message:
71
+ rdoc_options: []
72
+ require_paths:
73
+ - lib
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 2.7.6
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 3.4.13
84
+ requirements: []
85
+ rubygems_version: 3.4.13
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: This small class will output Information about your hardware, i.e. the Processor
89
+ type and so on. This presently only works on Linux, though.
90
+ test_files: []
91
+ ...