hardware_information 1.0.84 → 1.0.86

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87c4fea0bafa90ad535ff6796f2f5109ad419e9849cb6d8546ddd1816093f4c5
4
- data.tar.gz: 32ed180c5d2c37ba28b9b94a7223c5d06a1a9fec31a776936a07fc3200d2e472
3
+ metadata.gz: 5a19df6f32b025586d64d054e4eae44c7282f3992b303b254715019e7a97457c
4
+ data.tar.gz: 20d7e51454beaeab123a02b7869b342b024c06616bfcc3085c53d1c822ccfd7a
5
5
  SHA512:
6
- metadata.gz: d2bbfab124dbb2dc4a34f73a11349f8d672a580ad13d587a8935a34dfb07f63ebe6f7af98a964f8157172e60096ba4fe2885e893d2fbfd8e9a3f767f6456dd93
7
- data.tar.gz: e85b7e5e03199a2a29f53458779d2e426fca824fe05f497c4d273e71538f7474446e7b8bcc0e44a1bb273247d6291ac05300b1adf394b96a3bec9e151a36183f
6
+ metadata.gz: 82e61d7fe4482fc61ab43b9e61594340ff3012c86227d7eef6e7410edb9f33865880f08c7d39ea1b476e87f31a9bda43576d43e01054777549faf2049184edf0
7
+ data.tar.gz: 2d96b0eef4b3358f5916569096a12af5532a80c42d15ca7683bba8601a99d9222574073b4352f13e1e87b263213b22f7ace6e20ade65ba09cf051b11af2d66c0
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">18.11.2023</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">08:09:30</span> o'clock.
5
+ This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">30.01.2024</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">13:39:46</span> o'clock.
6
6
 
7
7
  # The HardwareInformation Project
8
8
 
@@ -49,7 +49,7 @@ to disable colour support:
49
49
  <img src="https://i.imgur.com/cIqwg5V.png" style="margin: 1em">
50
50
 
51
51
 
52
- ## Contact information and mandatory 2FA coming up in 2022
52
+ ## Contact information and mandatory 2FA (no longer) coming up in 2022 / 2023
53
53
 
54
54
  If your creative mind has ideas and specific suggestions to make this gem
55
55
  more useful in general, feel free to drop me an email at any time, via:
@@ -14,6 +14,8 @@ class HardwareInformation # === HardwareInformation
14
14
  require 'hardware_information/version/version.rb'
15
15
  require 'hardware_information/project/project.rb'
16
16
 
17
+ require 'colours/autogenerated/html_colours_methods.rb'
18
+
17
19
  # ========================================================================= #
18
20
  # === N
19
21
  # ========================================================================= #
@@ -210,6 +212,13 @@ class HardwareInformation # === HardwareInformation
210
212
  set_commandline_mode # Default.
211
213
  end
212
214
 
215
+ # ========================================================================= #
216
+ # === mediumslateblue
217
+ # ========================================================================= #
218
+ def mediumslateblue(i)
219
+ ::Colours::HtmlColoursMethods.send(__method__, i)
220
+ end
221
+
213
222
  # ========================================================================= #
214
223
  # === make_line
215
224
  #
@@ -240,7 +249,7 @@ class HardwareInformation # === HardwareInformation
240
249
  # Pas through.
241
250
  else # Else, use colours.
242
251
  if use_colours?
243
- content = COLOURS.send(yielded, content)
252
+ content = ::Colours::HtmlColoursMethods.send(yielded, content)
244
253
  end
245
254
  end
246
255
  end
@@ -371,7 +380,7 @@ class HardwareInformation # === HardwareInformation
371
380
  def _(i, optional_colour = nil)
372
381
  if optional_colour and use_colours? # Add colours only if needed.
373
382
  if optional_colour.is_a? Symbol
374
- i = ::Colours.send(optional_colour, i)
383
+ i = send(optional_colour, i)
375
384
  else
376
385
  i = optional_colour+i+rev
377
386
  end
@@ -400,7 +409,7 @@ class HardwareInformation # === HardwareInformation
400
409
  # === colourize_filesize_of_the_harddisc
401
410
  # ========================================================================= #
402
411
  def colourize_filesize_of_the_harddisc(i)
