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 +4 -4
- data/assets/bylaws/bug-report-was-rewarded.liquid +1 -1
- data/assets/bylaws/code-contribution-was-rewarded.liquid +1 -1
- data/assets/bylaws/code-review-was-rewarded.liquid +1 -1
- data/assets/bylaws/dud-was-punished.liquid +1 -1
- data/assets/bylaws/enhancement-suggestion-was-rewarded.liquid +1 -1
- data/assets/bylaws/long-pull-was-punished.liquid +7 -0
- data/assets/bylaws/published-release-was-rewarded.liquid +1 -1
- data/assets/bylaws/resolved-bug-was-rewarded.liquid +1 -1
- data/lib/fbe/octo.rb +7 -1
- data/lib/fbe.rb +1 -1
- data/test/fbe/test_bylaws.rb +3 -0
- data/test/fbe/test_octo.rb +7 -0
- metadata +2 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 27b96e4e39ce6a637b696b09e9cbadf4a568808a09a346cf047829177159b7e4
         | 
| 4 | 
            +
              data.tar.gz: dedbe3927aa65537bd018d99c12dd946feaf24e18149b32c0c09b92eef27990c
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4c8c8cdc56cdd98315a73fa6f9fc918a17a15df7bcb0098389265898ee900cc2b4306f6f8ffe1589018a4ca6f081081dab8660e02afcc95ce52ea5bc6566f4ab
         | 
| 7 | 
            +
              data.tar.gz: '0880f2cf0795093280b210c4b891ea9eb7e7c9a928bbfdd324b497da40a4d20a80d190ce4afd08ace605b9e14a74275b5aa82dc1a0a623337e252ab1ec27accc'
         | 
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            (award
         | 
| 2 | 
            -
              (explain "When a code contribution is made, the author  | 
| 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  | 
| 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  | 
| 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  | 
| 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")
         | 
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            (award
         | 
| 2 | 
            -
              (explain "When a new release is published,  | 
| 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  | 
| 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
    
    
    
        data/test/fbe/test_bylaws.rb
    CHANGED
    
    
    
        data/test/fbe/test_octo.rb
    CHANGED
    
    | @@ -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 | 
            +
              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
         |