hackmac 1.8.3 → 1.8.5

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: '09d1c9d86b5f82faf58a2b4b86aff4a2bf315e81f2f30b4cf967e6fb6dfd33ca'
4
- data.tar.gz: e642ea32afa25bcec1026b4e1d1cfb1ce71309aab7d32d42b55ad31b78d836fd
3
+ metadata.gz: 4e6a5eddb6a8534ec0ab25e387690e533805343b7531b380bf0916ac4f181d72
4
+ data.tar.gz: 6906f6c55a4d2dd6f46b70cd44cb3bcfff16283e14871992d19cb22dc8a71ecf
5
5
  SHA512:
6
- metadata.gz: ce6b64440555a2236fa91cf059cfe8413bb6aa2361b453f694d6791fcd76a95ef397b3bd401bf9747936c3d85d46deb58e5eaed76e89600ffa9f7fe691764178
7
- data.tar.gz: '092da979e7b49732c26ba139f36d58df9c11f22790bea9ff6bfa7289025562b751c5a77651632966aed4ab6cbbfacc441a1d8a97490fc43cdde6f4501c774b31'
6
+ metadata.gz: f45158ccc125e01999b97272f89e3257a1d36b5a32546f3438af5cd99a2a5a1192004d62e9346eb28b12eafbbc28404f16ff2d310aaa95b93737d8a9a3fe5033
7
+ data.tar.gz: 98b0c59693b5f94146d12a49c7d2ace14f37bec4d9548ad1ca851d4ab1b1cd3777208fbe9cc7fa5003d4ae44c4f662335eb86cc2794242857c1fa56a55beb526
data/CHANGES.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changes
2
2
 
3
+ ## 2025-10-14 v1.8.5
4
+
5
+ - Improved version parsing in `github_source.rb` by adding regex validation
6
+ `/\A\d+\.\d+\.\d+\z/` before creating `Version` objects
7
+ - Enhanced version parsing in `kext.rb` with regex validation
8
+ `/\A\d+\.\d+\.\d+\z/` before parsing `CFBundleShortVersionString()` as a
9
+ version
10
+ - Both changes ensure only valid semantic version strings are processed by the
11
+ `Version` class, preventing errors from malformed version identifiers
12
+
13
+ ## 2025-09-20 v1.8.4
14
+
15
+ - Added a new section titled "Documentation" to the README with a link to the
16
+ API documentation hosted at GitHub.io
17
+ - Renamed `.context/code_comment.rb` to `.contexts/code_comment.rb` and updated
18
+ the directory structure for code comment context files while maintaining all
19
+ existing functionality
20
+ - Added a new GitHub Actions workflow file `.github/workflows/static.yml` to
21
+ deploy static content to GitHub Pages
22
+ - Updated the `Rakefile` to include the `.github` directory in the
23
+ `package_ignore` list and configured the workflow to run on push to the
24
+ master branch and manual dispatch
25
+ - Set up permissions for deployment to GitHub Pages and installed the
26
+ `gem_hadar` gem to generate documentation using `rake doc`
27
+ - Added `.yardoc` and `doc` directories to `.gitignore` and updated the
28
+ `Rakefile` to ignore these directories while removing `.byebug_history` from
29
+ both files
30
+ - Fixed markdown escaping in documentation comments, specifically updating the
31
+ `@param` documentation tag in `asset_tools.rb` to yield instead of block and
32
+ escaping `\@format_value` and `\@plist` references in `graph.rb` and
33
+ `plist.rb` respectively
34
+
3
35
  ## 2025-09-19 v1.8.3
4
36
 
5
37
  - Enhanced README with improved formatting and detailed tool descriptions
data/README.md CHANGED
@@ -7,6 +7,10 @@ customizing Hackintosh configurations. While primarily intended for users with
7
7
  Hackintosh setups, it may also be useful for ordinary Mac users who want to
8
8
  leverage its features for monitoring system performance using `gfxmon`.
9
9
 
