Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap 5.x updates #53

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: RSpec

on: [push, pull_request]

jobs:
test:
strategy:
fail-fast: false
matrix:
gemfile: [ rails-5.2, rails-6.0, rails-6.1 ]
ruby: [ '2.7' ]
include:
- gemfile: rails-6.1
ruby: '3.0'
- gemfile: rails-7.0
ruby: '2.7'
- gemfile: rails-7.0
ruby: '3.0'
- gemfile: rails-7.1
ruby: '3.2'
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
/spec/dummy/*.sqlite3-journal
/spec/dummy/log/*.log
/spec/dummy/tmp/*
*.sqlite3-shm
*.sqlite3-wal
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ source 'https://rubygems.org'
gemspec

group :test do
gem "rspec-rails", "~> 5.0"
gem "rspec-rails"
gem "capybara"
end

gem "rails", "~> 7.1.0"
gem "sqlite3", "~> 1.4"

gem "trestle", github: "TrestleAdmin/trestle"
4 changes: 1 addition & 3 deletions app/views/trestle/search/_search.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<div class="searchbox">
<%= form_tag admin.path, method: :get do %>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><icon class="fa fa-search"></icon></span>
</div>
<span class="input-group-text"><icon class="fa fa-search"></icon></span>
<%= link_to icon("fa fa-times"), admin.path, class: "clear-search" if params[:q].present? %>
<%= search_field_tag :q, params[:q], class: "form-control", autocomplete: "off", placeholder: admin.t("search.placeholder", default: "Search") %>
</div>
Expand Down
16 changes: 0 additions & 16 deletions gemfiles/rails-5.0.gemfile

This file was deleted.

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

This file was deleted.

2 changes: 1 addition & 1 deletion gemfiles/rails-5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
group :test do
gem "rspec-rails", "~> 5.0"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "capybara"

gem "sqlite3", "~> 1.3.13"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails-6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
group :test do
gem "rspec-rails", "~> 5.0"

gem "coveralls", require: false
gem "coveralls_reborn", require: false

gem "capybara"
gem "sqlite3", "~> 1.4"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails-6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
group :test do
gem "rspec-rails", "~> 5.0"

gem "coveralls", require: false
gem "coveralls_reborn", require: false

gem "capybara"
gem "sqlite3", "~> 1.4"
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails-7.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
source 'https://rubygems.org'

group :test do
gem "rspec-rails", "~> 5.0"
gem "rspec-rails"

gem "coveralls", require: false
gem "coveralls_reborn", require: false

gem "capybara"
gem "sqlite3", "~> 1.4"
Expand Down
10 changes: 5 additions & 5 deletions gemfiles/rails-4.2.gemfile → gemfiles/rails-7.1.gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
source 'https://rubygems.org'

group :test do
gem "rspec-rails", "~> 4.1.2"
gem "rspec-rails"

gem "coveralls", require: false
gem "capybara"
gem "coveralls_reborn", require: false

gem "sqlite3", "~> 1.3.13"
gem "capybara"
gem "sqlite3", "~> 1.4"
end

gem "rails", "~> 4.2.0"
gem "rails", "~> 7.1.0"

gem "trestle", github: "TrestleAdmin/trestle"

Expand Down
9 changes: 1 addition & 8 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@
module Dummy
class Application < Rails::Application
# Initialize configuration defaults for current Rails version.
case Rails.version.split(".").first(2).join(".")
when '6.0'
config.load_defaults 6.0
when '5.2'
config.load_defaults 5.2
when '5.1'
config.load_defaults 5.1
end
config.load_defaults Rails::VERSION::STRING.to_f

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
Expand Down
5 changes: 1 addition & 4 deletions spec/feature/basic_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
private
def search_for(query)
visit "/admin/continents"
fill_in "Search", with: query

form = page.find("#q").ancestor("form")
Capybara::RackTest::Form.new(page.driver, form.native).submit({})
fill_in "Search", with: "#{query}\n"
end
end
3 changes: 0 additions & 3 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
end

RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"

# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
Expand Down