fbe 0.4.0 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcae083c116fe7dba6cf632dd55fdf3a65e3d88b3c32afe4f39dda17e6cfd055
4
- data.tar.gz: b69a33a628245a01b72cec23b21bb4b4dc3df15ac3f6a49920c7edad11446d80
3
+ metadata.gz: 27b96e4e39ce6a637b696b09e9cbadf4a568808a09a346cf047829177159b7e4
4
+ data.tar.gz: dedbe3927aa65537bd018d99c12dd946feaf24e18149b32c0c09b92eef27990c
5
5
  SHA512:
6
- metadata.gz: bf2b5de5a2b4ff2916c63c2b4124deb742edd79338d37b7e2b0377bd42c26f80556a3ee0b70e21bcbc711ea76dbf3bb11e52bc885afec27d3627f7c8b91f8099
7
- data.tar.gz: f29473025b68679a241a4fe594fbe684cfeab25f4bb1b7ab973d181ede994a8d5a54943dc7be751cd53ef126a41ebbc95734c5297b511254554b8eac2fe3e216
6
+ metadata.gz: 4c8c8cdc56cdd98315a73fa6f9fc918a17a15df7bcb0098389265898ee900cc2b4306f6f8ffe1589018a4ca6f081081dab8660e02afcc95ce52ea5bc6566f4ab
7
+ data.tar.gz: '0880f2cf0795093280b210c4b891ea9eb7e7c9a928bbfdd324b497da40a4d20a80d190ce4afd08ace605b9e14a74275b5aa82dc1a0a623337e252ab1ec27accc'
@@ -1,5 +1,5 @@
1
1
  (award
2
- (explain "When a bug is reported and accepted by the team, the reporter gets a bonus")
2
+ (explain "When a bug is reported and accepted by the team, the reporter receives a bonus")
3
3
  (aka
4
4
  (let bonus {{ 4 | times: love }})
5
5
  (give bonus "as a basis")
@@ -1,5 +1,5 @@
1
1
  (award
2
- (explain "When a code contribution is made, the author gets a bonus")
2
+ (explain "When a code contribution is made, the author receives a bonus")
3
3
  (in hoc "the total number of hits-of-code in the contribution")
4
4
  (in comments "the total number of comments made by all reviewers")
5
5
  (in reviews "the number of reviews provided")
@@ -1,5 +1,5 @@
1
1
  (award
2
- (explain "An author of every code review gets a bonus")
2
+ (explain "An author of every code review receives a bonus")
3
3
  (in hoc "the total number of hits-of-code in the contribution")
4
4
  (in comments "the total number of comments made by all reviewers")
5
5
  (in self "1 if the review was made for their own code contribution, otherwise zero")
@@ -1,5 +1,5 @@
1
1
  (award
2
- (explain "When an issue is submitted but then rejected by the team, the reporter gets a penalty")
2
+ (explain "When an issue is submitted but then rejected by the team, the reporter receives a penalty")
3
3
  (aka
4
4
  (let fee {{ -8 | times: anger }})
5
5
  (give fee "as a basis")
@@ -1,5 +1,5 @@
1
1
  (award
2
- (explain "When an enhancement is suggested and accepted by the team, the reporter gets a bonus")
2
+ (explain "When an enhancement is suggested and accepted by the team, the reporter receives a bonus")
3
3
  (aka
4
4
  (let bonus {{ 4 | times: love }})
5
5
  (give bonus "as a basis")
@@ -0,0 +1,7 @@
1
+ (award
2
+ (explain "Oversized pull requests get penalized")
3
+ (aka
4
+ (let fee {{ -4 | times: anger }})
5
+ (give fee "as a basis")
6
+ "deduct ${fee} points")
7
+ )
@@ -1,5 +1,5 @@
1
1
  (award
2
- (explain "When a new release is published, everybody who contributed gets a bonus")
2
+ (explain "When a new release is published, everyone who contributed receives a bonus")
3
3
  (in hoc "how many hits-of-code are in the release")
4
4
  (in contributors "how many people contributed to the release")
5
5
  (aka
@@ -1,5 +1,5 @@
1
1
  (award
2
- (explain "When a bug is resolved, the person who was assigned to it gets a bonus")
2
+ (explain "When a bug is resolved, the person who was assigned to it receives a bonus")
3
3
  (in hours "how many hours it took to resolve the bug")
4
4
  (in self "1 if the bug was reported and resolved by the same person, otherwise zero")
5
5
  (set days (div hours 24))
data/lib/fbe/octo.rb CHANGED
@@ -144,6 +144,11 @@ class Fbe::FakeOctokit
144
144
  ]
145
145
  end
146
146
 
147
+ # Give this repo a star.
148
+ def star(_repo)
149
+ true
150
+ end
151
+
147
152
  def user(name)
148
153
  login = name
149
154
  login = name == 526_301 ? 'yegor256' : 'torvalds' if login.is_a?(Integer)
@@ -277,7 +282,8 @@ class Fbe::FakeOctokit
277
282
  },
278
283
  additions: 12,
279
284
  deletions: 5,
280
- changed_files: 3
285
+ changed_files: 3,
286
+ review_comments: 2
281
287
  }
282
288
  end
283
289
 
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.4.0' unless const_defined?(:VERSION)
13
+ VERSION = '0.5.1' unless const_defined?(:VERSION)
14
14
  end
@@ -78,6 +78,9 @@ class TestBylaws < Minitest::Test
78
78
  },
79
79
  'bad-branch-name-was-punished' => {
80
80
  {} => -12
81
+ },
82
+ 'long-pull-was-punished' => {
83
+ {} => -8
81
84
  }
82
85
  }
83
86
  awards.each do |title, pairs|
@@ -30,6 +30,13 @@ class TestOcto < Minitest::Test
30
30
  assert_equal(42, o.add_comment('foo/foo', 4, 'hello!')[:id])
31
31
  end
32
32
 
33
+ def test_give_repo_a_star
34
+ global = {}
35
+ options = Judges::Options.new({ 'testing' => true })
36
+ o = Fbe.octo(loog: Loog::NULL, global:, options:)
37
+ assert(o.star('foo/foo'))
38
+ end
39
+
33
40
  def test_detect_bot
34
41
  global = {}
35
42
  options = Judges::Options.new({ 'testing' => true })
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.4.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -272,6 +272,7 @@ files:
272
272
  - assets/bylaws/code-review-was-rewarded.liquid
273
273
  - assets/bylaws/dud-was-punished.liquid
274
274
  - assets/bylaws/enhancement-suggestion-was-rewarded.liquid
275
+ - assets/bylaws/long-pull-was-punished.liquid
275
276
  - assets/bylaws/published-release-was-rewarded.liquid
276
277
  - assets/bylaws/push-to-master-was-punished.liquid
277
278
  - assets/bylaws/resolved-bug-was-rewarded.liquid