Skip to content

Commit 116fe95

Browse files
authored
Merge pull request #316 from cjlarose/remove-support-for-old-ruby-and-rails-versions
Remove support for old Ruby and Rails versions
2 parents 3dd6817 + 2981bbd commit 116fe95

158 files changed

Lines changed: 23 additions & 2738 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
ruby:
20-
- 2.4
21-
- 2.5
2220
- 2.6
2321
- 2.7
22+
- 3.0
23+
- 3.1
2424
- jruby
25-
- truffleruby
25+
- truffleruby-21
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@master

Appraisals

Lines changed: 13 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,30 @@
1-
# Bundler >= 2.x do not work with Rails 4.2
2-
puts `bundle -v`
3-
4-
if (`bundle -v`[/\d+\.\d+\.\d+/]).start_with?('1.17')
5-
appraise 'rails-4.2' do
6-
gem 'activerecord-jdbcsqlite3-adapter', '~> 1.3.25', platform: :jruby
7-
gem 'rails', '4.2.11.3'
1+
# Rails 5.x, 6.0 requires Ruby < 3
2+
if RUBY_ENGINE == 'ruby' && RUBY_VERSION <= '3.0'
3+
appraise 'rails-5.2' do
4+
gem 'activerecord-jdbcsqlite3-adapter', '~> 52.5', platform: :jruby
5+
gem 'bootsnap', '~> 1.4'
6+
gem 'rails', '5.2.4.3'
87
gem 'rspec-rails', '~> 3.7'
9-
gem 'sprockets', '~> 3.7'
108
gem 'sqlite3', '< 1.4.0', platform: :ruby
11-
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
129
end
13-
else
14-
puts 'Skipping rails-4.2 for Bundler >= 2.x'
15-
end
16-
17-
appraise 'rails-5.0' do
18-
gem 'activerecord-jdbcsqlite3-adapter', '~> 50.6', platform: :jruby
19-
gem 'rails', '5.0.7.2'
20-
gem 'rspec-rails', '~> 3.7'
21-
gem 'sqlite3', '< 1.4.0', platform: :ruby
22-
end
2310

