Skip to content

Commit

Permalink
Update to rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
codez committed Nov 18, 2023
1 parent a23db37 commit 14e9387
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']
ruby-version: ['3.1', '3.2']
haml: [true, false]
steps:
- uses: actions/checkout@v4
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
ruby-version: 3.1
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run rubocop
run: bundle exec rubocop
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
ruby-version: 3.1
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: paambaati/[email protected]
env:
Expand Down
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rails', '~> 7.0.0'
gem 'rails', '~> 7.1.0'

gem 'puma'

Expand All @@ -19,11 +19,9 @@ gem "cssbundling-rails"
gem "turbo-rails"
gem "stimulus-rails"

gem 'sassc-rails'

gem 'bootsnap', require: false

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'tzinfo-data', platforms: [:windows, :jruby]

group :development do
gem 'web-console'
Expand All @@ -33,7 +31,7 @@ group :development do
end

gem 'simplecov', require: false
gem 'byebug', platforms: [:mri]
gem 'debug', platforms: [:mri, :windows]

# platform specific gems

Expand Down
20 changes: 2 additions & 18 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace :test do
desc "Create a rails test application"
task :create do
unless File.exist?(TEST_APP_ROOT)
sh "rails new #{TEST_APP_ROOT} --css=bootstrap"
sh "rails new #{TEST_APP_ROOT} --css=bootstrap --js esbuild"
file_replace(File.join(TEST_APP_ROOT, 'Gemfile'),
/\z/,
File.read(File.join(File.dirname(__FILE__),
Expand Down Expand Up @@ -142,24 +142,8 @@ namespace :test do
"= paginate entries\n\n= render 'list'")
end

desc "Use Boostrap Icons in the test app"
desc "Remove sample scss in the test app"
task :use_bootstrap do
sh "cd #{TEST_APP_ROOT}; yarn add bootstrap-icons"

app_css = File.join(TEST_APP_ROOT, 'app', 'assets', 'stylesheets', 'application.bootstrap.scss')
if File.exist?(app_css) && File.read(app_css) !~ /bootstrap-icons/
file_replace(app_css,
/\n\z/,
"\n@import 'bootstrap-icons/font/bootstrap-icons';\n@import 'crud';\n")
end

assets = File.join(TEST_APP_ROOT, 'config', 'initializers', 'assets.rb')
if File.exist?(assets) && File.read(assets) !~ /bootstrap-icons/
file_replace(assets,
/\n\z/,
"\nRails.application.config.assets.paths << Rails.root.join('node_modules/bootstrap-icons/font')\n")
end

FileUtils.rm_f(File.join(TEST_APP_ROOT,
'app', 'assets', 'stylesheets', 'sample.scss'))
end
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.1.0
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
= csrf_meta_tag
= csp_meta_tag

= stylesheet_link_tag 'application', :media => 'all', 'data-turbo-track': 'reload'
= stylesheet_link_tag 'application', 'data-turbo-track': 'reload'
= javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true

= yield :head
Expand Down
2 changes: 1 addition & 1 deletion dry_crud.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ to DRY up the CRUD code in your Rails project. Start with these elements and
build a clean base to efficiently develop your application upon.
END

spec.add_dependency 'rails', '>= 7.0'
spec.add_dependency 'rails', '>= 7.1'

readmes = FileList.new('*') do |list|
list.exclude(/(^|[^.a-z])[a-z]+/)
Expand Down
2 changes: 0 additions & 2 deletions test/templates/Gemfile.append
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ gem 'haml'
gem 'kaminari'

gem 'rspec-rails'

gem 'sassc-rails'

0 comments on commit 14e9387

Please sign in to comment.