optify-config 0.4.1-x86_64-linux → 0.4.3-x86_64-linux

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: f528141e54c523a7ac8e6adab9016603e0730019a8b269ba9b67138cdd0e3e6b
4
- data.tar.gz: 34916f4ca8744a89f167650aa7659853276bc90fde9d3b173112d28f02015957
3
+ metadata.gz: ea45992d5e680740c38f83f984341c1cd07bd8260309238eeb0634098cce3a74
4
+ data.tar.gz: 9ecedd3829a5d7fd1490f9b4341433c22355b9af67249005ac568a967bd208e3
5
5
  SHA512:
6
- metadata.gz: '0087468a8c3fcacc748c42d30c648cdcf0f7907aabe6e14ee78ba1e9c7d04094d59c1cf178ae7787f473e09845af4f6ad5acc2df36e61633a1cb86a4ac344eac'
7
- data.tar.gz: 4190cbacb0234dbc429d7fac30efbc238b7aa53795c811f35233bd9847bdf442d3b158919c0faf8264a60a13df851cdbe06ed13c38fe78075e2986370c5fac8c
6
+ metadata.gz: 6587092aa19dca0bd81f53ef8e455c1b385698aed448bc56dca894adbdcadb6cbf85e3240d3f0e7daa106d1d1115f5e77d599bf7bced52baf542cf65653ac7e7
7
+ data.tar.gz: df747ed909993549e5124efd77ac81ea153e0fd85f366fec49508245f20e15255fa43ff5c0377520537cd3abfc4f93bf5ccbb4328dde62255bca5175d9933065
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: x86_64-linux
6
6
  authors:
7
7
  - Justin D. Harris