hardware_information 1.0.83 → 1.0.84

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4087e89cb73b455fcab014e76b247cdd625a1139ca482529713dd4f83aaa02f4
4
- data.tar.gz: b9a2905adf53d06674e532ef2b448107863789ef6ab6ff619e389a9edb86a362
3
+ metadata.gz: 87c4fea0bafa90ad535ff6796f2f5109ad419e9849cb6d8546ddd1816093f4c5
4
+ data.tar.gz: 32ed180c5d2c37ba28b9b94a7223c5d06a1a9fec31a776936a07fc3200d2e472
5
5
  SHA512:
6
- metadata.gz: ee8927ef80715d22e2c98838e84764b87b812a33a2c01a546a9f9fc975f30a7090f81217e01149b16ed737b08fe68b83aa9ad06fce131f3cba901f2ba40d1e82
7
- data.tar.gz: 112500cefbe7e4a8f85c71a506c4812502ab8928b460ca0cf4c026727d6fcf75757ee9acea7c98411cdedbcbf7b4c5cc76fd5c269482b22809c97654d77412d6
6
+ metadata.gz: d2bbfab124dbb2dc4a34f73a11349f8d672a580ad13d587a8935a34dfb07f63ebe6f7af98a964f8157172e60096ba4fe2885e893d2fbfd8e9a3f767f6456dd93
7
+ data.tar.gz: e85b7e5e03199a2a29f53458779d2e426fca824fe05f497c4d273e71538f7474446e7b8bcc0e44a1bb273247d6291ac05300b1adf394b96a3bec9e151a36183f
data/README.md CHANGED
@@ -2,7 +2,7 @@
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/hardware_information.svg)](https://badge.fury.io/rb/hardware_information)
4
4
 
5
- This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">06.06.2023</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">13:01:37</span> o'clock.
5
+ This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">18.11.2023</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">08:09:30</span> o'clock.
6
6
 
7
7
  # The HardwareInformation Project
8
8
 
@@ -59,36 +59,51 @@ more useful in general, feel free to drop me an email at any time, via:
59
59
  Before that email I used an email account at Google gmail, but in **2021** I
60
60
  decided to slowly abandon gmail, for various reasons. In order to limit the
61
61
  explanation here, allow me to just briefly state that I do not feel as if I
62
- want to promote any Google service anymore when the user becomes the
63
- product (such as via data collection by upstream services). I feel this is
64
- a hugely flawed business model.
65
-
66
- Do keep in mind that responding to emails may take some time, depending on
67
- the amount of work I may have at that moment.
68
-
69
- In <b>2022</b> rubygems.org, or rather the corporate overlords who control the
70
- rubygems.org infrastructure these days, decided to make 2FA mandatory for every
71
- gem owner eventually: see
62
+ want to promote any Google service anymore when the user becomes the end
63
+ product (such as via data collection by upstream services, including other
64
+ proxy-services). My feeling is that this is a hugely flawed business model
65
+ to begin with, and I no longer wish to support this in any way, even if
66
+ only indirectly so, such as by using services of companies that try to
67
+ promote this flawed model.
68
+
69
+ In regards to responding to emails: please keep in mind that responding
70
+ may take some time, depending on the amount of work I may have at that
71
+ moment. So it is not that emails are ignored; it is more that I have not
72
+ (yet) found the time to read and reply. This means there may be a delay
73
+ of days, weeks and in some instances also months. There is, unfortunately,
74
+ not much I can do when I need to prioritise my time investment, but I try
75
+ to consider <b>all</b> feedback as an opportunity to improve my projects
76
+ nonetheless.
77
+
78
+ In <b>2022</b> rubygems.org decided to make 2FA mandatory for every
79
+ gem owner eventually:
80
+
81
+ see
72
82
  https://blog.rubygems.org/2022/06/13/making-packages-more-secure.html
73
83
 
74
84
  Mandatory 2FA will eventually be extended to all rubygems.org developers and
75
85
  maintainers. As I can not use 2FA, for reasons I will skip explaining here,
76
- this means that my projects will eventually be taken over by shopify (or,
77
- correspondingly, whoever effectively controls the rubygems.org ecosystem).
86
+ this means that my projects will eventually be removed, as I no longer
87
+ have any control over my projects hosted on rubygems.org (because I
88
+ can not use 2FA).
89
+
78
90
  At that point, I no longer have any control what is done to my projects
79
- since shopify (respectively those controlling the gems ecosystem) took away
80
- control here. Not sure at which point ruby became corporate-controlled -
81
- that was not the case several years ago.
91
+ since whoever is controlling the gems ecosystem took away our control
92
+ here. I am not sure at which point ruby became corporate-controlled -
93
+ that was not the case several years ago, so something has
94
+ changed.
82
95
 
83
96
  Ruby also only allows 2FA users to participate on the issue tracker these
84
97
  days:
85
98
 
86
99
  https://bugs.ruby-lang.org/issues/18800
87
100
 
88
- (Note that this was changed a few months ago, so the last part is no
89
- longer valid - it is possible to register again without mandating
90
- 2FA. I will retain the above notice for a bit longer, though, as I feel
91
- we should not restrict communication via mandatory authentification
92
- in general. Fighting spam is a noble goal, but when it also means you
93
- lock out real human people then this is definitely NOT good.)
101
+ But this has been reverted some months ago, so it is no longer applicable.
102
+ Suffice to say that I do not think that we should only be allowed to
103
+ interact on the world wide web when some 'authority' authenticated us,
104
+ such as via mandatory 2FA, so I hope this won't come back again.
105
+
106
+ Fighting spam is a noble goal, but when it also means you lock out
107
+ real human people then this is definitely NOT a good situation
108
+ to be had.
94
109
 
@@ -6,15 +6,23 @@
6
6
  #
7
7
  # This module has been primarily written to support the old content
8
8
  # shown in the old .cgi file. By having this available as a module
9
- # we can, in principle, adapt this easily into sinatra or rails as
10
- # well, so we gain more flexibility by using a module here.
9
+ # or class we can, in principle, adapt this easily into sinatra or
10
+ # rails as well, so we gain more flexibility by using a module here.
11
11
  # =========================================================================== #
12
12
  # require 'hardware_information/misc/purchased_hardware/purchased_hardware.rb'
13
+ # HardwareInformation.file_my_hardware
13
14
  # include HardwareInformation::PurchasedHardware
14
15
  # =========================================================================== #
15
16
  class HardwareInformation
16
17
 
17
- module PurchasedHardware
18
+ # =========================================================================== #
19
+ # === HardwareInformation.file_my_hardware
20
+ # =========================================================================== #
21
+ def self.file_my_hardware
22
+ '/home/x/data/personal/yaml/my_hardware/my_hardware.yml'
23
+ end
24
+
25
+ module PurchasedHardware # === HardwareInformation::PurchasedHardware
18
26
 
19
27
  require 'yaml'
20
28
 
@@ -37,10 +45,12 @@ module PurchasedHardware
37
45
  # ========================================================================= #
38
46
  def self.body_css_style
39
47
  return '
40
- border-top: 3px solid orange;
41
- border-left: 3px solid orange;
42
- color: #ceffce;
43
- width: 100%;'
48
+ border: 1px solid orange;
49
+ border-radius: 24px;
50
+ color: #ceffce;
51
+ width: 84%;
52
+
53
+ '
44
54
  end
45
55
 
46
56
  # ========================================================================= #
@@ -56,10 +66,35 @@ width: 100%;'
56
66
  @total_cost = 0
57
67
 
58
68
  # ========================================================================= #
59
- # === HardwareInformation::PurchasedHardware.add_to_the_total_cost
69
+ # === @hash_yearly_purchases_made
70
+ # ========================================================================= #
71
+ @hash_yearly_purchases_made = {}
72
+
73
+ # ========================================================================= #
74
+ # === HardwareInformation::PurchasedHardware.hash_yearly_purchases_made?
60
75
  # ========================================================================= #
61
- def self.add_to_the_total_cost(i)
62
- @total_cost += i.to_f
76
+ def self.hash_yearly_purchases_made?
77
+ @hash_yearly_purchases_made
78
+ end
79
+
80
+ # ========================================================================= #
81
+ # === HardwareInformation::PurchasedHardware.add_to_the_total_cost
82
+ #
83
+ # Since as of November 2023 we will also keep track of the year in which
84
+ # the purchase has been made. This is optional though.
85
+ # ========================================================================= #
86
+ def self.add_to_the_total_cost(
87
+ i, optional_year = nil
88
+ )
89
+ i = i.to_f
90
+ @total_cost += i
91
+ if optional_year
92
+ if @hash_yearly_purchases_made.has_key? optional_year
93
+ @hash_yearly_purchases_made[optional_year] += i
94
+ else
95
+ @hash_yearly_purchases_made[optional_year] = i
96
+ end
97
+ end
63
98
  end; self.instance_eval { alias add_to_total_cost add_to_the_total_cost } # === HardwareInformation::PurchasedHardware.add_to_total_cost
64
99
 
65
100
  # ========================================================================= #
@@ -74,7 +109,7 @@ width: 100%;'
74
109
  #
75
110
  # CSS-related Constants are defined next.
76
111
  # ========================================================================= #
77
- MAIN_DIV = 'pad0_5em mart0_2em'
112
+ MAIN_DIV = 'pad0_4em mart0_1em'
78
113
 
79
114
  # ========================================================================= #
80
115
  # === LINUX_YAML
@@ -90,29 +125,17 @@ width: 100%;'
90
125
  LINUX_YAML
91
126
  end
92
127
 
93
- # ========================================================================= #
94
- # === HardwareInformation::PurchasedHardware.file_computer_hardware?
95
- #
96
- # All the important data is stored in the following .yml file:
97
- #
98
- # bl /home/x/DATA/PC/OS/LINUX/yaml/computer_hardware.yml
99
- #
100
- # ========================================================================= #
101
- def self.file_computer_hardware?
102
- '/home/x/data/personal/yaml/my_hardware/my_hardware.yml'
103
- end
104
-
105
128
  # ========================================================================= #
106
129
  # === HardwareInformation::PurchasedHardware.file_my_hardware
107
130
  #
108
- # See:
131
+ # All the important data is stored in the following .yml file:
109
132
  #
110
133
  # bl /home/x/data/personal/yaml/my_hardware/my_hardware.yml
111
134
  #
112
135
  # ========================================================================= #
113
136
  def self.file_my_hardware
114
- "/home/x/data/personal/yaml/my_hardware/my_hardware.yml"
115
- end
137
+ '/home/x/data/personal/yaml/my_hardware/my_hardware.yml'
138
+ end; self.instance_eval { alias file_computer_hardware? file_my_hardware } # === HardwareInformation::PurchasedHardware.file_computer_hardware?
116
139
 
117
140
  # ========================================================================= #
118
141
  # === HardwareInformation::PurchasedHardware.my_hardware
@@ -166,4 +189,13 @@ width: 100%;'
166
189
  return @array_date_bought_at
167
190
  end
168
191
 
169
- end; end
192
+ end
193
+
194
+ # =========================================================================== #
195
+ # === HardwareInformation.my_hardware?
196
+ # =========================================================================== #
197
+ def self.my_hardware?
198
+ return ::HardwareInformation::PurchasedHardware.my_hardware
199
+ end
200
+
201
+ end
@@ -9,11 +9,11 @@ class HardwareInformation
9
9
  # ========================================================================= #
10
10
  # === VERSION
11
11
  # ========================================================================= #
12
- VERSION = '1.0.83'
12
+ VERSION = '1.0.84'
13
13
 
14
14
  # ========================================================================= #
15
15
  # === LAST_UPDATE
16
16
  # ========================================================================= #
17
- LAST_UPDATE = '06.06.2023'
17
+ LAST_UPDATE = '18.11.2023'
18
18
 
19
19
  end
@@ -0,0 +1,3 @@
1
+ The idea for this directory is to show all hardware that someone purchased
2
+ over time. A .yml file has to be supplied, which is not distributed by
3
+ this gem.
@@ -2,6 +2,6 @@
2
2
  # Encoding: UTF-8
3
3
  # frozen_string_literal: true
4
4
  # =========================================================================== #
5
- # http://localhost/programming/ruby/src/hardware_information/lib/hardware_information/www/my_hardware.cgi
5
+ # http://localhost/programming/ruby/src/hardware_information/lib/hardware_information/www/purchased_hardware/purchased_hardware.cgi
6
6
  # =========================================================================== #
7
7
  require 'cyberweb/evaluate_from_the_same_named_file_then_serve'