Skip to content

Commit

Permalink
Merge pull request #420 from samvera/rails_7.1
Browse files Browse the repository at this point in the history
allow and build on Rails 7.1
  • Loading branch information
jrochkind authored Nov 8, 2023
2 parents 2edc9ec + fa5429f commit 15b7de9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
workflows:
ci:
jobs:
- build:
name: "ruby3-2_rails7-1"
ruby_version: 3.2.1
rails_version: 7.1.1
- build:
name: "ruby3-2_rails7-0"
ruby_version: 3.2.0
Expand Down
11 changes: 4 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ end

# Set a default RAILS_VERSION so we make sure to get extra dependencies for it...

ENV['RAILS_VERSION'] ||= "7.0.3"
ENV['RAILS_VERSION'] ||= "7.1.1"

if ENV['RAILS_VERSION']
if ENV['RAILS_VERSION'] == 'edge'
Expand All @@ -33,13 +33,10 @@ if ENV['RAILS_VERSION']
end

case ENV['RAILS_VERSION']
when /^7\.1\./
# sprockets is optional for rails 7, but we currently require it, and test with it.
gem "sprockets-rails"
when /^7\.0\./
# rspec-rails 6.0 is required for Rails 7 support, it's currently only in pre-release,
# opt into it here. This should not be required when rspec-rails 6.0.0 final is released.
# Note rspec-rails 6.0.0 does not support rails before 6.1, so different versions of
# rspec-rails will be needed for different jobs, but that should happen automatically.
gem "rspec-rails", ">= 6.0.0.rc1"

# sprockets is optional for rails 7, but we currently require it, and test with it.
gem "sprockets-rails"
when /^6\.1\./
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Currently, the following releases of Ruby are tested:

## Supported Rails Releases
The supported Rail releases follow those specified by [the security policy of the Rails Community](https://rubyonrails.org/security/). As is the case with the supported Ruby releases, it is recommended that one upgrades from any Rails release no longer receiving security updates.
- 7.1
- 7.0
- 6.1
- 6.0
Expand Down
2 changes: 1 addition & 1 deletion browse-everything.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'dropbox_api', '>= 0.1.20'
spec.add_dependency 'google-apis-drive_v3'
spec.add_dependency 'googleauth', '>= 0.6.6', '< 2.0'
spec.add_dependency 'rails', '>= 4.2', '< 7.1'
spec.add_dependency 'rails', '>= 4.2', '< 7.2'
spec.add_dependency 'ruby-box'
spec.add_dependency 'signet', '~> 0.8'
spec.add_dependency 'typhoeus'
Expand Down
15 changes: 8 additions & 7 deletions spec/views/browse_everything/_files.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
end

let(:provider) { instance_double(BrowseEverything::Driver::Base) }
let(:page) { Capybara::Node::Simple.new(rendered) }

before do
allow(view).to receive(:browse_everything_engine).and_return(BrowseEverything::Engine.routes.url_helpers)
Expand All @@ -41,30 +40,32 @@
let(:config) { { max_upload_file_size: (5 * 1024 * 1024 * 1024) } }

it 'draws link' do
expect(page).to have_selector('a.ev-link')
assert_select('a.ev-link')
end

it 'provides hover text' do
expect(page.find('td.ev-file')['title']).to eq(file.name)
assert_select('td.ev-file', attributes: { title: file.name })
end
end

context 'when a maximum file size is not configured' do
it 'draws link' do
expect(page).to have_selector('a.ev-link')
assert_select('a.ev-link')
end
end

context 'when a file is too big' do
let(:config) { { max_upload_file_size: 1024 } }

it 'draws link' do
expect(page).not_to have_selector('a.ev-link')
# count:0 is like `refute`
assert_select('a.ev-link', count: 0)
end
end

it 'does not have a checkbox' do
expect(page).not_to have_selector('input.ev-select-all')
# count:0 is like `refute`
assert_select('input.ev-select-all', count: 0)
end
end

Expand All @@ -77,7 +78,7 @@
end

it 'has the select-all checkbox' do
expect(page).to have_selector('input.ev-select-all')
assert_select('input.ev-select-all')
end
end
end

0 comments on commit 15b7de9

Please sign in to comment.