10
+ ## Documentation
11
+
12
+ Complete API documentation is available at: [GitHub.io](https://flori.github.io/hackmac/)
13
+
10
14
  ## Tools 🛠️
11
15
 
12
16
  ### `efi` - EFI Partition Management 📁
data/Rakefile CHANGED
@@ -13,8 +13,8 @@ GemHadar do
13
13
  executables Dir['bin/*'].map(&File.method(:basename))
14
14
  test_dir 'tests'
15
15
  ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', '.AppleDouble',
16
- 'tags', '.bundle', '.DS_Store', '.byebug_history'
17
- package_ignore '.gitignore', '.contexts'
16
+ 'tags', '.bundle', '.DS_Store', '.yardoc', 'doc'
17
+ package_ignore '.gitignore', '.contexts', '.github'
18
18
 
19
19
  readme 'README.md'
20
20
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.3
1
+ 1.8.5
data/hackmac.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: hackmac 1.8.3 ruby lib
2
+ # stub: hackmac 1.8.5 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "hackmac".freeze
6
- s.version = "1.8.3".freeze
6
+ s.version = "1.8.5".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]
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["efi".freeze, "gfxmon".freeze, "usb".freeze]
15
15
  s.extra_rdoc_files = ["README.md".freeze, "lib/hackmac.rb".freeze, "lib/hackmac/asset_tools.rb".freeze, "lib/hackmac/config.rb".freeze, "lib/hackmac/disks.rb".freeze, "lib/hackmac/github_source.rb".freeze, "lib/hackmac/graph.rb".freeze, "lib/hackmac/graph/display.rb".freeze, "lib/hackmac/ioreg.rb".freeze, "lib/hackmac/kext.rb".freeze, "lib/hackmac/kext_upgrader.rb".freeze, "lib/hackmac/oc.rb".freeze, "lib/hackmac/oc_upgrader.rb".freeze, "lib/hackmac/oc_validator.rb".freeze, "lib/hackmac/plist.rb".freeze, "lib/hackmac/url_download.rb".freeze, "lib/hackmac/utils.rb".freeze, "lib/hackmac/version.rb".freeze]
16
- s.files = [".context/code_comment.rb".freeze, "CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/efi".freeze, "bin/gfxmon".freeze, "bin/usb".freeze, "hackmac.gemspec".freeze, "img/gfxmon.png".freeze, "lib/hackmac.rb".freeze, "lib/hackmac/asset_tools.rb".freeze, "lib/hackmac/config.rb".freeze, "lib/hackmac/disks.rb".freeze, "lib/hackmac/github_source.rb".freeze, "lib/hackmac/graph.rb".freeze, "lib/hackmac/graph/display.rb".freeze, "lib/hackmac/hackmac.yml".freeze, "lib/hackmac/ioreg.rb".freeze, "lib/hackmac/kext.rb".freeze, "lib/hackmac/kext_upgrader.rb".freeze, "lib/hackmac/oc.rb".freeze, "lib/hackmac/oc_upgrader.rb".freeze, "lib/hackmac/oc_validator.rb".freeze, "lib/hackmac/plist.rb".freeze, "lib/hackmac/url_download.rb".freeze, "lib/hackmac/utils.rb".freeze, "lib/hackmac/version.rb".freeze]
16
+ s.files = ["CHANGES.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/efi".freeze, "bin/gfxmon".freeze, "bin/usb".freeze, "hackmac.gemspec".freeze, "img/gfxmon.png".freeze, "lib/hackmac.rb".freeze, "lib/hackmac/asset_tools.rb".freeze, "lib/hackmac/config.rb".freeze, "lib/hackmac/disks.rb".freeze, "lib/hackmac/github_source.rb".freeze, "lib/hackmac/graph.rb".freeze, "lib/hackmac/graph/display.rb".freeze, "lib/hackmac/hackmac.yml".freeze, "lib/hackmac/ioreg.rb".freeze, "lib/hackmac/kext.rb".freeze, "lib/hackmac/kext_upgrader.rb".freeze, "lib/hackmac/oc.rb".freeze, "lib/hackmac/oc_upgrader.rb".freeze, "lib/hackmac/oc_validator.rb".freeze, "lib/hackmac/plist.rb".freeze, "lib/hackmac/url_download.rb".freeze, "lib/hackmac/utils.rb".freeze, "lib/hackmac/version.rb".freeze]
17
17
  s.homepage = "http://github.com/flori/hackmac".freeze
