Class: Danger::CISource::CI
- Inherits:
-
Object
- Object
- Danger::CISource::CI
- Defined in:
- lib/danger/ci_source/ci_source.rb
Overview
“abstract” CI class
Direct Known Subclasses
Buildkite, CircleCI, Drone, Jenkins, LocalGitRepo, Semaphore, Surf, TeamCity, Travis, XcodeServer
Instance Attribute Summary collapse
-
#pull_request_id ⇒ Object
Returns the value of attribute pull_request_id.
-
#repo_slug ⇒ Object
Returns the value of attribute repo_slug.
-
#repo_url ⇒ Object
Returns the value of attribute repo_url.
-
#supported_request_sources ⇒ Object
Returns the value of attribute supported_request_sources.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(_env) ⇒ CI
constructor
A new instance of CI.
- #supports?(request_source) ⇒ Boolean
Constructor Details
#initialize(_env) ⇒ CI
Returns a new instance of CI.
30 31 32 |
# File 'lib/danger/ci_source/ci_source.rb', line 30 def initialize(_env) raise "Subclass and overwrite initialize" end |
Instance Attribute Details
#pull_request_id ⇒ Object
Returns the value of attribute pull_request_id.
7 8 9 |
# File 'lib/danger/ci_source/ci_source.rb', line 7 def pull_request_id @pull_request_id end |
#repo_slug ⇒ Object
Returns the value of attribute repo_slug.
7 8 9 |
# File 'lib/danger/ci_source/ci_source.rb', line 7 def repo_slug @repo_slug end |
#repo_url ⇒ Object
Returns the value of attribute repo_url.
7 8 9 |
# File 'lib/danger/ci_source/ci_source.rb', line 7 def repo_url @repo_url end |
#supported_request_sources ⇒ Object
Returns the value of attribute supported_request_sources.
7 8 9 |
# File 'lib/danger/ci_source/ci_source.rb', line 7 def supported_request_sources @supported_request_sources end |
Class Method Details
.available_ci_sources ⇒ Object
14 15 16 |
# File 'lib/danger/ci_source/ci_source.rb', line 14 def self.available_ci_sources @available_ci_sources ||= Set.new end |
.inherited(child_class) ⇒ Object
9 10 11 12 |
# File 'lib/danger/ci_source/ci_source.rb', line 9 def self.inherited(child_class) available_ci_sources.add child_class super end |
.validates?(_env) ⇒ Boolean
26 27 28 |
# File 'lib/danger/ci_source/ci_source.rb', line 26 def self.validates?(_env) false end |
Instance Method Details
#supports?(request_source) ⇒ Boolean
22 23 24 |
# File 'lib/danger/ci_source/ci_source.rb', line 22 def supports?(request_source) supported_request_sources.include? request_source end |