fbe 0.44.0 → 0.44.1

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/fbe/pmp.rb +12 -3
  3. data/lib/fbe.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8898cf1c6099ac82cfb5843eeb579c97b745301d10e905260f3306c9aee6a5d
4
- data.tar.gz: 66842cb964cf6979b84e19bb4e4c8b076bb8230382b56810e22e133a23882f8b
3
+ metadata.gz: 402427f9ad7494a0b2986eb8c34263e0c2ad09dd374831eaa30c13c6609e2522
4
+ data.tar.gz: 6815e1fe899316cbaf7bc5eee454076d3cf9ccbee4bfb0006357d8d08e413ff6
5
5
  SHA512:
6
- metadata.gz: 31210d317020f2aca92eec0e13ba7f04c832f5018d59773880a71aa62201d74c666923c517035c38e77556589d8ed40725c04a39f0ff704501a3992088cb3a87
7
- data.tar.gz: 5cc04353c57025729ec74e5ac0c0df7694820f172dc9d0cfb807cf142b4082294ddccc40752b05e584f57b39936575967d9b3e9f02f49d9ffd6ec46ba4383030
6
+ metadata.gz: 5ba173a218ba4fb35a1c6107533db8be655f86492efbd6c47b13315e8f5ac5206e24190593c1d5637fe029408c36da048977c307dabadcbf917deac4c4cab026
7
+ data.tar.gz: 5f143ed59036fe621e267723362dff1ae3fc97c6e46901f97b4cf4dd345c6da4fc8764ddc0c23505c3fe2c532d034de08e93747f53a0d49204e410ef71ce3004
data/lib/fbe/pmp.rb CHANGED
@@ -70,7 +70,7 @@ def Fbe.pmp(fb: Fbe.fb, global: $global, options: $options, loog: $loog)
70
70
  others do |*args2|
71
71
  param = args2.first.to_s
72
72
  f = Fbe.fb(global:, fb:, options:, loog:).query("(and (eq what 'pmp') (eq area '#{area}'))").each.first
73
- r = f&.[](param)&.first
73
+ result = f&.[](param)&.first
74
74
  prop = node.at_xpath("p[name='#{param}']")
75
75
  default = nil
76
76
  type = nil
@@ -80,13 +80,22 @@ def Fbe.pmp(fb: Fbe.fb, global: $global, options: $options, loog: $loog)
80
80
  type = prop.at_xpath('type').text
81
81
  memo = prop.at_xpath('memo').text
82
82
  default =
83
- case t
83
+ case type
84
84
  when 'int' then default.to_i
85
85
  when 'float' then default.to_f
86
+ when 'bool' then default == 'true'
86
87
  else default
87
88
  end
88
89
  end
89
- pmpv.new(r || default, default, type, memo)
90
+ result ||= default
91
+ result =
92
+ case type
93
+ when 'int' then result.to_i
94
+ when 'float' then result.to_f
95
+ when 'bool' then result == 'true'
96
+ else result
97
+ end
98
+ pmpv.new(result, default, type, memo)
90
99
  end
91
100
  end.new
92
101
  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.44.0' unless const_defined?(:VERSION)
13
+ VERSION = '0.44.1' 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.44.0
4
+ version: 0.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko