Skip to content

Commit f3ecd50

Browse files
authored
Upgrade ruby to 3.0 minimum (#58)
* Upgrade ruby to min version 3.0. Upgrade gems * choose safer version constraints * explictly list ruby 3.0.7 * use strings to specify ruby versions * update actions to fix tests * update actions to fix tests * remove support for activesupport 7.0.x
1 parent 004d0f8 commit f3ecd50

22 files changed

+93
-122
lines changed

.github/workflows/ruby.yml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,32 @@ on:
66

77
jobs:
88
test:
9-
runs-on: ubuntu-latest
109
strategy:
1110
fail-fast: false
1211
matrix:
13-
ruby: [2.5.9, 2.6.10, 2.7.8, jruby-9.3]
12+
os: [ubuntu-latest, macos-latest]
13+
ruby: ['3.0', 3.1, 3.2, 3.3, head, jruby-9.4, jruby-head]
1414
gemfile:
15-
- Gemfile.activesupport-4.0
16-
- Gemfile.activesupport-4.1
17-
- Gemfile.activesupport-4.2
18-
- Gemfile.activesupport-5.0
19-
- Gemfile.activesupport-5.1
15+
- Gemfile.activesupport-7.1
16+
- Gemfile.activesupport-7.2
17+
- Gemfile.activesupport-8.0
2018
exclude:
21-
- ruby: jruby-9.3
22-
gemfile: Gemfile.activesupport-4.0
23-
- ruby: jruby-9.3
24-
gemfile: Gemfile.activesupport-4.1
25-
- ruby: jruby-9.3
26-
gemfile: Gemfile.activesupport-5.0
27-
- ruby: jruby-9.3
28-
gemfile: Gemfile.activesupport-5.1
29-
- ruby: 2.5.9
30-
gemfile: Gemfile.activesupport-4.0
31-
- ruby: 2.5.9
32-
gemfile: Gemfile.activesupport-4.1
33-
- ruby: 2.5.9
34-
gemfile: Gemfile.activesupport-4.2
35-
- ruby: 2.6.10
36-
gemfile: Gemfile.activesupport-4.0
37-
- ruby: 2.6.10
38-
gemfile: Gemfile.activesupport-4.1
39-
- ruby: 2.6.10
40-
gemfile: Gemfile.activesupport-4.2
41-
- ruby: 2.7.8
42-
gemfile: Gemfile.activesupport-4.0
43-
- ruby: 2.7.8
44-
gemfile: Gemfile.activesupport-4.1
45-
- ruby: 2.7.8
46-
gemfile: Gemfile.activesupport-4.2
47-
19+
- ruby: '3.0'
20+
gemfile: Gemfile.activesupport-8.0
21+
- ruby: '3.0'
22+
gemfile: Gemfile.activesupport-7.2
23+
- ruby: 3.1
24+
gemfile: Gemfile.activesupport-8.0
25+
- ruby: jruby-9.4
26+
gemfile: Gemfile.activesupport-8.0
27+
runs-on: ${{ matrix.os }}
4828
continue-on-error: ${{ matrix.continue-on-error || false }}
4929

5030
env:
5131
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
5232

5333
steps:
54-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
5535

5636
- name: Set up Ruby
5737
uses: ruby/setup-ruby@v1

Gemfile.activesupport-5.0

Lines changed: 0 additions & 5 deletions
This file was deleted.

Gemfile.activesupport-5.1

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22

33
gemspec
44

5-
gem 'activesupport', '~> 4.0.2'
5+
gem 'activesupport', '~> 7.1.0'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22

33
gemspec
44

5-
gem 'activesupport', '~> 4.1.0'
5+
gem 'activesupport', '~> 7.2.0'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22

33
gemspec
44

5-
gem 'activesupport', '~> 4.2.0'
5+
gem 'activesupport', '~> 8.0.0'

lib/taza/generators/project_generator.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ def self.source_root
1515

1616
desc "This creates the Taza project structure. Example taza create foo"
1717
def create
18-
template('templates/project/Gemfile.tt', 'Gemfile') unless File.exists? 'Gemfile'
19-
template('templates/project/Rakefile.tt', 'Rakefile') unless File.exists? 'Rakefile'
20-
template('templates/project/config.yml.tt', 'config/config.yml') unless File.exists? 'config/config.yml'
18+
template('templates/project/Gemfile.tt', 'Gemfile') unless File.exist? 'Gemfile'
19+
template('templates/project/Rakefile.tt', 'Rakefile') unless File.exist? 'Rakefile'
20+
template('templates/project/config.yml.tt', 'config/config.yml') unless File.exist? 'config/config.yml'
2121
empty_directory 'lib/sites'
2222
empty_directory 'spec'
23-
template('templates/project/spec_helper.rb.tt', 'spec/spec_helper.rb') unless File.exists? 'spec/spec_helper.rb'
23+
template('templates/project/spec_helper.rb.tt', 'spec/spec_helper.rb') unless File.exist? 'spec/spec_helper.rb'
2424
empty_directory 'spec/isolation'
2525
empty_directory 'spec/integration'
2626
empty_directory 'bin'
27-
template('templates/project/taza.tt', 'bin/taza') unless File.exists? 'bin/taza'
27+
template('templates/project/taza.tt', 'bin/taza') unless File.exist? 'bin/taza'
2828
end
2929
end
3030
end

lib/taza/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Taza
2-
VERSION = "3.0.0"
2+
VERSION = "4.0.0"
33
end

spec/generators/flow_generator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
it 'a checkout.rb' do
1616
expect(output).to include('lib/sites/foo_site/flows/checkout.rb')
17-
expect(File.exists?('lib/sites/foo_site/flows/checkout.rb')).to be true
17+
expect(File.exist?('lib/sites/foo_site/flows/checkout.rb')).to be true
1818
end
1919

2020
it 'a message if site does not exist' do

spec/generators/page_generator_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
it 'creates a checkout_page.rb' do
1717
expect(output).to include('lib/sites/foo_site/pages/home_page.rb')
18-
expect(File.exists?('lib/sites/foo_site/pages/home_page.rb')).to be true
18+
expect(File.exist?('lib/sites/foo_site/pages/home_page.rb')).to be true
1919
end
2020
it 'creates a checkout_page_spec.rb' do
2121
expect(output).to include('spec/isolation/home_page_spec.rb')
22-
expect(File.exists?('spec/isolation/home_page_spec.rb')).to be true
22+
expect(File.exist?('spec/isolation/home_page_spec.rb')).to be true
2323
end
2424

2525
it 'gives message if site does not exist' do

0 commit comments

Comments
 (0)