Skip to content

Commit 003dfaa

Browse files
authored
Change ruby test version from 2.4 to 2.5 (#180)
* Change Docker files for feature tests, * Change documentation * Change gemspec ruby version reference
1 parent 4061fc2 commit 003dfaa

File tree

11 files changed

+20
-16
lines changed

11 files changed

+20
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ $ retest 'bundle exec rails test <test>'
119119

120120
## Ruby Support
121121

122-
Retest supports ruby 2.4 and above.
122+
Retest supports ruby 2.5 and above.
123123

124124
## Roadmap
125125

features/git-ruby/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.10-alpine
1+
FROM ruby:2.5.9-alpine3.13
22

33
ARG BUILD_PACKAGES="build-base git"
44

features/git-ruby/retest/retest_test.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ def test_start_retest
2626

2727
class GitChangesTest < Minitest::Test
2828
def setup
29+
`git config --global init.defaultBranch main`
30+
`git config --global --add safe.directory /usr/src/app`
31+
`git config --global user.email "you@example.com"`
32+
`git config --global user.name "Your Name"`
2933
`git init`
30-
`git config --local user.email "you@example.com"`
31-
`git config --local user.name "Your Name"`
3234
`git add .`
3335
`git commit -m "First commit"`
3436
`git checkout -b feature-branch`
@@ -53,7 +55,7 @@ def test_diffs_from_other_branch
5355
`git add .`
5456
`git commit -m "Rename, Add and Remove files"`
5557

56-
@output, @pid = launch_retest 'retest --diff=master --ruby'
58+
@output, @pid = launch_retest 'retest --diff=main --ruby'
5759
sleep 2
5860

5961
assert_match <<~EXPECTED, @output.read

features/hanami-app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.10-alpine
1+
FROM ruby:2.5.9-alpine3.13
22

33
ARG BUILD_PACKAGES="build-base git sqlite-dev"
44

features/rails-app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.10-alpine
1+
FROM ruby:2.5.9-alpine3.13
22

33
ARG BUILD_PACKAGES="build-base git nodejs tzdata sqlite-dev"
44

features/rails-app/retest/retest_test.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,19 @@ def test_repository_setup
9494

9595
class DiffOptionTest < Minitest::Test
9696
def setup
97+
`git config --global init.defaultBranch main`
98+
`git config --global user.email "you@example.com"`
99+
`git config --global user.name "Your Name"`
100+
`git config --global --add safe.directory /usr/src/app`
97101
`git init`
98-
`git config --local user.email "you@example.com"`
99-
`git config --local user.name "Your Name"`
100102
`git add .`
101103
`git commit -m "First commit"`
102104
`git checkout -b feature-branch`
103105
end
104106

105107
def teardown
106108
@output.delete
107-
`git checkout master`
109+
`git checkout -`
108110
`git clean -fd .`
109111
`git checkout .`
110112
`git branch -D feature-branch`
@@ -118,7 +120,7 @@ def test_diffs_from_other_branch
118120
`git add .`
119121
`git commit -m "Scaffold books"`
120122

121-
@output, @pid = launch_retest 'retest --diff=master'
123+
@output, @pid = launch_retest 'retest --diff=main'
122124
sleep 10
123125

124126
assert_match <<~EXPECTED, @output.read

features/rspec-rails/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.10-alpine
1+
FROM ruby:2.5.9-alpine3.13
22

33
ARG BUILD_PACKAGES="build-base git nodejs tzdata sqlite-dev"
44

features/rspec-ruby/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.10-alpine
1+
FROM ruby:2.5.9-alpine3.13
22

33
ARG BUILD_PACKAGES="build-base git"
44

features/ruby-app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.10-alpine
1+
FROM ruby:2.5.9-alpine3.13
22

33
ARG BUILD_PACKAGES="build-base git"
44

features/ruby-bare/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.10-alpine
1+
FROM ruby:2.5.9-alpine3.13
22

33
ARG BUILD_PACKAGES="build-base git"
44

retest.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
99
spec.summary = "A simple command line tool to watch file change and run its matching spec."
1010
spec.homepage = "https://github.com/AlexB52/retest"
1111
spec.license = "MIT"
12-
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
12+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
1313

1414
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
1515

0 commit comments

Comments
 (0)