Class: Xccoveralls::Command
- Inherits:
-
Object
- Object
- Xccoveralls::Command
- Includes:
- Commander::Methods
- Defined in:
- lib/xccoveralls/command.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Command
constructor
rubocop:disable Metrics/MethodLength.
- #run_report!(_args, options) ⇒ Object
- #setup_report(command) ⇒ Object
Constructor Details
#initialize ⇒ Command
rubocop:disable Metrics/MethodLength
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/xccoveralls/command.rb', line 21 def initialize # rubocop:disable Metrics/MethodLength program :version, VERSION program :description, DESCRIPTION program :help, 'Author', 'Atsushi Nagase <[email protected]>' program :help, 'Blog', 'https://ngs.io' program :help, 'GitHub', 'https://github.com/ngs/xccoveralls' program :help_formatter, :compact global_option('--verbose') do FastlaneCore::Globals.verbose = true ENV['COVERALLS_DEBUG'] = '1' end command(:report) { |command| setup_report(command) } default_command :report end |
Class Method Details
Instance Method Details
#run_report!(_args, options) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/xccoveralls/command.rb', line 48 def run_report!(_args, ) config = FastlaneCore::Configuration.create( Options., .__hash__.reject { |k, _v| k == :verbose } ) Xccoveralls::Runner.new(config.values).run! end |
#setup_report(command) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/xccoveralls/command.rb', line 38 def setup_report(command) command.syntax = NAME command.description = 'Send Coverage information to Coveralls' command.action { |args, | run_report!(args, ) } FastlaneCore::CommanderGenerator.new.generate( Options., command: command ) end |