Class: Status::Base
- Inherits:
-
Object
- Object
- Status::Base
- Defined in:
- lib/status/base.rb
Instance Attribute Summary collapse
-
#qa_status ⇒ Object
readonly
Returns the value of attribute qa_status.
Instance Method Summary collapse
- #branch ⇒ Object
-
#initialize(options) ⇒ Base
constructor
A new instance of Base.
- #qa_required ⇒ Object
- #update ⇒ Object
Constructor Details
Instance Attribute Details
#qa_status ⇒ Object (readonly)
Returns the value of attribute qa_status.
7 8 9 |
# File 'lib/status/base.rb', line 7 def qa_status @qa_status end |
Instance Method Details
#branch ⇒ Object
16 17 18 |
# File 'lib/status/base.rb', line 16 def branch `git rev-parse --abbrev-ref HEAD`.chomp end |
#qa_required ⇒ Object
28 29 30 |
# File 'lib/status/base.rb', line 28 def qa_required Status.qa_required? ? "pending" : "pass" end |
#update ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/status/base.rb', line 20 def update puts "Updating..." pull = Status::Github::PullRequest.new(@branch) pull.create_pull_request unless pull.pull_request_found? @statuses.request puts "Done." end |