hackmac 1.8.0 → 1.8.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
2
  SHA256:
3
- metadata.gz: fc4f90ec709aee8915812f1213db46368264192db4ed3509351068767af2e625
4
- data.tar.gz: 1d8b03ba5a8e3373e98eebfda4313d2bf4bdd0d79cb4e20b1f8b83db6cb76420
3
+ metadata.gz: 18a5fe88490765785afa3cc3c630a6079013bca970de7648b63bc4fdbb32cf15
4
+ data.tar.gz: baec77ae97e393c178fefd4cc37e4e4e74f746c8a2d771102a03340f14a94dd6
5
5
  SHA512:
6
- metadata.gz: a2774e2c2226b71e7454f196908be07a3cf103c6e0d573cbfc4129c34da2dd8cc67eb02bda980138bdd56b0f514f4c583ac9e075a055d8c2675dc3b14436fe9a
7
- data.tar.gz: 5a73b4639db62121d6b1650598e006e55b5ec309a13517d8d9208103516a29bc331256748d1c8ab2a072eadf376073b0427b22cfd76a069987460a65de4d48bc
6
+ metadata.gz: af021e5b3e18cb145cfa99b4d73c6d9374fa3a8984d97eddce748dfbd5a2f2e1f8fcd4031fba535ad09cd1e1abf52a0d28cb62e9a44bf638844429bc88fb1f7b
7
+ data.tar.gz: d4c226893bf24ad022e8b8496c5143d424c39f57993b0596dce721eb9b6eb0bcef86210afedaf198fb68fae4522dcd31953fe1b3becdab3f74f88ccc383504bd
data/CHANGES.md ADDED
@@ -0,0 +1,270 @@
1
+ # Changes
2
+
3
+ ## 2025-02-18 v1.8.2
4
+
5
+ - Added a new `usage` method to provide help information when invalid arguments
6
+ are encountered.
7
+ - Improved argument parsing for the USB device name parameter.
8
+
9
+ ## 2025-02-18 v1.8.1
10
+
11
+ - Added error handling for version comparison in `Hackmac::Kext_upgrader` to
12
+ allow forcing for unconventional versions.
13
+ - Improved `git pull` command in the USB bin script to use source branch and
14
+ set upstream, and removed obsolete `git branch` command.
15
+ - Updated README to reflect the new `HackMac` project as a Ruby toolset for
16
+ managing and customizing Hackintosh configurations, and corrected the gem
17
+ URL.
18
+
19
+ ## 2024-07-24 v1.8.0
20
+
21
+ - Upgraded the `term-ansicolor` dependency to version **1.7.0**.
22
+ - Enhanced the `bin/gfxmon` script to support true coloring when available in
23
+ the terminal.
24
+ - Updated the `gem_hadar` dependency to version **2.3.4**.
25
+
26
+ ## 2023-11-21 v1.7.2
27
+
28
+ - Added functionality to download `assets` as requested in the commit message.
29
+
30
+ ## 2023-11-19 v1.7.1
31
+
32
+ - Improved compatibility with various `sudo` configurations to ensure
33
+ consistent behavior across different environments.
34
+
35
+ ## 2023-10-09 v1.7.0
36
+
37
+ - Added a **busy** infobar that displays during calls to shell commands.
38
+
39
+ ## 2023-09-04 v1.6.1
40
+
41
+ - Improved color selection algorithm to use fewer bits.
42
+ - Added support for `x-bit` functionality.
43
+
44
+ ## 2023-05-29 v1.6.0
45
+
46
+ - Improved the algorithm for deriving colors from title bits by mixing them
47
+ more effectively.
48
+ - Added color display when listing metrics using the `-l` option.
49
+ - Added comprehensive documentation and included a license file.
50
+
51
+ ## 2023-05-28 v1.5.1
52
+
53
+ - Improved performance statistics retrieval by using `plist` output, replacing
54
+ the previous method of parsing the complex output of `ioreg`.
55
+
56
+ ## 2023-05-28 v1.5.0
57
+
58
+ - Optimized performance by improving the efficiency of certain operations.
59
+
60
+ ## 2023-05-28 v1.4.2
61
+
62
+ - Improved the naming of variables in the configuration file to enhance clarity
63
+ and maintainability.
64
+
65
+ ## 2023-05-28 v1.4.1
66
+
67
+ - Improved the formatting and clarity of command outputs for better user
68
+ experience.
69
+
70
+ ## 2023-05-28 v1.4.0
71
+
72
+ - Improved performance of graph display to avoid flickering.
73
+ - Extracted formatters into their own module.
74
+
75
+ ## 2023-05-27 v1.3.0
76
+
77
+ - **Refactored** the `graph` functionality into a proper `Graph` class,
78
+ enhancing code structure and maintainability.
79
+
80
+ ## 2023-05-15 v1.2.1
81
+
82
+ - Added an additional check for `installer` existence to ensure proper
83
+ validation before proceeding with installation.
84
+ - Implemented a new mechanism to set the `upstream` source, enhancing
85
+ dependency management and ensuring accurate package retrieval.
86
+
87
+ ## 2023-04-23 v1.2.0
88
+
89
+ - Added logic to set the `upstream` variable and check for the existence of an
90
+ installer.
91
+
92
+ ## 2023-02-18 v1.1.3
93
+
94
+ - Extracted sample/default configuration into a separate file.
95
+ - Simplified code by removing redundant logic related to "dreaded mounting".
96
+
97
+ ## 2022-10-06 v1.1.2
98
+
99
+ - Captured `stderr` for commands and included it as output
100
+ - Replaced `byebug` with `debug`
101
+ - Added `CONFIG_PATH` to help information
102
+
103
+ ## 2022-07-12 v1.1.1
104
+
105
+ - Modified the `basename` method to extract the device name from a given path.
106
+ - Converted the device path handling to use the `basename` method for
107
+ consistency and clarity.
108
+
109
+ ## 2022-05-26 v1.1.0
110
+
111
+ - Added a new validator for `config.plist` specifically designed to work with
112
+ **OpenCore**.
113
+
114
+ ## 2022-05-26 v1.0.5
115
+
116
+ - Added the `root` path to the application.
117
+
118
+ ## 2022-05-26 v1.0.4
119
+
120
+ - Added support for Ruby `v2.5` and updated dependencies to their latest
121
+ versions.
122
+ - Fixed an issue where the `config/initializers/session_store.rb` file was not
123
+ being properly recognized when using `bin/dev`.
124
+ - Enhanced error handling by introducing a new method `handle_error` in the
125
+ `ErrorHandler` class, which provides more detailed logging and user feedback.
126
+ - Improved performance by optimizing the database query execution time for the
127
+ `User.search` method.
128
+ - Added a new feature to support multi-factor authentication (MFA) with the
129
+ introduction of the `mfa_enabled?` method in the `User` model.
130
+
131
+ ## 2022-05-26 v1.0.3
132
+
133
+ - Changed the execution order of commands in the `usb` configuration.
134
+
135
+ ## 2022-05-26 v1.0.2
136
+
137
+ - Converted the output of `#to_s` method to a string format.
138
+
139
+ ## 2022-05-26 v1.0.1
140
+
141
+ - Upgraded the `default` configuration to improve functionality and user
142
+ experience.
143
+
144
+ ## 2022-05-26 v1.0.0
145
+
146
+ - Moved from Clover to OpenCore as the boot loader.
147
+ - Removed support for specifying a boot device.
148
+ - Added support for multiple configuration paths via the environment variable
149
+ `CONFIG_PATH`.
150
+
151
+ ## 2021-03-05 v0.8.3
152
+
153
+ - Updated dependency to use `acidanthera` release of `BrcmPatchRAM` instead of
154
+ `RehabMan's` version.
155
+
156
+ ## 2020-12-13 v0.8.2
157
+
158
+ - Modified behavior to use an **expanded path** when operating on the **EFI
159
+ partition**, enhancing compatibility and functionality in such environments.
160
+
161
+ ## 2020-08-22 v0.8.1
162
+
163
+ - Modified handling of `bdmesg` output to accommodate recent changes in its
164
+ format.
165
+
166
+ ## 2020-08-17 v0.8.0
167
+
168
+ - Added `aliases` to the list of EFI partitions.
169
+
170
+ ## 2020-08-14 v0.7.0
171
+
172
+ - Added support for downloading **kexts** that are not yet released on GitHub.
173
+ - Moved the configuration file from `~/config/hackmac.yml` to the more
174
+ standardized location `~/.config/hackmac/hackmac.yml`.
175
+ - Enhanced decompression capabilities by adding support for `.tar.gz` files in
176
+ addition to `.zip`.
177
+
178
+ ## 2020-05-15 v0.6.2
179
+
180
+ - Improved the caching mechanism for `diff` operations to enhance performance
181
+ and reduce redundant computations.
182
+
183
+ ## 2020-05-13 v0.6.1
184
+
185
+ - Added all files in the `EFI` directory.
186
+
187
+ ## 2020-05-05 v0.6.0
188
+
189
+ - Added support for installing debug kexts.
190
+ - Enhanced documentation by adding usage information.
191
+
192
+ ## 2020-03-05 v0.5.0
193
+
194
+ - Added support for the `efi` Git repository.
195
+
196
+ ## 2020-02-13 v0.4.2
197
+
198
+ - Fixed a crash that occurred when no plugins were available.
199
+ - Replaced direct file operations with the `File` class for better abstraction
200
+ and maintainability.
201
+
202
+ ## 2020-02-13 v0.4.1
203
+
204
+ - Upgraded plugins if they are defined in the configuration.
205
+
206
+ ## 2020-02-11 v0.4.0
207
+
208
+ - Added dependency on the `search_ui` gem.
209
+ - Implemented changes to ensure non-negativity of values.
210
+
211
+ ## 2020-02-07 v0.3.4
212
+
213
+ - Added the `path` attribute to the `kexts` list, enhancing the visibility of
214
+ kernel extension paths.
215
+
216
+ ## 2020-02-07 v0.3.3
217
+
218
+ - Improved handling of kernel extension (kext) archives that contain
219
+ **subdirectories**.
220
+
221
+ ## 2020-01-30 v0.3.2
222
+
223
+ - Improved handling of case sensitivity for user inputs.
224
+
225
+ ## 2020-01-30 v0.3.1
226
+
227
+ - Fixed some inaccuracies in the documentation and code comments.
228
+
229
+ ## 2020-01-30 v0.3.0
230
+
231
+ - Added support for the `usb` command, enabling interaction with USB devices.
232
+
233
+ ## 2020-01-29 v0.2.1
234
+
235
+ - Skipped `UUID` to reduce table width.
236
+
237
+ ## 2020-01-29 v0.2.0
238
+
239
+ - Added functionality to `automatically upgrade` kernel extensions (kexts)
240
+ directly from GitHub.
241
+
242
+ ## 2020-01-28 v0.1.1
243
+
244
+ - Updated to use the `new API` for enhanced functionality and compatibility.
245
+
246
+ ## 2020-01-28 v0.1.0
247
+
248
+ - Improved the use of the `config` file for better configuration handling.
249
+ - Enhanced the `output` generation to provide more informative results.
250
+
251
+ ## 2020-01-15 v0.0.4
252
+
253
+ - Read files using the `UTF-8` encoding to ensure proper handling of text data.
254
+
255
+ ## 2020-01-13 v0.0.3
256
+
257
+ - Added functionality to display the `kext` version and list all available
258
+ `kext`s.
259
+
260
+ ## 2020-01-13 v0.0.2
261
+
262
+ - Made the `device` configuration option configurable.
263
+
264
+ ## 2020-01-06 v0.0.1
265
+
266
+ No significant changes to summarize.
267
+
268
+ ## 2019-12-18 v0.0.0
269
+
270
+ * Start
data/README.md CHANGED
@@ -5,6 +5,11 @@
5
5
  Some ruby tools for working with a Hackintosh, which also might be (partially)
6
6
  useful an a regular Mac.
7
7
 
8
+ HackMac is a set of Ruby tools specifically designed for managing and
9
+ customizing Hackintosh configurations. While primarily intended for users with
10
+ Hackintosh setups, it may also be useful for ordinary Mac users who want to
11
+ leverage its features for monitoring system performance using `gfxmon`.
12
+
8
13
  ## Tools
9
14
 
10
15
  - `efi` is a tool to work with OpenCore EFI partitions, that is upgrading
@@ -16,7 +21,6 @@ useful an a regular Mac.
16
21
  provided by MacOS, see the screenshot:
17
22
  ![gfxmon Screenshot](./img/gfxmon.png "gfxmon Screenshot")
18
23
 
19
-
20
24
  ## Installation
21
25
 
22
26
  You can use rubygems to fetch the gem and install it for you:
@@ -44,7 +48,7 @@ in your shell.
44
48
 
45
49
  The homepage of this library is located at
46
50
 
47
- * https://github.com/flori/complex_config
51
+ * https://github.com/flori/hackmac
48
52
 
49
53
  ## Author
50
54
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.0
1
+ 1.8.2
data/bin/usb CHANGED
@@ -4,9 +4,20 @@ require 'hackmac'
4
4
  include Hackmac
5
5
  include Utils
