From b64a9bf10b204e8f8d3c650cad7da721bb5133dd Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 12 Dec 2020 19:54:57 +0100 Subject: Include yardopts for autogenerated docs with private --- CLI/ruby/game_of_life.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CLI/ruby') diff --git a/CLI/ruby/game_of_life.gemspec b/CLI/ruby/game_of_life.gemspec index 73ea1c8..fd8b0b9 100644 --- a/CLI/ruby/game_of_life.gemspec +++ b/CLI/ruby/game_of_life.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| 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" -- cgit v1.2.3 From c79264c91cf1da6beddf19a039a823300f308823 Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 12 Dec 2020 19:56:35 +0100 Subject: Use progress as the default format for CI --- CLI/ruby/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CLI/ruby') diff --git a/CLI/ruby/.gitlab-ci.yml b/CLI/ruby/.gitlab-ci.yml index 930afec..a639158 100644 --- a/CLI/ruby/.gitlab-ci.yml +++ b/CLI/ruby/.gitlab-ci.yml @@ -34,7 +34,7 @@ test: <<: *cache policy: pull script: - - bundle exec rspec + - bundle exec rspec --format progress lint: stage: test -- cgit v1.2.3 From a85dc48d9f2b51d7926d5426adc1ebec072cf0f6 Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 12 Dec 2020 20:05:32 +0100 Subject: Add documentation and changelog URIs to the gem page --- CLI/ruby/game_of_life.gemspec | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CLI/ruby') diff --git a/CLI/ruby/game_of_life.gemspec b/CLI/ruby/game_of_life.gemspec index fd8b0b9..030a830 100644 --- a/CLI/ruby/game_of_life.gemspec +++ b/CLI/ruby/game_of_life.gemspec @@ -17,6 +17,8 @@ Gem::Specification.new do |spec| 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"] -- cgit v1.2.3 From aa78cc2cf340418ce73a22a7e11a6294592c8ad9 Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 12 Dec 2020 20:28:36 +0100 Subject: Add ruby 2.6/2.5 testing and remove useless build step --- CLI/ruby/.gitlab-ci.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'CLI/ruby') diff --git a/CLI/ruby/.gitlab-ci.yml b/CLI/ruby/.gitlab-ci.yml index a639158..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,17 +18,31 @@ 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: - - ruby -v - - bundle env + - bundle exec rspec --format progress + +test:2.6: + image: ruby:2.6 + stage: test + cache: + <<: *cache + policy: pull + script: + - bundle exec rspec --format progress -test: +test:2.5: + image: ruby:2.5 stage: test - needs: [build] cache: <<: *cache policy: pull @@ -38,7 +51,6 @@ test: 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: -- cgit v1.2.3 From 0c465900092042947ae3110ba0bf7da48a515545 Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 12 Dec 2020 20:46:17 +0100 Subject: Fix the required ruby version (2.4 isn't supported) Ruby 2.4 URI.open method is private and cannot be used I can support 2.4 by using `URI.send(:open, uri)` instead of `URI.open` but I haven't investigated that, and I don't think it's critical to support 2.4 --- CLI/ruby/game_of_life.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CLI/ruby') diff --git a/CLI/ruby/game_of_life.gemspec b/CLI/ruby/game_of_life.gemspec index 030a830..9f88e68 100644 --- a/CLI/ruby/game_of_life.gemspec +++ b/CLI/ruby/game_of_life.gemspec @@ -12,7 +12,7 @@ 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 -- cgit v1.2.3 From 4d43c5e5f4596b0fdfab9673354d8baa0b009da5 Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 12 Dec 2020 21:59:04 +0100 Subject: Fix the TargetRubyVersion for rubocop --- CLI/ruby/.rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CLI/ruby') 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: -- cgit v1.2.3 From ca060b58fc9d2b237cdd3002a936b6da03195dde Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 12 Dec 2020 22:03:22 +0100 Subject: [skip ci] update CHANGELOG --- CLI/ruby/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CLI/ruby') 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/) -- cgit v1.2.3