optify-config 0.4.1-arm64-darwin → 0.4.3-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: 71e6bf86cbfdf7ab44e95bf45688b4056e02eaba32b7a39250257d0b80be8d88
4
- data.tar.gz: 94dd7c21e9dc8e787b6d8dcb62754c595e718d3d8ac0be4187b280dda2e81a3a
3
+ metadata.gz: 2a5a0c843dc307b2357c8c02d3a215efc2b2ce01cb9f1aebef73100b2c3a2a9c
4
+ data.tar.gz: 672820f4ed38f0e5ffe2416ffa295940f4538017d2eb229b59b2b008c65e422f
5
5
  SHA512:
6
- metadata.gz: 3674067e77a0854173cb3093ead2c672cad092798f8ef3264cfb6e6a97a70344f73f0df37cf887a104fd219e2de6f29ab7ed5cbd7220c55c636f2e3f0ec14f13
7
- data.tar.gz: 46030ebeb50fde4ef6a03d95be18e6631314a94e15f6773d65bda9f54cc88dbf1f2c2f5493b3839a42aa467ecee87abd4259544b96646846496a3ebad61c7b8e
6
+ metadata.gz: 1f074539b6a8f38505c693099c4855c6c0f962dca5a870d14d94dbbba9c13f5f98fd0be4a575d06e8112cc2a18543bf1d26caedde4a2ccf273d5825ae5b71e87
7
+ data.tar.gz: 9ddb297af009890679b5167ba4da7d5568a9184d590a6dae9e9516c42ac8756271551309ab14b0c252f8cd7a586a9d46a09ac242aa1f279bb78182125efd0ecc
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>\d+\.\d+)/ =~ RUBY_VERSION
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
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.1
4
+ version: 0.4.3
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Justin D. Harris