From dd787926ecbe62d0c3b65998bb7ef75d9f4f1e26 Mon Sep 17 00:00:00 2001 From: Manuel Barros Reyes Date: Fri, 18 Sep 2020 14:46:19 -0300 Subject: [PATCH 1/4] warn when there's no test coverage --- lib/skunk/cli/application.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 From 1d80c205d8b06f84cf26c9059040c0e4aa4b8168 Mon Sep 17 00:00:00 2001 From: Manuel Barros Reyes Date: Fri, 18 Sep 2020 14:48:07 -0300 Subject: [PATCH 2/4] remove Gemfile.lock --- Gemfile.lock | 124 --------------------------------------------------- 1 file changed, 124 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 4dc95c3..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,124 +0,0 @@ -PATH - remote: . - specs: - skunk (0.4.2) - rubycritic (>= 4.4, < 5.0) - terminal-table (~> 1.8.0) - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - ansi (1.5.0) - ast (2.4.0) - 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) - codeclimate-engine-rb (0.4.1) - virtus (~> 1.0) - codecov (0.1.16) - json - simplecov - url - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - docile (1.3.2) - equalizer (0.0.11) - erubis (2.7.0) - flay (2.12.1) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.6.4) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.8) - ice_nine (0.11.2) - jaro_winkler (1.5.4) - json (2.3.0) - 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) - parser (2.6.5.0) - ast (~> 2.4.0) - path_expander (1.1.0) - psych (3.1.0) - public_suffix (4.0.5) - rainbow (3.0.0) - rake (13.0.1) - reek (5.4.1) - codeclimate-engine-rb (~> 0.4.0) - kwalify (~> 0.7.0) - parser (>= 2.5.0.0, < 2.7, != 2.5.1.1) - psych (~> 3.1.0) - rainbow (>= 2.0, < 4.0) - rubocop (0.78.0) - jaro_winkler (~> 1.5.1) - parallel (~> 1.10) - parser (>= 2.6) - rainbow (>= 2.2.2, < 4.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) - ruby-progressbar (1.10.1) - ruby_parser (3.14.2) - sexp_processor (~> 4.9) - rubycritic (4.4.1) - flay (~> 2.8) - flog (~> 4.4) - launchy (= 2.4.3) - parser (>= 2.6.0) - rainbow (~> 3.0) - reek (~> 5.0, < 6.0) - ruby_parser (~> 3.8) - simplecov (>= 0.17.0) - tty-which (~> 0.4.0) - virtus (~> 1.0) - sexp_processor (4.15.0) - simplecov (0.18.5) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov-console (0.5.0) - ansi - simplecov - terminal-table - simplecov-html (0.12.2) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - 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) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - -PLATFORMS - ruby - -DEPENDENCIES - bundler (~> 2.0) - byebug (~> 11) - codecov (~> 0.1.16) - minitest (~> 5.8.4) - minitest-around (~> 0.5.0) - rake (~> 13.0) - reek (~> 5.4.0) - rubocop (< 1.0) - simplecov (~> 0.18.1) - simplecov-console (= 0.5.0) - skunk! - -BUNDLED WITH - 2.1.4 From 64322802ec58741c970526baa8e0a4a385f823d2 Mon Sep 17 00:00:00 2001 From: Manuel Barros Reyes Date: Fri, 18 Sep 2020 14:53:04 -0300 Subject: [PATCH 3/4] remove bundler as dev dependency --- skunk.gemspec | 1 - 1 file changed, 1 deletion(-) 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" From f08c0fa1e4c1a45563f1231e9f9279a667f8314a Mon Sep 17 00:00:00 2001 From: Manuel Barros Reyes Date: Fri, 18 Sep 2020 15:04:24 -0300 Subject: [PATCH 4/4] add Gemfile.lock --- Gemfile.lock | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..41edf25 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,121 @@ +PATH + remote: . + specs: + skunk (0.4.2) + rubycritic (>= 4.4, < 5.0) + terminal-table (~> 1.8.0) + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + ansi (1.5.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.3) + codeclimate-engine-rb (0.4.1) + virtus (~> 1.0) + codecov (0.1.21) + json + simplecov + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + docile (1.3.2) + equalizer (0.0.11) + erubis (2.7.0) + flay (2.12.1) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.6.4) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.8) + ice_nine (0.11.2) + jaro_winkler (1.5.4) + 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.2) + parser (2.6.5.0) + ast (~> 2.4.0) + path_expander (1.1.0) + psych (3.1.0) + public_suffix (4.0.6) + rainbow (3.0.0) + rake (13.0.1) + reek (5.4.1) + codeclimate-engine-rb (~> 0.4.0) + kwalify (~> 0.7.0) + parser (>= 2.5.0.0, < 2.7, != 2.5.1.1) + psych (~> 3.1.0) + rainbow (>= 2.0, < 4.0) + rubocop (0.78.0) + jaro_winkler (~> 1.5.1) + parallel (~> 1.10) + parser (>= 2.6) + rainbow (>= 2.2.2, < 4.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 1.7) + ruby-progressbar (1.10.1) + ruby_parser (3.15.0) + sexp_processor (~> 4.9) + rubycritic (4.4.1) + flay (~> 2.8) + flog (~> 4.4) + launchy (= 2.4.3) + parser (>= 2.6.0) + rainbow (~> 3.0) + reek (~> 5.0, < 6.0) + ruby_parser (~> 3.8) + simplecov (>= 0.17.0) + tty-which (~> 0.4.0) + virtus (~> 1.0) + sexp_processor (4.15.1) + simplecov (0.18.5) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov-console (0.5.0) + ansi + simplecov + terminal-table + simplecov-html (0.12.2) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + tty-which (0.4.2) + unicode-display_width (1.6.1) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + +PLATFORMS + ruby + +DEPENDENCIES + byebug (~> 11) + codecov (~> 0.1.16) + minitest (~> 5.8.4) + minitest-around (~> 0.5.0) + rake (~> 13.0) + reek (~> 5.4.0) + rubocop (< 1.0) + simplecov (~> 0.18.1) + simplecov-console (= 0.5.0) + skunk! + +BUNDLED WITH + 2.1.4