fbe 0.43.2 → 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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/assets/pmp.xml +20 -12
  3. data/lib/fbe/pmp.rb +12 -3
  4. data/lib/fbe.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 382fab73e0c2ab5fbf2f219bf9d40d6cf46e748f0ebef046c8497b1850dcf015
4
- data.tar.gz: 24203f3894c023ede33c9306b03bb416d5a94c6fbc35aaf75600e165f56fcee5
3
+ metadata.gz: 402427f9ad7494a0b2986eb8c34263e0c2ad09dd374831eaa30c13c6609e2522
4
+ data.tar.gz: 6815e1fe899316cbaf7bc5eee454076d3cf9ccbee4bfb0006357d8d08e413ff6
5
5
  SHA512:
6
- metadata.gz: 86983802b65da05db81719d66afaa231b9410ddf4cd86846dc59bb5a955b803306e9bb0f9f94fc238ba10f55f31e4d8b35ef6fad7c71dea693a68fc47978a41b
7
- data.tar.gz: d0ac651c8ec8a4647eae3d80f8f5274a21343a36375aed8037b134ff284a04df24e53a927f45ea5dceff278d40c6bb9e5e6dc16e5a87460cfcc8b4ce8d27f59d
6
+ metadata.gz: 5ba173a218ba4fb35a1c6107533db8be655f86492efbd6c47b13315e8f5ac5206e24190593c1d5637fe029408c36da048977c307dabadcbf917deac4c4cab026
7
+ data.tar.gz: 5f143ed59036fe621e267723362dff1ae3fc97c6e46901f97b4cf4dd345c6da4fc8764ddc0c23505c3fe2c532d034de08e93747f53a0d49204e410ef71ce3004
data/assets/pmp.xml CHANGED
@@ -9,25 +9,25 @@ SPDX-License-Identifier: MIT
9
9
  <name>anger</name>
10
10
  <default>2</default>
11
11
  <type>int</type>
12
- <memo>The level of anger</memo>
12
+ <memo>Intensity of penalties for rule violations</memo>
13
13
  </p>
14
14
  <p>
15
15
  <name>days_to_reward</name>
16
16
  <default>14</default>
17
17
  <type>int</type>
18
- <memo>How many days ago an event must happen so that we reward it?</memo>
18
+ <memo>Minimum age in days for an event to qualify for a reward</memo>
19
19
  </p>
20
20
  <p>
21
21
  <name>days_of_running_score</name>
22
22
  <default>56</default>
23
23
  <type>int</type>
24
- <memo>How many days to include into the score of a person?</memo>
24
+ <memo>Number of days to include in a contributor's running score</memo>
25
25
  </p>
26
26
  <p>
27
27
  <name>master_punish_days</name>
28
28
  <default>4</default>
29
29
  <type>int</type>
30
- <memo>Every X days to punish for direct push to master</memo>
30
+ <memo>Interval in days between penalties for direct pushes to master</memo>
31
31
  </p>
32
32
  </area>
33
33
  <area name="integration">
@@ -35,13 +35,13 @@ SPDX-License-Identifier: MIT
35
35
  <name>eva_interval</name>
36
36
  <default>10</default>
37
37
  <type>int</type>
38
- <memo>Every X days to collect EVA statistics</memo>
38
+ <memo>Interval in days between EVA statistics collection</memo>
39
39
  </p>
40
40
  <p>
41
41
  <name>eva_learn_hours</name>
42
42
  <default>8</default>
43
43
  <type>int</type>
44
- <memo>Every X hours to collect EVA numbers and learn the model using them</memo>
44
+ <memo>Interval in hours between EVA data collection and model training</memo>
45
45
  </p>
46
46
  </area>
47
47
  <area name="quality">
@@ -49,13 +49,13 @@ SPDX-License-Identifier: MIT
49
49
  <name>paranoia</name>
50
50
  <default>2</default>
51
51
  <type>int</type>
52
- <memo>The level of paranoia</memo>
52
+ <memo>Strictness level for quality checks</memo>
53
53
  </p>
54
54
  <p>
55
55
  <name>qos_days</name>
56
56
  <default>32</default>
57
57
  <type>int</type>
58
- <memo>For how many days to collect QoS data</memo>
58
+ <memo>Number of days to include in QoS data collection</memo>
59
59
  </p>
60
60
  </area>
61
61
  <area name="scope">
@@ -63,7 +63,7 @@ SPDX-License-Identifier: MIT
63
63
  <name>qod_days</name>
64
64
  <default>32</default>
65
65
  <type>int</type>
66
- <memo>For how many days to collect QoD data</memo>
66
+ <memo>Number of days to include in QoD data collection</memo>
67
67
  </p>
68
68
  </area>
69
69
  <area name="cost">
@@ -71,19 +71,27 @@ SPDX-License-Identifier: MIT
71
71
  <name>love</name>
72
72
  <default>2</default>
73
73
  <type>int</type>
74
- <memo>The level of love</memo>
74
+ <memo>Generosity level for rewards</memo>
75
75
  </p>
76
76
  <p>
77
77
  <name>award_price</name>
78
78
  <default>0.0</default>
79
79
  <type>float</type>
80
- <memo>How many USD to pay for each award point</memo>
80
+ <memo>Amount in USD paid per award point</memo>
81
81
  </p>
82
82
  <p>
83
83
  <name>slaves</name>
84
84
  <default>torvalds</default>
85
85
  <type>string</type>
86
- <memo>List of people, who are not supposed to be paid real cash</memo>
86
+ <memo>Comma-separated list of contributors exempt from cash payments</memo>
87
+ </p>
88
+ </area>
89
+ <area name="communications">
90
+ <p>
91
+ <name>stealth</name>
92
+ <default>false</default>
93
+ <type>bool</type>
94
+ <memo>Suppress all notifications to contributors about awards and penalties</memo>
87
95
  </p>
88
96
  </area>
89
97
  </pmp>
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.43.2' 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.43.2
4
+ version: 0.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko