hackmac 1.8.5 → 1.8.7

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: 4e6a5eddb6a8534ec0ab25e387690e533805343b7531b380bf0916ac4f181d72
4
- data.tar.gz: 6906f6c55a4d2dd6f46b70cd44cb3bcfff16283e14871992d19cb22dc8a71ecf
3
+ metadata.gz: 0e9f27838590146ba41eed29aac8016b7116f8e6020c5f48b7fbde9f2e67623b
4
+ data.tar.gz: 1b910b5ae3d1f6a48115729719ed002b0469060da5e49971700f1e8d9c44a221
5
5
  SHA512:
6
- metadata.gz: f45158ccc125e01999b97272f89e3257a1d36b5a32546f3438af5cd99a2a5a1192004d62e9346eb28b12eafbbc28404f16ff2d310aaa95b93737d8a9a3fe5033
7
- data.tar.gz: 98b0c59693b5f94146d12a49c7d2ace14f37bec4d9548ad1ca851d4ab1b1cd3777208fbe9cc7fa5003d4ae44c4f662335eb86cc2794242857c1fa56a55beb526
6
+ metadata.gz: 91e174f74f9e504258c3538f50bf26ab32b2970017bb52e92362c9075d856718672312f1f85f1803486821c7eb6b388a27592d618f68691865babee9da862b26
7
+ data.tar.gz: 67b18e89b675e321b39c0b636bb42df1fba19486ae0e27e892b4fe922d8354309a9ff0746bc26b879b74d38870da160b06f12102789427121930c3112cc3d5d1
data/CHANGES.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changes
2
2
 
3
+ ## 2025-10-15 v1.8.7
4
+
5
+ - Configure **User-Agent** header with version for GitHub API calls
6
+ - Refactor HTTP options into a single hash for cleaner API request handling
7
+ - Use `http_basic_authentication` with **auth** variable for GitHub API
8
+ authentication
9
+ - Apply `.compact` to remove nil values from HTTP options hash
10
+ - Update `URI.open` call to use consolidated options hash instead of direct
11
+ keyword arguments
12
+
13
+ ## 2025-10-14 v1.8.6
14
+
15
+ - Added support for consistent parsing of both **v1.2.3** and **1.2.3** tag
16
+ formats
17
+
3
18
  ## 2025-10-14 v1.8.5
4
19
 
5
20
  - Improved version parsing in `github_source.rb` by adding regex validation
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.5
1
+ 1.8.7
data/hackmac.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: hackmac 1.8.5 ruby lib
2
+ # stub: hackmac 1.8.7 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "hackmac".freeze
6
- s.version = "1.8.5".freeze
6
+ s.version = "1.8.7".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]
@@ -41,16 +41,21 @@ module Hackmac
41
41
  @suffix = (Regexp.quote(suffix) if suffix)
42
42
  _account, repo = github.split(?/)
43
43
  @name = repo
44
+ opts = {
45
+ 'User-Agent' => "hackmac efi v#{Hackmac::VERSION}",
46
+ http_basic_authentication: auth,
47
+ }.compact
44
48
  releases = URI.open(
45
49
  GITHUB_API_URL % github,
46
- http_basic_authentication: auth) { |o|
50
+ opts
51
+ ) { |o|
47
52
  JSON.parse(o.read, object_class: JSON::GenericObject)
48
53
  }
49
54
  if max_version = releases.map { |r|
50
55
  tag = r.tag_name
51
- if tag =~ /\A\d+\.\d+\.\d+\z/
56
+ if tag =~ /\Av?(\d+\.\d+\.\d+)\z/
52
57
  begin
53
- [ Version.new(tag), r ]
58
+ [ Version.new($1), r ]
54
59
  rescue ArgumentError
55
60
  end
56
61
  end
@@ -1,6 +1,6 @@
1
1
  module Hackmac
2
2
  # Hackmac version
3
- VERSION = '1.8.5'
3
+ VERSION = '1.8.7'
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.5
4
+ version: 1.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank