summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora14m <[email protected]>2020-12-12 21:04:23 +0000
committera14m <[email protected]>2020-12-12 21:04:23 +0000
commit784e4d51ddce7de440e124c0d0df63758532f980 (patch)
treea58a0d7545103a12d0b2d676cbf40d31dd4f9c01
parent6efdc07ea344e38b45b77c65a26a45453cc69860 (diff)
parentca060b58fc9d2b237cdd3002a936b6da03195dde (diff)
Merge branch 'feature/multiple-ruby-version-tests' into 'master'
Feature/multiple ruby version tests See merge request a14m/game-of-life!7
-rw-r--r--CLI/ruby/.gitlab-ci.yml32
-rw-r--r--CLI/ruby/.rubocop.yml2
-rw-r--r--CLI/ruby/CHANGELOG.md1
-rw-r--r--CLI/ruby/game_of_life.gemspec6
-rw-r--r--README.md4
5 files changed, 29 insertions, 16 deletions
diff --git a/CLI/ruby/.gitlab-ci.yml b/CLI/ruby/.gitlab-ci.yml
index 930afec..d573ce5 100644
--- a/CLI/ruby/.gitlab-ci.yml
+++ b/CLI/ruby/.gitlab-ci.yml
@@ -1,5 +1,4 @@
image: ruby:2.7
-
stages:
- build
- test
@@ -19,26 +18,39 @@ cache: &cache
before_script:
- cd CLI/ruby
+ - gem update --system
+ - bundle update --bundler
- bundle install -j $(nproc)
-build:
- stage: build
+test:2.7:
+ image: ruby:2.7
+ stage: test
+ cache:
+ <<: *cache
+ policy: pull
+ script:
+ - bundle exec rspec --format progress
+
+test:2.6:
+ image: ruby:2.6
+ stage: test
+ cache:
+ <<: *cache
+ policy: pull
script:
- - ruby -v
- - bundle env
+ - bundle exec rspec --format progress
-test:
+test:2.5:
+ image: ruby:2.5
stage: test
- needs: [build]
cache:
<<: *cache
policy: pull
script:
- - bundle exec rspec
+ - bundle exec rspec --format progress
lint:
stage: test
- needs: [build]
cache:
<<: *cache
policy: pull
@@ -47,7 +59,7 @@ lint:
release:
stage: release
- needs: [test, lint]
+ needs: ["test:2.7", "test:2.6", "test:2.5", lint]
rules:
- if: $CI_COMMIT_TAG =~ /^ruby\/v.*$/
cache:
diff --git a/CLI/ruby/.rubocop.yml b/CLI/ruby/.rubocop.yml
index 88abd76..970b547 100644
--- a/CLI/ruby/.rubocop.yml
+++ b/CLI/ruby/.rubocop.yml
@@ -1,5 +1,5 @@
AllCops:
- TargetRubyVersion: 2.4
+ TargetRubyVersion: 2.5
NewCops: enable
Layout/EmptyLineAfterGuardClause:
diff --git a/CLI/ruby/CHANGELOG.md b/CLI/ruby/CHANGELOG.md
index 18763e9..8174833 100644
--- a/CLI/ruby/CHANGELOG.md
+++ b/CLI/ruby/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
## Unreleased
+- Add ruby testing matrix for versions 2.5, 2.6 and 2.7
## 0.2.1
- Minor updates to the [yard documentation](https://rubydoc.info/gems/terminal_game_of_life/)
diff --git a/CLI/ruby/game_of_life.gemspec b/CLI/ruby/game_of_life.gemspec
index 73ea1c8..9f88e68 100644
--- a/CLI/ruby/game_of_life.gemspec
+++ b/CLI/ruby/game_of_life.gemspec
@@ -12,15 +12,17 @@ Gem::Specification.new do |spec|
spec.description = "Conway's game of life implementation as a CLI ruby gem."
spec.homepage = "https://gitlab.com/a14m/game-of-life"
spec.license = "MIT"
- spec.required_ruby_version = ">= 2.4.0"
+ spec.required_ruby_version = ">= 2.5.0"
spec.metadata["allowed_push_host"] = "https://rubygems.org"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://gitlab.com/a14m/game-of-life/-/tree/master/CLI/ruby/"
+ spec.metadata["documentation_uri"] = "https://rubydoc.info/gems/terminal_game_of_life"
+ spec.metadata["changelog_uri"] = "https://gitlab.com/a14m/game-of-life/-/blob/master/CLI/ruby/CHANGELOG.md"
spec.executables = ["game-of-life"]
spec.require_paths = ["lib"]
- spec.files = Dir["README.md", "game_of_life.gemspec", "bin/game-of-life", "lib/**/*.rb"]
+ spec.files = Dir["README.md", "game_of_life.gemspec", "bin/game-of-life", "lib/**/*.rb", ".yardopts"]
spec.add_dependency "thor", "~> 1.0"
diff --git a/README.md b/README.md
index 179c714..caa030b 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,4 @@ in the following languages
[![pipeline status](https://gitlab.com/a14m/game-of-life/badges/master/pipeline.svg)](https://gitlab.com/a14m/game-of-life/-/commits/master)
[![license](https://img.shields.io/badge/license-MIT-brightgreenA)](https://gitlab.com/a14m/game-of-life/-/blob/master/LICENSE.md)
- - [Ruby](./CLI/ruby)
-
-[![Gem](https://img.shields.io/gem/v/terminal_game_of_life)](https://rubygems.org/gems/terminal_game_of_life)
+ - [Ruby](./CLI/ruby) [![Gem Version](https://badge.fury.io/rb/terminal_game_of_life.svg)](https://badge.fury.io/rb/terminal_game_of_life)