Class: SimpleCov::Badger::Configuration
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- SimpleCov::Badger::Configuration
- Defined in:
- lib/simplecov_badger/configuration.rb
Class Method Summary collapse
Instance Method Summary collapse
- #badge_url ⇒ Object
- #encoded_repo_url ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 |
# File 'lib/simplecov_badger/configuration.rb', line 12 def initialize super(self.class.) end |
Class Method Details
.options ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/simplecov_badger/configuration.rb', line 3 def self. { post_url: "https://coverage.traels.it/badges", repo_url: `git config --get remote.origin.url`.strip, run_if: -> { `git rev-parse --abbrev-ref HEAD` == "master\n" }, token: ENV["SIMPLECOV_BADGER_TOKEN"] } end |
Instance Method Details
#badge_url ⇒ Object
22 23 24 |
# File 'lib/simplecov_badger/configuration.rb', line 22 def badge_url "#{post_url}/#{encoded_repo_url}" end |