Class: CircleCI::CoverageReporter::Configuration
- Inherits:
-
Object
- Object
- CircleCI::CoverageReporter::Configuration
- Defined in:
- lib/circleci/coverage_reporter/configuration.rb
Constant Summary collapse
Instance Attribute Summary collapse
- #artifacts_dir ⇒ String
- #base_revision ⇒ String
-
#circleci_token ⇒ Object
Returns the value of attribute circleci_token.
- #current_build_number ⇒ Integer
- #current_revision ⇒ String
- #previous_build_number ⇒ Integer
- #reporters ⇒ Array<AbstractReporter>
- #repository_name ⇒ String
- #user_name ⇒ String
-
#vcs_token ⇒ Object
Returns the value of attribute vcs_token.
- #vcs_type ⇒ String
Instance Method Summary collapse
Instance Attribute Details
#artifacts_dir ⇒ String
29 30 31 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 29 def artifacts_dir @artifacts_dir ||= ENV['CIRCLE_ARTIFACTS'] end |
#base_revision ⇒ String
34 35 36 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 34 def base_revision @base_revision ||= `git merge-base origin/master HEAD`.strip end |
#circleci_token ⇒ Object
Returns the value of attribute circleci_token.
9 10 11 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 9 def circleci_token @circleci_token end |
#current_build_number ⇒ Integer
39 40 41 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 39 def current_build_number @current_build_number ||= ENV['CIRCLE_BUILD_NUM'] end |
#current_revision ⇒ String
44 45 46 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 44 def current_revision @current_revision ||= ENV['CIRCLE_SHA1'] end |
#previous_build_number ⇒ Integer
49 50 51 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 49 def previous_build_number @previous_build_number ||= ENV['CIRCLE_PREVIOUS_BUILD_NUM'].to_i end |
#reporters ⇒ Array<AbstractReporter>
19 20 21 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 19 def reporters @reporters ||= DEFAULT_REPORTERS end |
#repository_name ⇒ String
54 55 56 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 54 def repository_name @repository_name ||= ENV['CIRCLE_PROJECT_REPONAME'] end |
#user_name ⇒ String
59 60 61 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 59 def user_name @user_name ||= ENV['CIRCLE_PROJECT_USERNAME'] end |
#vcs_token ⇒ Object
Returns the value of attribute vcs_token.
9 10 11 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 9 def vcs_token @vcs_token end |
#vcs_type ⇒ String
24 25 26 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 24 def vcs_type @vcs_type ||= DEFAULT_VCS_TYPE end |
Instance Method Details
#project ⇒ String
14 15 16 |
# File 'lib/circleci/coverage_reporter/configuration.rb', line 14 def project "#{user_name}/#{repository_name}" end |