24-
appraise 'rails-5.1' do
25-
gem 'activerecord-jdbcsqlite3-adapter', '~> 51.6', platform: :jruby
26-
gem 'rails', '5.1.7'
27-
gem 'rspec-rails', '~> 3.7'
28-
gem 'sqlite3', '< 1.4.0', platform: :ruby
29-
end
30-
31-
appraise 'rails-5.2' do
32-
gem 'activerecord-jdbcsqlite3-adapter', '~> 52.5', platform: :jruby
33-
gem 'bootsnap', '~> 1.4'
34-
gem 'rails', '5.2.4.3'
35-
gem 'rspec-rails', '~> 3.7'
36-
gem 'sqlite3', '< 1.4.0', platform: :ruby
37-
end
38-
39-
# Rails 6.x requires Ruby >= 2.5.0
40-
if (RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.5.0') || RUBY_ENGINE != 'ruby'
4111
appraise 'rails-6.0' do
4212
gem 'activerecord-jdbcsqlite3-adapter', '~> 60.1', platform: :jruby
4313
gem 'bootsnap', '~> 1.4'
4414
gem 'rails', '6.0.3.1'
4515
gem 'rspec-rails', '~> 3.7'
4616
gem 'sqlite3', '~> 1.4.0', platform: :ruby
4717
end
48-
else
49-
puts 'Skipping rails-6.0 for Ruby < 2.5'
5018
end
5119

5220
# Test rails 6.1 with psych >= 4
53-
# Rails 6.x requires Ruby >= 2.5.0
54-
if (RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.5.0') || RUBY_ENGINE != 'ruby'
55-
appraise 'rails-6.1' do
56-
gem 'activerecord-jdbcsqlite3-adapter', '~> 61.1', platform: :jruby
57-
gem 'bootsnap', '>= 1.4.4'
58-
gem 'rails', '6.1.4'
59-
gem 'rspec-rails', '~> 5.0'
60-
gem 'sqlite3', '~> 1.4', platform: :ruby
61-
gem 'psych', '>= 4'
62-
end
63-
else
64-
puts 'Skipping rails-6.1 for Ruby < 2.5'
21+
appraise 'rails-6.1' do
22+
gem 'activerecord-jdbcsqlite3-adapter', '~> 61.1', platform: :jruby
23+
gem 'bootsnap', '>= 1.4.4'
24+
gem 'rails', '6.1.4'
25+
gem 'rspec-rails', '~> 5.0'
26+
gem 'sqlite3', '~> 1.4', platform: :ruby
27+
gem 'psych', '>= 4'
6528
end
6629

6730
appraise 'sinatra' do

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### BREAKING CHANGES
66

7+
* Rails versions `< 5.2` are no longer supported
8+
* Ruby versions `< 2.6` are no longer supported
79
* Support `HashSource` and `EnvSource` instances in `Config.load_files` and `Config.load_and_set_settings`. ([#315](https://github.com/rubyconfig/config/pull/315)). There are a few subtle breaking changes:
810
* Previously, `Config.load_files` (called from `Config.load_and_set_settings`) would call `.to_s` on each of its arguments. Now, this responsibility is defered to YAMLSource. In effect, if your application passes String or Pathname objects to `Config.load_files`, no changes are necessary, but if you were somehow relying on the `.to_s` call for some other type of object, you'll now need to call `.to_s` on that object before passing it to `Config`.
911
* Before this change, `Config.load_files` would call `uniq` on its argument array. This call has been removed, so duplicate file paths are not removed before further processing. In some cases, this can cause differences in behavior since later config files override the values in earlier ones. In most cases, it's best to ensure that duplicate paths are not passed to `Config.load_files`.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ Config helps you easily manage environment specific settings in an easy and usab
2424
Current version supports and is [tested](.github/workflows/tests.yml#L19) for the following interpreters and frameworks:
2525

2626
* Interpreters
27-
* [Ruby](https://www.ruby-lang.org) `>= 2.4`
27+
* [Ruby](https://www.ruby-lang.org) `>= 2.6`
2828
* [JRuby](https://www.jruby.org) `>= 9.2`
2929
* [TruffleRuby](https://github.com/oracle/truffleruby) `>= 19.3`
3030
* Application frameworks
31-
* Rails `>= 4.2`, `5` and `6`
31+
* Rails `>= 5.2`
3232
* Padrino
3333
* Sinatra
3434

3535
For Ruby `2.0` to `2.3` or Rails `3` to `4.1` use version `1.x` of this gem. For older versions of Rails or Ruby use [AppConfig](http://github.com/fredwu/app_config).
3636

37+
For Ruby `2.4` or `2.5` or Rails `4.2`, `5.0`, or `5.1` use version `3.x` of this gem.
38+
3739
## Installing
3840

3941
### Installing on Rails

config.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Donate: \e[34mhttps://opencollective.com/rubyconfig/donate\e[0m\n"
2424
s.files.select! { |file| /(^lib\/|^\w+.md$|\.gemspec$)/ =~ file }
2525

2626
s.require_paths = ['lib']
27-
s.required_ruby_version = '>= 2.4.0'
27+
s.required_ruby_version = '>= 2.6.0'
2828

2929
s.add_dependency 'deep_merge', '~> 1.2', '>= 1.2.1'
3030
s.add_dependency 'dry-validation', '~> 1.0', '>= 1.0.0'

gemfiles/rails_4.2.gemfile

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

gemfiles/rails_5.0.gemfile

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

gemfiles/rails_5.1.gemfile

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

spec/app/rails_4.2/Rakefile

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

spec/app/rails_4.2/app/assets/javascripts/application.js

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

0 commit comments

Comments
 (0)