From a200f3f433984a20fc1831cb16c37ab4818d3761 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Tue, 30 Jan 2024 13:10:21 -0800 Subject: [PATCH 01/12] Replace sass-rails with sassc-rails --- Gemfile | 2 +- Gemfile.lock | 13 +------------ config/initializers/sass.rb | 10 ---------- 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 config/initializers/sass.rb diff --git a/Gemfile b/Gemfile index 99f6efba2..e09f214d1 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '7.0.8' -gem 'sass-rails', '~> 5.0' +gem 'sassc-rails' gem 'terser' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby diff --git a/Gemfile.lock b/Gemfile.lock index c0fbe44e0..7eff075ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -327,17 +327,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) @@ -430,7 +419,7 @@ DEPENDENCIES rexml (~> 3) rspec-rails rubocop - sass-rails (~> 5.0) + sassc-rails select2-rails stackprof terser diff --git a/config/initializers/sass.rb b/config/initializers/sass.rb deleted file mode 100644 index 25ac09514..000000000 --- a/config/initializers/sass.rb +++ /dev/null @@ -1,10 +0,0 @@ -module Sass::Script::Functions - - def body_margin_bottom - margin = Rails.env.appliance? ? "60px" : "300px" - Sass::Script::String.new(margin) - end - - declare :body_margin_bottom, [] - -end \ No newline at end of file From ef2098eb1b8ada07be604eaefe5de3abdfbe1ea1 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Tue, 30 Jan 2024 14:46:57 -0800 Subject: [PATCH 02/12] Add sprockets-rails gem and update from 3 to 4 --- Gemfile | 3 +++ Gemfile.lock | 15 ++++++++------- app/assets/config/manifest.js | 3 +++ config/initializers/assets.rb | 1 - 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 app/assets/config/manifest.js diff --git a/Gemfile b/Gemfile index e09f214d1..fed06577c 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,9 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '7.0.8' +# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] +gem 'sprockets-rails', require: 'sprockets/railtie' + gem 'sassc-rails' gem 'terser' # See https://github.com/rails/execjs#readme for more supported runtimes diff --git a/Gemfile.lock b/Gemfile.lock index 7eff075ad..5691140d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -129,7 +129,7 @@ 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) @@ -202,7 +202,7 @@ 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) multi_json (1.15.0) multipart-post (2.3.0) mysql2 (0.5.5) @@ -222,11 +222,11 @@ 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) @@ -338,9 +338,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) @@ -421,6 +421,7 @@ DEPENDENCIES rubocop sassc-rails select2-rails + sprockets-rails stackprof terser thin diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 000000000..b16e53d6d --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index ed7c2ad1c..4b828e80c 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -12,4 +12,3 @@ # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css ) -Rails.application.config.assets.precompile += %w( *.png *.jpg *.jpeg *.gif bp_annotator.js bp_annotatorplus.js vendor.js ) From 3fe990b5a42a7b25bf09a001ebeac71b9fdc5b8b Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Tue, 30 Jan 2024 16:14:26 -0800 Subject: [PATCH 03/12] Install jsbundling-rails --- .gitignore | 5 + Gemfile | 3 + Gemfile.lock | 3 + Procfile.dev | 2 + app/assets/builds/.keep | 0 app/assets/config/manifest.js | 1 + app/javascript/application.js | 1 + app/views/layouts/application.html.erb | 1 + bin/dev | 11 ++ package.json | 10 ++ yarn.lock | 143 +++++++++++++++++++++++++ 11 files changed, 180 insertions(+) create mode 100644 Procfile.dev create mode 100644 app/assets/builds/.keep create mode 100644 app/javascript/application.js create mode 100755 bin/dev create mode 100644 package.json diff --git a/.gitignore b/.gitignore index eaa496d6f..e5eb8ea5b 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Gemfile b/Gemfile index fed06577c..21fe288b8 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,9 @@ gem 'rails', '7.0.8' # 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' + gem 'sassc-rails' gem 'terser' # See https://github.com/rails/execjs#readme for more supported runtimes diff --git a/Gemfile.lock b/Gemfile.lock index 5691140d0..d15b07d7d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -181,6 +181,8 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (6.0.1) railties (>= 3.2.16) + jsbundling-rails (1.3.0) + railties (>= 6.0.0) json (2.6.3) language_server-protocol (3.17.0.3) listen (3.8.0) @@ -401,6 +403,7 @@ DEPENDENCIES iconv jquery-rails jquery-ui-rails + jsbundling-rails (~> 1.3) listen multi_json mysql2 (= 0.5.5) diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 000000000..b19ff761b --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,2 @@ +web: env RUBY_DEBUG_OPEN=true bin/rails server +js: yarn build --watch diff --git a/app/assets/builds/.keep b/app/assets/builds/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index b16e53d6d..d333340ba 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,3 +1,4 @@ //= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css +//= link_tree ../builds diff --git a/app/javascript/application.js b/app/javascript/application.js new file mode 100644 index 000000000..db91aa886 --- /dev/null +++ b/app/javascript/application.js @@ -0,0 +1 @@ +// Entry point for the build script in your package.json diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e721eb1e8..52e73ad8d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,6 +5,7 @@ <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application"%> <%= csrf_meta_tags %> + <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %> diff --git a/bin/dev b/bin/dev new file mode 100755 index 000000000..eda330c72 --- /dev/null +++ b/bin/dev @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +if gem list --no-installed --exact --silent foreman; then + echo "Installing foreman..." + gem install foreman +fi + +# Default to port 3000 if not specified +export PORT="${PORT:-3000}" + +exec foreman start -f Procfile.dev "$@" diff --git a/package.json b/package.json new file mode 100644 index 000000000..9605a0c27 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "app", + "private": true, + "dependencies": { + "esbuild": "^0.20.0" + }, + "scripts": { + "build": "esbuild app/javascript/*.* --bundle --sourcemap --format=esm --outdir=app/assets/builds --public-path=/assets" + } +} diff --git a/yarn.lock b/yarn.lock index fb57ccd13..4af48b936 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,3 +2,146 @@ # yarn lockfile v1 +"@esbuild/aix-ppc64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz#509621cca4e67caf0d18561a0c56f8b70237472f" + integrity sha512-fGFDEctNh0CcSwsiRPxiaqX0P5rq+AqE0SRhYGZ4PX46Lg1FNR6oCxJghf8YgY0WQEgQuh3lErUFE4KxLeRmmw== + +"@esbuild/android-arm64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.0.tgz#109a6fdc4a2783fc26193d2687827045d8fef5ab" + integrity sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q== + +"@esbuild/android-arm@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.0.tgz#1397a2c54c476c4799f9b9073550ede496c94ba5" + integrity sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g== + +"@esbuild/android-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.0.tgz#2b615abefb50dc0a70ac313971102f4ce2fdb3ca" + integrity sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ== + +"@esbuild/darwin-arm64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.0.tgz#5c122ed799eb0c35b9d571097f77254964c276a2" + integrity sha512-AjEcivGAlPs3UAcJedMa9qYg9eSfU6FnGHJjT8s346HSKkrcWlYezGE8VaO2xKfvvlZkgAhyvl06OJOxiMgOYQ== + +"@esbuild/darwin-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.0.tgz#9561d277002ba8caf1524f209de2b22e93d170c1" + integrity sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw== + +"@esbuild/freebsd-arm64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.0.tgz#84178986a3138e8500d17cc380044868176dd821" + integrity sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ== + +"@esbuild/freebsd-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.0.tgz#3f9ce53344af2f08d178551cd475629147324a83" + integrity sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ== + +"@esbuild/linux-arm64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.0.tgz#24efa685515689df4ecbc13031fa0a9dda910a11" + integrity sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw== + +"@esbuild/linux-arm@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.0.tgz#6b586a488e02e9b073a75a957f2952b3b6e87b4c" + integrity sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg== + +"@esbuild/linux-ia32@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.0.tgz#84ce7864f762708dcebc1b123898a397dea13624" + integrity sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w== + +"@esbuild/linux-loong64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.0.tgz#1922f571f4cae1958e3ad29439c563f7d4fd9037" + integrity sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw== + +"@esbuild/linux-mips64el@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.0.tgz#7ca1bd9df3f874d18dbf46af009aebdb881188fe" + integrity sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ== + +"@esbuild/linux-ppc64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.0.tgz#8f95baf05f9486343bceeb683703875d698708a4" + integrity sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw== + +"@esbuild/linux-riscv64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.0.tgz#ca63b921d5fe315e28610deb0c195e79b1a262ca" + integrity sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA== + +"@esbuild/linux-s390x@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.0.tgz#cb3d069f47dc202f785c997175f2307531371ef8" + integrity sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ== + +"@esbuild/linux-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.20.0.tgz#ac617e0dc14e9758d3d7efd70288c14122557dc7" + integrity sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg== + +"@esbuild/netbsd-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.0.tgz#6cc778567f1513da6e08060e0aeb41f82eb0f53c" + integrity sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ== + +"@esbuild/openbsd-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.0.tgz#76848bcf76b4372574fb4d06cd0ed1fb29ec0fbe" + integrity sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA== + +"@esbuild/sunos-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.0.tgz#ea4cd0639bf294ad51bc08ffbb2dac297e9b4706" + integrity sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g== + +"@esbuild/win32-arm64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.0.tgz#a5c171e4a7f7e4e8be0e9947a65812c1535a7cf0" + integrity sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ== + +"@esbuild/win32-ia32@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.0.tgz#f8ac5650c412d33ea62d7551e0caf82da52b7f85" + integrity sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg== + +"@esbuild/win32-x64@0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz#2efddf82828aac85e64cef62482af61c29561bee" + integrity sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg== + +esbuild@^0.20.0: + version "0.20.0" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.0.tgz#a7170b63447286cd2ff1f01579f09970e6965da4" + integrity sha512-6iwE3Y2RVYCME1jLpBqq7LQWK3MW6vjV2bZy6gt/WrqkY+WE74Spyc0ThAOYpMtITvnjX09CrC6ym7A/m9mebA== + optionalDependencies: + "@esbuild/aix-ppc64" "0.20.0" + "@esbuild/android-arm" "0.20.0" + "@esbuild/android-arm64" "0.20.0" + "@esbuild/android-x64" "0.20.0" + "@esbuild/darwin-arm64" "0.20.0" + "@esbuild/darwin-x64" "0.20.0" + "@esbuild/freebsd-arm64" "0.20.0" + "@esbuild/freebsd-x64" "0.20.0" + "@esbuild/linux-arm" "0.20.0" + "@esbuild/linux-arm64" "0.20.0" + "@esbuild/linux-ia32" "0.20.0" + "@esbuild/linux-loong64" "0.20.0" + "@esbuild/linux-mips64el" "0.20.0" + "@esbuild/linux-ppc64" "0.20.0" + "@esbuild/linux-riscv64" "0.20.0" + "@esbuild/linux-s390x" "0.20.0" + "@esbuild/linux-x64" "0.20.0" + "@esbuild/netbsd-x64" "0.20.0" + "@esbuild/openbsd-x64" "0.20.0" + "@esbuild/sunos-x64" "0.20.0" + "@esbuild/win32-arm64" "0.20.0" + "@esbuild/win32-ia32" "0.20.0" + "@esbuild/win32-x64" "0.20.0" From e9710fb184ae366450954914b1d7aa8ab9254c5a Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Wed, 31 Jan 2024 10:39:07 -0800 Subject: [PATCH 04/12] Rename build script entry point Fixes "Sprockets::DoubleLinkError: Multiple files with the same output path cannot be linked ("application.js")" --- app/javascript/{application.js => application-esbuild.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/javascript/{application.js => application-esbuild.js} (100%) diff --git a/app/javascript/application.js b/app/javascript/application-esbuild.js similarity index 100% rename from app/javascript/application.js rename to app/javascript/application-esbuild.js From 06ac94c1a89e7845257a45119fbefab4b796bd72 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Wed, 31 Jan 2024 16:02:19 -0800 Subject: [PATCH 05/12] Update manifest.js --- app/assets/config/manifest.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index d333340ba..2c35fb2c3 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,4 +1,7 @@ //= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css //= link_tree ../builds +//= link application.js +//= link bp_annotator.js +//= link bp_annotatorplus.js +//= link vendor.js +//= link_directory ../stylesheets .css From cd23fb4f03e9a176e1f9ee960113e1d435cdbd85 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Mon, 26 Feb 2024 15:18:39 -0800 Subject: [PATCH 06/12] Install Turbo --- Gemfile | 6 ++++++ Gemfile.lock | 21 ++++++++++++++------- app/javascript/application-esbuild.js | 3 +++ config/cable.yml | 3 ++- package.json | 1 + yarn.lock | 18 ++++++++++++++++++ 6 files changed, 44 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 21fe288b8..04d978bde 100644 --- a/Gemfile +++ b/Gemfile @@ -11,6 +11,12 @@ 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" + +# Use Redis for Action Cable +gem "redis", "~> 4.0" + gem 'sassc-rails' gem 'terser' # See https://github.com/rails/execjs#readme for more supported runtimes diff --git a/Gemfile.lock b/Gemfile.lock index d15b07d7d..c7cb35d96 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -183,7 +183,7 @@ GEM railties (>= 3.2.16) jsbundling-rails (1.3.0) railties (>= 6.0.0) - json (2.6.3) + json (2.7.1) language_server-protocol (3.17.0.3) listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) @@ -232,8 +232,8 @@ GEM 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) @@ -288,7 +288,8 @@ GEM rdoc (6.3.3) recaptcha (5.9.0) json - regexp_parser (2.8.2) + redis (4.8.1) + regexp_parser (2.9.0) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) @@ -312,15 +313,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) @@ -361,6 +362,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) @@ -418,6 +423,7 @@ DEPENDENCIES rails_autolink rdoc recaptcha (~> 5.9.0) + redis (~> 4.0) rest-client rexml (~> 3) rspec-rails @@ -428,6 +434,7 @@ DEPENDENCIES stackprof terser thin + turbo-rails will_paginate (~> 3.0) BUNDLED WITH diff --git a/app/javascript/application-esbuild.js b/app/javascript/application-esbuild.js index db91aa886..4039174f5 100644 --- a/app/javascript/application-esbuild.js +++ b/app/javascript/application-esbuild.js @@ -1 +1,4 @@ // Entry point for the build script in your package.json + +import '@hotwired/turbo-rails' +Turbo.session.drive = false \ No newline at end of file diff --git a/config/cable.yml b/config/cable.yml index 487866035..f41190b83 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -1,5 +1,6 @@ development: - adapter: async + adapter: redis + url: redis://localhost:6379/1 test: adapter: test diff --git a/package.json b/package.json index 9605a0c27..6f02ad383 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "app", "private": true, "dependencies": { + "@hotwired/turbo-rails": "^8.0.3", "esbuild": "^0.20.0" }, "scripts": { diff --git a/yarn.lock b/yarn.lock index 4af48b936..742908b64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -117,6 +117,24 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz#2efddf82828aac85e64cef62482af61c29561bee" integrity sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg== +"@hotwired/turbo-rails@^8.0.3": + version "8.0.3" + resolved "https://registry.yarnpkg.com/@hotwired/turbo-rails/-/turbo-rails-8.0.3.tgz#e60375f4eea4b30ec0cd6d7e3fdb3d6349a2b57b" + integrity sha512-n5B9HdFsNiGJfXFAriCArmvFZyznIh/OriB5ZVAWz4Fsi4oLkpgmJNw5pibBAM7NMQQGN6cfKa/nhZT4LWcqbQ== + dependencies: + "@hotwired/turbo" "^8.0.3" + "@rails/actioncable" "^7.0" + +"@hotwired/turbo@^8.0.3": + version "8.0.3" + resolved "https://registry.yarnpkg.com/@hotwired/turbo/-/turbo-8.0.3.tgz#338e07278f4b3c76921328d3c92dbc4831c209d0" + integrity sha512-qLgp7d6JaegKjMToTJahosrFxV3odfSbiekispQ3soOzE5jnU+iEMWlRvYRe/jvy5Q+JWoywtf9j3RD4ikVjIg== + +"@rails/actioncable@^7.0": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-7.1.3.tgz#4db480347775aeecd4dde2405659eef74a458881" + integrity sha512-ojNvnoZtPN0pYvVFtlO7dyEN9Oml1B6IDM+whGKVak69MMYW99lC2NOWXWeE3bmwEydbP/nn6ERcpfjHVjYQjA== + esbuild@^0.20.0: version "0.20.0" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.0.tgz#a7170b63447286cd2ff1f01579f09970e6965da4" From b4fda30dc48ec29b6111c45405807c107a5e3af0 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Thu, 29 Feb 2024 13:47:11 -0800 Subject: [PATCH 07/12] Install Stimulus --- Gemfile | 3 +++ Gemfile.lock | 3 +++ app/javascript/application-esbuild.js | 3 ++- app/javascript/controllers/application.js | 9 +++++++++ app/javascript/controllers/hello_controller.js | 7 +++++++ app/javascript/controllers/index.js | 8 ++++++++ package.json | 1 + yarn.lock | 5 +++++ 8 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 app/javascript/controllers/application.js create mode 100644 app/javascript/controllers/hello_controller.js create mode 100644 app/javascript/controllers/index.js diff --git a/Gemfile b/Gemfile index 04d978bde..203d0f5a9 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,9 @@ 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' + # Use Redis for Action Cable gem "redis", "~> 4.0" diff --git a/Gemfile.lock b/Gemfile.lock index c7cb35d96..b7423e39a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -352,6 +352,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) @@ -432,6 +434,7 @@ DEPENDENCIES select2-rails sprockets-rails stackprof + stimulus-rails terser thin turbo-rails diff --git a/app/javascript/application-esbuild.js b/app/javascript/application-esbuild.js index 4039174f5..b8b490239 100644 --- a/app/javascript/application-esbuild.js +++ b/app/javascript/application-esbuild.js @@ -1,4 +1,5 @@ // Entry point for the build script in your package.json - import '@hotwired/turbo-rails' +import './controllers' + Turbo.session.drive = false \ No newline at end of file diff --git a/app/javascript/controllers/application.js b/app/javascript/controllers/application.js new file mode 100644 index 000000000..1213e85c7 --- /dev/null +++ b/app/javascript/controllers/application.js @@ -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 } diff --git a/app/javascript/controllers/hello_controller.js b/app/javascript/controllers/hello_controller.js new file mode 100644 index 000000000..5975c0789 --- /dev/null +++ b/app/javascript/controllers/hello_controller.js @@ -0,0 +1,7 @@ +import { Controller } from "@hotwired/stimulus" + +export default class extends Controller { + connect() { + this.element.textContent = "Hello World!" + } +} diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js new file mode 100644 index 000000000..d0685d3b7 --- /dev/null +++ b/app/javascript/controllers/index.js @@ -0,0 +1,8 @@ +// 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" + +import HelloController from "./hello_controller" +application.register("hello", HelloController) diff --git a/package.json b/package.json index 6f02ad383..7689074db 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "app", "private": true, "dependencies": { + "@hotwired/stimulus": "^3.2.2", "@hotwired/turbo-rails": "^8.0.3", "esbuild": "^0.20.0" }, diff --git a/yarn.lock b/yarn.lock index 742908b64..6da874dbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -117,6 +117,11 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz#2efddf82828aac85e64cef62482af61c29561bee" integrity sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg== +"@hotwired/stimulus@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@hotwired/stimulus/-/stimulus-3.2.2.tgz#071aab59c600fed95b97939e605ff261a4251608" + integrity sha512-eGeIqNOQpXoPAIP7tC1+1Yc1yl1xnwYqg+3mzqxyrbE5pg5YFBZcA6YoTiByJB6DKAEsiWtl6tjTJS4IYtbB7A== + "@hotwired/turbo-rails@^8.0.3": version "8.0.3" resolved "https://registry.yarnpkg.com/@hotwired/turbo-rails/-/turbo-rails-8.0.3.tgz#e60375f4eea4b30ec0cd6d7e3fdb3d6349a2b57b" From 2c4685c2b785c9ac656f79f4d56ea5a2cc1a0ba2 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Wed, 6 Mar 2024 14:52:02 -0800 Subject: [PATCH 08/12] Add include tags for JS bundled with esbuild --- app/views/layouts/_header.html.erb | 1 + app/views/layouts/angular.html.erb | 1 + app/views/layouts/appliance.html.haml | 1 + app/views/layouts/application.html.erb | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index a58be5537..a800a46e7 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -26,6 +26,7 @@ <%= stylesheet_link_tag "application" %> + <%= 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" %> diff --git a/app/views/layouts/angular.html.erb b/app/views/layouts/angular.html.erb index 95a78f6c1..2b1704a71 100644 --- a/app/views/layouts/angular.html.erb +++ b/app/views/layouts/angular.html.erb @@ -33,6 +33,7 @@ <%= stylesheet_link_tag "application" %> + <%=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"%> diff --git a/app/views/layouts/appliance.html.haml b/app/views/layouts/appliance.html.haml index 2ca01d6da..fc6511aaa 100644 --- a/app/views/layouts/appliance.html.haml +++ b/app/views/layouts/appliance.html.haml @@ -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" diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 52e73ad8d..64ae08bb0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -3,9 +3,9 @@ BioportalWebUi <%= stylesheet_link_tag "application", :media => "all" %> + <%= javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module" %> <%= javascript_include_tag "application"%> <%= csrf_meta_tags %> - <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %> From 3cd25de8627d7785b0bf752ced8c11891ecde312 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Wed, 6 Mar 2024 15:08:09 -0800 Subject: [PATCH 09/12] Fix some RuboCop warnings --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 203d0f5a9..17c795254 100644 --- a/Gemfile +++ b/Gemfile @@ -12,13 +12,13 @@ gem 'sprockets-rails', require: 'sprockets/railtie' gem 'jsbundling-rails', '~> 1.3' # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] -gem "turbo-rails" +gem 'turbo-rails' # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] gem 'stimulus-rails' # Use Redis for Action Cable -gem "redis", "~> 4.0" +gem 'redis', '~> 4.0' gem 'sassc-rails' gem 'terser' @@ -82,10 +82,10 @@ group :development do 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' From edd87a93740851b99b95d4712a260b1e3e9f6284 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Wed, 6 Mar 2024 15:11:54 -0800 Subject: [PATCH 10/12] Remove example Stimulus controller --- app/javascript/controllers/hello_controller.js | 7 ------- app/javascript/controllers/index.js | 3 --- 2 files changed, 10 deletions(-) delete mode 100644 app/javascript/controllers/hello_controller.js diff --git a/app/javascript/controllers/hello_controller.js b/app/javascript/controllers/hello_controller.js deleted file mode 100644 index 5975c0789..000000000 --- a/app/javascript/controllers/hello_controller.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Controller } from "@hotwired/stimulus" - -export default class extends Controller { - connect() { - this.element.textContent = "Hello World!" - } -} diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index d0685d3b7..373c3edc2 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -3,6 +3,3 @@ // ./bin/rails generate stimulus controllerName import { application } from "./application" - -import HelloController from "./hello_controller" -application.register("hello", HelloController) From 54a3537d80f8c35b1dc93004d117d5e10534ba59 Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Thu, 7 Mar 2024 14:46:12 -0800 Subject: [PATCH 11/12] Add more Rails 7 default gems --- Gemfile | 52 ++++++++++++++++++++++++++++++-------------------- Gemfile.lock | 15 +++++++++++++++ config/boot.rb | 1 + 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 17c795254..d9e11e32d 100644 --- a/Gemfile +++ b/Gemfile @@ -17,14 +17,26 @@ 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 'terser' -# See https://github.com/rails/execjs#readme for more supported runtimes -# gem 'therubyracer', platforms: :ruby -# gem 'duktape' gem 'bootstrap', '~> 5.2.3' gem 'chart-js-rails' @@ -32,15 +44,6 @@ 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' @@ -54,31 +57,30 @@ 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' -gem 'rack-mini-profiler' gem 'rails_autolink' gem 'rdoc' 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 @@ -90,13 +92,21 @@ group :development do 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] + + # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] + gem 'rack-mini-profiler' + gem 'rspec-rails' end diff --git a/Gemfile.lock b/Gemfile.lock index b7423e39a..0f10dedc5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -135,6 +137,9 @@ GEM 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) @@ -175,6 +180,10 @@ 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) @@ -205,6 +214,7 @@ GEM mime-types-data (3.2023.1003) mini_mime (1.1.5) minitest (5.21.2) + msgpack (1.7.2) multi_json (1.15.0) multipart-post (2.3.0) mysql2 (0.5.5) @@ -290,6 +300,8 @@ GEM json 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) @@ -387,6 +399,7 @@ PLATFORMS DEPENDENCIES base64 (= 0.1.0) bcrypt_pbkdf (>= 1.0, < 2.0) + bootsnap bootstrap (~> 5.2.3) brakeman capistrano (~> 3.17) @@ -400,6 +413,7 @@ DEPENDENCIES chart-js-rails cube-ruby dalli + debug ed25519 (>= 1.2, < 2.0) flamegraph graphql (~> 2.0.27) @@ -438,6 +452,7 @@ DEPENDENCIES terser thin turbo-rails + tzinfo-data will_paginate (~> 3.0) BUNDLED WITH diff --git a/config/boot.rb b/config/boot.rb index 282011619..988a5ddc4 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,4 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. From 44f3fe621575c3265636db866af0dcb3bbbeeb4a Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Thu, 7 Mar 2024 15:03:20 -0800 Subject: [PATCH 12/12] Fix uninitialized constant error --- Gemfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index d9e11e32d..606509511 100644 --- a/Gemfile +++ b/Gemfile @@ -61,6 +61,7 @@ gem 'ontologies_api_client', github: 'ncbo/ontologies_api_ruby_client', tag: 'v2 gem 'open_uri_redirections' gem 'pry' gem 'psych', '< 4' +gem 'rack-mini-profiler' gem 'rails_autolink' gem 'rdoc' gem 'recaptcha', '~> 5.9.0' @@ -103,10 +104,6 @@ end 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] - - # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] - gem 'rack-mini-profiler' - gem 'rspec-rails' end