diff --git a/Gemfile.lock b/Gemfile.lock index 9b763f59b31c5c..a91d46310ddd99 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,21 +8,21 @@ GIT GEM remote: https://rubygems.org/ specs: - actionmailer (6.0.3.3) - actionpack (= 6.0.3.3) - actionview (= 6.0.3.3) - activejob (= 6.0.3.3) + actionmailer (6.0.3.5) + actionpack (= 6.0.3.5) + actionview (= 6.0.3.5) + activejob (= 6.0.3.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.3.3) - actionview (= 6.0.3.3) - activesupport (= 6.0.3.3) + actionpack (6.0.3.5) + actionview (= 6.0.3.5) + activesupport (= 6.0.3.5) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.3.3) - activesupport (= 6.0.3.3) + actionview (6.0.3.5) + activesupport (= 6.0.3.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -31,15 +31,15 @@ GEM actionview (>= 6.0.a) active_model_serializers (0.8.4) activemodel (>= 3.0) - activejob (6.0.3.3) - activesupport (= 6.0.3.3) + activejob (6.0.3.5) + activesupport (= 6.0.3.5) globalid (>= 0.3.6) - activemodel (6.0.3.3) - activesupport (= 6.0.3.3) - activerecord (6.0.3.3) - activemodel (= 6.0.3.3) - activesupport (= 6.0.3.3) - activesupport (6.0.3.3) + activemodel (6.0.3.5) + activesupport (= 6.0.3.5) + activerecord (6.0.3.5) + activemodel (= 6.0.3.5) + activesupport (= 6.0.3.5) + activesupport (6.0.3.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -51,24 +51,24 @@ GEM activerecord (>= 3.2, < 7.0) rake (>= 10.4, < 14.0) ast (2.4.2) - aws-eventstream (1.1.0) - aws-partitions (1.390.0) - aws-sdk-core (3.109.2) + aws-eventstream (1.1.1) + aws-partitions (1.432.0) + aws-sdk-core (3.112.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.39.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-kms (1.42.0) + aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.83.2) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-s3 (1.90.0) + aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sdk-sns (1.35.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-sns (1.38.0) + aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.2) + aws-sigv4 (1.2.3) aws-eventstream (~> 1, >= 1.0.2) barber (0.12.2) ember-source (>= 1.0, < 3.1) @@ -82,7 +82,7 @@ GEM bootsnap (1.7.2) msgpack (~> 1.0) builder (3.2.4) - bullet (6.1.3) + bullet (6.1.4) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) @@ -113,7 +113,9 @@ GEM jquery-rails (>= 1.0.17) railties (>= 3.1) discourse-ember-source (3.12.2.2) - discourse-fonts (0.0.6) + discourse-fonts (0.0.7) + discourse_dev (0.0.3) + faker (~> 2.16) discourse_image_optim (0.26.2) exifr (~> 1.2, >= 1.2.2) fspath (~> 3.0) @@ -135,6 +137,8 @@ GEM execjs (2.7.0) exifr (1.3.9) fabrication (2.21.1) + faker (2.16.0) + i18n (>= 1.6, < 2) fakeweb (1.3.0) faraday (1.3.0) faraday-net_http (~> 1.0) @@ -143,8 +147,8 @@ GEM faraday-net_http (1.0.1) fast_blank (1.0.0) fast_xs (0.8.0) - fastimage (2.2.2) - ffi (1.14.2) + fastimage (2.2.3) + ffi (1.15.0) fspath (3.1.2) gc_tracer (1.5.1) globalid (0.4.2) @@ -169,7 +173,7 @@ GEM json (2.5.1) json-schema (2.8.1) addressable (>= 2.4) - json_schemer (0.2.17) + json_schemer (0.2.18) ecma-re-validator (~> 0.3) hana (~> 1.3) regexp_parser (~> 2.0) @@ -193,7 +197,7 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - logster (2.9.5) + logster (2.9.6) loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -213,7 +217,7 @@ GEM mini_sql (1.0.1) mini_suffix (0.3.2) ffi (~> 1.9) - minitest (5.14.3) + minitest (5.14.4) mocha (1.12.0) mock_redis (0.27.3) ruby2_keywords @@ -222,15 +226,15 @@ GEM multi_xml (0.6.0) multipart-post (2.1.1) mustache (1.1.1) - nio4r (2.5.5) - nokogiri (1.11.1) + nio4r (2.5.7) + nokogiri (1.11.2) mini_portile2 (~> 2.5.0) racc (~> 1.4) - nokogiri (1.11.1-arm64-darwin) + nokogiri (1.11.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.11.1-x86_64-darwin) + nokogiri (1.11.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.11.1-x86_64-linux) + nokogiri (1.11.2-x86_64-linux) racc (~> 1.4) nokogumbo (2.0.4) nokogiri (~> 1.8, >= 1.8.4) @@ -264,7 +268,7 @@ GEM omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack - onebox (2.2.2) + onebox (2.2.8) addressable (~> 2.7.0) htmlentities (~> 4.3) multi_json (~> 1.11) @@ -276,7 +280,7 @@ GEM openssl (~> 2.0) optimist (3.0.1) parallel (1.20.1) - parallel_tests (3.4.0) + parallel_tests (3.5.2) parallel parser (3.0.0.0) ast (~> 2.4.1) @@ -291,7 +295,7 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) - puma (5.2.1) + puma (5.2.2) nio4r (~> 2.0) r2 (0.2.7) racc (1.5.2) @@ -314,9 +318,9 @@ GEM rails_multisite (2.5.0) activerecord (> 5.0, < 7) railties (> 5.0, < 7) - railties (6.0.3.3) - actionpack (= 6.0.3.3) - activesupport (= 6.0.3.3) + railties (6.0.3.5) + actionpack (= 6.0.3.5) + activesupport (= 6.0.3.5) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -334,7 +338,7 @@ GEM redis (4.2.5) redis-namespace (1.8.1) redis (>= 3.0.4) - regexp_parser (2.0.3) + regexp_parser (2.1.1) request_store (1.5.0) rack (>= 1.4) rexml (3.2.4) @@ -359,10 +363,10 @@ GEM rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-rails (4.0.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) + rspec-rails (5.0.0) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) rspec-core (~> 3.10) rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) @@ -373,7 +377,7 @@ GEM json-schema (~> 2.2) railties (>= 3.1, < 7.0) rtlit (0.0.5) - rubocop (1.10.0) + rubocop (1.11.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -434,7 +438,7 @@ GEM sprockets (>= 3.0.0) sshkey (2.0.0) stackprof (0.2.16) - test-prof (1.0.1) + test-prof (1.0.2) thor (1.1.0) thread_safe (0.3.6) tilt (2.0.10) @@ -449,9 +453,9 @@ GEM unicorn (5.8.0) kgio (~> 2.6) raindrops (~> 0.7) - uniform_notifier (1.13.2) + uniform_notifier (1.14.1) uri_template (0.7.0) - webmock (3.11.2) + webmock (3.12.1) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -471,14 +475,14 @@ PLATFORMS x86_64-linux DEPENDENCIES - actionmailer (= 6.0.3.3) - actionpack (= 6.0.3.3) - actionview (= 6.0.3.3) + actionmailer (= 6.0.3.5) + actionpack (= 6.0.3.5) + actionview (= 6.0.3.5) actionview_precompiler active_model_serializers (~> 0.8.3) - activemodel (= 6.0.3.3) - activerecord (= 6.0.3.3) - activesupport (= 6.0.3.3) + activemodel (= 6.0.3.5) + activerecord (= 6.0.3.5) + activesupport (= 6.0.3.5) addressable annotate aws-sdk-s3 @@ -499,6 +503,7 @@ DEPENDENCIES discourse-ember-rails (= 0.18.6) discourse-ember-source (~> 3.12.2) discourse-fonts + discourse_dev discourse_image_optim email_reply_trimmer ember-handlebars-template (= 0.8.0) @@ -556,7 +561,7 @@ DEPENDENCIES rack-protection rails_failover rails_multisite - railties (= 6.0.3.3) + railties (= 6.0.3.5) rake rb-fsevent rbtrace @@ -596,4 +601,4 @@ DEPENDENCIES yaml-lint BUNDLED WITH - 2.2.6 + 2.2.7 diff --git a/app/assets/javascripts/discourse/app/models/category.js b/app/assets/javascripts/discourse/app/models/category.js index b6b84f4634f62b..0963302e8203a0 100644 --- a/app/assets/javascripts/discourse/app/models/category.js +++ b/app/assets/javascripts/discourse/app/models/category.js @@ -330,7 +330,7 @@ Category.reopenClass({ return _uncategorized; }, - slugFor(category, separator = "/", depth = 3) { + slugFor(category, separator = "/", depth) { if (!category) { return ""; } @@ -338,9 +338,12 @@ Category.reopenClass({ const parentCategory = get(category, "parentCategory"); let result = ""; - if (parentCategory && depth > 1) { - result = - Category.slugFor(parentCategory, separator, depth - 1) + separator; + if (parentCategory) { + if (typeof depth === 'undefined') { + result = Category.slugFor(parentCategory, separator) + separator; + } else if (depth > 1) { + result = Category.slugFor(parentCategory, separator, depth - 1) + separator; + } } const id = get(category, "id"), diff --git a/config/site_settings.yml b/config/site_settings.yml index 7481295072d546..f51da5b5467875 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -257,7 +257,7 @@ basic: client: true default: 2 min: 2 - max: 3 + max: 7 hidden: true enable_mobile_theme: client: true