pico_phone 0.6.1 → 0.6.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: 9b70bc60193037e297bda847ecd27ae159ac8c9d0d7d32cf3c974934238204b1
4
- data.tar.gz: dc071916f0f69a89623eab9f5ef2a876528b15e91a23a2d5866b353703a9b763
3
+ metadata.gz: 531d0661fc329cddcf748e6d369ce736f0d55e424e9bcf3e12ae20cd603f1986
4
+ data.tar.gz: 026e44c1ae5fe953b21326438534fdfc81484e9bf1c606c183e385a1b1356b53
5
5
  SHA512:
6
- metadata.gz: 175f4986de986e1ced80129d423bb0b5196301c2a2df72a37fef7315c5184333e7c9bcf938e84a5dd0e1543475ef072da72557da8c747bf840b3d1dc49f0d2db
7
- data.tar.gz: 5ed75c8424c3f84228fb238bf257413d400c476e711cbc65d6c9413599ffc70509faf809b981a261dca0effa53fe1df58ef5c338a50e44d9a29d8513f8d472bd
6
+ metadata.gz: 7a6de20bf0c071c4a642ee8fe82d91418e04261a22a2a32a5b9732145e2b06db6c9528a61fb15a40ec61fda819a6674831e66da02d0066f3b4c2d1def708eeac
7
+ data.tar.gz: 2fedbde2893b28cd38ec37613e51613508ad89a3679f2d6a604a612d691e5ce503ea533d2536ac0f50ed5b111dc19afcccfd947ccb77608fd2bbf3e0b6456320
@@ -115,4 +115,15 @@ else
115
115
  end
116
116
  end
117
117
 
118
+ # Ruby builds with --enable-shared (used by ruby/setup-ruby, official Docker images, Homebrew, and
119
+ # most system packages) make mkmf hard-link every extension against a build-specific libruby.so/
120
+ # .dylib via LIBRUBYARG_SHARED, on top of -Wl,-undefined,dynamic_lookup which alone is already
121
+ # sufficient for symbol resolution at load time. On macOS that dependency is an absolute path tied
122
+ # to wherever that particular Ruby happened to be installed -- which cannot exist on any other
123
+ # machine, breaking every precompiled native gem once it's moved off the machine that built it,
124
+ # regardless of Ruby version. Drop it so the compiled extension only depends on libraries it
125
+ # actually needs.
126
+ $LIBRUBYARG_SHARED = ""
127
+ $LIBRUBYARG = ""
128
+
118
129
  create_makefile("pico_phone/pico_phone")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PicoPhone
4
- VERSION = "0.6.1"
4
+ VERSION = "0.6.2"
5
5
  end
data/lib/pico_phone.rb CHANGED
@@ -1,8 +1,29 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
  require "pico_phone/version"
4
- require "pico_phone/pico_phone"
4
+
5
+ # Native/precompiled gems ship one binary per Ruby minor actually tested in CI (bucketed by
6
+ # major.minor, e.g. "3.1", "3.4", "4.0") under lib/pico_phone/<major.minor>/. This is an EXACT
7
+ # match only, deliberately -- a binary built under one minor can produce wrong results (not just
8
+ # fail to load) under a different minor, because Rice (the C++ binding layer) is header-only and
9
+ # some Ruby C-API usage compiles down to macros that bake in that minor's internal struct layout.
10
+ # Ruby's "ABI stable within a major series" promise doesn't cover that, so there is no safe
11
+ # cross-minor fallback here. Source/dynamic gem installs (compiled fresh at `gem install` time
12
+ # against system libphonenumber) never have any lib/pico_phone/<major.minor>/ directory -- they
13
+ # fall straight through to the flat path below, unchanged from before this loader existed.
14
+ begin
15
+ abi = RUBY_VERSION.split(".").first(2).join(".")
16
+ bucket = File.join(__dir__, "pico_phone", abi)
17
+
18
+ if File.directory?(bucket)
19
+ require "pico_phone/#{abi}/pico_phone"
20
+ else
21
+ require "pico_phone/pico_phone"
22
+ end
23
+ rescue LoadError
24
+ require "pico_phone/pico_phone"
25
+ end
5
26
 
6
27
  module PicoPhone
7
28
  class Error < StandardError; end
8
- end
29
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pico_phone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabi Jack