diff --git a/Gemfile.lock b/Gemfile.lock index 4dc95c3..41edf25 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,18 +11,17 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ansi (1.5.0) - ast (2.4.0) + ast (2.4.1) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - byebug (11.1.1) + byebug (11.1.3) codeclimate-engine-rb (0.4.1) virtus (~> 1.0) - codecov (0.1.16) + codecov (0.1.21) json simplecov - url coercible (1.0.0) descendants_tracker (~> 0.0.1) descendants_tracker (0.0.4) @@ -41,19 +40,19 @@ GEM sexp_processor (~> 4.8) ice_nine (0.11.2) jaro_winkler (1.5.4) - json (2.3.0) + json (2.3.1) kwalify (0.7.2) launchy (2.4.3) addressable (~> 2.3) minitest (5.8.5) minitest-around (0.5.0) minitest (~> 5.0) - parallel (1.19.1) + parallel (1.19.2) parser (2.6.5.0) ast (~> 2.4.0) path_expander (1.1.0) psych (3.1.0) - public_suffix (4.0.5) + public_suffix (4.0.6) rainbow (3.0.0) rake (13.0.1) reek (5.4.1) @@ -70,7 +69,7 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.1) - ruby_parser (3.14.2) + ruby_parser (3.15.0) sexp_processor (~> 4.9) rubycritic (4.4.1) flay (~> 2.8) @@ -83,7 +82,7 @@ GEM simplecov (>= 0.17.0) tty-which (~> 0.4.0) virtus (~> 1.0) - sexp_processor (4.15.0) + sexp_processor (4.15.1) simplecov (0.18.5) docile (~> 1.1) simplecov-html (~> 0.11) @@ -97,7 +96,6 @@ GEM thread_safe (0.3.6) tty-which (0.4.2) unicode-display_width (1.6.1) - url (0.3.2) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) @@ -108,7 +106,6 @@ PLATFORMS ruby DEPENDENCIES - bundler (~> 2.0) byebug (~> 11) codecov (~> 0.1.16) minitest (~> 5.8.4) diff --git a/lib/skunk/cli/application.rb b/lib/skunk/cli/application.rb index 4a1646f..165d846 100644 --- a/lib/skunk/cli/application.rb +++ b/lib/skunk/cli/application.rb @@ -12,11 +12,15 @@ module Skunk module Cli # Knows how to execute command line commands class Application < RubyCritic::Cli::Application + COVERAGE_FILE = "coverage/.resultset.json" + def initialize(argv) @options = Skunk::Cli::Options.new(argv) end def execute + warn_coverage_info unless File.exist?(COVERAGE_FILE) + parsed_options = @options.parse.to_h reporter = Skunk::Cli::CommandFactory.create(parsed_options).execute print(reporter.status_message) @@ -25,6 +29,13 @@ def execute warn "Error: #{error}" STATUS_ERROR end + + private + + def warn_coverage_info + warn "warning: Couldn't find coverage info at #{COVERAGE_FILE}." + warn "warning: Having no coverage metrics will make your SkunkScore worse." + end end end end diff --git a/skunk.gemspec b/skunk.gemspec index 113e287..aa9346a 100644 --- a/skunk.gemspec +++ b/skunk.gemspec @@ -41,7 +41,6 @@ Gem::Specification.new do |spec| spec.add_dependency "rubycritic", ">= 4.4", "< 5.0" spec.add_dependency "terminal-table", "~> 1.8.0" - spec.add_development_dependency "bundler", "~> 2.0" spec.add_development_dependency "byebug", "~> 11" spec.add_development_dependency "codecov", "~> 0.1.16" spec.add_development_dependency "minitest", "~> 5.8.4"