moxml 0.5.174 → 0.5.175

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: b5f92e477a3f081f711febd54ab9425573ead518fd44ff6341744ce5e421a485
4
- data.tar.gz: 1c7f9d77b19a460b90dc6f8ca0cb1af76c3d1a95f36e484d4a56bf2cd7be03c5
3
+ metadata.gz: 14463613d8081db0efee985379ddcae7740f8044d9f0f7a8192f5f1828337a27
4
+ data.tar.gz: 7fcb65b5d65fedc5d9766d31f409441eafba5f78b8212478a854bcd17ffdf167
5
5
  SHA512:
6
- metadata.gz: 654e595f1b8e8e847761e670a73565b8ef7b783a09942586bb93ae6199951d192c267359cd6f8c4f7968ed125d593119f5a47b92a04a907505bb7f1b9e1da6d0
7
- data.tar.gz: 04f8045e8e42310697de9a141e163a41e1bde33f9a3f9451a463c5f68683e21928cac81770112cd9c30b8c2c0acaaa04a913a7ff212d4a38f660a778eb7b35bb
6
+ metadata.gz: b7c402c813be0883260893a9e47290653e61104cf870702d7d46b155299d87752f8ec5662455ebb0b75c4b776d8962502d7ed223a3b5fca0764fb2600ae67488
7
+ data.tar.gz: cc0a50d550e12d1496c0f31a623c9e1c3a7569fe1d65b7796b97a1a30d63d994812d02c28cd6cfcfd22352a11d0fc9ed25d4a2488bda768ac0898342dad7837a
@@ -335,9 +335,18 @@ module Moxml
335
335
  # consumers ask for them by name; the internal routing gates
336
336
  # the floor made constant are absent by design. Frozen; the
337
337
  # keys are the model's capability names.
338
+ #
339
+ # Two versions, never conflated (the binding vendors the
340
+ # engine; the numbers differ): +binding_version+ is the gem's
341
+ # (Leptris::VERSION), +engine_version+ is libleptris's own
342
+ # (the leptris_version() C face, face-probed — nil on a
343
+ # binding without it).
338
344
  def capabilities
339
345
  @capabilities ||= {
340
- engine_version: ::Leptris::VERSION,
346
+ binding_version: ::Leptris::VERSION,
347
+ engine_version:
348
+ (::Leptris::XML::FFI.leptris_version if
349
+ ::Leptris::XML::FFI.respond_to?(:leptris_version)),
341
350
  native_read_layer: !NATIVE_READ_LAYER.nil?,
342
351
  native_xpath_seams: !NATIVE_XPATH_SEAMS.nil?,
343
352
  bulk_xpath_rows: BULK_XPATH_ROWS,
data/lib/moxml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.5.174"
4
+ VERSION = "0.5.175"
5
5
  end
@@ -8,11 +8,13 @@ require "spec_helper"
8
8
  # what the installed binding+engine serves — queried once at attach,
9
9
  # the replacement for the version-gate-constant class. Only
10
10
  # runtime-variable faces appear; anything the floor makes
11
- # unconditional is absent by design.
11
+ # unconditional is absent by design. The two versions are never
12
+ # conflated: the binding vendors the engine, and the numbers differ.
12
13
  RSpec.describe "engine capability report" do
13
- it "answers for leptris with the engine version and known faces" do
14
+ it "answers for leptris with both versions and known faces" do
14
15
  caps = Moxml::Adapter::Leptris.capabilities
15
16
  expect(caps).to be_frozen
17
+ expect(caps[:binding_version]).to eq(Leptris::VERSION)
16
18
  expect(caps[:engine_version]).to match(/\A1\.\d+\.\d+/)
17
19
  expect(caps.keys).to include(
18
20
  :native_read_layer, :native_plan_structs, :native_plan_typed,
@@ -20,9 +22,21 @@ RSpec.describe "engine capability report" do
20
22
  )
21
23
  end
22
24
 
23
- it "reports only booleans beyond the version" do
25
+ it "answers the ENGINE's version under engine_version, not the binding's" do
24
26
  caps = Moxml::Adapter::Leptris.capabilities
25
- caps.except(:engine_version).each_value do |value|
27
+ engine = Leptris::XML::FFI.leptris_version
28
+ expect(caps[:engine_version]).to eq(engine)
29
+ if Gem::Version.new(Leptris::VERSION) != Gem::Version.new(engine)
30
+ expect(caps[:binding_version]).not_to eq(caps[:engine_version]),
31
+ "binding and engine versions are " \
32
+ "different numbers; the report must " \
33
+ "never conflate them"
34
+ end
35
+ end
36
+
37
+ it "reports only booleans beyond the versions" do
38
+ caps = Moxml::Adapter::Leptris.capabilities
39
+ caps.except(:binding_version, :engine_version).each_value do |value|
26
40
  expect(value).to eql(true).or eql(false)
27
41
  end
28
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.174
4
+ version: 0.5.175
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.