18
18
  s.licenses = ["MIT".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "Hackmac - Some useful tools for working with a Hackintosh".freeze, "--main".freeze, "README.md".freeze]
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.specification_version = 4
24
24
 
25
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.6".freeze])
25
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 2.8".freeze])
26
26
  s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
27
27
  s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.14".freeze])
28
28
  s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.10".freeze])
@@ -26,7 +26,7 @@ module Hackmac
26
26
  # the provided block within that context. After the block completes, it
27
27
  # ensures proper cleanup of the temporary directory.
28
28
  #
29
- # @param block [ Block ] the block to execute within the temporary
29
+ # @yield [ dir ] the block to execute within the temporary
30
30
  # directory context
31
31
  #
32
32
  # @return [ Object ] the return value of the yielded block
@@ -47,13 +47,14 @@ module Hackmac
47
47
  JSON.parse(o.read, object_class: JSON::GenericObject)
48
48
  }
49
49
  if max_version = releases.map { |r|
50
- next unless r.tag_name.include?(?.)
51
- tag = r.tag_name.delete '^.0-9'
50
+ tag = r.tag_name
51
+ if tag =~ /\A\d+\.\d+\.\d+\z/
52
52
  begin
53
53
  [ Version.new(tag), r ]
54
54
  rescue ArgumentError
55
55
  end
56
- }.compact.max_by(&:first)
56
+ end
57
+ }.compact.max_by(&:first)
57
58
  then
58
59
  @version, @release = max_version
59
60
  end
data/lib/hackmac/graph.rb CHANGED
@@ -317,7 +317,7 @@ class Hackmac::Graph
317
317
  # formatting strategy
318
318
  #
319
319
  # This method applies the appropriate formatting to a value based on the
320
- # @format_value instance variable configuration It supports different
320
+ # \@format_value instance variable configuration It supports different
321
321
  # formatting approaches including custom Proc objects, Symbol-based method
322
322
  # calls, and default formatting
323
323
  #
data/lib/hackmac/kext.rb CHANGED
@@ -83,10 +83,12 @@ module Hackmac
83
83
  def version
84
84
  unless @version
85
85
  if version = CFBundleShortVersionString()
86
- begin
87
- @version = Version.new(version)
88
- rescue ArgumentError
89
- @version = version
86
+ if version =~ /\A\d+\.\d+\.\d+\z/
87
+ begin
88
+ @version = Version.new(version)
89
+ rescue ArgumentError
90
+ @version = version
91
+ end
90
92
  end
91
93
  end
92
94
  end
data/lib/hackmac/plist.rb CHANGED
@@ -23,7 +23,7 @@ module Hackmac
23
23
  #
24
24
  # This method executes a shell command and parses its XML output into a
25
25
  # Ruby hash using the Plist library. The resulting hash is stored in the
26
- # @plist instance variable for later access through other methods.
26
+ # \@plist instance variable for later access through other methods.
27
27
  #
28
28
  # @param cmd [Array<String>] command and arguments to execute
29
29
  #
@@ -1,6 +1,6 @@
1
1
  module Hackmac
2
2
  # Hackmac version
3
- VERSION = '1.8.3'
3
+ VERSION = '1.8.5'
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.3
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '2.6'
18
+ version: '2.8'
19
19
  type: :development
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '2.6'
25
+ version: '2.8'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: debug
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +176,6 @@ extra_rdoc_files:
176
176
  - lib/hackmac/utils.rb
177
177
  - lib/hackmac/version.rb
178
178
  files:
179
- - ".context/code_comment.rb"
180
179
  - CHANGES.md
181
180
  - Gemfile
182
181
  - LICENSE
@@ -1,15 +0,0 @@
1
- context do
2
- namespace "bin" do
3
- Dir['bin/*'].each do |filename|
4
- file filename, tags: 'bin'
5
- end
6
- end
7
-
8
- namespace "lib" do
9
- Dir['lib/**/*.rb'].each do |filename|
10
- file filename, tags: 'lib'
11
- end
12
- end
13
-
14
- file 'README.md', tags: [ 'documentation' ]
15
- end