From 200f3ddcb13e57fcf8c6f1c68626013c44430864 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Sun, 22 Dec 2019 20:54:50 -0500 Subject: [PATCH 1/4] [ruby/prime] Bump version --- lib/prime.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prime.rb b/lib/prime.rb index cf08be0..d2de8dc 100644 --- a/lib/prime.rb +++ b/lib/prime.rb @@ -96,7 +96,7 @@ def Integer.each_prime(ubound, &block) # :yields: prime class Prime - VERSION = "0.1.0" + VERSION = "0.1.1" include Enumerable include Singleton From 8f89470e77c85e087c876d8a4bf415f8879311f8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 6 Mar 2020 21:03:46 +0900 Subject: [PATCH 2/4] Switch to use GitHub Actions --- .github/workflows/test.yml | 21 +++++++++++++++++++++ .travis.yml | 6 ------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..13b792c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: ubuntu + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] + ruby: [ 'head', '2.7', '2.6', '2.5', '2.4' ] + steps: + - uses: actions/checkout@master + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Install dependencies + run: bundle install + - name: Run test + run: rake test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a7b4916..0000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -sudo: false -language: ruby -rvm: - - 2.5.1 - - ruby-head -before_install: gem install bundler -v 1.16.2 From 116feb1f04159d44459eaf99cede00ad20b67b3c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 6 Mar 2020 21:06:59 +0900 Subject: [PATCH 3/4] Drop to test with Ruby 2.4 --- .github/workflows/test.yml | 2 +- prime.gemspec | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13b792c..f46b48e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] - ruby: [ 'head', '2.7', '2.6', '2.5', '2.4' ] + ruby: [ 'head', '2.7', '2.6', '2.5' ] steps: - uses: actions/checkout@master - name: Set up Ruby diff --git a/prime.gemspec b/prime.gemspec index 6a9aa68..2874cb4 100644 --- a/prime.gemspec +++ b/prime.gemspec @@ -21,6 +21,8 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] + spec.required_ruby_version = ">= 2.5.0" + spec.add_development_dependency "bundler" spec.add_development_dependency "rake" spec.add_development_dependency "test-unit" From abfe378e59454103594d084c5f10245a29e6e0a2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 6 Mar 2020 21:08:00 +0900 Subject: [PATCH 4/4] Use Gemfile instead of Gem::Specification#add_development_dependency. --- Gemfile | 6 +++++- prime.gemspec | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 901dccc..9d226e0 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,9 @@ source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } -# Specify your gem's dependencies in prime.gemspec gemspec + +group :development do + gem "rake" + gem "test-unit" +end diff --git a/prime.gemspec b/prime.gemspec index 2874cb4..aa7fe6f 100644 --- a/prime.gemspec +++ b/prime.gemspec @@ -22,8 +22,4 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.required_ruby_version = ">= 2.5.0" - - spec.add_development_dependency "bundler" - spec.add_development_dependency "rake" - spec.add_development_dependency "test-unit" end