summaryrefslogtreecommitdiffstats
path: root/CLI/ruby
diff options
context:
space:
mode:
authora14m <[email protected]>2020-12-14 14:17:39 +0100
committera14m <[email protected]>2020-12-14 14:17:39 +0100
commit67de73f67ea4f7afeb68829fb510065ed8d41159 (patch)
tree9b0084e9e2a6d220e8042316eae89343f71d9bf2 /CLI/ruby
parent628e5e81596892cadfd5b5dea46001556b6a7d49 (diff)
Add codecov integration
Diffstat (limited to 'CLI/ruby')
-rw-r--r--CLI/ruby/.rubocop.yml1
-rw-r--r--CLI/ruby/Gemfile.lock13
-rw-r--r--CLI/ruby/game_of_life.gemspec3
-rw-r--r--CLI/ruby/spec/spec_helper.rb6
4 files changed, 23 insertions, 0 deletions
diff --git a/CLI/ruby/.rubocop.yml b/CLI/ruby/.rubocop.yml
index 970b547..075df4f 100644
--- a/CLI/ruby/.rubocop.yml
+++ b/CLI/ruby/.rubocop.yml
@@ -10,6 +10,7 @@ Layout/LineLength:
Metrics/BlockLength:
Exclude:
+ - "game_of_life.gemspec"
- "spec/**/*"
Naming/MethodParameterName:
diff --git a/CLI/ruby/Gemfile.lock b/CLI/ruby/Gemfile.lock
index 002d5c4..c3ad0ed 100644
--- a/CLI/ruby/Gemfile.lock
+++ b/CLI/ruby/Gemfile.lock
@@ -9,8 +9,13 @@ GEM
specs:
ast (2.4.1)
byebug (11.1.3)
+ codecov (0.2.12)
+ json
+ simplecov
coderay (1.1.3)
diff-lcs (1.4.4)
+ docile (1.3.2)
+ json (2.3.1)
method_source (1.0.0)
parallel (1.20.1)
parser (2.7.2.0)
@@ -51,6 +56,12 @@ GEM
rubocop-ast (1.2.0)
parser (>= 2.7.1.5)
ruby-progressbar (1.10.1)
+ simplecov (0.20.0)
+ docile (~> 1.1)
+ simplecov-html (~> 0.11)
+ simplecov_json_formatter (~> 0.1)
+ simplecov-html (0.12.3)
+ simplecov_json_formatter (0.1.2)
thor (1.0.1)
unicode-display_width (1.7.0)
yard (0.9.25)
@@ -60,11 +71,13 @@ PLATFORMS
DEPENDENCIES
bundler
+ codecov
pry-byebug
rake
redcarpet
rspec
rubocop
+ simplecov
terminal_game_of_life!
yard
diff --git a/CLI/ruby/game_of_life.gemspec b/CLI/ruby/game_of_life.gemspec
index 9f88e68..940efdf 100644
--- a/CLI/ruby/game_of_life.gemspec
+++ b/CLI/ruby/game_of_life.gemspec
@@ -31,6 +31,9 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "rubocop"
+ # Code Coverage dependencies
+ spec.add_development_dependency "codecov"
+ spec.add_development_dependency "simplecov"
# Documentation dependencies
spec.add_development_dependency "redcarpet"
spec.add_development_dependency "yard"
diff --git a/CLI/ruby/spec/spec_helper.rb b/CLI/ruby/spec/spec_helper.rb
index 890ca34..0c453de 100644
--- a/CLI/ruby/spec/spec_helper.rb
+++ b/CLI/ruby/spec/spec_helper.rb
@@ -1,5 +1,11 @@
# frozen_string_literal: true
+require "simplecov"
+SimpleCov.start
+
+require "codecov"
+SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV["CODECOV_TOKEN"]
+
require "bundler/setup"
require "game_of_life"