optify-config 0.4.2-arm64-darwin → 0.4.4-arm64-darwin

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: 7c84a11c5778ebf6bbc8af2b011faf801f33ee092121b09e18a2185eabb3ff73
4
- data.tar.gz: f20547407b683d72c63243805405c772d4f646281262744ac0ce510d983565f3
3
+ metadata.gz: 60710502674cb4226e92a16bec9340779d93e8eac0cb7ec2c17b9d98f46f2e88
4
+ data.tar.gz: 4b19b8471538db894d7faedd5032133f3dd7ebbdac2e3385c1483bc1d4ab0682
5
5
  SHA512:
6
- metadata.gz: 537b6443ee071cd28cd382f78668ced1d52be29c828454e880a6464c4cc1580ad512d7bc9d49a3a330f7fba11bda01ae23ea7aa8d395cc6987b93a04b5af2861
7
- data.tar.gz: 06bfa7df689cabd7b3feb711672213a800ebac67d30aa2b9269819e3f83e772b1814e17a77ddbfbfa2f3e99820127cf16364a14abc439ebfcd89f48ed7257514
6
+ metadata.gz: b177f89a0b28510807cd31e805a287723c6110425e644fad9c75cc065896f293a5bf3a55f8a7efced92ef93306a910466722af939d2047312b6044eab3de497d
7
+ data.tar.gz: c5387e0e2dcaeaf09b9f85a8bf6ec137741c707f5f561b22e7fc5b1c91c8f2e67f415a5f8c1376a48c7c3d8f6ba4ae190f3a4be96b3d486184a2f354f9dcc063
data/lib/optify.rb CHANGED
@@ -8,6 +8,19 @@ require_relative 'optify_ruby/implementation'
8
8
  # This yields some warnings, but we should redeclare the methods in Ruby to help with type checking anyway.
9
9
  # Warnings about redefining methods are normal and can be ignored
10
10
  # because the implementations in Ruby are not implemented and only exist to help with type checking.
11
- require_relative 'optify_ruby/optify_ruby'
11
+ # Ideally we do:
12
+ # `require_relative 'optify_ruby/optify_ruby'`
13
+ # but that doesn't work when building for multiple versions of Ruby.
14
+ # So we have to do this which is similar to something from 'https://github.com/matsadler/halton-rb/blob/main/lib/halton.rb'.
15
+ begin
16
+ ruby_version = T.must(RUBY_VERSION.match(/\d+\.\d+/))[0]
17
+ require_relative "optify_ruby/#{ruby_version}/optify_ruby"
18
+ rescue LoadError
19
+ begin
20
+ require_relative 'optify_ruby/optify_ruby'
21
+ rescue LoadError # Cargo Builder in RubyGems < 3.4.6 doesn't install to dir
22
+ require_relative 'optify_ruby.so'
23
+ end
24
+ end
12
25
 
13
26
  require_relative 'optify_ruby/base_config'
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optify-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Justin D. Harris