parsanol 1.3.46 → 1.3.47

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: a69acb95360d14562fcea57597673c9fadb653c1b10688a6cd3b9324bc6b751a
4
- data.tar.gz: fd3ee0db276a54c3aa13108747f4cb632a45fc8f53c7ffc01731c578d1b18b45
3
+ metadata.gz: 84b51a358f1867ed55ebfa7a9c6afbb2d442c23e93e8b44b338fd8479eb38f3c
4
+ data.tar.gz: 7d0e702019b1023b1ff41b36099c44b27eb8613d4e02c8b10ee60ac5501a0748
5
5
  SHA512:
6
- metadata.gz: e20527cabb71ea4aecb84aa26b629d81e34f6d0d2dd46a2e33c874abb1c7bdeea2efe06add1bc8ed6c9d648cd837de15f7a6735dcbb7fdb84b3547ac2b573ec2
7
- data.tar.gz: 2d9aad0fdb64fe5354b0a6fba463754b24b4bc8993f25fdf79b5ada6ffa52f02b1c87066979559f531b90c10acdbbf40e93009abcbbecb5e658cefd08140fd71
6
+ metadata.gz: 6d31070597c02776113dfdafe9749d86f2e2edcaf88700576823d10058a7c244114859f304a1c85856c29c520102dfa64d2553508a95259af1f530995e339bd6
7
+ data.tar.gz: d0a35ca10ec03ba72b40b1e7a37043b24065a3246bec795c19f32e3e6e023188b60402c31c775517a1d2a1576b3a392583f21f2ffb371286ee3727d498b096aa
@@ -1,18 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "mkmf"
4
-
5
- # The Rust extension only builds against MRI's C API. Other engines
6
- # (TruffleRuby, JRuby) resolve the ruby-platform gem and must install
7
- # cleanly on the pure-Ruby backend instead of failing the whole install
8
- # (parsanol-ruby#23). An explicit opt-out works on MRI too.
9
- if RUBY_ENGINE != "ruby" || ENV["PARSANOL_NATIVE"] == "0"
10
- File.write("Makefile", dummy_makefile("").to_s)
3
+ # The Rust extension targets the CRuby C API through rb_sys/magnus. On
4
+ # engines whose C-extension story cannot build it (TruffleRuby compiles C
5
+ # extensions through Sulong and cannot load magnus-produced cdylibs; JRuby
6
+ # has no C-extension support), or when the pure-Ruby backend is requested
7
+ # explicitly, emit a no-op Makefile so the ruby-platform gem installs
8
+ # cleanly. Parsanol::Native already falls back to the pure-Ruby parser at
9
+ # runtime (lib/parsanol/native.rb rescues LoadError), so skipping the
10
+ # build here is sufficient — see
11
+ # https://github.com/parsanol/parsanol-ruby/issues/23
12
+ if ENV["PARSANOL_PURE_RUBY"] == "1" || ENV["PARSANOL_NATIVE"] == "0" ||
13
+ RUBY_ENGINE != "ruby"
14
+ # No mkmf yet (and not wanted on engines without a C toolchain): the
15
+ # hand-written no-op Makefile is the whole contract.
16
+ File.write("Makefile", <<~MAKEFILE)
17
+ all:
18
+ install:
19
+ clean:
20
+ MAKEFILE
11
21
  warn "parsanol: skipping the Rust extension on #{RUBY_ENGINE} " \
12
22
  "(pure-Ruby backend will be used)"
13
23
  exit 0
14
24
  end
15
25
 
26
+ require "mkmf"
16
27
  require "rb_sys/mkmf"
17
28
 
18
29
  create_rust_makefile("parsanol/parsanol_native") do |r|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.46"
4
+ VERSION = "1.3.47"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsanol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.46
4
+ version: 1.3.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.