yeptris 0.6.20.1-arm-linux-eabihf → 0.6.20.2-arm-linux-eabihf

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/yeptris/psych.rb +1 -1
  3. data/lib/yeptris.rb +16 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f2691ab19c21d3baf1e2cef0c94e8d30f6f5cb23e583efe9b6c556f5a8db204
4
- data.tar.gz: 8909d958cd2ceae64090edfba873887beca27776bd964fc7134a538a990ab7f0
3
+ metadata.gz: c6f14359879cb5565903eed247065200d621e62eb4f66a5087b872ae6628feef
4
+ data.tar.gz: 90040133606f9490b6e75f1812a332bb9d29be74c264e92ed054038a9a9d083a
5
5
  SHA512:
6
- metadata.gz: 192cb0187904ab6f64535992e42853865c88d968111699897eda69dbed2a7d3a8c53dc5527cf977dbb6b2e4192fa1ba15aef09855244738abbfa9e0d89180ca8
7
- data.tar.gz: 8bd3f503be2b027eff9445eb95f2969e7e359d220775976e3531026dc971c74614357ab92d4434a04a165244d7a685184bec95b123c293e2e1a8f0496ba5f858
6
+ metadata.gz: 439283a3742f6714b1035b5152c34883f82922d98ff256993c4637816c05b520b9d72e41e92f923719f5b1ba288d84f3b2fdc488ff8f46fd888e1bcf9c397821
7
+ data.tar.gz: aa5869e30fe061448a05374ddae5ec3b38eb5f9facbf092a2bd76f9df44327f49bdef4a8a6cc0e92ea75ce0051f49af09d29934e191bb2acf9120f6f8d9f2af2
data/lib/yeptris/psych.rb CHANGED
@@ -619,7 +619,7 @@ end
619
619
  # rebind ::Psych. It does not anymore, and re-binding it here would
620
620
  # regress #69 (any stdlib psych loaded afterwards would explode with
621
621
  # a superclass mismatch), so the old path warns instead of acting.
622
- if defined?(::Psych) && !::Psych.equal?(Yeptris::Psych)
622
+ if defined?(::Psych) && !::Psych.equal?(Yeptris::Psych) && Yeptris.debug?
623
623
  warn "yeptris: \"yeptris/psych\" defines the namespace only — it no " \
624
624
  "longer rebinds ::Psych. Require \"yeptris/psych/drop_in\" for the " \
625
625
  "drop-in rebind, or call Yeptris::Psych explicitly."
data/lib/yeptris.rb CHANGED
@@ -3,7 +3,17 @@
3
3
  module Yeptris
4
4
  # The gem's version lives in the parent namespace's file — the last
5
5
  # internal require (yeptris/version) retired with it.
6
- VERSION = "0.6.20.1".freeze
6
+ VERSION = "0.6.20.2".freeze
7
+
8
+ # Informational notices are OPT-IN (yeptris-ruby#217): consumers
9
+ # embed yeptris inside CLIs that assert clean stderr, and a
10
+ # successful fallback is not a warning. YEPTRIS_DEBUG=1 turns the
11
+ # notices on.
12
+ def self.debug?
13
+ return @debug unless @debug.nil?
14
+ v = ENV["YEPTRIS_DEBUG"]
15
+ @debug = !v.nil? && !v.empty? && v != "0"
16
+ end
7
17
  # The error hierarchy lives in THIS file (the parent namespace's
8
18
  # own file): nested constants do not trigger a parent-constant
9
19
  # autoload, and the law forbids internal requires — defining the
@@ -110,8 +120,10 @@ rescue LoadError
110
120
  begin
111
121
  require "yeptris/native"
112
122
  rescue LoadError => e
113
- warn "yeptris: no precompiled native materializer for Ruby " \
114
- "#{RUBY_VERSION[/\A\d+\.\d+/]} on this platform " \
115
- "(#{e.message}); the FFI ladder carries the load"
123
+ if Yeptris.debug? # the require chain is top-level (self = main)
124
+ warn "yeptris: no precompiled native materializer for Ruby " \
125
+ "#{RUBY_VERSION[/\A\d+\.\d+/]} on this platform " \
126
+ "(#{e.message}); the FFI ladder carries the load"
127
+ end
116
128
  end
117
129
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.20.1
4
+ version: 0.6.20.2
5
5
  platform: arm-linux-eabihf
6
6
  authors:
7
7
  - Ribose Inc.