Skip to content

Commit

Permalink
Drop support for Rails versions < 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Sep 18, 2023
1 parent 55963f5 commit 13c3de2
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
gemfile: [ rails-5.0, rails-5.1, rails-5.2, rails-6.0, rails-6.1 ]
gemfile: [ rails-5.2, rails-6.0, rails-6.1 ]
ruby: [ '2.7' ]
include:
- gemfile: rails-6.1
Expand Down
20 changes: 0 additions & 20 deletions gemfiles/rails-5.0.gemfile

This file was deleted.

20 changes: 0 additions & 20 deletions gemfiles/rails-5.1.gemfile

This file was deleted.

13 changes: 2 additions & 11 deletions lib/trestle/reloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,8 @@ def install(app)

app.reloaders << reloader

if app.respond_to?(:reloader)
# Rails >= 5.0
app.reloader.to_run do
reloader.execute_if_updated
true # Rails <= 5.1
end
else
# Rails 4.2
ActionDispatch::Reloader.to_prepare do
reloader.execute_if_updated
end
app.reloader.to_run do
reloader.execute_if_updated
end

reloader.execute
Expand Down
2 changes: 0 additions & 2 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class Application < Rails::Application
config.load_defaults 6.0
when '5.2'
config.load_defaults 5.2
when '5.1'
config.load_defaults 5.1
end

# Settings in config/environments/* take precedence over those specified here.
Expand Down
23 changes: 0 additions & 23 deletions spec/dummy/config/initializers/new_framework_defaults.rb

This file was deleted.

6 changes: 3 additions & 3 deletions trestle.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.2.2"

spec.add_dependency "railties", ">= 4.2.0"
spec.add_dependency "activemodel", ">= 4.2.0"
spec.add_dependency "railties", ">= 5.2.0"
spec.add_dependency "activemodel", ">= 5.2.0"
spec.add_dependency "sprockets-rails", ">= 2.0.0"
spec.add_dependency "kaminari", ">= 1.1.0"

Expand All @@ -32,6 +32,6 @@ Gem::Specification.new do |spec|

spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "sqlite3", "~> 1.3.6"
spec.add_development_dependency "sqlite3"
spec.add_development_dependency "turbolinks"
end

0 comments on commit 13c3de2

Please sign in to comment.