Class: Swiftrail::Cli
- Inherits:
-
Thor
- Object
- Thor
- Swiftrail::Cli
- Defined in:
- lib/swiftrail/cli.rb
Instance Method Summary collapse
Instance Method Details
#coverage ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/swiftrail/cli.rb', line 36 def coverage results = swiftrail_coverage.coverage_report([:run_id]) if ['output_folder'].nil? puts(JSON.pretty_generate(results)) else write(results, File.join(['output_folder'], 'coverage.swiftrail')) end end |
#lint ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/swiftrail/cli.rb', line 48 def lint results = swiftrail_lint.lint_report([:run_id]) if ['output_folder'].nil? puts(JSON.pretty_generate(results)) else write(results, File.join(['output_folder'], 'lint.swiftrail')) end end |
#report ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/swiftrail/cli.rb', line 26 def report if swiftrail_reporter.report_results([:run_id], [:dry_run]) puts 'Successfully reported the results' else puts 'There was an issue while reporting the results' end end |