diff options
Diffstat (limited to 'CLI/ruby')
| -rw-r--r-- | CLI/ruby/.gitlab-ci.yml | 32 | ||||
| -rw-r--r-- | CLI/ruby/.rubocop.yml | 2 | ||||
| -rw-r--r-- | CLI/ruby/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | CLI/ruby/game_of_life.gemspec | 6 |
4 files changed, 28 insertions, 13 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" |
