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

Rails 7.0.8 upgrade (part two) #309

Merged
merged 12 commits into from
Mar 11, 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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ node_modules
/config/credentials/test.key
/config/credentials/staging.key
/config/credentials/production.key

/app/assets/builds/*
!/app/assets/builds/.keep

/node_modules
66 changes: 44 additions & 22 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,45 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '7.0.8'

gem 'sass-rails', '~> 5.0'
gem 'terser'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# gem 'duktape'
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails', require: 'sprockets/railtie'

# Bundle and transpile JavaScript [https://github.com/rails/jsbundling-rails]
gem 'jsbundling-rails', '~> 1.3'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem 'turbo-rails'

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem 'stimulus-rails'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
# gem 'jbuilder'

# Use Redis for Action Cable
gem 'redis', '~> 4.0'

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem 'kredis'

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', require: false

# Use Sass to process CSS
gem 'sassc-rails'

gem 'bootstrap', '~> 5.2.3'
gem 'chart-js-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'select2-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# To use debugger
# gem 'debugger'

gem 'base64', '0.1.0'
gem 'cube-ruby', require: 'cube'
gem 'dalli'
Expand All @@ -39,6 +57,7 @@ gem 'iconv'
gem 'multi_json'
gem 'mysql2', '0.5.5'
gem 'oj'
gem 'ontologies_api_client', github: 'ncbo/ontologies_api_ruby_client', tag: 'v2.2.5'
gem 'open_uri_redirections'
gem 'pry'
gem 'psych', '< 4'
Expand All @@ -49,39 +68,42 @@ gem 'recaptcha', '~> 5.9.0'
gem 'rest-client'
gem 'rexml', '~> 3'
gem 'stackprof', require: false
gem 'terser'
gem 'thin'
gem 'will_paginate', '~> 3.0'

gem 'ontologies_api_client', github: 'ncbo/ontologies_api_ruby_client', tag: 'v2.2.5'

group :staging, :production do
# application monitoring
# Application monitoring
gem 'newrelic_rpm'
# logs in json format, useful for shipping logs to logstash
# Logs in json format, useful for shipping logs to logstash
# gem 'rackstash', git: 'https://github.com/planio-gmbh/rackstash.git'
# gem 'logstash-logger'
end

group :development do
# Capistrano Deployment
# Capistrano deployment
gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0', require: false # https://github.com/miloserdow/capistrano-deploy/issues/42
gem 'capistrano', '~> 3.17', require: false
gem 'capistrano-bundler', require: false
gem 'capistrano-rbenv', require: false
gem 'capistrano-locally', require: false
gem 'capistrano-passenger', require: false
gem 'capistrano-rails', '~> 1.4', require: false
gem 'capistrano-rbenv', require: false
gem 'capistrano-yarn', require: false
gem 'ed25519', '>= 1.2', '< 2.0', require: false # https://github.com/miloserdow/capistrano-deploy/issues/42
gem 'html2haml'
gem 'listen'
# static code analysis

# Static code analysis
gem 'brakeman', require: false
gem 'rubocop', require: false

# gem 'i18n-debug'
end

group :test, :development do
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem 'debug', platforms: %i[mri mingw x64_mingw]
gem 'rspec-rails'
end

Expand Down
70 changes: 44 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ GEM
execjs (~> 2)
base64 (0.1.0)
bcrypt_pbkdf (1.1.0)
bootsnap (1.17.1)
msgpack (~> 1.2)
bootstrap (5.2.3)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 2.11.6, < 3)
Expand Down Expand Up @@ -129,12 +131,15 @@ GEM
chart-js-rails (0.1.7)
railties (> 3.1)
coderay (1.1.3)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
crass (1.0.6)
cube-ruby (0.0.3)
daemons (1.4.1)
dalli (3.2.6)
date (3.3.4)
debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.0)
domain_name (0.6.20231109)
ed25519 (1.3.0)
Expand Down Expand Up @@ -175,13 +180,19 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
iconv (1.0.8)
io-console (0.7.2)
irb (1.11.1)
rdoc
reline (>= 0.4.2)
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (2.6.3)
jsbundling-rails (1.3.0)
railties (>= 6.0.0)
json (2.7.1)
language_server-protocol (3.17.0.3)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand All @@ -202,7 +213,8 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1003)
mini_mime (1.1.5)
minitest (5.20.0)
minitest (5.21.2)
msgpack (1.7.2)
multi_json (1.15.0)
multipart-post (2.3.0)
mysql2 (0.5.5)
Expand All @@ -222,16 +234,16 @@ GEM
newrelic_rpm (9.6.0)
base64
nio4r (2.6.1)
nokogiri (1.15.5-arm64-darwin)
nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-darwin)
nokogiri (1.16.0-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-linux)
nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
oj (3.16.1)
open_uri_redirections (0.2.1)
parallel (1.23.0)
parser (3.2.2.4)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
popper_js (2.11.8)
Expand Down Expand Up @@ -286,7 +298,10 @@ GEM
rdoc (6.3.3)
recaptcha (5.9.0)
json
regexp_parser (2.8.2)
redis (4.8.1)
regexp_parser (2.9.0)
reline (0.4.2)
io-console (~> 0.5)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
Expand All @@ -310,15 +325,15 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.1)
rubocop (1.57.2)
rubocop (1.60.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
Expand All @@ -327,17 +342,6 @@ GEM
ruby2_keywords (0.0.5)
ruby_parser (3.20.3)
sexp_processor (~> 4.16)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
Expand All @@ -349,9 +353,9 @@ GEM
select2-rails (4.0.13)
sexp_processor (4.17.0)
spawnling (2.1.5)
sprockets (3.7.2)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
Expand All @@ -360,6 +364,8 @@ GEM
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.25)
stimulus-rails (1.3.3)
railties (>= 6.0.0)
temple (0.10.3)
terser (1.1.20)
execjs (>= 0.3.0, < 3)
Expand All @@ -370,6 +376,10 @@ GEM
thor (1.3.0)
tilt (2.3.0)
timeout (0.4.1)
turbo-rails (1.5.0)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
Expand All @@ -389,6 +399,7 @@ PLATFORMS
DEPENDENCIES
base64 (= 0.1.0)
bcrypt_pbkdf (>= 1.0, < 2.0)
bootsnap
bootstrap (~> 5.2.3)
brakeman
capistrano (~> 3.17)
Expand All @@ -402,6 +413,7 @@ DEPENDENCIES
chart-js-rails
cube-ruby
dalli
debug
ed25519 (>= 1.2, < 2.0)
flamegraph
graphql (~> 2.0.27)
Expand All @@ -412,6 +424,7 @@ DEPENDENCIES
iconv
jquery-rails
jquery-ui-rails
jsbundling-rails (~> 1.3)
listen
multi_json
mysql2 (= 0.5.5)
Expand All @@ -426,15 +439,20 @@ DEPENDENCIES
rails_autolink
rdoc
recaptcha (~> 5.9.0)
redis (~> 4.0)
rest-client
rexml (~> 3)
rspec-rails
rubocop
sass-rails (~> 5.0)
sassc-rails
select2-rails
sprockets-rails
stackprof
stimulus-rails
terser
thin
turbo-rails
tzinfo-data
will_paginate (~> 3.0)

BUNDLED WITH
Expand Down
2 changes: 2 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
js: yarn build --watch
Empty file added app/assets/builds/.keep
Empty file.
7 changes: 7 additions & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//= link_tree ../images
//= link_tree ../builds
//= link application.js
//= link bp_annotator.js
//= link bp_annotatorplus.js
//= link vendor.js
//= link_directory ../stylesheets .css
5 changes: 5 additions & 0 deletions app/javascript/application-esbuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Entry point for the build script in your package.json
import '@hotwired/turbo-rails'
import './controllers'

Turbo.session.drive = false
9 changes: 9 additions & 0 deletions app/javascript/controllers/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Application } from "@hotwired/stimulus"

const application = Application.start()

// Configure Stimulus development experience
application.debug = false
window.Stimulus = application

export { application }
5 changes: 5 additions & 0 deletions app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file is auto-generated by ./bin/rails stimulus:manifest:update
// Run that command whenever you add a new controller or create them with
// ./bin/rails generate stimulus controllerName

import { application } from "./application"
1 change: 1 addition & 0 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<%= stylesheet_link_tag "application" %>

<!-- JavaScript -->
<%= javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module" %>
<%= javascript_include_tag "vendor" %>
<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.min.js" %>
<%= javascript_include_tag "//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js" %>
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/angular.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<%= stylesheet_link_tag "application" %>
</head>
<body class="<%= controller_name %> <%= action_name %> d-flex flex-column h-100">
<%=javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module" %>
<%=javascript_include_tag "vendor"%>
<%=javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.min.js"%>
<%=javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.1/Chart.min.js"%>
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/appliance.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
= stylesheet_link_tag "https://use.fontawesome.com/releases/v5.2.0/css/all.css", integrity: "sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ", crossorigin: "anonymous"
= stylesheet_link_tag "application", media: "all"

= javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module"
= javascript_include_tag "vendor"
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.min.js"
= javascript_include_tag "//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<title>BioportalWebUi</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module" %>
<%= javascript_include_tag "application"%>
<%= csrf_meta_tags %>
</head>
Expand Down
Loading
Loading