fbe 0.43.0 → 0.43.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: 5389d9ecc0b9c343ea11ce2054aa1c8bf2efaff8d62e320e92e142bc3b9ed1cc
4
- data.tar.gz: e04b7d8d445789490aee49c7ee8a068da1256c6636b01ad1b350b74ddf8168e6
3
+ metadata.gz: 382fab73e0c2ab5fbf2f219bf9d40d6cf46e748f0ebef046c8497b1850dcf015
4
+ data.tar.gz: 24203f3894c023ede33c9306b03bb416d5a94c6fbc35aaf75600e165f56fcee5
5
5
  SHA512:
6
- metadata.gz: e4b269991d90d608370dd3c0fb2ad703d700f1a959022143a0f13291d9699d7af71f85125fa760b4cda3584c59a73fe2b49666445ee95beb4d1c104b66e44a75
7
- data.tar.gz: ec874b7fb71b3c325c7d05cb3bba9c168270ddfe10e3c8294778a0ffabac5ebf2aa522fafc39eddf11f64f7f7308798d9d88c3adb41559241e97dd88436676fa
6
+ metadata.gz: 86983802b65da05db81719d66afaa231b9410ddf4cd86846dc59bb5a955b803306e9bb0f9f94fc238ba10f55f31e4d8b35ef6fad7c71dea693a68fc47978a41b
7
+ data.tar.gz: d0ac651c8ec8a4647eae3d80f8f5274a21343a36375aed8037b134ff284a04df24e53a927f45ea5dceff278d40c6bb9e5e6dc16e5a87460cfcc8b4ce8d27f59d
@@ -20,4 +20,4 @@ jobs:
20
20
  runs-on: ubuntu-24.04
21
21
  steps:
22
22
  - uses: actions/checkout@v6
23
- - uses: DavidAnson/markdownlint-cli2-action@v21.0.0
23
+ - uses: DavidAnson/markdownlint-cli2-action@v22.0.0
data/lib/fbe/pmp.rb CHANGED
@@ -46,13 +46,13 @@ def Fbe.pmp(fb: Fbe.fb, global: $global, options: $options, loog: $loog)
46
46
  xml = Nokogiri::XML(File.read(File.join(__dir__, '../../assets/pmp.xml')))
47
47
  pmpv =
48
48
  Class.new(SimpleDelegator) do
49
- def initialize(value, dv)
50
- super(value)
51
- @dv = dv
52
- end
49
+ attr_reader :default, :type, :memo
53
50
 
54
- def default
55
- @dv
51
+ def initialize(value, default, type, memo)
52
+ super(value)
53
+ @default = default
54
+ @type = type
55
+ @memo = memo
56
56
  end
57
57
  end
58
58
  Class.new do
@@ -69,19 +69,24 @@ def Fbe.pmp(fb: Fbe.fb, global: $global, options: $options, loog: $loog)
69
69
  end
70
70
  others do |*args2|
71
71
  param = args2.first.to_s
72
- prop = node.at_xpath("p[name='#{param}']")
73
- raise "Unknown property #{param.inspect} in the #{area.inspect} area" if prop.nil?
74
72
  f = Fbe.fb(global:, fb:, options:, loog:).query("(and (eq what 'pmp') (eq area '#{area}'))").each.first
75
73
  r = f&.[](param)&.first
76
- d = prop.at_xpath('default').text
77
- t = prop.at_xpath('type').text
78
- dv =
79
- case t
80
- when 'int' then d.to_i
81
- when 'float' then d.to_f
82
- else d
83
- end
84
- pmpv.new(r || dv, dv)
74
+ prop = node.at_xpath("p[name='#{param}']")
75
+ default = nil
76
+ type = nil
77
+ memo = nil
78
+ if prop
79
+ default = prop.at_xpath('default').text
80
+ type = prop.at_xpath('type').text
81
+ memo = prop.at_xpath('memo').text
82
+ default =
83
+ case t
84
+ when 'int' then default.to_i
85
+ when 'float' then default.to_f
86
+ else default
87
+ end
88
+ end
89
+ pmpv.new(r || default, default, type, memo)
85
90
  end
86
91
  end.new
87
92
  end
data/lib/fbe.rb CHANGED
@@ -10,5 +10,5 @@
10
10
  # License:: MIT
11
11
  module Fbe
12
12
  # Current version of the gem (changed by +.rultor.yml+ on every release)
13
- VERSION = '0.43.0' unless const_defined?(:VERSION)
13
+ VERSION = '0.43.2' unless const_defined?(:VERSION)
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.0
4
+ version: 0.43.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko