Skip to content

Commit

Permalink
Merge pull request #349 from cre-ne-jp/rails71-webpack
Browse files Browse the repository at this point in the history
rails7.1 + webpack + sprockets へ移行する
  • Loading branch information
koi-chan authored Mar 5, 2024
2 parents 6deab1e + a8ee2c3 commit 700b2da
Show file tree
Hide file tree
Showing 48 changed files with 13,628 additions and 8,288 deletions.
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
name: "Ruby 3.1: test and coverage measurement"
name: "Ruby 3.2: test and coverage measurement"
strategy:
fail-fast: false
runs-on: ubuntu-latest
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
ruby-version: '3.2'

# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
Expand All @@ -44,6 +44,8 @@ jobs:
run: |
cp config/database.yml.github_actions config/database.yml
bin/rails db:setup
- name: Compile JavaScripts (webpack)
run: NODE_ENV=production bin/yarn webpack
- uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: 74e589ede57e23f089cbbd2eee75be23a93b5ace7b5cfce58213cd3f21447147
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
fail-fast: false
matrix:
ruby:
- 2.7
- 3.0
- 3.1
- 3.2
- '3.0'
- '3.1'
- '3.2'
- '3.3'
mroonga:
- latest
- mysql80-latest
Expand Down Expand Up @@ -53,5 +53,7 @@ jobs:
run: |
cp config/database.yml.github_actions config/database.yml
bin/rails db:setup
- name: Compile JavaScripts (webpack)
run: NODE_ENV=production bin/yarn webpack
- name: Run tests
run: bin/rails test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@
/yarn-error.log
yarn-debug.log*
.yarn-integrity
.yarn/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
29 changes: 15 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ gem 'sysexits'
gem 'xmlrpc'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1'
gem 'rails', '~> 7.1.0'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"

# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.5'

Expand All @@ -22,13 +26,13 @@ gem 'activerecord-import'

# Use SCSS for stylesheets
gem 'sassc-rails', '>= 2.1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3'
# Use Terser as compressor for JavaScript assets
gem 'terser'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use Webpack to manage app-like JavaScript modules in Rails
gem 'webpacker', '~> 5.x'
# webpack 用のヘルパーを提供する
gem 'simpacker'

# Use jquery as the JavaScript library
gem 'jquery-rails'
Expand All @@ -38,7 +42,7 @@ gem 'jquery-ui-rails'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 1.0', group: :doc
gem 'sdoc', '~> 2.6', group: :doc

# デザイン
gem 'bootstrap-sass', '>= 3.4.1'
Expand All @@ -57,10 +61,10 @@ gem 'puma_worker_killer'
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', '< 1.10', require: false
gem 'bootsnap', '~> 1.18', require: false

# カレンダー
gem "simple_calendar", "~> 2.0"
gem "simple_calendar", "~> 3.0"

# Markdown パーサ
gem 'redcarpet'
Expand Down Expand Up @@ -94,7 +98,7 @@ gem 'pry-rails'
gem 'simple-navigation'

# ActiveJob バックエンド
gem 'sidekiq', '< 7'
gem 'sidekiq', '~> 6.5.12'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand Down Expand Up @@ -122,19 +126,16 @@ group :test do
# Workaround for cc-test-reporter with SimpleCov 0.18.
# Stop upgrading SimpleCov until the following issue will be resolved.
# https://github.com/codeclimate/test-reporter/issues/418
gem 'simplecov', '~> 0.10', '< 0.18'
gem 'simplecov', '~> 0.22'

# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 3.26'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
#gem 'webdrivers'
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 4.0'

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
Loading

0 comments on commit 700b2da

Please sign in to comment.