403
- COLOURS.send(
412
+ ::Colours::HtmlColoursMethods.send(
404
413
  @hash_use_these_colours[:filesize_of_the_harddisc],
405
414
  i
406
415
  )
@@ -410,7 +419,7 @@ class HardwareInformation # === HardwareInformation
410
419
  # === colourize_file_system_type
411
420
  # ========================================================================= #
412
421
  def colourize_file_system_type(i)
413
- COLOURS.send(
422
+ ::Colours::HtmlColoursMethods.send(
414
423
  @hash_use_these_colours[:file_system_type],
415
424
  i
416
425
  )
@@ -420,7 +429,7 @@ class HardwareInformation # === HardwareInformation
420
429
  # === colourize_n_percent_occupied
421
430
  # ========================================================================= #
422
431
  def colourize_n_percent_occupied(i)
423
- COLOURS.send(
432
+ ::Colours::HtmlColoursMethods.send(
424
433
  @hash_use_these_colours[:n_percent_occupied],
425
434
  i
426
435
  )
@@ -430,7 +439,7 @@ class HardwareInformation # === HardwareInformation
430
439
  # === colourize_highlighted_content
431
440
  # ========================================================================= #
432
441
  def colourize_highlighted_content(i)
433
- COLOURS.send(
442
+ ::Colours::HtmlColoursMethods.send(
434
443
  @hash_use_these_colours[:highlighted_content],
435
444
  i
436
445
  )
@@ -444,7 +453,7 @@ class HardwareInformation # === HardwareInformation
444
453
  # the time being this remains hardcoded.
445
454
  # ========================================================================= #
446
455
  def colourize_via_regular_colour(i)
447
- COLOURS.send(
456
+ ::Colours::HtmlColoursMethods.send(
448
457
  :thistle,
449
458
  i
450
459
  )
@@ -592,30 +601,6 @@ class HardwareInformation # === HardwareInformation
592
601
  @use_colours = false
593
602
  end
594
603
 
595
- # ========================================================================= #
596
- # === thistle
597
- # ========================================================================= #
598
- def thistle(i)
599
- return COLOURS.thistle(i) if use_colours?
600
- return i
601
- end
602
-
603
- # ========================================================================= #
604
- # === royalblue
605
- # ========================================================================= #
606
- def royalblue(i)
607
- return COLOURS.royalblue(i) if use_colours?
608
- return i
609
- end
610
-
611
- # ========================================================================= #
612
- # === steelblue
613
- # ========================================================================= #
614
- def steelblue(i)
615
- return COLOURS.steelblue(i) if use_colours?
616
- return i
617
- end
618
-
619
604
  # ========================================================================= #
620
605
  # === rev
621
606
  # ========================================================================= #
@@ -995,6 +980,30 @@ class HardwareInformation # === HardwareInformation
995
980
  end
996
981
  end
997
982
 
983
+ # ========================================================================= #
984
+ # === thistle
985
+ # ========================================================================= #
986
+ def thistle(i)
987
+ return ::Colours::HtmlColoursMethods.thistle(i) if use_colours?
988
+ return i
989
+ end
990
+
991
+ # ========================================================================= #
992
+ # === royalblue
993
+ # ========================================================================= #
994
+ def royalblue(i)
995
+ return ::Colours::HtmlColoursMethods.royalblue(i) if use_colours?
996
+ return i
997
+ end
998
+
999
+ # ========================================================================= #
1000
+ # === steelblue
1001
+ # ========================================================================= #
1002
+ def steelblue(i)
1003
+ return ::Colours::HtmlColoursMethods.steelblue(i) if use_colours?
1004
+ return i
1005
+ end
1006
+
998
1007
  # ========================================================================= #
999
1008
  # === run (run tag)
1000
1009
  # ========================================================================= #
@@ -1045,4 +1054,4 @@ if __FILE__ == $PROGRAM_NAME
1045
1054
  # _.disable_colours
1046
1055
  _.run
1047
1056
  _.report_result
1048
- end # hardi
1057
+ end # hardi
@@ -87,7 +87,7 @@ class MountedHarddiscs < ::Gtk::Box # === HardwareInformation::GUI::Gtk::Mounted
87
87
  def self.run(
88
88
  i = ARGV
89
89
  )
90
- require 'gtk_paradise/app/app.rb'
90
+ require 'gtk_paradise/run'
91
91
  _ = ::HardwareInformation::GUI::Gtk::MountedHarddiscs.new(i)
92
92
  r = ::Gtk.run
93
93
  r << _
@@ -86,19 +86,7 @@ module PurchasedHardwareModule
86
86
  # === @configuration
87
87
  # ======================================================================= #
88
88
  @configuration = [true, __dir__, NAMESPACE]
89
- # ======================================================================= #
90
- # === @title
91
- # ======================================================================= #
92
- set_title(TITLE)
93
- # ======================================================================= #
94
- # === @width
95
- # ======================================================================= #
96
- set_width(WIDTH)
97
- # ======================================================================= #
98
- # === @height
99
- # ======================================================================= #
100
- set_height(HEIGHT)
101
- set_use_this_font(USE_THIS_FONT)
89
+ title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
102
90
  use_gtk_project_css_file
103
91
  infer_the_size_automatically
104
92
  end
@@ -131,7 +119,7 @@ module PurchasedHardwareModule
131
119
  def connect_skeleton
132
120
  abort_on_exception
133
121
  vbox_containing_the_hardware_entries = gtk_vbox
134
- hbox = gtk_hbox
122
+ hbox = create_hbox
135
123
  hbox.minimal(
136
124
  text('♥️ ').red
137
125
  )
@@ -258,8 +246,10 @@ module PurchasedHardwareModule
258
246
  text = '<b>Gesamtkosten</b>: <b>'+
259
247
  HardwareInformation::PurchasedHardware.total_cost?.to_s.to_f.round(2).to_s+
260
248
  ' Euro</b>'
249
+ _ = h2(text).align_left
250
+ _.make_selectable
261
251
  vbox_containing_the_hardware_entries.add(
262
- h2(text).align_left
252
+ _
263
253
  )
264
254
  # ======================================================================= #
265
255
  # Add the big vbox into a scrolled-window interface.
@@ -9,11 +9,11 @@ class HardwareInformation
9
9
  # ========================================================================= #
10
10
  # === VERSION
11
11
  # ========================================================================= #
12
- VERSION = '1.0.84'
12
+ VERSION = '1.0.86'
13
13
 
14
14
  # ========================================================================= #
15
15
  # === LAST_UPDATE
16
16
  # ========================================================================= #
17
- LAST_UPDATE = '18.11.2023'
17
+ LAST_UPDATE = '30.01.2024'
18
18
 
19
19
  end
@@ -50,9 +50,11 @@ img { margin-right: 2px;}
50
50
  /*
51
51
  * The following min-width is important to prevent our <td>
52
52
  * tags from breaking into a newline too early.
53
+ *
54
+ * It needs its own dedicated class, though.
53
55
  */
54
- td {
55
- min-width: 320px;
56
+ .td_min_width {
57
+ min-width: 360px;
56
58
  }
57
59
 
58
60
  /*
@@ -556,20 +558,33 @@ smaller_width(HardwareInformation::PurchasedHardware::MAIN_DIV,'',
556
558
  e 'No file exists at '+_+'.'
557
559
  end
558
560
  # ========================================================================= #
559
- # === Display the final total costs next, close to the end of the web-app
561
+ # === Next comes the "Spendings on hardware per year" part.
560
562
  # ========================================================================= #
561
563
  display_the_total_costs
562
- h3 'Spendings on hardware per year:'
564
+ h3 'Spendings on hardware per year:',
565
+ 'marl1_5em marb2px'
563
566
  hash = HardwareInformation::PurchasedHardware.hash_yearly_purchases_made?
564
567
  result = ''.dup
568
+ array = []
565
569
  hash.each_pair {|year, cost|
570
+ next if year == 1970 # As this can not be possible.
566
571
  cost = cost.round(2)
567
- result << string_s2(year.to_s, 'lightblue')+': '+
568
- string_s2(cost.to_s.ljust(20,' ')+' Euro', 'gold terminal_font')+'<br>'
572
+ array << string_s2((year.to_s+':'), 'lightblue BOLD marr1em')
573
+ array << string_s2(
574
+ (cost.to_s+' Euro').rjust(20,' '), 'gold terminal_font BOLD'
575
+ )
569
576
  }
570
- p_default(css_class: 'marl3em') {
571
- e result
577
+ p_default(css_style: 'font-size: 1.4em; margin-top: 2px;') {
578
+ table2('mart1px marl3em monofont pretty_table','',
579
+ '') {{
580
+ use_this_dataset: array # ← This is the part where we display the total cost.
581
+ }}
572
582
  }
583
+ # ========================================================================= #
584
+ # === After that, display the final total costs next, close to the end of
585
+ # the web-app
586
+ # ========================================================================= #
587
+ display_the_total_costs
573
588
  show_the_external_links # Always show the external links.
574
589
  # ========================================================================= #
575
590
  # === Sitemap
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hardware_information
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.84
4
+ version: 1.0.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert A. Heiler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-18 00:00:00.000000000 Z
11
+ date: 2024-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colours
@@ -81,9 +81,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: 3.4.22
84
+ version: 3.5.5
85
85
  requirements: []
86
- rubygems_version: 3.4.22
86
+ rubygems_version: 3.5.5
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: This small class will output Information about your hardware, i.e. the Processor