diff --git a/.rubocop.yml b/.rubocop.yml index a2791b457..e3306ee3d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,7 @@ require: rubocop-rails AllCops: - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 NewCops: enable Exclude: - "bin/**/*" @@ -39,7 +39,7 @@ Metrics/PerceivedComplexity: # Some blocks are longer. Metrics/BlockLength: - ExcludedMethods: + AllowedMethods: - "namespace" - "create_table" Exclude: @@ -168,6 +168,11 @@ Style/Documentation: Naming/BinaryOperatorParameterName: Enabled: false +# Defining constants in tests is fine, and it's good to have them close to the test where they are used. +Lint/ConstantDefinitionInBlock: + Exclude: + - "spec/**/*" + # There are valid cases, for example debugging Cucumber steps, # also they'll fail CI anyway Lint/Debugger: diff --git a/Gemfile b/Gemfile index 93930b7e7..b803c5488 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rails", "6.1.6.1" +gem "rails", "6.1.7.4" # needed for actionmailer, can be removed when upgrading to rails 7 gem "net-imap", require: false @@ -11,30 +11,30 @@ gem "net-smtp", require: false # Legacy Rails features, remove me! # responders (class level) -gem "responders", "3.0.1" +gem "responders", "3.1.0" # Appserver -gem "puma", "5.6.5", require: false +gem "puma", "6.3.0", require: false # Federation -gem "diaspora_federation-json_schema", "1.0.1" -gem "diaspora_federation-rails", "1.0.1" +gem "diaspora_federation-json_schema", "1.1.0" +gem "diaspora_federation-rails", "1.1.0" # API and JSON gem "acts_as_api", "1.0.1" -gem "json", "2.6.2" -gem "json-schema", "3.0.0" +gem "json", "2.6.3" +gem "json-schema", "4.0.0" gem "yajl-ruby", "1.4.3" # Authentication -gem "devise", "4.8.1" +gem "devise", "4.9.2" gem "devise_lastseenable", "0.0.6" -gem "devise-two-factor", "4.0.2" -gem "rqrcode", "2.1.1" +gem "devise-two-factor", "4.1.0" +gem "rqrcode", "2.2.0" # Captcha @@ -42,29 +42,29 @@ gem "simple_captcha2", "0.5.0", require: "simple_captcha" # Background processing -gem "redis", "4.7.0" -gem "sidekiq", "6.5.1" +gem "redis-client", "0.14.1" +gem "sidekiq", "7.1.2" # Scheduled processing -gem "sidekiq-cron", "1.6.0" +gem "sidekiq-cron", "1.10.1" # Compression -gem "terser", "1.1.10" +gem "terser", "1.1.16" # Configuration gem "configurate", "0.5.0" -gem "toml-rb", "2.1.2" +gem "toml-rb", "2.2.0" # Cross-origin resource sharing -gem "rack-cors", "1.1.1", require: "rack/cors" +gem "rack-cors", "2.0.1", require: "rack/cors" # CSS -gem "autoprefixer-rails", "10.4.7.0" +gem "autoprefixer-rails", "10.4.13.0" gem "bootstrap-sass", "3.4.1" gem "bootstrap-switch-rails", "3.3.3" # 3.3.4 and 3.3.5 is broken, see https://github.com/Bttstrp/bootstrap-switch/issues/691 gem "sassc-rails", "2.1.2" @@ -73,19 +73,19 @@ gem "sprockets-rails", "3.4.2" # Database group :mysql, optional: true do - gem "mysql2", "0.5.4" + gem "mysql2", "0.5.5" end group :postgresql, optional: true do - gem "pg", "1.4.1" + gem "pg", "1.5.3" end -gem "activerecord-import", "1.4.0" +gem "activerecord-import", "1.4.1" # File uploading gem "carrierwave", "2.2.4" -gem "fog-aws", "3.14.0" -gem "mini_magick", "4.11.0" +gem "fog-aws", "3.19.0" +gem "mini_magick", "4.12.0" # GUID generation gem "uuid", "2.3.9" @@ -97,21 +97,21 @@ gem "handlebars_assets", "0.23.9" gem "jquery-rails", "4.5.0" gem "jquery-ui-rails", "5.0.5" gem "js_image_paths", "0.2.0" -gem "js-routes", "2.2.4" +gem "js-routes", "2.2.5" # Localization gem "http_accept_language", "2.1.1" -gem "rails-i18n", "6.0.0" +gem "rails-i18n", "7.0.7" # Map -gem "leaflet-rails", "1.7.0" +gem "leaflet-rails", "1.9.3" # Parsing -gem "nokogiri", "1.13.7" +gem "nokogiri", "1.15.2" gem "open_graph_reader", "0.7.2" # also update User-Agent in features/support/webmock.rb and open_graph_cache_spec.rb -gem "redcarpet", "3.5.1" +gem "redcarpet", "3.6.0" gem "ruby-oembed", "0.16.1" gem "twitter-text", "3.1.0" @@ -121,23 +121,23 @@ gem "string-direction", "1.2.2" # Security Headers -gem "secure_headers", "6.3.3" +gem "secure_headers", "6.5.0" # Services -gem "omniauth", "2.1.0" +gem "omniauth", "2.1.1" gem "omniauth-rails_csrf_protection", "1.0.1" gem "omniauth-tumblr", "1.2" gem "omniauth-twitter", "1.4.0" gem "omniauth-wordpress", "0.2.2" -gem "twitter", "7.0.0" +gem "twitter", "8.0.0" # OpenID Connect -gem "openid_connect", "1.3.0" +gem "openid_connect", "2.2.0" # Serializers -gem "active_model_serializers", "0.9.8" +gem "active_model_serializers", "0.9.9" # Tags @@ -145,19 +145,20 @@ gem "acts-as-taggable-on", "9.0.1" # URIs and HTTP -gem "addressable", "2.8.0", require: "addressable/uri" -gem "faraday", "1.10.0" +gem "addressable", "2.8.4", require: "addressable/uri" +gem "faraday", "2.7.7" gem "faraday-cookie_jar", "0.0.7" gem "faraday-follow_redirects", "0.3.0" +gem "faraday-typhoeus", "1.0.0", require: false gem "typhoeus", "1.4.0" # Views gem "gon", "6.4.0" -gem "hamlit", "2.16.0" +gem "hamlit", "3.0.3" gem "mobile-fu", "1.4.0" gem "rails-timeago", "2.20.0" -gem "will_paginate", "3.3.1" +gem "will_paginate", "4.0.0" # Logging @@ -172,7 +173,7 @@ gem "rubyzip", "2.3.2", require: "zip" # https://github.com/gitlabhq/gitlabhq/issues/3826 # https://github.com/gitlabhq/gitlabhq/pull/3852 # https://github.com/discourse/discourse/pull/238 -gem "minitest", "5.15.0" +gem "minitest", "5.18.1" gem "versionist", "2.0.1" @@ -193,30 +194,30 @@ group :production do # we don"t install these on travis to speed up test runs # Third party asset hosting - gem "asset_sync", "2.15.2", require: false + gem "asset_sync", "2.18.0", require: false end group :development do # Linters - gem "haml_lint", "0.40.0", require: false - gem "pronto", "0.11.0", require: false - gem "pronto-eslint", "0.11.0", require: false + gem "haml_lint", "0.46.0", require: false + gem "pronto", "0.11.1", require: false + gem "pronto-eslint", "0.11.1", require: false gem "pronto-haml", "0.11.1", require: false - gem "pronto-rubocop", "0.11.1", require: false + gem "pronto-rubocop", "0.11.5", require: false gem "pronto-scss", "0.11.0", require: false - gem "rubocop", "0.93.1", require: false - gem "rubocop-rails", "2.9.1", require: false + gem "rubocop", "1.53.1", require: false + gem "rubocop-rails", "2.20.2", require: false # Debugging gem "pry" gem "pry-byebug" # test coverage - gem "simplecov", "0.21.2", require: false + gem "simplecov", "0.22.0", require: false gem "turbo_dev_assets", "0.0.2" - gem "listen", "3.7.1" + gem "listen", "3.8.0" end group :test do @@ -230,26 +231,26 @@ group :test do gem "capybara", "3.39.2" gem "cuprite", "0.14.3" - gem "database_cleaner-active_record", "2.0.1" + gem "database_cleaner-active_record", "2.1.0" gem "cucumber-api-steps", "0.14", require: false # General helpers gem "factory_bot_rails", "6.2.0" - gem "shoulda-matchers", "4.5.1" - gem "timecop", "0.9.5" - gem "webmock", "3.14.0", require: false + gem "shoulda-matchers", "5.3.0" + gem "timecop", "0.9.6" + gem "webmock", "3.18.1", require: false - gem "diaspora_federation-test", "1.0.1" + gem "diaspora_federation-test", "1.1.0" end group :development, :test do # RSpec (unit tests, some integration tests) - gem "rspec-rails", "5.1.2" + gem "rspec-rails", "6.0.3" # Cucumber (integration tests) - gem "cucumber-rails", "2.5.1", require: false + gem "cucumber-rails", "2.6.1", require: false # Jasmine (client side application tests (JS)) gem "chrome_remote", "0.3.0" diff --git a/Gemfile.lock b/Gemfile.lock index 2c2a72f3c..8c42eeda0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,65 +1,65 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.6.1) - actionpack (= 6.1.6.1) - activesupport (= 6.1.6.1) + actioncable (6.1.7.4) + actionpack (= 6.1.7.4) + activesupport (= 6.1.7.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.6.1) - actionpack (= 6.1.6.1) - activejob (= 6.1.6.1) - activerecord (= 6.1.6.1) - activestorage (= 6.1.6.1) - activesupport (= 6.1.6.1) + actionmailbox (6.1.7.4) + actionpack (= 6.1.7.4) + activejob (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) mail (>= 2.7.1) - actionmailer (6.1.6.1) - actionpack (= 6.1.6.1) - actionview (= 6.1.6.1) - activejob (= 6.1.6.1) - activesupport (= 6.1.6.1) + actionmailer (6.1.7.4) + actionpack (= 6.1.7.4) + actionview (= 6.1.7.4) + activejob (= 6.1.7.4) + activesupport (= 6.1.7.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.6.1) - actionview (= 6.1.6.1) - activesupport (= 6.1.6.1) + actionpack (6.1.7.4) + actionview (= 6.1.7.4) + activesupport (= 6.1.7.4) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.6.1) - actionpack (= 6.1.6.1) - activerecord (= 6.1.6.1) - activestorage (= 6.1.6.1) - activesupport (= 6.1.6.1) + actiontext (6.1.7.4) + actionpack (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) nokogiri (>= 1.8.5) - actionview (6.1.6.1) - activesupport (= 6.1.6.1) + actionview (6.1.7.4) + activesupport (= 6.1.7.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - active_model_serializers (0.9.8) + active_model_serializers (0.9.9) activemodel (>= 3.2) concurrent-ruby (~> 1.0) - activejob (6.1.6.1) - activesupport (= 6.1.6.1) + activejob (6.1.7.4) + activesupport (= 6.1.7.4) globalid (>= 0.3.6) - activemodel (6.1.6.1) - activesupport (= 6.1.6.1) - activerecord (6.1.6.1) - activemodel (= 6.1.6.1) - activesupport (= 6.1.6.1) - activerecord-import (1.4.0) + activemodel (6.1.7.4) + activesupport (= 6.1.7.4) + activerecord (6.1.7.4) + activemodel (= 6.1.7.4) + activesupport (= 6.1.7.4) + activerecord-import (1.4.1) activerecord (>= 4.2) - activestorage (6.1.6.1) - actionpack (= 6.1.6.1) - activejob (= 6.1.6.1) - activerecord (= 6.1.6.1) - activesupport (= 6.1.6.1) + activestorage (6.1.7.4) + actionpack (= 6.1.7.4) + activejob (= 6.1.7.4) + activerecord (= 6.1.7.4) + activesupport (= 6.1.7.4) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.6.1) + activesupport (6.1.7.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -71,31 +71,31 @@ GEM activemodel (>= 3.0.0) activesupport (>= 3.0.0) rack (>= 1.1.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.4) + public_suffix (>= 2.0.2, < 6.0) aes_key_wrap (1.1.0) - asset_sync (2.15.2) + asset_sync (2.18.0) activemodel (>= 4.1.0) fog-core mime-types (>= 2.99) unf ast (2.4.2) - attr_encrypted (3.1.0) + attr_encrypted (4.0.0) encryptor (~> 3.0.0) attr_required (1.0.1) - autoprefixer-rails (10.4.7.0) + autoprefixer-rails (10.4.13.0) execjs (~> 2) babel-source (5.8.35) babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) execjs (~> 2.0) - bcrypt (3.1.18) + bcrypt (3.1.19) bindata (2.4.15) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) bootstrap-switch-rails (3.3.3) - buftok (0.2.0) + buftok (0.3.0) builder (3.2.4) byebug (11.1.3) capybara (3.39.2) @@ -143,86 +143,80 @@ GEM coderay (1.1.3) concurrent-ruby (1.2.2) configurate (0.5.0) - connection_pool (2.2.5) + connection_pool (2.4.1) crack (0.4.5) rexml crass (1.0.6) - cucumber (7.1.0) + cucumber (8.0.0) builder (~> 3.2, >= 3.2.4) - cucumber-core (~> 10.1, >= 10.1.0) - cucumber-create-meta (~> 6.0, >= 6.0.1) - cucumber-cucumber-expressions (~> 14.0, >= 14.0.0) - cucumber-gherkin (~> 22.0, >= 22.0.0) - cucumber-html-formatter (~> 17.0, >= 17.0.0) - cucumber-messages (~> 17.1, >= 17.1.1) - cucumber-wire (~> 6.2, >= 6.2.0) - diff-lcs (~> 1.4, >= 1.4.4) - mime-types (~> 3.3, >= 3.3.1) - multi_test (~> 0.1, >= 0.1.2) + cucumber-ci-environment (~> 9.0, >= 9.0.4) + cucumber-core (~> 11.0, >= 11.0.0) + cucumber-cucumber-expressions (~> 15.1, >= 15.1.1) + cucumber-gherkin (~> 23.0, >= 23.0.1) + cucumber-html-formatter (~> 19.1, >= 19.1.0) + cucumber-messages (~> 18.0, >= 18.0.0) + diff-lcs (~> 1.5, >= 1.5.0) + mime-types (~> 3.4, >= 3.4.1) + multi_test (~> 1.1, >= 1.1.0) sys-uname (~> 1.2, >= 1.2.2) cucumber-api-steps (0.14.0) cucumber (>= 2.0.2) jsonpath (>= 0.1.2) - cucumber-core (10.1.1) - cucumber-gherkin (~> 22.0, >= 22.0.0) - cucumber-messages (~> 17.1, >= 17.1.1) + cucumber-ci-environment (9.2.0) + cucumber-core (11.0.0) + cucumber-gherkin (~> 23.0, >= 23.0.1) + cucumber-messages (~> 18.0, >= 18.0.0) cucumber-tag-expressions (~> 4.1, >= 4.1.0) - cucumber-create-meta (6.0.4) - cucumber-messages (~> 17.1, >= 17.1.1) - sys-uname (~> 1.2, >= 1.2.2) - cucumber-cucumber-expressions (14.0.0) - cucumber-gherkin (22.0.0) - cucumber-messages (~> 17.1, >= 17.1.1) - cucumber-html-formatter (17.0.0) - cucumber-messages (~> 17.1, >= 17.1.0) - cucumber-messages (17.1.1) - cucumber-rails (2.5.1) + cucumber-cucumber-expressions (15.2.0) + cucumber-gherkin (23.0.1) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-html-formatter (19.2.0) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-messages (18.0.0) + cucumber-rails (2.6.1) capybara (>= 2.18, < 4) - cucumber (>= 3.2, < 8) + cucumber (>= 3.2, < 9) mime-types (~> 3.3) nokogiri (~> 1.10) railties (>= 5.0, < 8) rexml (~> 3.0) webrick (~> 1.7) cucumber-tag-expressions (4.1.0) - cucumber-wire (6.2.1) - cucumber-core (~> 10.1, >= 10.1.0) - cucumber-cucumber-expressions (~> 14.0, >= 14.0.0) cuprite (0.14.3) capybara (~> 3.0) ferrum (~> 0.13.0) - database_cleaner-active_record (2.0.1) + database_cleaner-active_record (2.1.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) date (3.3.3) - devise (4.8.1) + devise (4.9.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-two-factor (4.0.2) + devise-two-factor (4.1.0) activesupport (< 7.1) - attr_encrypted (>= 1.3, < 4, != 2) + attr_encrypted (>= 1.3, < 5, != 2) devise (~> 4.0) railties (< 7.1) rotp (~> 6.0) devise_lastseenable (0.0.6) devise rails (>= 3.0.4) - diaspora_federation (1.0.1) + diaspora_federation (1.1.0) faraday (>= 1.0, < 3) faraday-follow_redirects (~> 0.3) nokogiri (~> 1.6, >= 1.6.8) typhoeus (~> 1.0) valid (~> 1.0) - diaspora_federation-json_schema (1.0.1) - diaspora_federation-rails (1.0.1) + diaspora_federation-json_schema (1.1.0) + diaspora_federation-rails (1.1.0) actionpack (>= 5.2, < 8) - diaspora_federation (= 1.0.1) - diaspora_federation-test (1.0.1) - diaspora_federation (= 1.0.1) + diaspora_federation (= 1.1.0) + diaspora_federation-test (1.1.0) + diaspora_federation (= 1.1.0) fabrication (~> 2.29) uuid (~> 2.3, >= 2.3.8) diff-lcs (1.5.0) @@ -231,16 +225,16 @@ GEM unf (>= 0.0.5, < 1.0.0) encryptor (3.0.0) equalizer (0.0.11) - erubi (1.10.0) + erubi (1.12.0) eslintrb (2.1.0) execjs multi_json (>= 1.3) rake et-orbi (1.2.7) tzinfo - ethon (0.15.0) + ethon (0.16.0) ffi (>= 1.15.0) - excon (0.92.3) + excon (0.100.0) execjs (2.8.1) eye (0.10.0) celluloid (~> 0.17.3) @@ -248,40 +242,24 @@ GEM kostya-sigar (~> 2.0.0) state_machines thor - fabrication (2.29.0) + fabrication (2.30.0) factory_bot (6.2.1) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faraday (1.10.0) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) + faraday (2.7.7) + faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) http-cookie (~> 1.0.0) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) faraday-follow_redirects (0.3.0) faraday (>= 1, < 3) - faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) + faraday-net_http (3.0.2) + faraday-typhoeus (1.0.0) + faraday (~> 2.0) + typhoeus (~> 1.4) ferrum (0.13) addressable (~> 2.5) concurrent-ruby (~> 1.1) @@ -295,7 +273,7 @@ GEM activerecord (>= 2) activesupport (>= 2) hashdiff - fog-aws (3.14.0) + fog-aws (3.19.0) fog-core (~> 2.1) fog-json (~> 1.1) fog-xml (~> 0.1) @@ -311,32 +289,33 @@ GEM fog-core nokogiri (>= 1.5.11, < 2.0.0) formatador (1.1.0) - fugit (1.5.3) + fugit (1.8.1) et-orbi (~> 1, >= 1.2.7) raabro (~> 1.4) fuubar (2.5.1) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) - gitlab (4.18.0) - httparty (~> 0.18) + gitlab (4.19.0) + httparty (~> 0.20) terminal-table (>= 1.5.1) - globalid (1.0.0) + globalid (1.1.0) activesupport (>= 5.0) gon (6.4.0) actionpack (>= 3.0.20) i18n (>= 0.7) multi_json request_store (>= 1.0) - haml (5.2.2) - temple (>= 0.8.0) + haml (6.1.1) + temple (>= 0.8.2) + thor tilt - haml_lint (0.40.0) - haml (>= 4.0, < 5.3) + haml_lint (0.46.0) + haml (>= 4.0, < 6.2) parallel (~> 1.10) rainbow - rubocop (>= 0.50.0) + rubocop (>= 1.0) sysexits (~> 1.1) - hamlit (2.16.0) + hamlit (3.0.3) temple (>= 0.8.2) thor tilt @@ -346,25 +325,21 @@ GEM tilt (>= 1.2) hashdiff (1.0.1) hashie (5.0.0) - http (4.4.1) - addressable (~> 2.3) + http (5.1.1) + addressable (~> 2.8) http-cookie (~> 1.0) http-form_data (~> 2.2) - http-parser (~> 1.2.0) + llhttp-ffi (~> 0.4.0) http-cookie (1.0.5) domain_name (~> 0.5) http-form_data (2.3.0) - http-parser (1.2.3) - ffi-compiler (>= 1.0, < 2.0) http_accept_language (2.1.1) - http_parser.rb (0.6.0) - httparty (0.20.0) - mime-types (~> 3.0) + httparty (0.21.0) + mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - httpclient (2.8.3) i18n (1.14.1) concurrent-ruby (~> 1.0) - idn-ruby (0.1.0) + idn-ruby (0.1.5) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) @@ -382,41 +357,49 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (5.0.5) railties (>= 3.2.16) - js-routes (2.2.4) + js-routes (2.2.5) railties (>= 4) js_image_paths (0.2.0) rails (>= 4.0, < 8.0) sprockets (>= 3.0.0) - json (2.6.2) - json-jwt (1.15.3) + json (2.6.3) + json-jwt (1.16.3) activesupport (>= 4.2) aes_key_wrap bindata - httpclient - json-schema (3.0.0) + faraday (~> 2.0) + faraday-follow_redirects + json-schema (4.0.0) addressable (>= 2.8) - jsonpath (1.1.2) + jsonpath (1.1.3) multi_json jwt (2.7.1) kostya-sigar (2.0.10) - leaflet-rails (1.7.0) + language_server-protocol (3.17.0.3) + leaflet-rails (1.9.3) rails (>= 4.2.0) - listen (3.7.1) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) little-plugger (1.1.4) + llhttp-ffi (0.4.0) + ffi-compiler (~> 1.0) + rake (~> 13.0) logging (2.3.1) little-plugger (~> 1.1) multi_json (~> 1.14) logging-rails (0.6.0) logging (>= 1.8) - loofah (2.18.0) + loofah (2.21.3) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) macaddr (1.7.2) systemu (~> 2.6.5) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) matrix (0.4.2) memoizable (0.4.2) @@ -424,21 +407,21 @@ GEM method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) - mini_magick (4.11.0) + mime-types-data (3.2023.0218.1) + mini_magick (4.12.0) mini_mime (1.1.2) mini_portile2 (2.8.2) - minitest (5.15.0) + minitest (5.18.1) mobile-fu (1.4.0) rack-mobile-detect rails multi_json (1.15.0) - multi_test (0.1.2) + multi_test (1.1.0) multi_xml (0.6.0) - multipart-post (2.2.3) - mysql2 (0.5.4) + multipart-post (2.3.0) + mysql2 (0.5.5) naught (1.1.0) - net-imap (0.3.4) + net-imap (0.3.6) date net-protocol net-pop (0.1.2) @@ -447,22 +430,27 @@ GEM timeout net-smtp (0.3.3) net-protocol - nio4r (2.5.8) - nokogiri (1.13.7) - mini_portile2 (~> 2.8.0) + nio4r (2.5.9) + nokogiri (1.15.2) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - oauth (0.5.10) - oauth2 (2.0.2) + oauth (1.1.0) + oauth-tty (~> 1.0, >= 1.0.1) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + oauth-tty (1.0.5) + version_gem (~> 1.1, >= 1.1.1) + oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) multi_xml (~> 0.5) - rack (>= 1.2, < 3) - rash_alt (>= 0.4, < 1) - version_gem (~> 1.0) - octokit (4.22.0) - faraday (>= 0.9) - sawyer (~> 0.8.0, >= 0.5.3) - omniauth (2.1.0) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + octokit (6.1.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) + omniauth (2.1.1) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection @@ -486,89 +474,94 @@ GEM open_graph_reader (0.7.2) faraday (>= 0.9.0) nokogiri (~> 1.6) - openid_connect (1.3.0) + openid_connect (2.2.0) activemodel attr_required (>= 1.0.0) - json-jwt (>= 1.5.0) - rack-oauth2 (>= 1.6.1) - swd (>= 1.0.0) + faraday (~> 2.0) + faraday-follow_redirects + json-jwt (>= 1.16) + net-smtp + rack-oauth2 (~> 2.2) + swd (~> 2.0) tzinfo validate_email validate_url - webfinger (>= 1.0.1) + webfinger (~> 2.0) orm_adapter (0.5.0) - parallel (1.22.1) - parser (3.1.2.0) + parallel (1.23.0) + parser (3.2.2.3) ast (~> 2.4.1) - pg (1.4.1) + racc + pg (1.5.3) phantomjs (2.1.1.0) - pronto (0.11.0) - gitlab (~> 4.4, >= 4.4.0) - httparty (>= 0.13.7) - octokit (~> 4.7, >= 4.7.0) + pronto (0.11.1) + gitlab (>= 4.4.0, < 5.0) + httparty (>= 0.13.7, < 1.0) + octokit (>= 4.7.0, < 7.0) rainbow (>= 2.2, < 4.0) - rexml (~> 3.2) - rugged (>= 0.23.0, < 1.1.0) + rexml (>= 3.2.5, < 4.0) + rugged (>= 0.23.0, < 2.0) thor (>= 0.20.3, < 2.0) - pronto-eslint (0.11.0) + pronto-eslint (0.11.1) eslintrb (~> 2.0, >= 2.0.0) pronto (~> 0.11.0) pronto-haml (0.11.1) haml_lint (~> 0.23) pronto (~> 0.11.0) - pronto-rubocop (0.11.1) + pronto-rubocop (0.11.5) pronto (~> 0.11.0) rubocop (>= 0.63.1, < 2.0) pronto-scss (0.11.0) pronto (~> 0.11.0) scss_lint (~> 0.43, >= 0.43.0) - pry (0.14.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.8.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.10) - public_suffix (4.0.7) - puma (5.6.5) + pry (>= 0.13, < 0.15) + public_suffix (5.0.1) + puma (6.3.0) nio4r (~> 2.0) raabro (1.4.0) - racc (1.7.0) + racc (1.7.1) rack (2.2.7) - rack-cors (1.1.1) + rack-cors (2.0.1) rack (>= 2.0.0) rack-google-analytics (1.2.0) actionpack activesupport rack-mobile-detect (0.4.0) rack - rack-oauth2 (1.19.0) + rack-oauth2 (2.2.0) activesupport attr_required - httpclient + faraday (~> 2.0) + faraday-follow_redirects json-jwt (>= 1.11.0) rack (>= 2.1.0) rack-piwik (0.3.0) - rack-protection (2.2.0) + rack-protection (3.0.6) rack rack-rewrite (1.5.1) rack-ssl (1.4.1) rack rack-test (2.1.0) rack (>= 1.3) - rails (6.1.6.1) - actioncable (= 6.1.6.1) - actionmailbox (= 6.1.6.1) - actionmailer (= 6.1.6.1) - actionpack (= 6.1.6.1) - actiontext (= 6.1.6.1) - actionview (= 6.1.6.1) - activejob (= 6.1.6.1) - activemodel (= 6.1.6.1) - activerecord (= 6.1.6.1) - activestorage (= 6.1.6.1) - activesupport (= 6.1.6.1) + rails (6.1.7.4) + actioncable (= 6.1.7.4) + actionmailbox (= 6.1.7.4) + actionmailer (= 6.1.7.4) + actionpack (= 6.1.7.4) + actiontext (= 6.1.7.4) + actionview (= 6.1.7.4) + activejob (= 6.1.7.4) + activemodel (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) bundler (>= 1.15.0) - railties (= 6.1.6.1) + railties (= 6.1.7.4) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -577,81 +570,83 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) - rails-i18n (6.0.0) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rails-i18n (7.0.7) i18n (>= 0.7, < 2) - railties (>= 6.0.0, < 7) + railties (>= 6.0.0, < 8) rails-timeago (2.20.0) actionpack (>= 5.2) activesupport (>= 5.2) - railties (6.1.6.1) - actionpack (= 6.1.6.1) - activesupport (= 6.1.6.1) + railties (6.1.7.4) + actionpack (= 6.1.7.4) + activesupport (= 6.1.7.4) method_source rake (>= 12.2) thor (~> 1.0) rainbow (3.1.1) rake (13.0.6) - rash_alt (0.4.12) - hashie (>= 3.4) - rb-fsevent (0.11.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - redcarpet (3.5.1) - redis (4.7.0) + redcarpet (3.6.0) + redis-client (0.14.1) + connection_pool regexp_parser (2.8.1) request_store (1.5.1) rack (>= 1.4) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + responders (3.1.0) + actionpack (>= 5.2) + railties (>= 5.2) rexml (3.2.5) - rotp (6.2.0) - rqrcode (2.1.1) + rotp (6.2.2) + rqrcode (2.2.0) chunky_png (~> 1.0) rqrcode_core (~> 1.0) rqrcode_core (1.2.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-json_expectations (2.2.0) - rspec-mocks (3.11.1) + rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-rails (5.1.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.11.0) - rubocop (0.93.1) + rspec-support (~> 3.12.0) + rspec-rails (6.0.3) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) + rspec-support (3.12.1) + rubocop (1.53.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8) - rexml - rubocop-ast (>= 0.6.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.17.0) - parser (>= 3.1.1.0) - rubocop-rails (2.9.1) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) + rubocop-rails (2.20.2) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.90.0, < 2.0) + rubocop (>= 1.33.0, < 2.0) ruby-oembed (0.16.1) - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) ruby-vips (2.1.4) ffi (~> 1.12) ruby2_keywords (0.0.5) rubyzip (2.3.2) - rugged (1.0.1) + rugged (1.6.3) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -665,25 +660,27 @@ GEM sprockets (> 3.0) sprockets-rails tilt - sawyer (0.8.2) + sawyer (0.9.2) addressable (>= 2.3.5) - faraday (> 0.8, < 2.0) + faraday (>= 0.17.3, < 3) scss_lint (0.60.0) sass (~> 3.5, >= 3.5.5) - secure_headers (6.3.3) - shoulda-matchers (4.5.1) - activesupport (>= 4.2.0) - sidekiq (6.5.1) - connection_pool (>= 2.2.2) - rack (~> 2.0) - redis (>= 4.2.0) - sidekiq-cron (1.6.0) - fugit (~> 1) - sidekiq (>= 4.2.1) + secure_headers (6.5.0) + shoulda-matchers (5.3.0) + activesupport (>= 5.2.0) + sidekiq (7.1.2) + concurrent-ruby (< 2) + connection_pool (>= 2.3.0) + rack (>= 2.2.4) + redis-client (>= 0.14.0) + sidekiq-cron (1.10.1) + fugit (~> 1.8) + globalid (>= 1.0.1) + sidekiq (>= 6) simple_captcha2 (0.5.0) rails (>= 4.1) simple_oauth (0.3.1) - simplecov (0.21.2) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) @@ -691,9 +688,12 @@ GEM simplecov_json_formatter (0.1.4) sinon-rails (1.15.0) railties (>= 3.1) - sprockets (4.1.1) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) @@ -701,35 +701,36 @@ GEM ssrf_filter (1.1.1) state_machines (0.5.0) string-direction (1.2.2) - swd (1.3.0) + swd (2.0.2) activesupport (>= 3) attr_required (>= 0.0.5) - httpclient (>= 2.4) - sys-uname (1.2.2) + faraday (~> 2.0) + faraday-follow_redirects + sys-uname (1.2.3) ffi (~> 1.1) sysexits (1.2.0) systemu (2.6.5) - temple (0.8.2) + temple (0.10.2) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - terser (1.1.10) + terser (1.1.16) execjs (>= 0.3.0, < 3) - thor (1.2.1) + thor (1.2.2) thread_safe (0.3.6) - tilt (2.0.10) - timecop (0.9.5) - timeout (0.3.2) - timers (4.3.3) - toml-rb (2.1.2) + tilt (2.2.0) + timecop (0.9.6) + timeout (0.4.0) + timers (4.3.5) + toml-rb (2.2.0) citrus (~> 3.0, > 3.0) turbo_dev_assets (0.0.2) - twitter (7.0.0) + twitter (8.0.0) addressable (~> 2.3) - buftok (~> 0.2.0) + buftok (~> 0.3.0) equalizer (~> 0.0.11) - http (~> 4.0) - http-form_data (~> 2.0) - http_parser.rb (~> 0.6.0) + http (~> 5.1) + http-form_data (~> 2.3) + llhttp-ffi (~> 0.4.0) memoizable (~> 0.4.0) multipart-post (~> 2.0) naught (~> 1.0) @@ -744,7 +745,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.8.2) - unicode-display_width (1.8.0) + unicode-display_width (2.4.2) uuid (2.3.9) macaddr (~> 1.0) valid (1.2.0) @@ -754,43 +755,43 @@ GEM validate_url (1.0.15) activemodel (>= 3.0.0) public_suffix - version_gem (1.1.0) + version_gem (1.1.3) versionist (2.0.1) activesupport (>= 3) railties (>= 3) yard (~> 0.9.20) warden (1.2.9) rack (>= 2.0.9) - webfinger (1.2.0) + webfinger (2.1.2) activesupport - httpclient (>= 2.4) - webmock (3.14.0) + faraday (~> 2.0) + faraday-follow_redirects + webmock (3.18.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.7.0) + webrick (1.8.1) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - will_paginate (3.3.1) + will_paginate (4.0.0) xpath (3.2.0) nokogiri (~> 1.8) yajl-ruby (1.4.3) - yard (0.9.28) - webrick (~> 1.7.0) + yard (0.9.34) zeitwerk (2.6.8) PLATFORMS ruby DEPENDENCIES - active_model_serializers (= 0.9.8) - activerecord-import (= 1.4.0) + active_model_serializers (= 0.9.9) + activerecord-import (= 1.4.1) acts-as-taggable-on (= 9.0.1) acts_as_api (= 1.0.1) - addressable (= 2.8.0) - asset_sync (= 2.15.2) - autoprefixer-rails (= 10.4.7.0) + addressable (= 2.8.4) + asset_sync (= 2.18.0) + autoprefixer-rails (= 10.4.13.0) babel-transpiler (= 0.7.0) bootstrap-sass (= 3.4.1) bootstrap-switch-rails (= 3.3.3) @@ -799,103 +800,104 @@ DEPENDENCIES chrome_remote (= 0.3.0) configurate (= 0.5.0) cucumber-api-steps (= 0.14) - cucumber-rails (= 2.5.1) + cucumber-rails (= 2.6.1) cuprite (= 0.14.3) - database_cleaner-active_record (= 2.0.1) - devise (= 4.8.1) - devise-two-factor (= 4.0.2) + database_cleaner-active_record (= 2.1.0) + devise (= 4.9.2) + devise-two-factor (= 4.1.0) devise_lastseenable (= 0.0.6) - diaspora_federation-json_schema (= 1.0.1) - diaspora_federation-rails (= 1.0.1) - diaspora_federation-test (= 1.0.1) + diaspora_federation-json_schema (= 1.1.0) + diaspora_federation-rails (= 1.1.0) + diaspora_federation-test (= 1.1.0) eye (= 0.10.0) factory_bot_rails (= 6.2.0) - faraday (= 1.10.0) + faraday (= 2.7.7) faraday-cookie_jar (= 0.0.7) faraday-follow_redirects (= 0.3.0) + faraday-typhoeus (= 1.0.0) fixture_builder (= 0.5.2) - fog-aws (= 3.14.0) + fog-aws (= 3.19.0) fuubar (= 2.5.1) gon (= 6.4.0) - haml_lint (= 0.40.0) - hamlit (= 2.16.0) + haml_lint (= 0.46.0) + hamlit (= 3.0.3) handlebars_assets (= 0.23.9) http_accept_language (= 2.1.1) jasmine (= 3.10.0) jasmine-jquery-rails (= 2.0.3) jquery-rails (= 4.5.0) jquery-ui-rails (= 5.0.5) - js-routes (= 2.2.4) + js-routes (= 2.2.5) js_image_paths (= 0.2.0) - json (= 2.6.2) - json-schema (= 3.0.0) - leaflet-rails (= 1.7.0) - listen (= 3.7.1) + json (= 2.6.3) + json-schema (= 4.0.0) + leaflet-rails (= 1.9.3) + listen (= 3.8.0) logging-rails (= 0.6.0) - mini_magick (= 4.11.0) - minitest (= 5.15.0) + mini_magick (= 4.12.0) + minitest (= 5.18.1) mobile-fu (= 1.4.0) - mysql2 (= 0.5.4) + mysql2 (= 0.5.5) net-imap net-pop net-smtp - nokogiri (= 1.13.7) - omniauth (= 2.1.0) + nokogiri (= 1.15.2) + omniauth (= 2.1.1) omniauth-rails_csrf_protection (= 1.0.1) omniauth-tumblr (= 1.2) omniauth-twitter (= 1.4.0) omniauth-wordpress (= 0.2.2) open_graph_reader (= 0.7.2) - openid_connect (= 1.3.0) - pg (= 1.4.1) - pronto (= 0.11.0) - pronto-eslint (= 0.11.0) + openid_connect (= 2.2.0) + pg (= 1.5.3) + pronto (= 0.11.1) + pronto-eslint (= 0.11.1) pronto-haml (= 0.11.1) - pronto-rubocop (= 0.11.1) + pronto-rubocop (= 0.11.5) pronto-scss (= 0.11.0) pry pry-byebug - puma (= 5.6.5) - rack-cors (= 1.1.1) + puma (= 6.3.0) + rack-cors (= 2.0.1) rack-google-analytics (= 1.2.0) rack-piwik (= 0.3.0) rack-rewrite (= 1.5.1) rack-ssl (= 1.4.1) - rails (= 6.1.6.1) + rails (= 6.1.7.4) rails-controller-testing (= 1.0.5) - rails-i18n (= 6.0.0) + rails-i18n (= 7.0.7) rails-timeago (= 2.20.0) - redcarpet (= 3.5.1) - redis (= 4.7.0) - responders (= 3.0.1) - rqrcode (= 2.1.1) + redcarpet (= 3.6.0) + redis-client (= 0.14.1) + responders (= 3.1.0) + rqrcode (= 2.2.0) rspec-json_expectations (~> 2.1) - rspec-rails (= 5.1.2) - rubocop (= 0.93.1) - rubocop-rails (= 2.9.1) + rspec-rails (= 6.0.3) + rubocop (= 1.53.1) + rubocop-rails (= 2.20.2) ruby-oembed (= 0.16.1) rubyzip (= 2.3.2) sassc-rails (= 2.1.2) - secure_headers (= 6.3.3) - shoulda-matchers (= 4.5.1) - sidekiq (= 6.5.1) - sidekiq-cron (= 1.6.0) + secure_headers (= 6.5.0) + shoulda-matchers (= 5.3.0) + sidekiq (= 7.1.2) + sidekiq-cron (= 1.10.1) simple_captcha2 (= 0.5.0) - simplecov (= 0.21.2) + simplecov (= 0.22.0) sinon-rails (= 1.15.0) sprockets-rails (= 3.4.2) string-direction (= 1.2.2) - terser (= 1.1.10) - timecop (= 0.9.5) - toml-rb (= 2.1.2) + terser (= 1.1.16) + timecop (= 0.9.6) + toml-rb (= 2.2.0) turbo_dev_assets (= 0.0.2) - twitter (= 7.0.0) + twitter (= 8.0.0) twitter-text (= 3.1.0) typhoeus (= 1.4.0) uuid (= 2.3.9) versionist (= 2.0.1) - webmock (= 3.14.0) - will_paginate (= 3.3.1) + webmock (= 3.18.1) + will_paginate (= 4.0.0) yajl-ruby (= 1.4.3) BUNDLED WITH diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index c6a5f516c..65486642d 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -30,7 +30,7 @@ class InvitationsController < ApplicationController session[:invalid_email_invites] = invalid_emails unless valid_emails.empty? - Workers::Mail::InviteEmail.perform_async(valid_emails.join(","), current_user.id, inviter_params) + Workers::Mail::InviteEmail.perform_async(valid_emails.join(","), current_user.id, inviter_params.to_h) end if emails.empty? diff --git a/app/workers/archive_base.rb b/app/workers/archive_base.rb index 6b8b38a82..b6b2001e7 100644 --- a/app/workers/archive_base.rb +++ b/app/workers/archive_base.rb @@ -31,7 +31,7 @@ module Workers !(Process.pid.to_s == process_id.split(":")[1] && Thread.current.object_id.to_s(36) == thread_id) && ArchiveBase.subclasses.map(&:to_s).include?(work["payload"]["class"]) end - rescue Redis::CannotConnectError + rescue RedisClient::CannotConnectError # If code gets to this point and there is no Redis conenction, we're # running in a Test environment and have not mocked Sidekiq::Workers, so # we're not testing the concurrency-limiting behavior. diff --git a/config/initializers/faraday.rb b/config/initializers/faraday.rb index 76f9d0a32..8896d48eb 100644 --- a/config/initializers/faraday.rb +++ b/config/initializers/faraday.rb @@ -6,7 +6,7 @@ # Use net_http in test, that's better supported by webmock unless Rails.env.test? - require 'typhoeus/adapters/faraday' + require "faraday/typhoeus" Faraday.default_adapter = :typhoeus end diff --git a/config/initializers/will_paginate.rb b/config/initializers/will_paginate.rb index f48c76cbd..46c24b49d 100644 --- a/config/initializers/will_paginate.rb +++ b/config/initializers/will_paginate.rb @@ -1,13 +1,13 @@ # frozen_string_literal: true -require 'will_paginate/array' +require "will_paginate/array" # Optional for Bootstrap :renderer => WillPaginate::ActionView::BootstrapLinkRenderer # https://github.com/yrgoldteeth/bootstrap-will_paginate module WillPaginate module ActionView - def will_paginate(collection = nil, options = {} ) + def will_paginate(collection=nil, options={}) options, collection = collection, nil if collection.is_a? Hash # Taken from original will_paginate code to handle if the helper is not passed a collection object. collection ||= infer_collection_from_controller @@ -23,15 +23,19 @@ module WillPaginate end def page_number(page) - tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page) + tag :li, link(page, page, rel: rel_value(page)), class: ("active" if page == current_page) end def gap - tag :li, link(super, '#'), :class => 'disabled' + tag :li, link(super, "#"), class: "disabled" end - def previous_or_next_page(page, text, classname) - tag :li, link(text, page || '#'), :class => [classname[0..3], classname, ('disabled' unless page)].join(' ') + def previous_or_next_page(page, text, classname, aria_label=nil) + tag :li, link(text, page || "#"), + { + class: [classname[0..3], classname, ("disabled" unless page)].join(" "), + "aria-label": aria_label + } end end end diff --git a/script/server b/script/server index aee6cf4f5..af68b8f18 100755 --- a/script/server +++ b/script/server @@ -128,7 +128,8 @@ if [ -n "$redis_url" ] then redis_param="url: '$redis_url'" fi -if [ "$(bin/bundle exec ruby -e "require 'redis'; puts Redis.new($redis_param).ping" 2> /dev/null | grep -vE "is not writable|as your home directory temporarily" )" != "PONG" ] +echo $redis_param +if [ "$(bin/bundle exec ruby -e "require 'redis-client'; puts RedisClient.config($redis_param).new_client.call('PING')" 2> /dev/null | grep -vE "is not writable|as your home directory temporarily" )" != "PONG" ] then fatal "Can't connect to redis. Please check if it's running and if environment.redis is configured correctly in $CONFIG_FILE." fi diff --git a/spec/controllers/invitations_controller_spec.rb b/spec/controllers/invitations_controller_spec.rb index 87232f401..f7cf2dfc9 100644 --- a/spec/controllers/invitations_controller_spec.rb +++ b/spec/controllers/invitations_controller_spec.rb @@ -39,7 +39,7 @@ describe InvitationsController, type: :controller do it "creates an InviteEmail worker" do expect(Workers::Mail::InviteEmail).to receive(:perform_async).with( - emails, alice.id, invite_params[:email_inviter] + emails, alice.id, invite_params[:email_inviter].stringify_keys ) post :create, params: invite_params end @@ -85,7 +85,7 @@ describe InvitationsController, type: :controller do it "creates an InviteEmail worker" do expect(Workers::Mail::InviteEmail).to receive(:perform_async).with( - valid_emails, alice.id, invite_params[:email_inviter] + valid_emails, alice.id, invite_params[:email_inviter].stringify_keys ) post :create, params: invite_params end