From ec55727d80f7942ae3f807ee873b44534cc61f27 Mon Sep 17 00:00:00 2001 From: Hoang Mirs Date: Thu, 17 Aug 2023 22:16:08 +0700 Subject: [PATCH 1/6] [#102] Update Ruby version to 3.2.2 --- .github/workflows/danger.yml | 2 +- .tool-versions | 2 +- Dockerfile | 2 +- Gemfile | 4 ++-- Gemfile.lock | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 46b11416..59b11416 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.0.6" + ruby-version: "3.2.2" bundler-cache: true - name: Setup Node diff --git a/.tool-versions b/.tool-versions index a56897b0..13a21033 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ nodejs 18.15.0 -ruby 3.0.6 +ruby 3.2.2 yarn 1.22.19 diff --git a/Dockerfile b/Dockerfile index bd5fbe56..3eac18ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.0.6-slim +FROM ruby:3.2.2-slim ARG BUILD_ENV=development ARG RUBY_ENV=development diff --git a/Gemfile b/Gemfile index 75200ca2..3cf47973 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '3.0.6' +ruby '3.2.2' # Backend gem 'rails', '7.0.4.3' # Latest stable @@ -49,7 +49,7 @@ end group :development, :test do gem 'bullet' # help to kill N+1 queries and unused eager loading - gem 'figaro' # Simple Rails app configuration + gem 'figjam' # ENV configuration for ruby using yaml files gem 'pry-rails' # Call 'binding.pry' anywhere in the code to stop execution and get a debugger console gem 'pry-byebug' # Step by step debugging and stack navigation in Pry gem 'listen' # Listens to file modifications diff --git a/Gemfile.lock b/Gemfile.lock index d04d2884..da535945 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -178,7 +178,7 @@ GEM faraday (~> 2.0) ffaker (2.21.0) ffi (1.15.5) - figaro (1.2.0) + figjam (1.6.0) thor (>= 0.14.0, < 2) foreman (0.87.2) git (1.18.0) @@ -472,7 +472,7 @@ DEPENDENCIES fabrication faraday-retry ffaker - figaro + figjam foreman graphql i18n-js @@ -513,7 +513,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.0.6p216 + ruby 3.2.2p53 BUNDLED WITH - 2.2.33 + 2.4.18 From b94f0ed5ca63f48683ca6b978d643504aa2a38d5 Mon Sep 17 00:00:00 2001 From: Hoang Mirs Date: Thu, 17 Aug 2023 22:17:42 +0700 Subject: [PATCH 2/6] [#102] Update Rails version to 7.0.7 --- Gemfile | 2 +- Gemfile.lock | 116 +++++++++++++++++++++++++-------------------------- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Gemfile b/Gemfile index 3cf47973..e780f741 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' ruby '3.2.2' # Backend -gem 'rails', '7.0.4.3' # Latest stable +gem 'rails', '7.0.7' # Latest stable gem 'pg' # Use Postgresql as database gem 'puma' # Use Puma as the app server gem 'mini_magick' # A ruby wrapper for ImageMagick or GraphicsMagick command line diff --git a/Gemfile.lock b/Gemfile.lock index da535945..8cbd0462 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,67 +1,67 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + actioncable (7.0.7) + actionpack (= 7.0.7) + activesupport (= 7.0.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailbox (7.0.7) + actionpack (= 7.0.7) + activejob (= 7.0.7) + activerecord (= 7.0.7) + activestorage (= 7.0.7) + activesupport (= 7.0.7) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.3) - actionpack (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailer (7.0.7) + actionpack (= 7.0.7) + actionview (= 7.0.7) + activejob (= 7.0.7) + activesupport (= 7.0.7) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.3) - actionview (= 7.0.4.3) - activesupport (= 7.0.4.3) - rack (~> 2.0, >= 2.2.0) + actionpack (7.0.7) + actionview (= 7.0.7) + activesupport (= 7.0.7) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.3) - actionpack (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actiontext (7.0.7) + actionpack (= 7.0.7) + activerecord (= 7.0.7) + activestorage (= 7.0.7) + activesupport (= 7.0.7) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.0.7) + activesupport (= 7.0.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.4.3) - activesupport (= 7.0.4.3) + activejob (7.0.7) + activesupport (= 7.0.7) globalid (>= 0.3.6) - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) - activerecord (7.0.4.3) - activemodel (= 7.0.4.3) - activesupport (= 7.0.4.3) - activestorage (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activesupport (= 7.0.4.3) + activemodel (7.0.7) + activesupport (= 7.0.7) + activerecord (7.0.7) + activemodel (= 7.0.7) + activesupport (= 7.0.7) + activestorage (7.0.7) + actionpack (= 7.0.7) + activejob (= 7.0.7) + activerecord (= 7.0.7) + activesupport (= 7.0.7) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.3) + activesupport (7.0.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -233,7 +233,7 @@ GEM minitest (5.18.0) msgpack (1.7.0) nap (1.1.0) - net-imap (0.3.4) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) @@ -280,20 +280,20 @@ GEM rack-test (2.1.0) rack (>= 1.3) rack-timeout (0.6.3) - rails (7.0.4.3) - actioncable (= 7.0.4.3) - actionmailbox (= 7.0.4.3) - actionmailer (= 7.0.4.3) - actionpack (= 7.0.4.3) - actiontext (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activemodel (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rails (7.0.7) + actioncable (= 7.0.7) + actionmailbox (= 7.0.7) + actionmailer (= 7.0.7) + actionpack (= 7.0.7) + actiontext (= 7.0.7) + actionview (= 7.0.7) + activejob (= 7.0.7) + activemodel (= 7.0.7) + activerecord (= 7.0.7) + activestorage (= 7.0.7) + activesupport (= 7.0.7) bundler (>= 1.15.0) - railties (= 7.0.4.3) + railties (= 7.0.7) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -307,9 +307,9 @@ GEM json require_all (~> 3.0) ruby-progressbar - railties (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + railties (7.0.7) + actionpack (= 7.0.7) + activesupport (= 7.0.7) method_source rake (>= 12.2) thor (~> 1.0) @@ -425,7 +425,7 @@ GEM thor (1.2.1) tilt (2.1.0) timecop (0.9.6) - timeout (0.3.2) + timeout (0.4.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.4.2) @@ -438,7 +438,7 @@ GEM crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) websocket (1.2.9) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) @@ -491,7 +491,7 @@ DEPENDENCIES pundit rack-cors rack-timeout - rails (= 7.0.4.3) + rails (= 7.0.7) roadie-rails rspec-rails (>= 4.0.0.beta2) rspec-retry From 6825566f3f790966dc43c3e598d5faddbee5ad7c Mon Sep 17 00:00:00 2001 From: Hoang Mirs Date: Thu, 17 Aug 2023 22:20:30 +0700 Subject: [PATCH 3/6] [#102] Update danger gem --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8cbd0462..5240f012 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,7 +66,7 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) awesome_print (1.9.2) @@ -112,18 +112,18 @@ GEM crass (1.0.6) css_parser (1.14.0) addressable - danger (9.2.0) + danger (9.3.1) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) cork (~> 0.1) faraday (>= 0.9.0, < 3.0) faraday-http-cache (~> 2.0) - git (~> 1.7) + git (~> 1.13) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) no_proxy_fix - octokit (~> 5.0) + octokit (~> 6.0) terminal-table (>= 1, < 4) danger-brakeman_scanner (0.1.1) brakeman @@ -168,10 +168,10 @@ GEM erubi (1.12.0) erubis (2.7.0) fabrication (2.30.0) - faraday (2.7.4) + faraday (2.7.10) faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-http-cache (2.4.1) + faraday-http-cache (2.5.0) faraday (>= 0.8) faraday-net_http (3.0.2) faraday-retry (2.1.0) @@ -250,7 +250,7 @@ GEM racc (~> 1.4) nokogiri (1.15.3-x86_64-linux) racc (~> 1.4) - octokit (5.6.1) + octokit (6.1.1) faraday (>= 1, < 3) sawyer (~> 0.9) open4 (1.3.4) From 2e437fe87b9c684168cefe7d177acfdf782175c9 Mon Sep 17 00:00:00 2001 From: Hoang Mirs Date: Thu, 17 Aug 2023 22:33:30 +0700 Subject: [PATCH 4/6] [#102] Update brakeman --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5240f012..9c472885 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -79,7 +79,7 @@ GEM debug_inspector (>= 0.0.1) bootsnap (1.16.0) msgpack (~> 1.2) - brakeman (5.4.1) + brakeman (6.0.1) builder (3.2.4) bullet (7.0.7) activesupport (>= 3.0.0) From ec6509899a373776f27ce20d104fd30e37eaa18c Mon Sep 17 00:00:00 2001 From: Sang Huynh Thanh Date: Fri, 12 Apr 2024 14:06:02 +0700 Subject: [PATCH 5/6] Update Danger version --- Gemfile.lock | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9c472885..5813d293 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,10 +66,11 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) awesome_print (1.9.2) + base64 (0.2.0) bcrypt (3.1.18) better_errors (2.9.1) coderay (>= 1.0.0) @@ -112,7 +113,7 @@ GEM crass (1.0.6) css_parser (1.14.0) addressable - danger (9.3.1) + danger (9.4.3) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -123,7 +124,7 @@ GEM kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) no_proxy_fix - octokit (~> 6.0) + octokit (>= 4.0) terminal-table (>= 1, < 4) danger-brakeman_scanner (0.1.1) brakeman @@ -168,12 +169,12 @@ GEM erubi (1.12.0) erubis (2.7.0) fabrication (2.30.0) - faraday (2.7.10) - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-http-cache (2.5.0) + faraday (2.9.0) + faraday-net_http (>= 2.0, < 3.2) + faraday-http-cache (2.5.1) faraday (>= 0.8) - faraday-net_http (3.0.2) + faraday-net_http (3.1.0) + net-http faraday-retry (2.1.0) faraday (~> 2.0) ffaker (2.21.0) @@ -181,7 +182,7 @@ GEM figjam (1.6.0) thor (>= 0.14.0, < 2) foreman (0.87.2) - git (1.18.0) + git (1.19.1) addressable (~> 2.8) rchardet (~> 1.8) git_diff (0.4.3) @@ -233,6 +234,8 @@ GEM minitest (5.18.0) msgpack (1.7.0) nap (1.1.0) + net-http (0.4.1) + uri net-imap (0.3.7) date net-protocol @@ -250,7 +253,8 @@ GEM racc (~> 1.4) nokogiri (1.15.3-x86_64-linux) racc (~> 1.4) - octokit (6.1.1) + octokit (8.1.0) + base64 faraday (>= 1, < 3) sawyer (~> 0.9) open4 (1.3.4) @@ -268,7 +272,7 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (5.0.3) + public_suffix (5.0.5) puma (6.2.1) nio4r (~> 2.0) pundit (2.3.0) @@ -374,7 +378,6 @@ GEM rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) rubyzip (2.3.2) sawyer (0.9.2) addressable (>= 2.3.5) @@ -428,8 +431,9 @@ GEM timeout (0.4.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) uniform_notifier (1.16.0) + uri (0.13.0) vcr (6.1.0) warden (1.2.9) rack (>= 2.0.9) From fe32927f6edf3cffc9814ad88075392eaff3c55b Mon Sep 17 00:00:00 2001 From: Sang Huynh Thanh Date: Fri, 12 Apr 2024 14:31:39 +0700 Subject: [PATCH 6/6] [GH-102] Try update i18n-js version --- Gemfile.lock | 10 ++++++---- config/application.rb | 3 --- db/schema.rb | 25 ++++++++++++------------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5813d293..fc78ac52 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,7 +104,7 @@ GEM sexp_processor coderay (1.1.3) colored2 (3.1.2) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) connection_pool (2.4.0) cork (0.3.0) colored2 (~> 3.1) @@ -186,14 +186,16 @@ GEM addressable (~> 2.8) rchardet (~> 1.8) git_diff (0.4.3) + glob (0.4.1) globalid (1.1.0) activesupport (>= 5.0) graphql (2.0.20) hashdiff (1.0.1) - i18n (1.12.0) + i18n (1.14.4) concurrent-ruby (~> 1.0) - i18n-js (3.5.1) - i18n (>= 0.6.6) + i18n-js (4.2.3) + glob (>= 0.4.0) + i18n inline_svg (1.9.0) activesupport (>= 3.0) nokogiri (>= 1.6) diff --git a/config/application.rb b/config/application.rb index cc42d74b..0306bae2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -26,8 +26,5 @@ class Application < Rails::Application # Compress the responses to reduce the size of html/json controller responses. config.middleware.use Rack::Deflater - - # Automatically generate the `translation.js` files - config.middleware.use I18n::JS::Middleware end end diff --git a/db/schema.rb b/db/schema.rb index 1c5f81ba..d7a286d6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,16 +2,15 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# This file is the source Rails uses to define your schema when running `rails -# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to # be faster and is potentially less error prone than running all of your # migrations from scratch. Old migrations may fail to apply correctly if those # migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[6.1].define(version: 2021_06_18_041839) do - +ActiveRecord::Schema[7.0].define(version: 2021_06_18_041839) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -21,8 +20,8 @@ t.text "token", null: false t.integer "expires_in", null: false t.text "redirect_uri", null: false - t.datetime "created_at", null: false - t.datetime "revoked_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "revoked_at", precision: nil t.string "scopes", default: "", null: false t.index ["application_id"], name: "index_oauth_access_grants_on_application_id" t.index ["resource_owner_id"], name: "index_oauth_access_grants_on_resource_owner_id" @@ -35,8 +34,8 @@ t.text "token", null: false t.string "refresh_token" t.integer "expires_in" - t.datetime "revoked_at" - t.datetime "created_at", null: false + t.datetime "revoked_at", precision: nil + t.datetime "created_at", precision: nil, null: false t.string "scopes" t.string "previous_refresh_token", default: "", null: false t.index ["application_id"], name: "index_oauth_access_tokens_on_application_id" @@ -52,8 +51,8 @@ t.text "redirect_uri" t.string "scopes", default: "", null: false t.boolean "confidential", default: true, null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true end @@ -61,9 +60,9 @@ t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "reset_password_sent_at", precision: nil + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "name" t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true