iStats 1.6.0 → 1.6.2

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
- SHA1:
3
- metadata.gz: 3d4524a43b23dc2f8c2ec7214001e9f167efdee9
4
- data.tar.gz: d73cade1cc7a3cc4004e1fd39f6ac7b2d0e579a2
2
+ SHA256:
3
+ metadata.gz: 85ed5e8845b71768672867309106a60d04d0fafffd91a514e04a2b20b3638868
4
+ data.tar.gz: 5bb6707e3a25a89906074ef9cf700c4fde34d7a0a9fba476c2f31b77b70474a5
5
5
  SHA512:
6
- metadata.gz: 43be157566d393bcaf162bf0f8609e7526f469c814dca9a1aad59453a9c124827b7893117a4f8190acee93cca0cf59038a2709ad49d6eb33293f2b81e23648c4
7
- data.tar.gz: d5ddf3e45144678fa0b7f5fd8752ea1741660b3d7416ae521f67e02ba01dd54ebeb49d34cd7c2b3ec8b2eda53ad733facc6b4ca4224a18c979f3e371254102c6
6
+ metadata.gz: e6b5e7694b7bde6215d3e0b36bf7b375b1f89cb931ea39f3af997950b634148d965b5e2702cc623ebcf90296c4d0f38b62181a03645355849886c58de290625c
7
+ data.tar.gz: 4c0ffa0059f89e56d059a065c8ecb3f8b078668a44eaf24648e62737c195d1810f68fcb19413c107f68d38390f35e681daead77b8fbc281b136fa0cef1ecf3f2
data/lib/iStats/extra.rb CHANGED
@@ -53,6 +53,10 @@ module IStats
53
53
 
54
54
  thresholds = sensor['thresholds'][1..-2].split(/, /).map { |s| s.to_i }
55
55
 
56
+ if Printer.get_temperature_scale == 'fahrenheit'
57
+ thresholds.map! { |t| Utils.to_fahrenheit(t) }
58
+ end
59
+
56
60
  if (display)
57
61
  # Invoked if settings has an AltDisplay?
58
62
  puts "#{Printer.format_label("#{key}")}" +
@@ -37,7 +37,7 @@ module IStats
37
37
  # thresholds - must be an array of size 4 containing the threshold values
38
38
  # for the sparkline colors
39
39
  #
40
- # If the values in the thresholds array are descending, treat 100& as
40
+ # If the values in the thresholds array are descending, treat 100% as
41
41
  # good (green) instead of bad (red)
42
42
  #
43
43
  def gen_sparkline(value, thresholds)
@@ -114,7 +114,7 @@ module IStats
114
114
  end
115
115
  end
116
116
 
117
- # Converts the value to the class temperature_scale with
117
+ # Converts the value to the class temperature_scale with
118
118
  # accompanying scale string.
119
119
  #
120
120
  def parse_temperature(temperature)
@@ -153,7 +153,7 @@ module IStats
153
153
 
154
154
  if @display_labels
155
155
  format = "%-"+LABEL_WIDTH.to_s + "s"
156
- printf("%-" + LABEL_WIDTH.to_s + "s", label + ":")
156
+ printf("%-" + LABEL_WIDTH.to_s + "s", label + ": ")
157
157
  end
158
158
 
159
159
  printf("%-" + full_value_width.to_s + "s", full_value)
@@ -26,7 +26,7 @@ module IStats
26
26
  end
27
27
 
28
28
  def load
29
- if File.exists?(@configDir + @configFile)
29
+ if File.exist?(@configDir + @configFile)
30
30
  $config = ParseConfig.new(@configDir + @configFile)
31
31
  else
32
32
  $config = ParseConfig.new
@@ -34,11 +34,11 @@ module IStats
34
34
  end
35
35
 
36
36
  def configFileExists
37
- if File.exists?(@configDir + @configFile)
37
+ if File.exist?(@configDir + @configFile)
38
38
  $config = ParseConfig.new(@configDir + @configFile)
39
39
  else
40
40
  puts "No config file #{@configDir}#{@configFile} found .. Run scan"
41
- if !File.exists?(@configDir)
41
+ if !File.exist?(@configDir)
42
42
  Dir.mkdir( @configDir)
43
43
  end
44
44
  file=File.open(@configDir + @configFile,"w+")
@@ -69,7 +69,7 @@ module IStats
69
69
  end
70
70
 
71
71
  def toggleAll(value)
72
- if File.exists?(@configDir + @configFile)
72
+ if File.exist?(@configDir + @configFile)
73
73
  settings = ParseConfig.new(@configDir + @configFile)
74
74
  settings.params.keys.each{ |key|
75
75
  if (settings.params[key]['enabled'])
@@ -85,7 +85,7 @@ module IStats
85
85
  end
86
86
 
87
87
  def list
88
- if File.exists?(@configDir + @configFile)
88
+ if File.exist?(@configDir + @configFile)
89
89
  settings = ParseConfig.new(@configDir + @configFile)
90
90
  settings.params.keys.each{ |key|
91
91
  if (settings[key]['enabled'])
@@ -1,3 +1,3 @@
1
1
  module IStats
2
- VERSION = '1.6.0'
2
+ VERSION = '1.6.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iStats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris911
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-29 00:00:00.000000000 Z
11
+ date: 2023-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sparkr
@@ -119,7 +119,7 @@ homepage: https://github.com/Chris911/iStats
119
119
  licenses:
120
120
  - MIT
121
121
  metadata: {}
122
- post_install_message:
122
+ post_install_message:
123
123
  rdoc_options: []
124
124
  require_paths:
125
125
  - lib
@@ -135,9 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.5.2
140
- signing_key:
138
+ rubygems_version: 3.4.1
139
+ signing_key:
141
140
  specification_version: 4
142
141
  summary: Stats for your mac
143
142
  test_files: []