hackmac 1.8.7 → 1.8.8

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: 0e9f27838590146ba41eed29aac8016b7116f8e6020c5f48b7fbde9f2e67623b
4
- data.tar.gz: 1b910b5ae3d1f6a48115729719ed002b0469060da5e49971700f1e8d9c44a221
3
+ metadata.gz: 7c8c0eca94ed5f928879ab9ff5a003a1244d3c57a6095a62e682ae4bad8e0441
4
+ data.tar.gz: 60f88a3daf23f9e332ab490c266d5f58ed22e0f63ac517d81197628e4e2039de
5
5
  SHA512:
6
- metadata.gz: 91e174f74f9e504258c3538f50bf26ab32b2970017bb52e92362c9075d856718672312f1f85f1803486821c7eb6b388a27592d618f68691865babee9da862b26
7
- data.tar.gz: 67b18e89b675e321b39c0b636bb42df1fba19486ae0e27e892b4fe922d8354309a9ff0746bc26b879b74d38870da160b06f12102789427121930c3112cc3d5d1
6
+ metadata.gz: 23dbecaa04d1d5ceae68b76c655283c9fdfdf330800e55ef3a646f665db95d94e851c278ae7a6002067376eec938b05a0a496668cf07bcc406c1277659b84622
7
+ data.tar.gz: 42299611665c9cf127319b202a32dc16a7cf9edd202f1acf0942aeaae7f9322339734286d7c400713c611cc749bb4e59f88ebcf9547abe121a25a51f176fb5fa
data/CHANGES.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changes
2
2
 
3
+ ## 2025-10-15 v1.8.8
4
+
5
+ - Handle invalid version strings by setting @version to **nil** instead of
6
+ storing malformed objects
7
+ - Changes in `bin\efi`
8
+ - Refactor version comparison styling into reusable `styler` lambda
9
+ - Extract version formatting logic into separate `formatter` lambda
10
+ - Update `Tabulo::Table` configuration to use the new lambda functions
11
+ - Improve version display logic to handle **nil** version comparisons gracefully
12
+ - Replace inline rescue logic with explicit nil checks for better error handling
13
+ - Updated `static.yml` workflow to use array syntax for branch specification
14
+ - Added `github_workflows` configuration to `Rakefile` for `static.yml` workflow
15
+
3
16
  ## 2025-10-15 v1.8.7
4
17
 
5
18
  - Configure **User-Agent** header with version for GitHub API calls
data/Rakefile CHANGED
@@ -18,6 +18,10 @@ GemHadar do
18
18
 
19
19
  readme 'README.md'
20
20
 
21
+ github_workflows(
22
+ 'static.yml' => {}
23
+ )
24
+
21
25
  dependency 'tins', '~>1.14'
22
26
  dependency 'term-ansicolor', '~>1.10'
23
27
  dependency 'complex_config'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.7
1
+ 1.8.8
data/bin/efi CHANGED
@@ -224,13 +224,28 @@ when 'kexts'
224
224
  warn "#{path.to_s.inspect} has no info => Skipping."
225
225
  end.compact.sort_by(&:name)
226
226
  puts 'EFI'.yellow.bold + " (#{mdev})".bold
227
+ styler = -> v, s {
228
+ if v.version.nil? || v.remote_version.nil?
229
+ s.yellow
230
+ else
231
+ v.version < v.remote_version ? s.red : s.green
232
+ end
233
+ }
234
+ formatter = -> e {
235
+ if e.version.nil? || e.remote_version.nil?
236
+ e.version.to_s
237
+ else
238
+ operator = { 0 => ?=, -1 => ?<, 1 => ?> }[e.version <=> e.remote_version]
239
+ "%s %s %s" % [ e.version, operator, e.remote_version ]
240
+ end
241
+ }
227
242
  puts Tabulo::Table.new(on_efi, align_header: :left, border: :modern) { |t|
228
243
  t.add_column(:name, header_styler: bold_head)
229
244
  t.add_column(
230
245
  :itself,
231
246
  header: 'Version/Remote',
232
- styler: -> v, s { v.version < v.remote_version ? s.red : s.green rescue s.yellow },
233
- formatter: -> e { "%s %s %s" % [ e.version, ({ 0 => ?=, -1 => ?<, 1 => ?> }[e.version <=> e.remote_version] rescue nil), e.remote_version ] },
247
+ styler:,
248
+ formatter:,
234
249
  header_styler: bold_head
235
250
  )
236
251
  t.add_column(:path, header_styler: bold_head)
data/hackmac.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: hackmac 1.8.7 ruby lib
2
+ # stub: hackmac 1.8.8 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "hackmac".freeze
6
- s.version = "1.8.7".freeze
6
+ s.version = "1.8.8".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
data/lib/hackmac/kext.rb CHANGED
@@ -87,7 +87,7 @@ module Hackmac
87
87
  begin
88
88
  @version = Version.new(version)
89
89
  rescue ArgumentError
90
- @version = version
90
+ @version = nil
91
91
  end
92
92
  end
93
93
  end
@@ -1,6 +1,6 @@
1
1
  module Hackmac
2
2
  # Hackmac version
3
- VERSION = '1.8.7'
3
+ VERSION = '1.8.8'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackmac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.7
4
+ version: 1.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank