diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 862e532cb..e69ba2e12 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: - ruby-version: ["3.1.4"] + ruby-version: ["3.2.2"] steps: - uses: actions/checkout@v2 - name: Install dependent libraries diff --git a/.ruby-version b/.ruby-version index 71e447d5b..9e79f6c4a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.1.4 +ruby-3.2.2 diff --git a/Dockerfile b/Dockerfile index 2bfdfaedd..22b300381 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.1.4 +FROM ruby:3.2.2 LABEL MAINTAINER Codeminer42 @@ -25,7 +25,7 @@ RUN apt-get update \ && chown -R app:app $BUNDLE_PATH # Install chrome and chromedriver for selenium -ENV CHROME_VERSION 106.0.5249.61 +ENV CHROME_VERSION 114.0.5735.90 RUN wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb \ && dpkg -i google-chrome-stable_${CHROME_VERSION}-1_amd64.deb || true \ && apt-get -f install -y \ diff --git a/Gemfile b/Gemfile index ca699cc0e..7976ae29b 100644 --- a/Gemfile +++ b/Gemfile @@ -4,21 +4,18 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.1.4' +ruby '3.2.2' -gem 'rails', '~> 7.0.7' +gem 'rails', '~> 7.1.1' gem 'bootsnap', require: false -gem 'activeadmin', '~> 2.13.1' +gem 'activeadmin', '> 2.13.1' gem 'autoprefixer-rails', '~> 10.4.2.0' gem 'cancancan', '~> 3.3.0' gem 'carrierwave', '~> 2.2.5' -gem 'devise', '~> 4.8.1' -gem 'devise-two-factor', - git: 'https://github.com/eoinkelly/devise-two-factor', - branch: 'rails-7-support', - ref: '7de6c315b507c41e6ee288ea0bdf3a070416bd17' +gem 'devise', '~> 4.8.0' +gem 'devise-two-factor', '~> 5.0.0' gem 'draper' gem 'draper-cancancan', '~> 1.1.1' gem 'jquery-rails' @@ -47,7 +44,7 @@ gem 'business_time' gem 'github_api', '~> 0.18.2' gem 'httparty' gem 'money-rails', '~> 1.12' -gem 'ransack', '~> 2.3' +gem 'ransack', '~> 4.0' gem 'sidekiq', "~> 6.5.12" @@ -62,7 +59,7 @@ gem 'font-awesome-sass', '~> 5.13' gem 'jquery-easing-rails' gem 'jquery_mask_rails', '~> 0.1.0' gem 'normalize-rails', '~> 4.1.1' -gem 'validates_timeliness', '~> 6.0.0.beta2', github: "mitsuru/validates_timeliness", branch: "rails7" +gem 'validates_timeliness', '>= 6.0.1' gem 'aasm', '~> 5.0', '>= 5.0.8' gem 'active_admin_flat_skin' @@ -80,8 +77,8 @@ end gem 'inline_svg', '~> 1.9' gem 'puma' -gem 'rswag-api', '~> 2.5.1' -gem 'rswag-ui', '~> 2.5.1' +gem 'rswag-api', '~> 2.13.0' +gem 'rswag-ui', '~> 2.13.0' gem "tailwindcss-rails", "~> 2.0" group :test do @@ -119,11 +116,11 @@ group :development, :test do gem 'pry-rails' gem 'pry-remote', '~> 0.1.8' gem 'rspec-rails' - gem 'rswag-specs', '~> 2.5.1' + gem 'rswag-specs', '~> 2.13.0' gem 'rubocop', require: false gem 'rubocop-faker', '~> 1.1' end group :development, :test, :staging do - gem 'faker', '~> 2.14.0' + gem 'faker', '~> 2.23.0' end diff --git a/Gemfile.lock b/Gemfile.lock index c2735cd7d..7b2ef9d78 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,15 +1,3 @@ -GIT - remote: https://github.com/eoinkelly/devise-two-factor - revision: 7de6c315b507c41e6ee288ea0bdf3a070416bd17 - ref: 7de6c315b507c41e6ee288ea0bdf3a070416bd17 - branch: rails-7-support - specs: - devise-two-factor (5.0.0) - activesupport (< 7.1) - devise (~> 4.0) - railties (< 7.1) - rotp (~> 6.0) - GIT remote: https://github.com/heroku/platform-api.git revision: b3f649b2082f3fb2a5e4012094474a559bce4fb4 @@ -19,15 +7,6 @@ GIT moneta (~> 1.0.0) rate_throttle_client (~> 0.1.0) -GIT - remote: https://github.com/mitsuru/validates_timeliness.git - revision: f28a62589cc069d1d1f5dfd99e1749edca04cd68 - branch: rails7 - specs: - validates_timeliness (6.0.0.beta2) - activemodel (>= 6.0.0, < 7.1) - timeliness (>= 0.3.10, < 1) - GEM remote: https://rubygems.org/ specs: @@ -35,119 +14,129 @@ GEM concurrent-ruby (~> 1.0) acme-client (2.0.9) faraday (>= 0.17, < 2.0.0) - actioncable (7.0.7.2) - actionpack (= 7.0.7.2) - activesupport (= 7.0.7.2) + actioncable (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.7.2) - actionpack (= 7.0.7.2) - activejob (= 7.0.7.2) - activerecord (= 7.0.7.2) - activestorage (= 7.0.7.2) - activesupport (= 7.0.7.2) + zeitwerk (~> 2.6) + actionmailbox (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.7.2) - actionpack (= 7.0.7.2) - actionview (= 7.0.7.2) - activejob (= 7.0.7.2) - activesupport (= 7.0.7.2) + actionmailer (7.1.2) + actionpack (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activesupport (= 7.1.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.7.2) - actionview (= 7.0.7.2) - activesupport (= 7.0.7.2) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.2) + actionview (= 7.1.2) + activesupport (= 7.1.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.7.2) - actionpack (= 7.0.7.2) - activerecord (= 7.0.7.2) - activestorage (= 7.0.7.2) - activesupport (= 7.0.7.2) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.2) + actionpack (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.7.2) - activesupport (= 7.0.7.2) + actionview (7.1.2) + activesupport (= 7.1.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) active_admin_flat_skin (0.1.2) active_admin_theme (1.1.4) - active_model_serializers (0.10.13) - actionpack (>= 4.1, < 7.1) - activemodel (>= 4.1, < 7.1) + active_model_serializers (0.10.14) + actionpack (>= 4.1) + activemodel (>= 4.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) active_skin (0.0.13) - activeadmin (2.13.1) + activeadmin (3.1.0) arbre (~> 1.2, >= 1.2.1) - formtastic (>= 3.1, < 5.0) - formtastic_i18n (~> 0.4) + formtastic (>= 3.1) + formtastic_i18n (>= 0.4) inherited_resources (~> 1.7) - jquery-rails (~> 4.2) - kaminari (~> 1.0, >= 1.2.1) - railties (>= 6.1, < 7.1) - ransack (>= 2.1.1, < 4) - activejob (7.0.7.2) - activesupport (= 7.0.7.2) + jquery-rails (>= 4.2) + kaminari (>= 1.2.1) + railties (>= 6.1) + ransack (>= 4.0) + activejob (7.1.2) + activesupport (= 7.1.2) globalid (>= 0.3.6) - activemodel (7.0.7.2) - activesupport (= 7.0.7.2) + activemodel (7.1.2) + activesupport (= 7.1.2) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (7.0.7.2) - activemodel (= 7.0.7.2) - activesupport (= 7.0.7.2) - activestorage (7.0.7.2) - actionpack (= 7.0.7.2) - activejob (= 7.0.7.2) - activerecord (= 7.0.7.2) - activesupport (= 7.0.7.2) + activerecord (7.1.2) + activemodel (= 7.1.2) + activesupport (= 7.1.2) + timeout (>= 0.4.0) + activestorage (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activesupport (= 7.1.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.7.2) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) - arbre (1.6.0) - activesupport (>= 3.0.0, < 7.1) - ruby2_keywords (>= 0.0.2, < 1.0) + arbre (1.7.0) + activesupport (>= 3.0.0) + ruby2_keywords (>= 0.0.2) ast (2.4.2) autoprefixer-rails (10.4.2.0) execjs (~> 2) barnes (0.0.9) multi_json (~> 1) statsd-ruby (~> 1.1) - bcrypt (3.1.19) + base64 (0.2.0) + bcrypt (3.1.20) better_errors (2.10.1) erubi (>= 1.0.0) rack (>= 0.9.0) rouge (>= 1.0.0) + bigdecimal (3.1.4) bindex (0.8.1) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootsnap (1.16.0) + bootsnap (1.17.0) msgpack (~> 1.2) bootstrap (4.6.2) autoprefixer-rails (>= 9.1.0) popper_js (>= 1.16.1, < 2) sassc-rails (>= 2.0.0) builder (3.2.4) - bullet (7.0.7) + bullet (7.1.4) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) business_time (0.13.0) @@ -179,7 +168,7 @@ GEM ssrf_filter (~> 1.0) case_transform (0.2) activesupport - caxlsx (3.4.1) + caxlsx (4.0.0) htmlentities (~> 4.3, >= 4.3.4) marcel (~> 1.0) nokogiri (~> 1.10, >= 1.10.4) @@ -188,7 +177,7 @@ GEM actionpack (>= 3.1) caxlsx (>= 3.0) certified (1.0.0) - chartkick (5.0.2) + chartkick (5.0.4) chunky_png (1.4.0) codeclimate-test-reporter (1.0.7) simplecov @@ -198,7 +187,7 @@ GEM crack (0.4.5) rexml crass (1.0.6) - date (3.3.3) + date (3.3.4) debug_inspector (1.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) @@ -208,6 +197,11 @@ GEM railties (>= 4.1.0) responders warden (~> 1.2.3) + devise-two-factor (5.0.0) + activesupport (~> 7.0) + devise (~> 4.0) + railties (~> 7.0) + rotp (~> 6.0) diff-lcs (1.5.0) docile (1.4.0) docx (0.8.0) @@ -225,6 +219,8 @@ GEM request_store (>= 1.0) ruby2_keywords draper-cancancan (1.1.1) + drb (2.2.0) + ruby2_keywords em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) @@ -233,15 +229,15 @@ GEM erubi (1.12.0) erubis (2.7.0) eventmachine (1.2.7) - excon (0.100.0) - execjs (2.8.1) - factory_bot (6.2.1) + excon (0.105.0) + execjs (2.9.1) + factory_bot (6.4.2) activesupport (>= 5.0.0) - factory_bot_rails (6.2.0) - factory_bot (~> 6.2.0) + factory_bot_rails (6.4.2) + factory_bot (~> 6.4) railties (>= 5.0.0) - faker (2.14.0) - i18n (>= 1.6, < 2) + faker (2.23.0) + i18n (>= 1.8.11, < 2) faraday (0.17.6) multipart-post (>= 1.2, < 3) ffi (1.16.3) @@ -249,8 +245,8 @@ GEM sassc (>= 1.11) foreman (0.87.2) formatador (1.1.0) - formtastic (4.0.0) - actionpack (>= 5.2.0) + formtastic (5.0.0) + actionpack (>= 6.0.0) formtastic_i18n (0.7.0) github_api (0.18.2) addressable (~> 2.4) @@ -258,9 +254,9 @@ GEM faraday (~> 0.8) hashie (~> 3.5, >= 3.5.2) oauth2 (~> 1.0) - globalid (1.1.0) - activesupport (>= 5.0) - guard (2.18.0) + globalid (1.2.1) + activesupport (>= 6.1) + guard (2.18.1) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) lumberjack (>= 1.0.12, < 2.0) @@ -275,7 +271,7 @@ GEM guard (~> 2.8) guard-compat (~> 1.0) multi_json (~> 1.8) - has_scope (0.8.1) + has_scope (0.8.2) actionpack (>= 5.2) activesupport (>= 5.2) hashdiff (1.0.1) @@ -298,14 +294,18 @@ GEM image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) - inherited_resources (1.13.1) - actionpack (>= 5.2, < 7.1) - has_scope (~> 0.6) - railties (>= 5.2, < 7.1) - responders (>= 2, < 4) + inherited_resources (1.14.0) + actionpack (>= 6.0) + has_scope (>= 0.6) + railties (>= 6.0) + responders (>= 2) inline_svg (1.9.0) activesupport (>= 3.0) nokogiri (>= 1.6) + io-console (0.6.0) + irb (1.10.1) + rdoc + reline (>= 0.3.8) jquery-easing-rails (0.0.2) railties (>= 3.1.0) jquery-rails (4.6.0) @@ -315,9 +315,9 @@ GEM jquery-ui-rails (6.0.1) railties (>= 3.2.16) jquery_mask_rails (0.1.0) - json (2.6.3) - json-schema (2.8.1) - addressable (>= 2.4) + json (2.7.1) + json-schema (4.1.1) + addressable (>= 2.8) jsonapi-renderer (0.2.2) jwt (2.7.1) kaminari (1.2.2) @@ -347,10 +347,10 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lumberjack (1.2.8) + lumberjack (1.2.10) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -361,7 +361,6 @@ GEM method_source (1.0.0) mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.2) minitest (5.20.0) moneta (1.0.0) monetize (1.12.0) @@ -373,24 +372,21 @@ GEM monetize (~> 1.9) money (~> 6.13) railties (>= 3.0) - msgpack (1.7.1) + msgpack (1.7.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) nenv (0.3.0) - net-imap (0.3.6) + net-imap (0.4.7) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.4.0) net-protocol - nio4r (2.5.9) - nokogiri (1.14.5) - mini_portile2 (~> 2.8.0) - racc (~> 1.4) + nio4r (2.7.0) nokogiri (1.14.5-aarch64-linux) racc (~> 1.4) nokogiri (1.14.5-arm64-darwin) @@ -411,10 +407,10 @@ GEM rack (>= 1.2, < 4) orm_adapter (0.5.0) parallel (1.23.0) - parser (3.2.2.3) + parser (3.2.2.4) ast (~> 2.4.1) racc - pg (1.5.3) + pg (1.5.4) popper_js (1.16.1) pry (0.14.2) coderay (~> 1.1) @@ -424,29 +420,36 @@ GEM pry-remote (0.1.8) pry (~> 0.9) slop (~> 3.0) + psych (5.1.1.1) + stringio public_suffix (5.0.4) - puma (6.3.1) + puma (6.4.0) nio4r (~> 2.0) - racc (1.7.1) - rack (2.2.7) - rack-proxy (0.7.6) + racc (1.7.3) + rack (2.2.8) + rack-proxy (0.7.7) rack + rack-session (1.0.2) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.7.2) - actioncable (= 7.0.7.2) - actionmailbox (= 7.0.7.2) - actionmailer (= 7.0.7.2) - actionpack (= 7.0.7.2) - actiontext (= 7.0.7.2) - actionview (= 7.0.7.2) - activejob (= 7.0.7.2) - activemodel (= 7.0.7.2) - activerecord (= 7.0.7.2) - activestorage (= 7.0.7.2) - activesupport (= 7.0.7.2) + rackup (1.0.0) + rack (< 3) + webrick + rails (7.1.2) + actioncable (= 7.1.2) + actionmailbox (= 7.1.2) + actionmailer (= 7.1.2) + actionpack (= 7.1.2) + actiontext (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activemodel (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) bundler (>= 1.15.0) - railties (= 7.0.7.2) + railties (= 7.1.2) rails-ajax_redirect (1.0.1) jquery-rails railties @@ -454,7 +457,7 @@ GEM actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.1.1) + rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) @@ -464,37 +467,42 @@ GEM rails-i18n (7.0.8) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.7.2) - actionpack (= 7.0.7.2) - activesupport (= 7.0.7.2) - method_source + railties (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.0.6) - ransack (2.6.0) - activerecord (>= 6.0.4) - activesupport (>= 6.0.4) + rake (13.1.0) + ransack (4.1.1) + activerecord (>= 6.1.5) + activesupport (>= 6.1.5) i18n rate_throttle_client (0.1.2) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) + rdoc (6.6.1) + psych (>= 4.0.0) redis (4.8.1) - regexp_parser (2.8.1) + regexp_parser (2.8.3) + reline (0.4.1) + io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) - responders (3.1.0) + responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.5) - rollbar (3.4.0) + rexml (3.2.6) + rollbar (3.4.2) roo (2.9.0) nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) - rotp (6.2.2) - rouge (4.1.2) + rotp (6.3.0) + rouge (4.2.0) rqrcode (2.2.0) chunky_png (~> 1.0) rqrcode_core (~> 1.0) @@ -504,10 +512,10 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-rails (6.0.3) + rspec-rails (6.1.0) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) @@ -516,27 +524,29 @@ GEM rspec-mocks (~> 3.12) rspec-support (~> 3.12) rspec-support (3.12.1) - rswag-api (2.5.1) - railties (>= 3.1, < 7.1) - rswag-specs (2.5.1) - activesupport (>= 3.1, < 7.1) - json-schema (~> 2.2) - railties (>= 3.1, < 7.1) - rswag-ui (2.5.1) - actionpack (>= 3.1, < 7.1) - railties (>= 3.1, < 7.1) - rubocop (1.54.1) + rswag-api (2.13.0) + activesupport (>= 3.1, < 7.2) + railties (>= 3.1, < 7.2) + rswag-specs (2.13.0) + activesupport (>= 3.1, < 7.2) + json-schema (>= 2.2, < 5.0) + railties (>= 3.1, < 7.2) + rspec-core (>= 2.14) + rswag-ui (2.13.0) + actionpack (>= 3.1, < 7.2) + railties (>= 3.1, < 7.2) + rubocop (1.58.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) rubocop-faker (1.1.0) faker (>= 2.12.0) @@ -554,7 +564,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt - selenium-webdriver (4.10.0) + selenium-webdriver (4.16.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -577,7 +587,7 @@ GEM simplecov_json_formatter (0.1.4) slop (3.6.0) spring (3.1.1) - sprockets (4.2.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) @@ -586,36 +596,38 @@ GEM sprockets (>= 3.0.0) ssrf_filter (1.1.2) statsd-ruby (1.5.0) - tailwindcss-rails (2.0.30) - railties (>= 6.0.0) - tailwindcss-rails (2.0.30-aarch64-linux) + stringio (3.1.0) + tailwindcss-rails (2.0.32-aarch64-linux) railties (>= 6.0.0) - tailwindcss-rails (2.0.30-arm64-darwin) + tailwindcss-rails (2.0.32-arm64-darwin) railties (>= 6.0.0) - tailwindcss-rails (2.0.30-x86_64-darwin) + tailwindcss-rails (2.0.32-x86_64-darwin) railties (>= 6.0.0) - tailwindcss-rails (2.0.30-x86_64-linux) + tailwindcss-rails (2.0.32-x86_64-linux) railties (>= 6.0.0) - thor (1.2.2) + thor (1.3.0) thread_safe (0.3.6) - tilt (2.2.0) + tilt (2.3.0) timeliness (0.4.5) - timeout (0.4.0) + timeout (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) uniform_notifier (1.16.0) + validates_timeliness (7.0.0.beta2) + activemodel (>= 7.0.0, < 8) + timeliness (>= 0.3.10, < 1) vcr (6.2.0) warden (1.2.9) rack (>= 2.0.9) - web-console (4.2.0) + web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.18.1) + webmock (3.19.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -625,18 +637,17 @@ GEM railties (>= 5.2) semantic_range (>= 2.3.0) webrick (1.8.1) - websocket (1.2.9) + websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.6.12) PLATFORMS aarch64-linux arm64-darwin - ruby x86_64-darwin x86_64-linux @@ -646,7 +657,7 @@ DEPENDENCIES active_admin_theme active_model_serializers (~> 0.10.13) active_skin - activeadmin (~> 2.13.1) + activeadmin (> 2.13.1) autoprefixer-rails (~> 10.4.2.0) barnes better_errors @@ -665,15 +676,15 @@ DEPENDENCIES certified chartkick codeclimate-test-reporter - devise (~> 4.8.1) - devise-two-factor! + devise (~> 4.8.0) + devise-two-factor (~> 5.0.0) docx dotenv-rails (~> 2.7) draper draper-cancancan (~> 1.1.1) enumerize (~> 2.5.0) factory_bot_rails - faker (~> 2.14.0) + faker (~> 2.23.0) font-awesome-sass (~> 5.13) foreman github_api (~> 0.18.2) @@ -699,18 +710,18 @@ DEPENDENCIES pry-rails pry-remote (~> 0.1.8) puma - rails (~> 7.0.7) + rails (~> 7.1.1) rails-ajax_redirect rails-controller-testing rails-i18n - ransack (~> 2.3) + ransack (~> 4.0) rollbar roo (~> 2.9.0) rqrcode rspec-rails - rswag-api (~> 2.5.1) - rswag-specs (~> 2.5.1) - rswag-ui (~> 2.5.1) + rswag-api (~> 2.13.0) + rswag-specs (~> 2.13.0) + rswag-ui (~> 2.13.0) rubocop rubocop-faker (~> 1.1) sassc-rails @@ -723,14 +734,14 @@ DEPENDENCIES sprockets tailwindcss-rails (~> 2.0) uglifier - validates_timeliness (~> 6.0.0.beta2)! + validates_timeliness (>= 6.0.1) vcr web-console (~> 4.0) webmock webpacker (~> 5.1) RUBY VERSION - ruby 3.1.4p223 + ruby 3.2.2p53 BUNDLED WITH - 2.3.26 + 2.4.10 diff --git a/app/models/allocation.rb b/app/models/allocation.rb index ec444628d..ce83f55de 100644 --- a/app/models/allocation.rb +++ b/app/models/allocation.rb @@ -59,6 +59,13 @@ def user_punches .decorate end + def self.ransackable_attributes(auth_object = nil) + %w[ + created_at end_at hourly_rate_cents hourly_rate_currency id id_value + ongoing project_id start_at updated_at user_id + ] + end + private def end_before_start? diff --git a/app/models/city.rb b/app/models/city.rb index dd4a21e8e..c7eebf3c8 100644 --- a/app/models/city.rb +++ b/app/models/city.rb @@ -16,4 +16,8 @@ def to_s def holidays regional_holidays.to_formatted_hash end + + def self.ransackable_attributes(auth_object = nil) + %w[created_at id id_value name state_id updated_at] + end end diff --git a/app/models/contribution.rb b/app/models/contribution.rb index 98a9af0ac..2fca50d11 100644 --- a/app/models/contribution.rb +++ b/app/models/contribution.rb @@ -76,6 +76,18 @@ def update_rejected_reason(rejected_reason = "other_reason", reviewer_id) scope :by_created_at_from, ->(date) { where('created_at >= ?', date) if date.present? } scope :by_created_at_until, ->(date) { where('created_at <= ?', date) if date.present? } + def self.ransackable_attributes(auth_object = nil) + %w[ + created_at description id id_value link notes pending pr_state + rejected_reason repository_id reviewed_at reviewer_id state tracking + updated_at user_id + ] + end + + def self.ransackable_associations(auth_object = nil) + %w[repository reviewed_by users] + end + private def normalize_description_blank_value diff --git a/app/models/education_experience.rb b/app/models/education_experience.rb index 9a683e252..37f8da858 100644 --- a/app/models/education_experience.rb +++ b/app/models/education_experience.rb @@ -16,4 +16,10 @@ class EducationExperience < ApplicationRecord allow_nil: true scope :for_user, ->(user_id) { where(user_id:) } + + def self.ransackable_attributes(auth_object = nil) + %w[ + course created_at end_date id id_value institution start_date updated_at user_id + ] + end end diff --git a/app/models/evaluation.rb b/app/models/evaluation.rb index 7e329468b..fd792f973 100644 --- a/app/models/evaluation.rb +++ b/app/models/evaluation.rb @@ -28,6 +28,17 @@ class Evaluation < ApplicationRecord }, scope: :shallow, predicates: true + def self.ransackable_attributes(auth_object = nil) + %w[ + created_at english_level evaluated_id evaluation_date evaluator_id + id id_value observation questionnaire_id score updated_at + ] + end + + def self.ransackable_associations(auth_object = nil) + %w[answers evaluated evaluator questionnaire] + end + private def update_office_score diff --git a/app/models/office.rb b/app/models/office.rb index 6072a77a2..d342e1361 100644 --- a/app/models/office.rb +++ b/app/models/office.rb @@ -22,4 +22,10 @@ def calculate_score users_average_score = users_overall_scores.sum / users_overall_scores.size update(score: users_average_score.round(2)) end + + def self.ransackable_attributes(auth_object = nil) + %w[ + active city created_at head_id id id_value score updated_at users_count + ] + end end diff --git a/app/models/project.rb b/app/models/project.rb index ad98ba2aa..d1e2286d2 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -31,4 +31,8 @@ def enable! def to_s name end + + def self.ransackable_attributes(auth_object = nil) + %w[active created_at id id_value market name updated_at] + end end diff --git a/app/models/punch.rb b/app/models/punch.rb index c1c7169b7..3f007a5b3 100644 --- a/app/models/punch.rb +++ b/app/models/punch.rb @@ -68,6 +68,12 @@ def self.total all.reduce(0) { |a, e| a + e.delta } end + def self.ransackable_attributes(auth_object = nil) + %w[ + attachment comment created_at extra_hour from id id_value project_id to updated_at user_id + ] + end + private def mount_time(time_string) diff --git a/app/models/questionnaire.rb b/app/models/questionnaire.rb index be793d03b..91f9ff3f3 100644 --- a/app/models/questionnaire.rb +++ b/app/models/questionnaire.rb @@ -32,4 +32,8 @@ def toggle_active def to_s title end + + def self.ransackable_attributes(auth_object = nil) + %w[active created_at description id kind title updated_at] + end end diff --git a/app/models/regional_holiday.rb b/app/models/regional_holiday.rb index 04c0e2e76..9aa9edf4a 100644 --- a/app/models/regional_holiday.rb +++ b/app/models/regional_holiday.rb @@ -14,6 +14,14 @@ def cities_names cities.pluck(:name).to_sentence end + def self.ransackable_attributes(auth_object = nil) + %w[created_at day id id_value month name updated_at] + end + + def self.ransackable_associations(auth_object = nil) + %w[cities] + end + private def valid_date? diff --git a/app/models/repository.rb b/app/models/repository.rb index e77467be1..578769d72 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -14,4 +14,8 @@ def to_s end } scope :by_languages, ->(languages) { where(language: languages) if languages.present? } + + def self.ransackable_attributes(auth_object = nil) + %w[created_at description highlight id issues language link stars updated_at] + end end diff --git a/app/models/skill.rb b/app/models/skill.rb index 14bfea0e4..54c66854b 100644 --- a/app/models/skill.rb +++ b/app/models/skill.rb @@ -9,4 +9,8 @@ class Skill < ApplicationRecord uniqueness: { case_sensitive: false } scope :by_title_like, ->(title) { where("skills.title ILIKE ?", "%#{title}%") if title.present? } + + def self.ransackable_attributes(auth_object = nil) + %w[created_at id id_value title updated_at] + end end diff --git a/app/models/talk.rb b/app/models/talk.rb index 9523e578d..0c677d385 100644 --- a/app/models/talk.rb +++ b/app/models/talk.rb @@ -6,6 +6,12 @@ class Talk < ApplicationRecord validates :event_name, :talk_title, :date, presence: true validate :future_date? + def self.ransackable_attributes(auth_object = nil) + %w[ + created_at date event_name id id_value talk_title updated_at user_id + ] + end + private def future_date? diff --git a/app/models/user.rb b/app/models/user.rb index 159d7551e..3540d4897 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -105,6 +105,22 @@ def self.ransackable_scopes(_auth_object) [:by_skills_in] end + def self.ransackable_attributes(auth_object = nil) + %w[ + active allow_overtime backend_level city_id consumed_timestep updated_at + contract_company_country contract_type created_at email frontend_level + github id mentor_id name observation occupation office_id roles specialty + ] + end + + def self.ransackable_associations(auth_object = nil) + %w[ + allocations authored_notes city contributions education_experiences + evaluations managed_offices mentees mentor notes office vacations + professional_experiences projects punches skills talks user_skills + ] + end + def self.overall_score_average overall_scores = all.map(&:overall_score).compact diff --git a/app/models/vacation.rb b/app/models/vacation.rb index 4ae3b6717..f543dd5b0 100644 --- a/app/models/vacation.rb +++ b/app/models/vacation.rb @@ -82,7 +82,7 @@ def deny!(user) def cancel!(user) update!(status: :cancelled, denier: user) - end + end def cancelable? pending? || approved_within_cancel_range? @@ -92,6 +92,13 @@ def duration_days (start_date..end_date).count end + def self.ransackable_attributes(auth_object = nil) + %w[ + commercial_approver_id created_at denier_id end_date hr_approver_id + id id_value start_date status updated_at user_id + ] + end + private def approved_within_cancel_range? diff --git a/app/views/new_admin/users/_punches.html.erb b/app/views/new_admin/users/_punches.html.erb index a0694e764..2d60b9b4e 100644 --- a/app/views/new_admin/users/_punches.html.erb +++ b/app/views/new_admin/users/_punches.html.erb @@ -103,8 +103,8 @@ to = params.dig(:punch, :to) %>
- <%= form.date_field :from, value: :from, class: "mr-2 bg-gray-100 font-semibold rounded-lg text-gray-600 text-sm dark:bg-slate-700 dark:text-gray-400" %> - <%= form.date_field :to, value: :to, class: "bg-gray-100 font-semibold rounded-lg text-gray-600 text-sm dark:bg-slate-700 dark:text-gray-400" %> + <%= form.date_field :from, value: from, class: "mr-2 bg-gray-100 font-semibold rounded-lg text-gray-600 text-sm dark:bg-slate-700 dark:text-gray-400" %> + <%= form.date_field :to, value: to, class: "bg-gray-100 font-semibold rounded-lg text-gray-600 text-sm dark:bg-slate-700 dark:text-gray-400" %>
<%= form.submit "#{t('punches_filter.to_filter')}", formmethod: :get, class: "px-4 py-2 mr-2 cursor-pointer font-semibold text-sm text-white transition-colors duration-150 rounded-lg bg-primary-600 hover:bg-primary-700" %> <%= link_to "#{t('punches_filter.clean_filter')}", new_admin_show_user_path(@user, anchor: "user_punches"), class: "px-4 py-2 cursor-pointer font-semibold text-sm text-white transition-colors duration-150 rounded-lg bg-slate-700 hover:bg-gray-600" %> diff --git a/config/application.rb b/config/application.rb index 1ea20ae0a..9ae1cbc81 100644 --- a/config/application.rb +++ b/config/application.rb @@ -34,8 +34,6 @@ class Application < Rails::Application # Do not swallow errors in after_commit/after_rollback callbacks. config.active_job.queue_adapter = :sidekiq - config.active_record.legacy_connection_handling = false - config.load_defaults 7.0 config.generators.system_tests = nil diff --git a/spec/features/admin/evaluations_spec.rb b/spec/features/admin/evaluations_spec.rb index 0e1520f3c..0ffd1b561 100644 --- a/spec/features/admin/evaluations_spec.rb +++ b/spec/features/admin/evaluations_spec.rb @@ -82,8 +82,8 @@ within '#filters_sidebar_section' do expect(page).to have_css('label', text: 'Criado em') - fill_in 'q_created_at_gteq_datetime', with: 9.months.ago - fill_in 'q_created_at_lteq_datetime', with: 7.months.ago + fill_in 'q_created_at_gteq', with: 9.months.ago + fill_in 'q_created_at_lteq', with: 7.months.ago click_button 'Filtrar' end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 6d595c620..c13ee14ed 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -21,7 +21,7 @@ end RSpec.configure do |config| - config.fixture_path = "#{::Rails.root}/spec/fixtures" + config.fixture_paths = ["#{::Rails.root}/spec/fixtures"] config.include IntegrationHelpers, type: :feature config.include ActiveSupport::Testing::TimeHelpers config.include AbstractController::Translation