Skip to content

Commit

Permalink
Merge pull request #3224 from projectblacklight/drop-support-rails6
Browse files Browse the repository at this point in the history
Stop supporting Rails 6
  • Loading branch information
jcoyne authored Sep 18, 2024
2 parents 0928f4f + 566ce2e commit c9800f1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ jobs:
additional_engine_cart_rails_options: [""]
additional_name: [""]
include:
- ruby: "3.2"
rails_version: "6.1.7.8"
- ruby: "3.2"
rails_version: "7.0.8.4"
- ruby: "3.2"
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inherit_from:
AllCops:
DisplayCopNames: true
TargetRubyVersion: 3.0
TargetRailsVersion: 6.1
TargetRailsVersion: 7.0
Exclude:
- "lib/generators/blacklight/templates/**/*"
- "blacklight.gemspec"
Expand Down
2 changes: 1 addition & 1 deletion blacklight.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |s|

s.required_ruby_version = '>= 2.7'

s.add_dependency "rails", '>= 6.1', '< 8'
s.add_dependency "rails", '>= 7.0', '< 8'
s.add_dependency "globalid"
s.add_dependency "jbuilder", '~> 2.7'
s.add_dependency "kaminari", ">= 0.15" # the pagination (page 1,2,3, etc..) of our search results
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/blacklight/assets/importmap_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def append_blacklight_javascript
end

def add_stylesheet
gem "sassc-rails", "~> 2.1" if Rails.version > '7'
gem "sassc-rails", "~> 2.1"

create_file 'app/assets/stylesheets/blacklight.scss' do
<<~CONTENT
Expand Down
4 changes: 1 addition & 3 deletions lib/generators/blacklight/assets/sprockets_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ def add_javascript_dependencies
# Remove the empty generated app/assets/images directory. Without doing this,
# the default Sprockets 4 manifest will raise an exception.
def appease_sprockets4
return if Rails.version > '7' || Sprockets::VERSION < '4'

append_to_file 'app/assets/config/manifest.js', "\n//= link application.js"
append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight/manifest.js"
empty_directory 'app/assets/images'
Expand All @@ -30,7 +28,7 @@ def assets
CONTENT
end

gem "sassc-rails", "~> 2.1" if Rails.version > '7'
gem "sassc-rails", "~> 2.1"

# Ensure this method is idempotent
return if has_blacklight_assets?
Expand Down
6 changes: 1 addition & 5 deletions spec/components/blacklight/document/action_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
end

it 'renders an action link' do
if Rails.version >= '6'
allow(view_context).to receive(:some_tool_solr_document_path).with(document, { only_path: true }).and_return('/asdf')
else
allow(view_context).to receive(:some_tool_solr_document_path).with(document).and_return('/asdf')
end
allow(view_context).to receive(:some_tool_solr_document_path).with(document, { only_path: true }).and_return('/asdf')

expect(rendered).to have_link 'Some tool', href: '/asdf'
end
Expand Down

0 comments on commit c9800f1

Please sign in to comment.