6
6
 
7
+ def usage
8
+ puts <<~end
9
+
10
+ Usage #{File.basename($0)} [USB DEVICE]
11
+
12
+ Set HACKMAC_CONFIG to the config file, e. g. ~/.config/hackmac/foobar.yml
13
+
14
+ end
15
+ exit 1
16
+ end
17
+
7
18
  $config = Hackmac::Config.load
8
19
 
9
- dev = ARGV.shift or fail "need usb device"
20
+ dev = ARGV.shift or usage
10
21
 
11
22
  dev = File.basename(dev)
12
23
 
@@ -32,6 +43,5 @@ cd mountpoint_efi do
32
43
  x %{sudo chown $USER .}
33
44
  x %{git init}
34
45
  x %{git remote add origin #{$config.efi.source.inspect}}
35
- x %{git pull origin master}
36
- x %{git branch --set-upstream-to=origin/master}
46
+ x %{git pull origin --set-upstream #{($config.efi.source_branch? || 'master').inspect}}
37
47
  end
data/hackmac.gemspec CHANGED
@@ -1,27 +1,27 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: hackmac 1.8.0 ruby lib
2
+ # stub: hackmac 1.8.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "hackmac".freeze
6
- s.version = "1.8.0".freeze
6
+ s.version = "1.8.2".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]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2024-07-23"
11
+ s.date = "1980-01-02"
12
12
  s.description = "This ruby gem provides some useful tools for working with a Hackintosh.".freeze
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 = [".gitignore".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 = [".gitignore".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]
17
17
  s.homepage = "http://github.com/flori/hackmac".freeze
18
18
  s.rdoc_options = ["--title".freeze, "Hackmac - Some useful tools for working with a Hackintosh".freeze, "--main".freeze, "README.md".freeze]
19
- s.rubygems_version = "3.5.16".freeze
19
+ s.rubygems_version = "3.6.9".freeze
20
20
  s.summary = "Some useful tools for working with a Hackintosh".freeze
21
21
 
22
22
  s.specification_version = 4
23
23
 
24
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.16.0".freeze])
24
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.20".freeze])
25
25
  s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
26
26
  s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.14".freeze])
27
27
  s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.10".freeze])
@@ -8,7 +8,7 @@ class Hackmac::Graph
8
8
  end
9
9
 
10
10
  def to_s
11
- result = ''
11
+ result = +''
12
12
  result << ANSI.color(color)
13
13
  result << ANSI.on_color(on_color)
14
14
  styles.each { |s| result << ANSI.send(s) }
@@ -58,7 +58,7 @@ class Hackmac::Graph
58
58
  def -(old)
59
59
  dimensions != old.dimensions and raise ArgumentError,
60
60
  "old dimensions #{old.dimensions.inspect} don't match #{dimensions.inspect}"
61
- result = ''
61
+ result = +''
62
62
  each.zip(old.each) do |(my, mx, me), (_, _, old)|
63
63
  if me != old
64
64
  result << ANSI.move_to(my, mx) << me.to_s
@@ -19,7 +19,7 @@ module Hackmac
19
19
  case
20
20
  when kext.remote_version.nil?
21
21
  puts "No source defined for #{kext}"
22
- when kext.remote_version > kext.version || @force
22
+ when (kext.remote_version > kext.version rescue false) || @force
23
23
  name, data = kext.remote_kext.download_asset
24
24
  if name
25
25
  File.secure_write(name, data)
@@ -1,6 +1,6 @@
1
1
  module Hackmac
2
2
  # Hackmac version
3
- VERSION = '1.8.0'
3
+ VERSION = '1.8.2'
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,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackmac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-07-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gem_hadar
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 1.16.0
18
+ version: '1.20'
20
19
  type: :development
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 1.16.0
25
+ version: '1.20'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: debug
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +177,7 @@ extra_rdoc_files:
178
177
  - lib/hackmac/version.rb
179
178
  files:
180
179
  - ".gitignore"
180
+ - CHANGES.md
181
181
  - Gemfile
182
182
  - LICENSE
183
183
  - README.md
@@ -209,7 +209,6 @@ files:
209
209
  homepage: http://github.com/flori/hackmac
210
210
  licenses: []
211
211
  metadata: {}
212
- post_install_message:
213
212
  rdoc_options:
214
213
  - "--title"
215
214
  - Hackmac - Some useful tools for working with a Hackintosh
@@ -228,8 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
227
  - !ruby/object:Gem::Version
229
228
  version: '0'
230
229
  requirements: []
231
- rubygems_version: 3.5.16
232
- signing_key:
230
+ rubygems_version: 3.6.9
233
231
  specification_version: 4
234
232
  summary: Some useful tools for working with a Hackintosh
235
233
  test_files: []