Class: PlanMyStuff::Verifier
- Inherits:
-
Object
- Object
- PlanMyStuff::Verifier
- Defined in:
- lib/plan_my_stuff/verifier.rb
Overview
Verifies PlanMyStuff configuration by making API calls to GitHub. Checks token validity, org access, repo access, and project access.
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
- #results ⇒ Array<Result> readonly
Instance Method Summary collapse
- #initialize ⇒ Verifier constructor
- #passed? ⇒ Boolean
-
#run ⇒ Verifier
Runs all verification checks and returns self.
Constructor Details
#initialize ⇒ Verifier
13 14 15 |
# File 'lib/plan_my_stuff/verifier.rb', line 13 def initialize @results = [] end |
Instance Attribute Details
#results ⇒ Array<Result> (readonly)
10 11 12 |
# File 'lib/plan_my_stuff/verifier.rb', line 10 def results @results end |
Instance Method Details
#passed? ⇒ Boolean
30 31 32 |
# File 'lib/plan_my_stuff/verifier.rb', line 30 def passed? results.all?(&:passed) end |
#run ⇒ Verifier
Runs all verification checks and returns self.
21 22 23 24 25 26 27 |
# File 'lib/plan_my_stuff/verifier.rb', line 21 def run check_token check_organization check_repos check_default_project self end |