From 679398b160ccb36674b2b21ccf79896daf2d9f70 Mon Sep 17 00:00:00 2001 From: talyz Date: Fri, 26 Nov 2021 13:39:50 +0100 Subject: nodejs: Provide a static v8 library output Since building nodejs also builds v8, one way to get a static v8 library is to manually assemble it from the leftover object files. This seems like an easier way to get an up-to-date v8 library than trying to keep the v8 package updated. --- pkgs/development/web/nodejs/nodejs.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 3f0f0e78e07a1..56c83e38c4ffb 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -58,6 +58,10 @@ let nativeBuildInputs = [ which pkg-config python ] ++ optionals stdenv.isDarwin [ xcbuild ]; + outputs = [ "out" "libv8" ]; + setOutputFlags = false; + moveToDev = false; + configureFlags = let isCross = stdenv.hostPlatform != stdenv.buildPlatform; inherit (stdenv.hostPlatform) gcc isAarch32; @@ -130,6 +134,35 @@ let # install the missing headers for node-gyp cp -r ${concatStringsSep " " copyLibHeaders} $out/include/node + + # assemble a static v8 library and put it in the 'libv8' output + mkdir -p $libv8/lib + pushd out/Release/obj.target + find . -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" | sort -u >files + ${if stdenv.buildPlatform.isGnu then '' + ar -cqs $libv8/lib/libv8.a @files + '' else '' + cat files | while read -r file; do + ar -cqS $libv8/lib/libv8.a $file + done + ''} + popd + + # copy v8 headers + cp -r deps/v8/include $libv8/ + + # create a pkgconfig file for v8 + major=$(grep V8_MAJOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) + minor=$(grep V8_MINOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) + patch=$(grep V8_PATCH_LEVEL deps/v8/include/v8-version.h | cut -d ' ' -f 3) + mkdir -p $libv8/lib/pkgconfig + cat > $libv8/lib/pkgconfig/v8.pc << EOF + Name: v8 + Description: V8 JavaScript Engine + Version: $major.$minor.$patch + Libs: -L$libv8/lib -lv8 -pthread -licui18n + Cflags: -I$libv8/include + EOF '' + optionalString (stdenv.isDarwin && enableNpm) '' sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' $out/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py ''; -- cgit 1.4.1 From e2415dbb8f091ef8846a94f06ff72d075f0f912f Mon Sep 17 00:00:00 2001 From: talyz Date: Fri, 26 Nov 2021 13:54:45 +0100 Subject: discourse: 2.7.9 -> 2.8.0.beta9 Update to the latest beta, since upstream advocates for it. See https://github.com/NixOS/nixpkgs/issues/146308 for more info. --- nixos/modules/services/web-apps/discourse.nix | 8 +- .../web-apps/discourse/auto_generated_path.patch | 4 +- pkgs/servers/web-apps/discourse/default.nix | 32 +- pkgs/servers/web-apps/discourse/rubyEnv/Gemfile | 45 ++- .../web-apps/discourse/rubyEnv/Gemfile.lock | 269 ++++++------ pkgs/servers/web-apps/discourse/rubyEnv/gemset.nix | 450 ++++++++++++--------- pkgs/servers/web-apps/discourse/update.py | 2 +- 7 files changed, 448 insertions(+), 362 deletions(-) diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix index c4fb7e2b316f8..1c7ffd59a596e 100644 --- a/nixos/modules/services/web-apps/discourse.nix +++ b/nixos/modules/services/web-apps/discourse.nix @@ -621,12 +621,13 @@ in max_user_api_reqs_per_minute = 20; max_user_api_reqs_per_day = 2880; - max_admin_api_reqs_per_key_per_minute = 60; + max_admin_api_reqs_per_minute = 60; max_reqs_per_ip_per_minute = 200; max_reqs_per_ip_per_10_seconds = 50; max_asset_reqs_per_ip_per_10_seconds = 200; max_reqs_per_ip_mode = "block"; max_reqs_rate_limit_on_private = false; + skip_per_ip_rate_limit_trust_level = 1; force_anonymous_min_queue_seconds = 1; force_anonymous_min_per_10_seconds = 3; background_requests_max_queue_length = 0.5; @@ -646,6 +647,9 @@ in enable_email_sync_demon = false; max_digests_enqueued_per_30_mins_per_site = 10000; cluster_name = null; + multisite_config_path = "config/multisite.yml"; + enable_long_polling = null; + long_polling_interval = null; }; services.redis.enable = lib.mkDefault (cfg.redis.host == "localhost"); @@ -825,7 +829,7 @@ in appendHttpConfig = '' # inactive means we keep stuff around for 1440m minutes regardless of last access (1 week) - # levels means it is a 2 deep heirarchy cause we can have lots of files + # levels means it is a 2 deep hierarchy cause we can have lots of files # max_size limits the size of the cache proxy_cache_path /var/cache/nginx inactive=1440m levels=1:2 keys_zone=discourse:10m max_size=600m; diff --git a/pkgs/servers/web-apps/discourse/auto_generated_path.patch b/pkgs/servers/web-apps/discourse/auto_generated_path.patch index 9dcb1cb5595e9..e63d4a283a74d 100644 --- a/pkgs/servers/web-apps/discourse/auto_generated_path.patch +++ b/pkgs/servers/web-apps/discourse/auto_generated_path.patch @@ -1,8 +1,8 @@ diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb -index 380a63e987..b2ce7fa982 100644 +index e59a6fbc05..c773a1356e 100644 --- a/lib/plugin/instance.rb +++ b/lib/plugin/instance.rb -@@ -403,7 +403,7 @@ class Plugin::Instance +@@ -447,7 +447,7 @@ class Plugin::Instance end def auto_generated_path diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 9206d39a3466d..62e9be80bcd9a 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -1,22 +1,22 @@ { stdenv, pkgs, makeWrapper, runCommand, lib, writeShellScript , fetchFromGitHub, bundlerEnv, callPackage -, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk +, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk, nettools , imagemagick, optipng, pngquant, libjpeg, jpegoptim, gifsicle, jhead -, libpsl, redis, postgresql, which, brotli, procps, rsync -, nodePackages, v8 +, libpsl, redis, postgresql, which, brotli, procps, rsync, icu +, nodePackages, nodejs-16_x , plugins ? [] }@args: let - version = "2.7.9"; + version = "2.8.0.beta9"; src = fetchFromGitHub { owner = "discourse"; repo = "discourse"; rev = "v${version}"; - sha256 = "sha256-SOERjFbG4l/tUfOl51XEW0nVbza3L4adjiPhz4Hj0YU="; + sha256 = "sha256-cTedMbf0N50ysRQqA9Fm1WQmI5J5hsqDSi2JZIa49jg="; }; runtimeDeps = [ @@ -33,6 +33,7 @@ let procps # For ps and kill util-linux # For renice gawk + nettools # For hostname # Image optimization imagemagick @@ -110,16 +111,21 @@ let gems = import ./rubyEnv/gemset.nix; in gems // { + mini_racer = gems.mini_racer // { + buildInputs = [ icu ]; + dontBuild = false; + NIX_LDFLAGS = "-licui18n"; + }; libv8-node = let noopScript = writeShellScript "noop" "exit 0"; linkFiles = writeShellScript "link-files" '' cd ../.. - mkdir -p vendor/v8/out.gn/libv8/obj/ - ln -s "${v8}/lib/libv8.a" vendor/v8/out.gn/libv8/obj/libv8_monolith.a + mkdir -p vendor/v8/${stdenv.hostPlatform.system}/libv8/obj/ + ln -s "${nodejs-16_x.libv8}/lib/libv8.a" vendor/v8/${stdenv.hostPlatform.system}/libv8/obj/libv8_monolith.a - ln -s ${v8}/include vendor/v8/include + ln -s ${nodejs-16_x.libv8}/include vendor/v8/include mkdir -p ext/libv8-node echo '--- !ruby/object:Libv8::Node::Location::Vendor {}' >ext/libv8-node/.location.yml @@ -155,13 +161,9 @@ let pname = "discourse-assets"; inherit version src; - nativeBuildInputs = [ - rubyEnv.wrappedRuby + nativeBuildInputs = runtimeDeps ++ [ postgresql redis - which - brotli - procps nodePackages.uglify-js nodePackages.terser ]; @@ -255,10 +257,6 @@ let # one constructed by bundlerEnv ./plugin_gem_api_version.patch - # Use mv instead of rename, since rename doesn't work across - # device boundaries - ./use_mv_instead_of_rename.patch - # Change the path to the auto generated plugin assets, which # defaults to the plugin's directory and isn't writable at the # time of asset generation diff --git a/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile b/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile index 71ee3f910c0ea..9cdfbf21a9d8c 100644 --- a/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile +++ b/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile @@ -18,13 +18,14 @@ else # this allows us to include the bits of rails we use without pieces we do not. # # To issue a rails update bump the version number here - gem 'actionmailer', '6.1.3.2' - gem 'actionpack', '6.1.3.2' - gem 'actionview', '6.1.3.2' - gem 'activemodel', '6.1.3.2' - gem 'activerecord', '6.1.3.2' - gem 'activesupport', '6.1.3.2' - gem 'railties', '6.1.3.2' + rails_version = '6.1.4.1' + gem 'actionmailer', rails_version + gem 'actionpack', rails_version + gem 'actionview', rails_version + gem 'activemodel', rails_version + gem 'activerecord', rails_version + gem 'activesupport', rails_version + gem 'railties', rails_version gem 'sprockets-rails' end @@ -60,8 +61,6 @@ gem 'redis-namespace' # better maintained living fork gem 'active_model_serializers', '~> 0.8.3' -gem 'onebox' - gem 'http_accept_language', require: false # Ember related gems need to be pinned cause they control client side @@ -90,9 +89,7 @@ gem 'unf', require: false gem 'email_reply_trimmer' -# Forked until https://github.com/toy/image_optim/pull/162 is merged -# https://github.com/discourse/image_optim -gem 'discourse_image_optim', require: 'image_optim' +gem 'image_optim' gem 'multi_json' gem 'mustache' gem 'nokogiri' @@ -108,7 +105,10 @@ gem 'omniauth-oauth2', require: false gem 'omniauth-google-oauth2' -gem 'oj' +# Pinning oj until https://github.com/ohler55/oj/issues/699 is resolved. +# Segfaults and stuck processes after upgrading. +gem 'oj', '3.13.2' + gem 'pg' gem 'mini_sql' gem 'pry-rails', require: false @@ -169,6 +169,8 @@ group :test, :development do gem 'parallel_tests' gem 'rswag-specs' + + gem 'annotate' end group :development do @@ -177,8 +179,16 @@ group :development do gem 'better_errors', platform: :mri, require: !!ENV['BETTER_ERRORS'] gem 'binding_of_caller' gem 'yaml-lint' - gem 'annotate' - gem 'discourse_dev' +end + +if ENV["ALLOW_DEV_POPULATE"] == "1" + gem 'discourse_dev_assets' + gem 'faker', "~> 2.16" +else + group :development do + gem 'discourse_dev_assets' + gem 'faker', "~> 2.16" + end end # this is an optional gem, it provides a high performance replacement @@ -205,6 +215,9 @@ gem 'gc_tracer', require: false, platform: :mri # required for feed importing and embedding gem 'ruby-readability', require: false +# rss gem is a bundled gem from Ruby 3 onwards +gem 'rss', require: false + gem 'stackprof', require: false, platform: :mri gem 'memory_profiler', require: false, platform: :mri @@ -231,6 +244,8 @@ gem 'sshkey', require: false gem 'rchardet', require: false gem 'lz4-ruby', require: false, platform: :ruby +gem 'sanitize' + if ENV["IMPORT"] == "1" gem 'mysql2' gem 'redcarpet' diff --git a/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile.lock b/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile.lock index 0b83d34833925..3a3217224cf60 100644 --- a/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile.lock +++ b/pkgs/servers/web-apps/discourse/rubyEnv/Gemfile.lock @@ -8,22 +8,22 @@ GIT GEM remote: https://rubygems.org/ specs: - actionmailer (6.1.3.2) - actionpack (= 6.1.3.2) - actionview (= 6.1.3.2) - activejob (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionmailer (6.1.4.1) + actionpack (= 6.1.4.1) + actionview (= 6.1.4.1) + activejob (= 6.1.4.1) + activesupport (= 6.1.4.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3.2) - actionview (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionpack (6.1.4.1) + actionview (= 6.1.4.1) + activesupport (= 6.1.4.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.1.3.2) - activesupport (= 6.1.3.2) + actionview (6.1.4.1) + activesupport (= 6.1.4.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -32,21 +32,21 @@ GEM actionview (>= 6.0.a) active_model_serializers (0.8.4) activemodel (>= 3.0) - activejob (6.1.3.2) - activesupport (= 6.1.3.2) + activejob (6.1.4.1) + activesupport (= 6.1.4.1) globalid (>= 0.3.6) - activemodel (6.1.3.2) - activesupport (= 6.1.3.2) - activerecord (6.1.3.2) - activemodel (= 6.1.3.2) - activesupport (= 6.1.3.2) - activesupport (6.1.3.2) + activemodel (6.1.4.1) + activesupport (= 6.1.4.1) + activerecord (6.1.4.1) + activemodel (= 6.1.4.1) + activesupport (= 6.1.4.1) + activesupport (6.1.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) annotate (3.1.1) activerecord (>= 3.2, < 7.0) @@ -59,10 +59,10 @@ GEM aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.42.0) + aws-sdk-kms (1.44.0) aws-sdk-core (~> 3, >= 3.112.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.90.0) + aws-sdk-s3 (1.96.1) aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) @@ -80,10 +80,10 @@ GEM rack (>= 0.9.0) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootsnap (1.7.5) + bootsnap (1.9.3) msgpack (~> 1.0) builder (3.2.4) - bullet (6.1.4) + bullet (6.1.5) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) @@ -92,7 +92,7 @@ GEM chunky_png (1.4.0) coderay (1.1.3) colored2 (3.1.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) connection_pool (2.2.5) cose (1.2.0) cbor (~> 0.5.9) @@ -101,7 +101,7 @@ GEM crack (0.4.5) rexml crass (1.0.6) - css_parser (1.9.0) + css_parser (1.10.0) addressable debug_inspector (1.1.0) diff-lcs (1.4.4) @@ -114,15 +114,10 @@ GEM jquery-rails (>= 1.0.17) railties (>= 3.1) discourse-ember-source (3.12.2.3) - discourse-fonts (0.0.8) - discourse_dev (0.2.1) + discourse-fonts (0.0.9) + discourse_dev_assets (0.0.3) faker (~> 2.16) - discourse_image_optim (0.26.2) - exifr (~> 1.2, >= 1.2.2) - fspath (~> 3.0) - image_size (~> 1.5) - in_threads (~> 1.3) - progress (~> 3.0, >= 3.0.1) + literate_randomizer docile (1.4.0) ecma-re-validator (0.3.0) regexp_parser (~> 2.0) @@ -134,30 +129,40 @@ GEM sprockets (>= 3.3, < 4.1) ember-source (2.18.2) erubi (1.10.0) - excon (0.81.0) + excon (0.88.0) execjs (2.8.1) exifr (1.3.9) fabrication (2.22.0) - faker (2.17.0) + faker (2.19.0) i18n (>= 1.6, < 2) fakeweb (1.3.0) - faraday (1.4.1) + faraday (1.8.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) + faraday-httpclient (1.0.1) faraday-net_http (1.0.1) - faraday-net_http_persistent (1.1.0) - fast_blank (1.0.0) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + fast_blank (1.0.1) fast_xs (0.8.0) - fastimage (2.2.3) - ffi (1.15.0) + fastimage (2.2.5) + ffi (1.15.4) fspath (3.1.2) gc_tracer (1.5.1) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (1.0.0) + activesupport (>= 5.0) guess_html_encoding (0.0.11) hana (1.3.7) hashdiff (1.0.1) @@ -166,16 +171,23 @@ GEM hkdf (0.3.0) htmlentities (4.3.4) http_accept_language (2.1.1) - i18n (1.8.10) + i18n (1.8.11) concurrent-ruby (~> 1.0) - image_size (1.5.0) + image_optim (0.31.1) + exifr (~> 1.2, >= 1.2.2) + fspath (~> 3.0) + image_size (>= 1.5, < 4) + in_threads (~> 1.3) + progress (~> 3.0, >= 3.0.1) + image_size (3.0.1) in_threads (1.5.4) + ipaddr (1.2.3) jmespath (1.4.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (2.5.1) + json (2.6.1) json-schema (2.8.1) addressable (>= 2.4) json_schemer (0.2.18) @@ -183,12 +195,14 @@ GEM hana (~> 1.3) regexp_parser (~> 2.0) uri_template (~> 0.7) - jwt (2.2.3) - kgio (2.11.3) - libv8-node (15.14.0.1) - listen (3.5.1) + jwt (2.3.0) + kgio (2.11.4) + libv8-node (16.10.0.0) + libv8-node (16.10.0.0-aarch64-linux) + listen (3.7.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + literate_randomizer (0.4.0) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) @@ -197,53 +211,51 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - logster (2.9.6) - loofah (2.9.1) + logster (2.10.0) + loofah (2.12.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lru_redux (1.1.0) lz4-ruby (0.3.3) maxminddb (0.1.22) memory_profiler (1.0.0) - message_bus (3.3.5) + message_bus (3.3.6) rack (>= 1.1.3) method_source (1.0.0) - mini_mime (1.1.0) - mini_portile2 (2.5.3) - mini_racer (0.4.0) - libv8-node (~> 15.14.0.0) + mini_mime (1.1.2) + mini_portile2 (2.6.1) + mini_racer (0.5.0) + libv8-node (~> 16.10.0.0) mini_scheduler (0.13.0) sidekiq (>= 4.2.3) mini_sql (1.1.3) mini_suffix (0.3.2) ffi (~> 1.9) minitest (5.14.4) - mocha (1.12.0) - mock_redis (0.28.0) + mocha (1.13.0) + mock_redis (0.29.0) ruby2_keywords msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) mustache (1.1.1) - nio4r (2.5.7) - nokogiri (1.11.7) - mini_portile2 (~> 2.5.0) + nio4r (2.5.8) + nokogiri (1.12.5) + mini_portile2 (~> 2.6.1) racc (~> 1.4) - nokogumbo (2.0.5) - nokogiri (~> 1.8, >= 1.8.4) - oauth (0.5.6) + oauth (0.5.8) oauth2 (1.4.7) faraday (>= 0.8, < 2.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - oj (3.11.5) + oj (3.13.2) omniauth (1.9.1) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - omniauth-facebook (8.0.0) + omniauth-facebook (9.0.0) omniauth-oauth2 (~> 1.2) omniauth-github (1.4.0) omniauth (~> 1.5) @@ -256,27 +268,21 @@ GEM omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) - omniauth-oauth2 (1.7.1) + omniauth-oauth2 (1.7.2) oauth2 (~> 1.4) omniauth (>= 1.9, < 3) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack - onebox (2.2.17) - addressable (~> 2.7.0) - htmlentities (~> 4.3) - multi_json (~> 1.11) - mustache - nokogiri (~> 1.7) - sanitize - openssl (2.2.0) + openssl (2.2.1) + ipaddr openssl-signature_algorithm (1.1.1) openssl (~> 2.0) optimist (3.0.1) - parallel (1.20.1) - parallel_tests (3.7.0) + parallel (1.21.0) + parallel_tests (3.7.3) parallel - parser (3.0.1.1) + parser (3.0.3.1) ast (~> 2.4.1) pg (1.2.3) progress (3.6.0) @@ -289,12 +295,12 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) - puma (5.3.1) + puma (5.5.2) nio4r (~> 2.0) r2 (0.2.7) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) - rack-mini-profiler (2.3.2) + rack-mini-profiler (2.3.3) rack (>= 1.2.0) rack-protection (2.1.0) rack @@ -303,24 +309,24 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) rails_failover (0.7.3) activerecord (~> 6.0) concurrent-ruby railties (~> 6.0) - rails_multisite (3.0.0) + rails_multisite (4.0.0) activerecord (> 5.0, < 7) railties (> 5.0, < 7) - railties (6.1.3.2) - actionpack (= 6.1.3.2) - activesupport (= 6.1.3.2) + railties (6.1.4.1) + actionpack (= 6.1.4.1) + activesupport (= 6.1.4.1) method_source - rake (>= 0.8.7) + rake (>= 0.13) thor (~> 1.0) rainbow (3.0.0) - raindrops (0.19.1) - rake (13.0.3) + raindrops (0.19.2) + rake (13.0.6) rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) @@ -329,7 +335,7 @@ GEM msgpack (>= 0.4.3) optimist (>= 3.0.0) rchardet (1.8.0) - redis (4.2.5) + redis (4.5.1) redis-namespace (1.8.1) redis (>= 3.0.4) regexp_parser (2.1.1) @@ -338,10 +344,10 @@ GEM rexml (3.2.5) rinku (2.0.6) rotp (6.2.0) - rqrcode (2.0.0) + rqrcode (2.1.0) chunky_png (~> 1.0) rqrcode_core (~> 1.0) - rqrcode_core (1.0.0) + rqrcode_core (1.2.0) rspec (3.10.0) rspec-core (~> 3.10.0) rspec-expectations (~> 3.10.0) @@ -357,7 +363,7 @@ GEM rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-rails (5.0.1) + rspec-rails (5.0.2) actionpack (>= 5.2) activesupport (>= 5.2) railties (>= 5.2) @@ -365,40 +371,40 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.2) + rspec-support (3.10.3) + rss (0.2.9) + rexml rswag-specs (2.4.0) activesupport (>= 3.1, < 7.0) json-schema (~> 2.2) railties (>= 3.1, < 7.0) rtlit (0.0.5) - rubocop (1.14.0) + rubocop (1.23.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.5.0, < 2.0) + rubocop-ast (>= 1.12.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.5.0) + rubocop-ast (1.13.0) parser (>= 3.0.1.1) - rubocop-discourse (2.4.1) + rubocop-discourse (2.4.2) rubocop (>= 1.1.0) rubocop-rspec (>= 2.0.0) - rubocop-rspec (2.3.0) - rubocop (~> 1.0) - rubocop-ast (>= 1.1.0) + rubocop-rspec (2.6.0) + rubocop (~> 1.19) ruby-prof (1.4.3) ruby-progressbar (1.11.0) ruby-readability (0.7.0) guess_html_encoding (>= 0.0.4) nokogiri (>= 1.6.0) - ruby2_keywords (0.0.4) - rubyzip (2.3.0) - sanitize (5.2.3) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sanitize (6.0.0) crass (~> 1.0.2) - nokogiri (>= 1.8.0) - nokogumbo (~> 2.0) + nokogiri (>= 1.12.0) sassc (2.0.1) ffi (~> 1.9) rake @@ -411,9 +417,9 @@ GEM seed-fu (2.3.9) activerecord (>= 3.1) activesupport (>= 3.1) - shoulda-matchers (4.5.1) - activesupport (>= 4.2.0) - sidekiq (6.2.1) + shoulda-matchers (5.0.0) + activesupport (>= 5.2.0) + sidekiq (6.3.1) connection_pool (>= 2.2.2) rack (~> 2.0) redis (>= 4.2.0) @@ -426,13 +432,13 @@ GEM sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.1) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sshkey (2.0.0) stackprof (0.2.17) - test-prof (1.0.5) + test-prof (1.0.7) thor (1.1.0) tilt (2.0.10) tzinfo (2.0.4) @@ -441,15 +447,15 @@ GEM execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - unicode-display_width (2.0.0) + unf_ext (0.0.8) + unicode-display_width (2.1.0) unicorn (6.0.0) kgio (~> 2.6) raindrops (~> 0.7) uniform_notifier (1.14.2) uri_template (0.7.0) - webmock (3.12.2) - addressable (>= 2.3.6) + webmock (3.14.0) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webpush (1.1.0) @@ -457,20 +463,21 @@ GEM jwt (~> 2.0) xorcist (1.1.2) yaml-lint (0.0.10) - zeitwerk (2.4.2) + zeitwerk (2.5.1) PLATFORMS + aarch64-linux ruby DEPENDENCIES - actionmailer (= 6.1.3.2) - actionpack (= 6.1.3.2) - actionview (= 6.1.3.2) + actionmailer (= 6.1.4.1) + actionpack (= 6.1.4.1) + actionview (= 6.1.4.1) actionview_precompiler active_model_serializers (~> 0.8.3) - activemodel (= 6.1.3.2) - activerecord (= 6.1.3.2) - activesupport (= 6.1.3.2) + activemodel (= 6.1.4.1) + activerecord (= 6.1.4.1) + activesupport (= 6.1.4.1) addressable annotate aws-sdk-s3 @@ -491,13 +498,13 @@ DEPENDENCIES discourse-ember-rails (= 0.18.6) discourse-ember-source (~> 3.12.2) discourse-fonts - discourse_dev - discourse_image_optim + discourse_dev_assets email_reply_trimmer ember-handlebars-template (= 0.8.0) excon execjs fabrication + faker (~> 2.16) fakeweb fast_blank fast_xs @@ -506,6 +513,7 @@ DEPENDENCIES highline htmlentities http_accept_language + image_optim json json_schemer listen @@ -531,14 +539,13 @@ DEPENDENCIES multi_json mustache nokogiri - oj + oj (= 3.13.2) omniauth omniauth-facebook omniauth-github omniauth-google-oauth2 omniauth-oauth2 omniauth-twitter - onebox parallel_tests pg pry-byebug @@ -550,7 +557,7 @@ DEPENDENCIES rack-protection rails_failover rails_multisite - railties (= 6.1.3.2) + railties (= 6.1.4.1) rake rb-fsevent rbtrace @@ -563,12 +570,14 @@ DEPENDENCIES rspec rspec-html-matchers rspec-rails + rss rswag-specs rtlit rubocop-discourse ruby-prof ruby-readability rubyzip + sanitize sassc (= 2.0.1) sassc-rails seed-fu @@ -590,4 +599,4 @@ DEPENDENCIES yaml-lint BUNDLED WITH - 2.2.24 + 2.2.26 diff --git a/pkgs/servers/web-apps/discourse/rubyEnv/gemset.nix b/pkgs/servers/web-apps/discourse/rubyEnv/gemset.nix index f63b68164ef25..7ee104f667450 100644 --- a/pkgs/servers/web-apps/discourse/rubyEnv/gemset.nix +++ b/pkgs/servers/web-apps/discourse/rubyEnv/gemset.nix @@ -5,10 +5,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1nqdaykzgib8fsldkxdkw0w44jzz4grvb028crzg0qpwvv03g2wp"; + sha256 = "00s07l2ac5igch1g2rpa0linmiq7mhgk6v6wxkckg8gbiqijb592"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; actionpack = { dependencies = ["actionview" "activesupport" "rack" "rack-test" "rails-dom-testing" "rails-html-sanitizer"]; @@ -16,10 +16,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1wdgv5llgbl4nayx5j78lfvhhjssrzfmypb45mjy37mgm8z5l5m5"; + sha256 = "0xgysqnibjsy6kdz10x2xb3kwa6lssiqhh0zggrbgs31ypwhlpia"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; actionview = { dependencies = ["activesupport" "builder" "erubi" "rails-dom-testing" "rails-html-sanitizer"]; @@ -27,10 +27,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1r6db2g3fsrca1hp9kbyvjx9psipsxw0g306qharkcblxl8h1ysn"; + sha256 = "1yf4ic5kl324rs0raralpwx24s6hvvdzxfhinafylf8f3x7jj23z"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; actionview_precompiler = { dependencies = ["actionview"]; @@ -60,32 +60,32 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0p80rbahcxhxlkxgf4bh580hbifn9q4gr5g9fy8fd0z5g6gr9xxq"; + sha256 = "1q7c0i0kwarxgcbxk71wa9jnlg45grbxmhlrh7dk9bgcv7r7r7hn"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; activemodel = { dependencies = ["activesupport"]; - groups = ["default" "development"]; + groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1gpd3hh4ryyr84drj6m0b5sy6929nyf50bfgksw1hpc594542nal"; + sha256 = "16ixam4lni8b5lgx0whnax0imzh1dh10fy5r9pxs52n83yz5nbq3"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; activerecord = { dependencies = ["activemodel" "activesupport"]; - groups = ["default" "development"]; + groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0fg58qma2zgrz0gr61p61qcz8c3h88fd5lbdrkpkm96aq5shwh68"; + sha256 = "1ccgvlj767ybps3pxlaa4iw77n7wbriw2sr8754id3ngjfap08ja"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; activesupport = { dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo" "zeitwerk"]; @@ -93,10 +93,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1csxddyhl6k773ycxjvmyshyr4g9jb1icbs3pnm7crnavqs4h1yr"; + sha256 = "19gx1jcq46x9d1pi1w8xq0bgvvfw239y4lalr8asm291gj3q3ds4"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; addressable = { dependencies = ["public_suffix"]; @@ -104,10 +104,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"; + sha256 = "022r3m9wdxljpbya69y2i3h9g3dhhfaqzidf95m6qjzms792jvgp"; type = "gem"; }; - version = "2.7.0"; + version = "2.8.0"; }; annotate = { dependencies = ["activerecord" "rake"]; @@ -167,10 +167,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "00wgf83cdy6z77b2y0ld0aqiidfyldi71hx0z8b73gxjdlbwpq1i"; + sha256 = "0407yggwsy89fzh387vq3af5azplci5v0a8y97h7r6da4jrv1ksm"; type = "gem"; }; - version = "1.42.0"; + version = "1.44.0"; }; aws-sdk-s3 = { dependencies = ["aws-sdk-core" "aws-sdk-kms" "aws-sigv4"]; @@ -178,10 +178,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0sm1x1pm2wb8gj3p4yv45r7n8m4k3qawk3lrnd2lvk2vg5nyfh61"; + sha256 = "0q28bdmpm2c2fw9wh00zhqxnb8p2nzdfi5l6wwa6bl63fm28816h"; type = "gem"; }; - version = "1.90.0"; + version = "1.96.1"; }; aws-sdk-sns = { dependencies = ["aws-sdk-core" "aws-sigv4"]; @@ -252,10 +252,10 @@ }]; source = { remotes = ["https://rubygems.org"]; - sha256 = "12n09iwpssnsfw9s140ynfxr9psd0xcfx42yqdsk0hq60zhq2nlx"; + sha256 = "18prmylz53gsw651f0sibb2mvdxgd2zzdzh6a9a1idpqhyxcnbg7"; type = "gem"; }; - version = "1.7.5"; + version = "1.9.3"; }; builder = { groups = ["default" "development" "test"]; @@ -273,10 +273,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0r8d3vh1xjfx46qlv75228rkshzgqxpmf491vxzpicpqi1xad5ni"; + sha256 = "01xachwsyykmp153514vz2khanbsz1n27j09za5gcxj54srh5l4p"; type = "gem"; }; - version = "6.1.4"; + version = "6.1.5"; }; byebug = { groups = ["development" "test"]; @@ -351,10 +351,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0mr23wq0szj52xnj0zcn1k0c7j4v79wlwbijkpfcscqww3l6jlg3"; + sha256 = "0nwad3211p7yv9sda31jmbyw6sdafzmdi2i2niaz6f0wk5nq9h0f"; type = "gem"; }; - version = "1.1.8"; + version = "1.1.9"; }; connection_pool = { groups = ["default"]; @@ -414,10 +414,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0xs4ind9xd099rb52b73pch8ha143dl8bhivqsbba4wrvxpbx751"; + sha256 = "1q8gj3wkc2mbzsqw5zcsr3kyzrrb2pda03pi769rjbvqr94g3bm5"; type = "gem"; }; - version = "1.9.0"; + version = "1.10.0"; }; debug_inspector = { groups = ["default" "development"]; @@ -475,32 +475,21 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1gr1d80wmb1jvip82jlbsz5bcpwsz9lryxxfnwiw537vx8pqkk3p"; + sha256 = "1q1q9fmqc7dir2nj94nai58h26zsh6fqmbr6hfax5d6xpy4pm1yf"; type = "gem"; }; - version = "0.0.8"; + version = "0.0.9"; }; - discourse_dev = { - dependencies = ["faker"]; + discourse_dev_assets = { + dependencies = ["faker" "literate_randomizer"]; groups = ["development"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1sn2lcgjhsbqnaca97a37bfk249c55b3cn1q8abnf1am9jq5hdiw"; + sha256 = "0c6cxrf6kvv4pg6fsig71dn5nrzy7jxbxmyi8206m1ijgpj8nddg"; type = "gem"; }; - version = "0.2.1"; - }; - discourse_image_optim = { - dependencies = ["exifr" "fspath" "image_size" "in_threads" "progress"]; - groups = ["default"]; - platforms = []; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "11nqmga5ygxyhjmsc07gsa0fwwyhdpwi20yyr4fnh263xs1xylvv"; - type = "gem"; - }; - version = "0.26.2"; + version = "0.0.3"; }; docile = { groups = ["default" "test"]; @@ -584,10 +573,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "19g5nvkycnkzqq4mqn1zjznq9adrlv2jz0dr9w10cbn42hhqpiz7"; + sha256 = "15yrwawhvkjvfg0dsf8z81876ddj6161q0wh5s7pw4sim8z8pspr"; type = "gem"; }; - version = "0.81.0"; + version = "0.88.0"; }; execjs = { groups = ["assets" "default"]; @@ -621,14 +610,14 @@ }; faker = { dependencies = ["i18n"]; - groups = ["default" "development"]; + groups = ["development"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0z3d4y6xg8prn3zdjw1qpqrnziq1d3zigqil4sxjj0pbr46gc1d6"; + sha256 = "0hb9wfxyb4ss2vl2mrj1zgdk7dh4yaxghq22gbx62yxj5yb9w4zw"; type = "gem"; }; - version = "2.17.0"; + version = "2.19.0"; }; fakeweb = { groups = ["test"]; @@ -641,15 +630,35 @@ version = "1.3.0"; }; faraday = { - dependencies = ["faraday-excon" "faraday-net_http" "faraday-net_http_persistent" "multipart-post" "ruby2_keywords"]; + dependencies = ["faraday-em_http" "faraday-em_synchrony" "faraday-excon" "faraday-httpclient" "faraday-net_http" "faraday-net_http_persistent" "faraday-patron" "faraday-rack" "multipart-post" "ruby2_keywords"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0q646m07lfahakx5jdq77j004rcgfj6lkg13c0f84993gi78dhvi"; + sha256 = "0afhlqgby2cizcwgh7h2sq5f77q01axjbdl25bsvfwsry9n7gyyi"; type = "gem"; }; - version = "1.4.1"; + version = "1.8.0"; + }; + faraday-em_http = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "12cnqpbak4vhikrh2cdn94assh3yxza8rq2p9w2j34bqg5q4qgbs"; + type = "gem"; + }; + version = "1.0.0"; + }; + faraday-em_synchrony = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1vgrbhkp83sngv6k4mii9f2s9v5lmp693hylfxp2ssfc60fas3a6"; + type = "gem"; + }; + version = "1.0.0"; }; faraday-excon = { groups = ["default"]; @@ -661,6 +670,16 @@ }; version = "1.1.0"; }; + faraday-httpclient = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0fyk0jd3ks7fdn8nv3spnwjpzx2lmxmg2gh4inz3by1zjzqg33sc"; + type = "gem"; + }; + version = "1.0.1"; + }; faraday-net_http = { groups = ["default"]; platforms = []; @@ -676,10 +695,30 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0l2c835wl7gv34xp49fhd1bl4czkpw2g3ahqsak2251iqv5589ka"; + sha256 = "0dc36ih95qw3rlccffcb0vgxjhmipsvxhn6cw71l7ffs0f7vq30b"; type = "gem"; }; - version = "1.1.0"; + version = "1.2.0"; + }; + faraday-patron = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "19wgsgfq0xkski1g7m96snv39la3zxz6x7nbdgiwhg5v82rxfb6w"; + type = "gem"; + }; + version = "1.0.0"; + }; + faraday-rack = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1h184g4vqql5jv9s9im6igy00jp6mrah2h14py6mpf9bkabfqq7g"; + type = "gem"; + }; + version = "1.0.0"; }; fast_blank = { groups = ["default"]; @@ -692,10 +731,10 @@ }]; source = { remotes = ["https://rubygems.org"]; - sha256 = "16s1ilyvwzmkcgmklbrn0c2pch5n02vf921njx0bld4crgdr6z56"; + sha256 = "1shpmamyzyhyxmv95r96ja5rylzaw60r19647d0fdm7y2h2c77r6"; type = "gem"; }; - version = "1.0.0"; + version = "1.0.1"; }; fast_xs = { groups = ["default"]; @@ -718,10 +757,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0lgr0vs9kg5622qaf2l3f37b238dncs037fisiygvkbq8sg11i68"; + sha256 = "05i1fgqy4l40niwm9y56d04f876sm0cvc7q3w2rpddf8gya4lcs9"; type = "gem"; }; - version = "2.2.3"; + version = "2.2.5"; }; ffi = { groups = ["default" "development" "test"]; @@ -732,10 +771,10 @@ }]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0nq1fb3vbfylccwba64zblxy96qznxbys5900wd7gm9bpplmf432"; + sha256 = "0ssxcywmb3flxsjdg13is6k01807zgzasdhj4j48dm7ac59cmksn"; type = "gem"; }; - version = "1.15.0"; + version = "1.15.4"; }; fspath = { groups = ["default"]; @@ -767,10 +806,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"; + sha256 = "1n5yc058i8xhi1fwcp1w7mfi6xaxfmrifdb4r4hjfff33ldn8lqj"; type = "gem"; }; - version = "0.4.2"; + version = "1.0.0"; }; guess_html_encoding = { groups = ["default"]; @@ -858,20 +897,31 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0g2fnag935zn2ggm5cn6k4s4xvv53v2givj1j90szmvavlpya96a"; + sha256 = "0vdd1kii40qhbr9n8qx71k2gskq6rkl8ygy8hw5hfj8bb5a364xf"; + type = "gem"; + }; + version = "1.8.11"; + }; + image_optim = { + dependencies = ["exifr" "fspath" "image_size" "in_threads" "progress"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1l3n59w1cbvfg2srfa14g3jdqwbkf7l86g4qrgfz3qps7zi0drg7"; type = "gem"; }; - version = "1.8.10"; + version = "0.31.1"; }; image_size = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0zrn2mqaf1kk548wn1y35i1a6kwh3320q62m929kn9m8sqpy4fk7"; + sha256 = "130yn87pcnr5sblssm88hnvg8hc76isgrnhlf1d9355zhv4i2hsz"; type = "gem"; }; - version = "1.5.0"; + version = "3.0.1"; }; in_threads = { groups = ["default"]; @@ -883,6 +933,16 @@ }; version = "1.5.4"; }; + ipaddr = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0s2cipiyhm1r8igc1n43py5p5r3rdz8lvagaa61jrm62prn7v5b2"; + type = "gem"; + }; + version = "1.2.3"; + }; jmespath = { groups = ["default"]; platforms = []; @@ -909,10 +969,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0lrirj0gw420kw71bjjlqkqhqbrplla61gbv1jzgsz6bv90qr3ci"; + sha256 = "1z9grvjyfz16ag55hg522d3q4dh07hf391sf9s96npc0vfi85xkz"; type = "gem"; }; - version = "2.5.1"; + version = "2.6.1"; }; json-schema = { dependencies = ["addressable"]; @@ -941,10 +1001,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "036i5fc09275ms49mw43mh4i9pwaap778ra2pmx06ipzyyjl6bfs"; + sha256 = "0bg8pjx0mpvl10k6d8a6gc8dzlv2z5jkqcjbjcirnk032iriq838"; type = "gem"; }; - version = "2.2.3"; + version = "2.3.0"; }; kgio = { groups = ["default"]; @@ -957,20 +1017,20 @@ }]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0ai6bzlvxbzpdl466p1qi4dlhx8ri2wcrp6x1l19y3yfs3a29rng"; + sha256 = "1ipzvw7n0kz1w8rkqybyxvf3hb601a770khm0xdqm68mc4aa59xx"; type = "gem"; }; - version = "2.11.3"; + version = "2.11.4"; }; libv8-node = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1xx217hrkpcm41p41inmy05kb7g8p9w5fwabgjgmpvz0d60j2862"; + sha256 = "102ixp1626b4zjh98h3jxhwv0sdbkgijz38wyb1ffgxqr47c7s0w"; type = "gem"; }; - version = "15.14.0.1"; + version = "16.10.0.0"; }; listen = { dependencies = ["rb-fsevent" "rb-inotify"]; @@ -978,10 +1038,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0h2v34xhi30w0d9gfzds2w6v89grq2gkpgvmdj9m8x1ld1845xnj"; + sha256 = "0ncfhdkjiwq9l1pm87ax2pa20kz2j0dz56vi74cnr5a6cfk0qb5p"; type = "gem"; }; - version = "3.5.1"; + version = "3.7.0"; + }; + literate_randomizer = { + groups = ["default" "development"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1c8p8aw93bx4ygpkwfv6dv41psb86jb0pi16gvnv30rr72dkq1q5"; + type = "gem"; + }; + version = "0.4.0"; }; lograge = { dependencies = ["actionpack" "activesupport" "railties" "request_store"]; @@ -1020,10 +1090,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1a65kp9d3n34nnd0vr49s3gxxjzi4l197s3qyq4njjf81smd2764"; + sha256 = "13k73ap18p09bxwgw24xc1lb5bxnky8p0xpx7yrlk74xlffasw30"; type = "gem"; }; - version = "2.9.6"; + version = "2.10.0"; }; loofah = { dependencies = ["crass" "nokogiri"]; @@ -1031,10 +1101,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1w9mbii8515p28xd4k72f3ab2g6xiyq15497ys5r8jn6m355lgi7"; + sha256 = "1nqcya57x2n58y1dify60i0dpla40n4yir928khp4nj5jrn9mgmw"; type = "gem"; }; - version = "2.9.1"; + version = "2.12.0"; }; lru_redux = { groups = ["default"]; @@ -1105,10 +1175,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0gg8axd71vjanzis8w4h4if2qi4fx0glmc258dwa5b3z6zvzsbz8"; + sha256 = "1d0cdx4cszsa0wgnch1b5dcyalg6x9niyydik8yyampnpjghwfnk"; type = "gem"; }; - version = "3.3.5"; + version = "3.3.6"; }; method_source = { groups = ["default" "development" "test"]; @@ -1125,20 +1195,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0kb7jq3wjgckmkzna799y5qmvn6vg52878bkgw35qay6lflcrwih"; + sha256 = "0lbim375gw2dk6383qirz13hgdmxlan0vc5da2l072j3qw6fqjm5"; type = "gem"; }; - version = "1.1.0"; + version = "1.1.2"; }; mini_portile2 = { groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ad0mli9rc0f17zw4ibp24dbj1y39zkykijsjmnzl4gwpg5s0j6k"; + sha256 = "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq"; type = "gem"; }; - version = "2.5.3"; + version = "2.6.1"; }; mini_racer = { dependencies = ["libv8-node"]; @@ -1146,10 +1216,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0334q46gi3il9izw7k4z32fj06nm8pznqdkr9r51033lnwwy9zy3"; + sha256 = "1b6lahs31m3ky4maq8s83w35lkariq0g1f6bjhnaxvwzjhhar5cf"; type = "gem"; }; - version = "0.4.0"; + version = "0.5.0"; }; mini_scheduler = { dependencies = ["sidekiq"]; @@ -1198,10 +1268,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "05yw6rwgjppq116jgqfg4pv4bql3ci4r2fmmg0m2c3sqib1bq41a"; + sha256 = "15s53ggsykk69kxqvs4416s8yxdhz6caggva55n8sjgy4ixzwp10"; type = "gem"; }; - version = "1.12.0"; + version = "1.13.0"; }; mock_redis = { dependencies = ["ruby2_keywords"]; @@ -1209,10 +1279,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0x6ng2p1884pjpwj169p6xyas5bvshi4q1wfcfmxvk82jwm0cz3c"; + sha256 = "10jj7hralc2hmvvm77w71d4dwq9ij5a1lkqyfw6z32saybzmcs99"; type = "gem"; }; - version = "0.28.0"; + version = "0.29.0"; }; msgpack = { groups = ["default"]; @@ -1273,10 +1343,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "00fwz0qq7agd2xkdz02i8li236qvwhma3p0jdn5bdvc21b7ydzd5"; + sha256 = "0xk64wghkscs6bv2n22853k2nh39d131c6rfpnlw12mbjnnv9v1v"; type = "gem"; }; - version = "2.5.7"; + version = "2.5.8"; }; nokogiri = { dependencies = ["mini_portile2" "racc"]; @@ -1284,31 +1354,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1vrn31385ix5k9b0yalnlzv360isv6dincbcvi8psllnwz4sjxj9"; - type = "gem"; - }; - version = "1.11.7"; - }; - nokogumbo = { - dependencies = ["nokogiri"]; - groups = ["default"]; - platforms = []; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0ngsnr0l6r4yccdwvky18n9a81plhpviaw6g7ym45mr1q0y0aj2w"; + sha256 = "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b"; type = "gem"; }; - version = "2.0.5"; + version = "1.12.5"; }; oauth = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1zwd6v39yqfdrpg1p3d9jvzs9ljg55ana2p06m0l7qn5w0lgx1a0"; + sha256 = "0h6nfg2pibc17fch0795d4bcy41a92im5zrsrgs31zdhrl6zf4w0"; type = "gem"; }; - version = "0.5.6"; + version = "0.5.8"; }; oauth2 = { dependencies = ["faraday" "jwt" "multi_json" "multi_xml" "rack"]; @@ -1326,10 +1385,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1cnadm83qwnmbpyild9whb9bgf9r7gs046ydxypclb2l756gcnva"; + sha256 = "1fh73xl58n696akgarylfdfmv6l93rfwh3csjjbljr6gvhg4qrz9"; type = "gem"; }; - version = "3.11.5"; + version = "3.13.2"; }; omniauth = { dependencies = ["hashie" "rack"]; @@ -1348,10 +1407,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1z0f5sr2ddnvfva0jrfd4926nlv4528rfj7z595288n39304r092"; + sha256 = "0m7q38kjm94wgq6h7hk9546yg33wcs3vf1v6zp0vx7nwkvfxh2j4"; type = "gem"; }; - version = "8.0.0"; + version = "9.0.0"; }; omniauth-github = { dependencies = ["omniauth" "omniauth-oauth2"]; @@ -1392,10 +1451,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "10fr2b58sp7l6nfdvxpbi67374hkrvsf507cvda89jjs0jacy319"; + sha256 = "1ry65f309rnzhgdjvqybkd5i4qp9rpk1gbp4dz02h4l6bkk6ya10"; type = "gem"; }; - version = "1.7.1"; + version = "1.7.2"; }; omniauth-twitter = { dependencies = ["omniauth-oauth" "rack"]; @@ -1408,26 +1467,16 @@ }; version = "1.4.0"; }; - onebox = { - dependencies = ["addressable" "htmlentities" "multi_json" "mustache" "nokogiri" "sanitize"]; - groups = ["default"]; - platforms = []; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1swlysqwfc6mb7smv52yv12sd79dchjf2f6r738wrag0wp5hazqy"; - type = "gem"; - }; - version = "2.2.17"; - }; openssl = { + dependencies = ["ipaddr"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "03wbynzkhay7l1x76srjkg91q48mxl575vrxb3blfxlpqwsvvp0w"; + sha256 = "0wkx3b598mxmr3idfbgas0cnrds54bfivnn1ip0d7z7kcr5vzbzn"; type = "gem"; }; - version = "2.2.0"; + version = "2.2.1"; }; openssl-signature_algorithm = { dependencies = ["openssl"]; @@ -1459,10 +1508,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0055br0mibnqz0j8wvy20zry548dhkakws681bhj3ycb972awkzd"; + sha256 = "1hkfpm78c2vs1qblnva3k1grijvxh87iixcnyd83s3lxrxsjvag4"; type = "gem"; }; - version = "1.20.1"; + version = "1.21.0"; }; parallel_tests = { dependencies = ["parallel"]; @@ -1470,10 +1519,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1vrd24lg1pqxvp63664hrndywpdyn8i38j4gfvqk8zjl1mxy9840"; + sha256 = "1vsfsfd194xnzjz94ml157w61fnag8jg47b4bssc508kb3vmk20w"; type = "gem"; }; - version = "3.7.0"; + version = "3.7.3"; }; parser = { dependencies = ["ast"]; @@ -1481,10 +1530,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1pxsi1i5z506xfzhiyavlasf8777h55ab40phvp7pfv9npmd5pnj"; + sha256 = "1skkdjawwigi9vs5zkp03jkpx2f11drfjz483g1xw2dnjdsq22c3"; type = "gem"; }; - version = "3.0.1.1"; + version = "3.0.3.1"; }; pg = { groups = ["default"]; @@ -1555,10 +1604,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "00839fhvcq73h9a4crbrk87y6bi2z4vp1zazxihn6w0mrwr51c3i"; + sha256 = "1xblxnrs0c5m326v7kgr32k4m00cl2ipcf5m0qvyisrw62vd5dbn"; type = "gem"; }; - version = "5.3.1"; + version = "5.5.2"; }; r2 = { groups = ["default"]; @@ -1575,10 +1624,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"; + sha256 = "0la56m0z26j3mfn1a9lf2l03qx1xifanndf9p3vx1azf6sqy7v9d"; type = "gem"; }; - version = "1.5.2"; + version = "1.6.0"; }; rack = { groups = ["default" "development" "test"]; @@ -1600,10 +1649,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "02rkbmi66pqcx8l4yxnhpiywdqhbza4m2i2b457q8imjvw950jhs"; + sha256 = "03hcvjw9nrv0w6yjy2zkv4ivin9xg2wr7xfcvx7rc2msv1gmjb6z"; type = "gem"; }; - version = "2.3.2"; + version = "2.3.3"; }; rack-protection = { dependencies = ["rack"]; @@ -1644,10 +1693,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1icpqmxbppl4ynzmn6dx7wdil5hhq6fz707m9ya6d86c7ys8sd4f"; + sha256 = "09qrfi3pgllxb08r024lln9k0qzxs57v0slsj8616xf9c0cwnwbk"; type = "gem"; }; - version = "1.3.0"; + version = "1.4.2"; }; rails_failover = { dependencies = ["activerecord" "concurrent-ruby" "railties"]; @@ -1666,10 +1715,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "09lwi5pd0bisy45pv85l8w7wm5f7l5bxpva0y7bcvqdrk49ykm1g"; + sha256 = "1j44n1c19gbskzxskdipr5f6lgglpn398x9kcbpw452wwwav8rmf"; type = "gem"; }; - version = "3.0.0"; + version = "4.0.0"; }; railties = { dependencies = ["actionpack" "activesupport" "method_source" "rake" "thor"]; @@ -1677,10 +1726,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "17r1pr8d467vh3zkciw4wmrcixj9zjrvd11nxn2z091bkzf66xq2"; + sha256 = "1kwpm068cqys34p2g0j3l1g0cd5f3kxnsay5v7lmbd0sgarac0vy"; type = "gem"; }; - version = "6.1.3.2"; + version = "6.1.4.1"; }; rainbow = { groups = ["default" "development" "test"]; @@ -1703,20 +1752,20 @@ }]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0zjja00mzgx2lddb7qrn14k7qrnwhf4bpmnlqj78m1pfxh7svync"; + sha256 = "07nikrdnsf6g55225njnzs1lm9s0lnbv2krvqd2gldwl49l7vl9x"; type = "gem"; }; - version = "0.19.1"; + version = "0.19.2"; }; rake = { groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1iik52mf9ky4cgs38fp2m8r6skdkq1yz23vh18lk95fhbcxb6a67"; + sha256 = "15whn7p9nrkxangbs9hh75q585yfn66lv0v2mhj6q6dl6x8bzr2w"; type = "gem"; }; - version = "13.0.3"; + version = "13.0.6"; }; rb-fsevent = { groups = ["development" "test"]; @@ -1769,10 +1818,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15x2sr6h094rjbvg8pkq6m3lcd5abpyx93aifvfdz3wv6x55xa48"; + sha256 = "03r9739q3vq38g456snf3rk9hadf955bs5im6qs6m69h19mrz2yw"; type = "gem"; }; - version = "4.2.5"; + version = "4.5.1"; }; redis-namespace = { dependencies = ["redis"]; @@ -1842,20 +1891,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "073w0qgjydkqpsqsb9yr8qg0mhvwlzx6z53hqr2b5zifvb9wzh02"; + sha256 = "0444sgvx3ahvgr3c9swpy32kcdpciwgcqahp3pb4m7d23xp1qjdc"; type = "gem"; }; - version = "2.0.0"; + version = "2.1.0"; }; rqrcode_core = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1djrfpzdy19c336nlzxdsm9qkrgqnm1himdawflsjsmxpq4j826c"; + sha256 = "06ld6386hbdhy5h0k09axmgn424kavpc8f27k1vjhknjhbf8jjfg"; type = "gem"; }; - version = "1.0.0"; + version = "1.2.0"; }; rspec = { dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"]; @@ -1918,20 +1967,31 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1pj2a9vrkp2xzlq0810q90sdc2zcqc7k92n57hxzhri2vcspy7n6"; + sha256 = "152yz205p8zi5nxxhs8z581rjdvvqsfjndklkvn11f2vi50nv7n9"; type = "gem"; }; - version = "5.0.1"; + version = "5.0.2"; }; rspec-support = { groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15j52parvb8cgvl6s0pbxi2ywxrv6x0764g222kz5flz0s4mycbl"; + sha256 = "0pjckrh8q6sqxy38xw7f4ziylq1983k84xh927s6352pps68zj35"; type = "gem"; }; - version = "3.10.2"; + version = "3.10.3"; + }; + rss = { + dependencies = ["rexml"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1b1zx07kr64kkpm4lssd4r1a1qyr829ppmfl85i4adcvx9mqfid0"; + type = "gem"; + }; + version = "0.2.9"; }; rswag-specs = { dependencies = ["activesupport" "json-schema" "railties"]; @@ -1960,10 +2020,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0chjr6i0g7frbp7dhi4d83ppf7akkdaw7mcgcwbxd6a9mairafpp"; + sha256 = "03ivbqd5blsb7v5mhrzxvn23779rqpyrsm7l086pb6ihp47122qb"; type = "gem"; }; - version = "1.14.0"; + version = "1.23.0"; }; rubocop-ast = { dependencies = ["parser"]; @@ -1971,10 +2031,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0hx4im1a2qpiwipvsl3fma358ixjp4h0mhj56ichq15xrq709qlf"; + sha256 = "06krbzlj49gjfmxpjwadfwqsqg5bgcp9k1fahyxxk3f6idqhkjbv"; type = "gem"; }; - version = "1.5.0"; + version = "1.13.0"; }; rubocop-discourse = { dependencies = ["rubocop" "rubocop-rspec"]; @@ -1982,21 +2042,21 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1z1h8spsjnsqz6c25n9ib1yimkwr7a76bas8w1k9c404hcqhlahv"; + sha256 = "1agjjqdzajlssw2lxpchz5gr2sll9lh5yldccgmghxh39l01cr0a"; type = "gem"; }; - version = "2.4.1"; + version = "2.4.2"; }; rubocop-rspec = { - dependencies = ["rubocop" "rubocop-ast"]; + dependencies = ["rubocop"]; groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0r69qcwm74vsbp1s2gaqaf91kkrsn2mv4gk6rvfb2pxzmgyi0r9g"; + sha256 = "0g7kwmb1ilmc8pfyvfh87yjp26qzij2ib7h3lqcl42cp33cg2zzk"; type = "gem"; }; - version = "2.3.0"; + version = "2.6.0"; }; ruby-prof = { groups = ["development"]; @@ -2038,31 +2098,31 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15wfcqxyfgka05v2a7kpg64x57gl1y4xzvnc9lh60bqx5sf1iqrs"; + sha256 = "1vz322p8n39hz3b4a9gkmz9y7a5jaz41zrm2ywf31dvkqm03glgz"; type = "gem"; }; - version = "0.0.4"; + version = "0.0.5"; }; rubyzip = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0590m2pr9i209pp5z4mx0nb1961ishdiqb28995hw1nln1d1b5ji"; + sha256 = "0grps9197qyxakbpw02pda59v45lfgbgiyw48i0mq9f2bn9y6mrz"; type = "gem"; }; - version = "2.3.0"; + version = "2.3.2"; }; sanitize = { - dependencies = ["crass" "nokogiri" "nokogumbo"]; + dependencies = ["crass" "nokogiri"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0xi2c9vbfjs0gk4i9y4mrlb3xx6g5lj22hlg5cx6hyc88ri7j4bc"; + sha256 = "1zq8pxmsd1abw18zz6mazsm2jfpwmbgdxbpawb7bmwvkb2c5yyc1"; type = "gem"; }; - version = "5.2.3"; + version = "6.0.0"; }; sassc = { dependencies = ["ffi" "rake"]; @@ -2103,10 +2163,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1qi7gzli00mqlaq9an28m6xd323k7grgq19r6dqa2amjnnxy41ld"; + sha256 = "0z6v2acldnvqrnvfk70f9xq39ppw5j03kbz2hpz7s17lgnn21vx8"; type = "gem"; }; - version = "4.5.1"; + version = "5.0.0"; }; sidekiq = { dependencies = ["connection_pool" "rack" "redis"]; @@ -2114,10 +2174,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ac57q6lnqg9h9lsj49wlwhgsfqfr83lgka1c1srk6g8vghhz662"; + sha256 = "0k38cbwhcj9ncfzlgfmvq2zqfdvldln58w8s8v89m0jqlhnhsqhj"; type = "gem"; }; - version = "6.2.1"; + version = "6.3.1"; }; simplecov = { dependencies = ["docile" "simplecov-html" "simplecov_json_formatter"]; @@ -2167,10 +2227,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0mwmz36265646xqfyczgr1mhkm1hfxgxxvgdgr4xfcbf2g72p1k2"; + sha256 = "0pjz4lbv2v0p9fa5nsrxy5lphsixb9a69gq2rxp0h5sr61m18mdq"; type = "gem"; }; - version = "3.2.2"; + version = "3.4.1"; }; sshkey = { groups = ["default"]; @@ -2201,10 +2261,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15jbm45jf1i8s1g5kj6pcfp6ddq9qfyy31lx3pff8g2w2hkhpik4"; + sha256 = "1vg0zjfgibdcgkzb4c25v0f4v6v8mvpzvgcag194rwglmkkyrwkx"; type = "gem"; }; - version = "1.0.5"; + version = "1.0.7"; }; thor = { groups = ["default" "development" "test"]; @@ -2264,20 +2324,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0wc47r23h063l8ysws8sy24gzh74mks81cak3lkzlrw4qkqb3sg4"; + sha256 = "0jmbimpnpjdzz8hlrppgl9spm99qh3qzbx0b81k3gkgwba8nk3yd"; type = "gem"; }; - version = "0.0.7.7"; + version = "0.0.8"; }; unicode-display_width = { groups = ["default" "development" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1bilbnc8j6jkb59lrf177i3p1pdyxll0n8400hzqr35vl3r3kv2m"; + sha256 = "0csjm9shhfik0ci9mgimb7hf3xgh7nx45rkd9rzgdz6vkwr8rzxn"; type = "gem"; }; - version = "2.0.0"; + version = "2.1.0"; }; unicorn = { dependencies = ["kgio" "raindrops"]; @@ -2322,10 +2382,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "038igpmkpmn0nw0k7s4db8x88af1nwcy7wzh9m9c9q4p74h7rii0"; + sha256 = "1l8vh8p0g92cqcvv0ra3mblsa4nczh0rz8nbwbkc3g3yzbva85xk"; type = "gem"; }; - version = "3.12.2"; + version = "3.14.0"; }; webpush = { dependencies = ["hkdf" "jwt"]; @@ -2363,9 +2423,9 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1746czsjarixq0x05f7p3hpzi38ldg6wxnxxw74kbjzh1sdjgmpl"; + sha256 = "18l4r6layck0d80ydc692mv1lxak5xbf6w2paj1x7m2ggbggzxgj"; type = "gem"; }; - version = "2.4.2"; + version = "2.5.1"; }; } diff --git a/pkgs/servers/web-apps/discourse/update.py b/pkgs/servers/web-apps/discourse/update.py index ffdff7bc06a15..a0b9d5e6519d7 100755 --- a/pkgs/servers/web-apps/discourse/update.py +++ b/pkgs/servers/web-apps/discourse/update.py @@ -22,7 +22,7 @@ logger = logging.getLogger(__name__) class DiscourseRepo: - version_regex = re.compile(r'^v\d+\.\d+\.\d+$') + version_regex = re.compile(r'^v\d+\.\d+\.\d+.beta\d+$') _latest_commit_sha = None def __init__(self, owner: str = 'discourse', repo: str = 'discourse'): -- cgit 1.4.1 From ab042d6452751e9d6e7c222e5fcb194e3d3c0ba9 Mon Sep 17 00:00:00 2001 From: talyz Date: Fri, 26 Nov 2021 14:59:09 +0100 Subject: discourse.plugins: Update all plugins to their latest versions Also, add support for updating plugins which keep gem versions in files at the root of the repo (discourse-prometheus) and replace the `up-plugin.sh` script with a README file pointing to the plugin packaging documentation. --- nixos/modules/services/web-apps/discourse.xml | 2 +- pkgs/servers/web-apps/discourse/plugins/README | 4 +++ .../discourse/plugins/discourse-assign/default.nix | 4 +-- .../plugins/discourse-calendar/Gemfile.lock | 4 +-- .../plugins/discourse-calendar/default.nix | 4 +-- .../plugins/discourse-calendar/gemset.nix | 8 ++--- .../plugins/discourse-chat-integration/default.nix | 4 +-- .../plugins/discourse-checklist/default.nix | 4 +-- .../plugins/discourse-data-explorer/default.nix | 4 +-- .../discourse/plugins/discourse-docs/default.nix | 4 +-- .../discourse/plugins/discourse-github/default.nix | 4 +-- .../discourse/plugins/discourse-ldap-auth/Gemfile | 3 ++ .../plugins/discourse-ldap-auth/Gemfile.lock | 6 ++-- .../plugins/discourse-ldap-auth/default.nix | 4 +-- .../plugins/discourse-ldap-auth/gemset.nix | 4 +-- .../discourse/plugins/discourse-math/default.nix | 4 +-- .../plugins/discourse-openid-connect/default.nix | 4 +-- .../discourse/plugins/discourse-prometheus/Gemfile | 4 +-- .../plugins/discourse-prometheus/Gemfile.lock | 2 +- .../plugins/discourse-prometheus/default.nix | 4 +-- .../prometheus_exporter_version | 1 + .../discourse/plugins/discourse-solved/default.nix | 4 +-- .../plugins/discourse-spoiler-alert/default.nix | 4 +-- .../discourse/plugins/discourse-voting/default.nix | 4 +-- .../plugins/discourse-yearly-review/default.nix | 4 +-- .../web-apps/discourse/plugins/up-plugin.sh | 39 ---------------------- pkgs/servers/web-apps/discourse/update.py | 13 ++++++-- 27 files changed, 63 insertions(+), 87 deletions(-) create mode 100644 pkgs/servers/web-apps/discourse/plugins/README create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/prometheus_exporter_version delete mode 100755 pkgs/servers/web-apps/discourse/plugins/up-plugin.sh diff --git a/nixos/modules/services/web-apps/discourse.xml b/nixos/modules/services/web-apps/discourse.xml index 184c9c6363e50..e91d3eac422de 100644 --- a/nixos/modules/services/web-apps/discourse.xml +++ b/nixos/modules/services/web-apps/discourse.xml @@ -297,7 +297,7 @@ services.discourse = { the script: ./update.py update-plugins -. + diff --git a/pkgs/servers/web-apps/discourse/plugins/README b/pkgs/servers/web-apps/discourse/plugins/README new file mode 100644 index 0000000000000..e0a88211dae89 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/README @@ -0,0 +1,4 @@ +Run the nixpkgs/pkgs/servers/web-apps/discourse/update.py script to +update plugins! See the Plugins section of the Discourse chapter in +the NixOS manual (https://nixos.org/manual/nixos/unstable/index.html#module-services-discourse) +for more info. diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-assign/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-assign/default.nix index a514425c40311..ce0d3c1373714 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-assign/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-assign/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-assign"; - rev = "5124ba0f67e26a075f0a0fc8993273f1211d1c28"; - sha256 = "1zd2irp5siza0vd5rlwzmjfvcdfw785988jc526xc741flazk1lr"; + rev = "91d0712b0440b6bb0c2fedbf6c31191cdeb991fe"; + sha256 = "sha256-ATWLu0vJZFquRcAUpFKaU8mqjjVOv3PziAsHR3aemWk="; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-docs"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/Gemfile.lock b/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/Gemfile.lock index d31b4afe51912..c06404848514a 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/Gemfile.lock +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/Gemfile.lock @@ -8,14 +8,14 @@ GEM tzinfo (~> 2.0) zeitwerk (~> 2.3) concurrent-ruby (1.1.9) - i18n (1.8.10) + i18n (1.8.11) concurrent-ruby (~> 1.0) minitest (5.14.4) rrule (0.4.2) activesupport (>= 4.1) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - zeitwerk (2.4.2) + zeitwerk (2.5.1) PLATFORMS ruby diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/default.nix index a437f293fa6fe..6bcdb3119c3ac 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/default.nix @@ -6,8 +6,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-calendar"; - rev = "2f76cdd3064735d484be1df77f43100aca21aea6"; - sha256 = "1skpc8p5br1jkii1rksha1q95ias6xxyvi5bnli3q41w7fz1h5j2"; + rev = "fbc617a5fa9f3a22bcc72bc2b32ea3cbdf6087c5"; + sha256 = "sha256-qBtq8IvxdKYIFNL9DwdRqZceMMO/qgd6jTr3kk3so3Y="; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-calendar"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/gemset.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/gemset.nix index 4f1e4c100c0bd..0248d93fc9401 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/gemset.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-calendar/gemset.nix @@ -26,10 +26,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0g2fnag935zn2ggm5cn6k4s4xvv53v2givj1j90szmvavlpya96a"; + sha256 = "0vdd1kii40qhbr9n8qx71k2gskq6rkl8ygy8hw5hfj8bb5a364xf"; type = "gem"; }; - version = "1.8.10"; + version = "1.8.11"; }; minitest = { groups = ["default"]; @@ -68,9 +68,9 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1746czsjarixq0x05f7p3hpzi38ldg6wxnxxw74kbjzh1sdjgmpl"; + sha256 = "18l4r6layck0d80ydc692mv1lxak5xbf6w2paj1x7m2ggbggzxgj"; type = "gem"; }; - version = "2.4.2"; + version = "2.5.1"; }; } diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-chat-integration/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-chat-integration/default.nix index 3079447dbb0a6..b7123aca7d760 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-chat-integration/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-chat-integration/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-chat-integration"; - rev = "8ade892b387f0ce843d5e78ef4a271b0d35847ff"; - sha256 = "1qn1bm09i9gzmh74ws32zgc89hrqzyhmh63qvmv0h00r52rmgxvx"; + rev = "ae0389ca89f26401a6c4cffaaae6adcf14af0e15"; + sha256 = "sha256-wT9S2mMz2MOpWpYv/FrHYhZibStRIGC4P2Vrqs04bkA="; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-chat-integration"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix index 2bcf88da150ae..c02614f0c0947 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-checklist"; - rev = "48855d81b7c3a3274f7f78a64312125c344d92d1"; - sha256 = "0139v5wpyglfzvd07ka6gic1ssfysisgfiq09dsbjy519gnc9kjw"; + rev = "d8012abd3d6dccb72eec83e6a96ef4809dcad681"; + sha256 = "1ngjql65939c571gyaqj8ydcxy5kkril2qlkxqf579vvwzpvxw13"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-checklist"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix index 90218759cac56..46f0ec4d2ca53 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-data-explorer"; - rev = "23287ece952cb45203819e7b470ebc194c58cb13"; - sha256 = "1vc2072r72fkvcfpy6vpn9x4gl9lpjk29pnj8095xs22im8j5in1"; + rev = "3ce778ec6d96a300a06ffe0581f4681fbed8df7f"; + sha256 = "1555k1anrijfbm0qfraby3ivh6h76177d541nxhnarj85mjx0hjb"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-data-explorer"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-docs/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-docs/default.nix index 1206fb0cd6ada..78ae9aba6fc65 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-docs/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-docs/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-docs"; - rev = "72cdd8d415ae3f797c0d5e2c857370714a42c54a"; - sha256 = "07hvw8lpg8873vhwh8rrbml3s5hq606b7sw93r2xv38gxfhmx5lq"; + rev = "d3eee7008b7a703774331808e302e36f2f8b4eae"; + sha256 = "1p3aqfpv207pvlbis43znwgw56yqsn41320yaw1gdcaakf5s2rsx"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-docs"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix index 0ea57071ebec2..f56c23febbb68 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix @@ -6,8 +6,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-github"; - rev = "9aaf4350968fb758f9bff3588f78e3ad24ddb4b0"; - sha256 = "0nmpkh1rr0jv68a655f5610v2mn09xriiqv049a0gklap2lgv7p8"; + rev = "8cd8c0703991c16cb2fa8cb1fd22a9c3849c7ae2"; + sha256 = "17ga31a10sm3fqjpf40mz7fk62vynyng2a243pia9fjdq9py8slx"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-github"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile index 897a808c1d7db..a988913a1bf62 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile @@ -2,6 +2,9 @@ source "https://rubygems.org" +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } + +# gem "rails" gem 'pyu-ruby-sasl', '0.0.3.3', require: false gem 'rubyntlm', '0.3.4', require: false gem 'net-ldap', '0.14.0' diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile.lock b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile.lock index 2843cb0d8f09d..83e3cd4cbf47b 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile.lock +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - hashie (4.1.0) + hashie (5.0.0) net-ldap (0.14.0) omniauth (1.9.1) hashie (>= 3.4.6) @@ -16,7 +16,7 @@ GEM rubyntlm (0.3.4) PLATFORMS - x86_64-linux + ruby DEPENDENCIES net-ldap (= 0.14.0) @@ -25,4 +25,4 @@ DEPENDENCIES rubyntlm (= 0.3.4) BUNDLED WITH - 2.2.20 + 2.2.24 diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/default.nix index 92a3c2544cda2..ea71c69a07d23 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/default.nix @@ -6,8 +6,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "jonmbake"; repo = "discourse-ldap-auth"; - rev = "eca02c560f2f2bf42feeb1923bc17e074f16b891"; - sha256 = "sha256-HLNoDvvxkBMvqP6WbRrJY0CYnK92W77nzSpuwgl0VPA="; + rev = "1c10221836393c3cfac470a7b08de6f31150c802"; + sha256 = "sha256-IiAl3OTADXSUnL+OKKHJY9Xqd4zCNJ2wOrgTN3nm5Yw="; }; meta = with lib; { homepage = "https://github.com/jonmbake/discourse-ldap-auth"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/gemset.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/gemset.nix index e684a50647914..7d5816cf53cba 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/gemset.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-ldap-auth/gemset.nix @@ -4,10 +4,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "02bsx12ihl78x0vdm37byp78jjw2ff6035y7rrmbd90qxjwxr43q"; + sha256 = "1nh3arcrbz1rc1cr59qm53sdhqm137b258y8rcb4cvd3y98lwv4x"; type = "gem"; }; - version = "4.1.0"; + version = "5.0.0"; }; net-ldap = { groups = ["default"]; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix index 812ea88d04028..ea449e9501daa 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-math"; - rev = "d7d0180352dd5a7dcb76c0817bfbb08c2a0f08c7"; - sha256 = "0y72impvnq965ibbfc9877hr78fxkrwav1xmgyy3r9w87952vcwa"; + rev = "cacbd04bb239db3c772ff5a37c19fe39d127ff3d"; + sha256 = "1bhs7wslb4rdf2b6h6klw1mpjf9pjpfpf2zg2mj8vg0acyaqvv9d"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-math"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-openid-connect/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-openid-connect/default.nix index 7162aa8a16ffc..ba5bf27eb77c8 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-openid-connect/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-openid-connect/default.nix @@ -6,8 +6,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-openid-connect"; - rev = "615038bd65f4fbe4dfdf8444b2f5eb06986b80b8"; - sha256 = "n8feZkP80iNc+BzTPyKD7kEgFSIkk091eJYuqonN/NU="; + rev = "0e1511fcec2bbb26ef08e453920e955d4140df42"; + sha256 = "02knx3z0ycz83cdarld2hmmpl6f9nkd2snp0qsbk9mjvbfvpfkni"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-openid-connect"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile index 3a73fc55839dd..ed57d552593ed 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } # gem "rails" -gem 'prometheus_exporter', '0.5.0' +gem 'prometheus_exporter', File.read(File.expand_path("../prometheus_exporter_version", __FILE__)).strip diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock index 75c139cbfc0ef..7fbd6680db6cf 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/Gemfile.lock @@ -10,4 +10,4 @@ DEPENDENCIES prometheus_exporter (= 0.5.0) BUNDLED WITH - 2.1.4 + 2.2.24 diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix index 4c6c12f22b3f6..2685f73f17153 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix @@ -6,8 +6,8 @@ src = fetchFromGitHub { owner = "discourse"; repo = "discourse-prometheus"; - rev = "46260710e8770344af438f86b47409d864a1c499"; - sha256 = "0nmpi0nysp59x4hyn1c3niypvxw1jkz86acb6m8acacw0c6682k2"; + rev = "08138ae4f89da76dd577781a2116b2ab66f8f547"; + sha256 = "1x4awgx9fj0a6drsix3mi39ynj56rca3km0fz2xb3g6vxgc7d2z1"; }; patches = [ diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/prometheus_exporter_version b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/prometheus_exporter_version new file mode 100644 index 0000000000000..8f0916f768f04 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/prometheus_exporter_version @@ -0,0 +1 @@ +0.5.0 diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix index b66aa1a7fab85..2e9654ef4ae71 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-solved"; - rev = "55cb184f7ef2954326561cc44fc8134798b8a9e0"; - sha256 = "0pv5i216zn0v8xfwlndvhvr06vkmxaynj8xjfnc5amy1sp6k76w7"; + rev = "40277e50d43e4bdaab99efab44f59f6e33d74740"; + sha256 = "02n266swdslws8r26xf99l3ghpqd3dryd0qfp7kiqk3ksy8hh5n2"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-solved"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix index 5b745cbd603b2..85f54655f1716 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-spoiler-alert"; - rev = "0b93227ea8e2c72afe72029382081ebff89c3638"; - sha256 = "0x0dxb41ss15sv5ph7z7q55ayf8a7r22bgkmr17924mny5440b5a"; + rev = "790380d9d321f9368c7a16d8ed87718fc6047bf2"; + sha256 = "079w4x2wlbsx164wv0zb373r8552wb5fvrb9pqzmrfvy0ybwf328"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-spoiler-alert"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-voting/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-voting/default.nix index f7748f5a52d37..fdc0c0f051a4b 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-voting/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-voting/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-voting"; - rev = "fc4d23174eba1a57ddcba93eaf4a4e75d469d4a4"; - sha256 = "07mj667qn387kaafg475f36pgnannsrb2bdqi0zj487av43252qb"; + rev = "36a41c2969c1ddfd8980e3f766b730b849726a08"; + sha256 = "0ns2i8liwpd29kbn44wzx9yb0jfpyz70h0hmrs71hz6fdalzm4ph"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-voting"; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix index ea48d9997bb81..0cd8363ba0f4c 100644 --- a/pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix @@ -5,8 +5,8 @@ mkDiscoursePlugin { src = fetchFromGitHub { owner = "discourse"; repo = "discourse-yearly-review"; - rev = "cb040562f6af3163d70e8932867b530c6640ab9a"; - sha256 = "07h6nq4bafs27ly2f5chkn5vb1wdy909qffwkgp5k1fanhbqvhvs"; + rev = "683327574ea1a67c9c4182c887d6ba85171ca02b"; + sha256 = "0y0hvb2ir9254ilpf7mnbn9xvv9anyqj4qwh97cw7jly7n2mga4m"; }; meta = with lib; { homepage = "https://github.com/discourse/discourse-yearly-review"; diff --git a/pkgs/servers/web-apps/discourse/plugins/up-plugin.sh b/pkgs/servers/web-apps/discourse/plugins/up-plugin.sh deleted file mode 100755 index ba103c5f6b2bc..0000000000000 --- a/pkgs/servers/web-apps/discourse/plugins/up-plugin.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p bash curl ruby.devEnv git sqlite libpcap postgresql libxml2 libxslt pkg-config bundix gnumake -# src https://nixos.wiki/wiki/Packaging/Ruby - -# This script should be ran afte rupdating a plugin that has a gemset.nix -# Usage: ./up-plugin.sh -# NOTE: Script must be ran directly as ./up-plugin, otherwise the nix-shell won't work - -set -exuo pipefail - -PLUGIN="$1" -SELF="$(dirname "$(readlink -f "$0")")" - -PL_DIR="$SELF/$PLUGIN" -TOP="$SELF/../../../../.." -TMP=$(mktemp -d) - -pushd "$TMP" - -if cat "$PL_DIR/default.nix" | grep gemdir >/dev/null; then - nix-build -A discourse.plugins.$PLUGIN.src "$TOP" - if [ -e result/Gemfile ]; then - cp result/Gemfile Gemfile - if [ -e result/Gemfile.lock ]; then - cp result/Gemfile.lock Gemfile.lock - fi - else - echo '# frozen_string_literal: true - -source "https://rubygems.org"' > Gemfile - cat result/plugin.rb | grep "^gem" >> Gemfile - fi - if [ ! -e Gemfile.lock ]; then - bundle install - fi - bundix - cp Gemfile Gemfile.lock gemset.nix "$PL_DIR" -fi - diff --git a/pkgs/servers/web-apps/discourse/update.py b/pkgs/servers/web-apps/discourse/update.py index a0b9d5e6519d7..2c4fc59cec11d 100755 --- a/pkgs/servers/web-apps/discourse/update.py +++ b/pkgs/servers/web-apps/discourse/update.py @@ -212,9 +212,8 @@ def update_plugins(): {'name': 'discourse-ldap-auth', 'owner': 'jonmbake'}, {'name': 'discourse-math'}, {'name': 'discourse-migratepassword', 'owner': 'discoursehosting'}, - # We can't update this automatically at the moment because the plugin.rb - # tries to load a version number which breaks bundler called by this script. - # {'name': 'discourse-prometheus'}, + {'name': 'discourse-prometheus'}, + {'name': 'discourse-openid-connect'}, {'name': 'discourse-saved-searches'}, {'name': 'discourse-solved'}, {'name': 'discourse-spoiler-alert'}, @@ -302,11 +301,19 @@ def update_plugins(): rubyenv_dir = Path(filename).parent gemfile = rubyenv_dir / "Gemfile" + version_file_regex = re.compile(r'.*File\.expand_path\("\.\./(.*)", __FILE__\)') gemfile_text = '' for line in repo.get_file('plugin.rb', repo.latest_commit_sha).splitlines(): if 'gem ' in line: gemfile_text = gemfile_text + line + os.linesep + version_file_match = version_file_regex.match(line) + if version_file_match is not None: + filename = version_file_match.groups()[0] + content = repo.get_file(filename, repo.latest_commit_sha) + with open(rubyenv_dir / filename, 'w') as f: + f.write(content) + if len(gemfile_text) > 0: if os.path.isfile(gemfile): os.remove(gemfile) -- cgit 1.4.1 From 4fb343c87e29bf1f33b49a1bcc210a57d9d42f1d Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 2 Dec 2021 11:55:07 +0100 Subject: discourse: update.py: Improve version handling, use pinned plugins Add a DiscourseVersion class which handles Discourse's version numbering properly when sorting - beta versions are sorted lower than their respective release versions. It can also return both its version number and equivalent git tag, removing the need for `rev2version` and manually adding `v` to the front. Using DiscourseVersion instead of LooseVersion, we can list all current version number tags from the `discourse` repo and sort them correctly, giving us the latest one, regardless of type; i.e. we don't have to filter for only release versions or beta versions anymore. This also implements the plugin pinning algorithm laid out here: https://meta.discourse.org/t/pinning-plugin-and-theme-versions-for-older-discourse-installs/156971 to make sure we don't upgrade plugins further than what's compatible with our currently packaged Discourse version. While it likely won't matter much most of the time if we continue packaging the beta versions, it could be helpful if we decide to go back to packaging release versions or if we run into issues with future upgrades. In that case, the plugins could still be updated safely even though we're not on the latest version of Discourse. --- pkgs/servers/web-apps/discourse/update.py | 150 ++++++++++++++++++++++-------- 1 file changed, 109 insertions(+), 41 deletions(-) diff --git a/pkgs/servers/web-apps/discourse/update.py b/pkgs/servers/web-apps/discourse/update.py index 2c4fc59cec11d..418c89d388b68 100755 --- a/pkgs/servers/web-apps/discourse/update.py +++ b/pkgs/servers/web-apps/discourse/update.py @@ -1,5 +1,6 @@ #!/usr/bin/env nix-shell #! nix-shell -i python3 -p bundix bundler nix-update nix-universal-prefetch python3 python3Packages.requests python3Packages.click python3Packages.click-log +from __future__ import annotations import click import click_log @@ -13,16 +14,70 @@ import stat import json import requests import textwrap +from functools import total_ordering from distutils.version import LooseVersion +from itertools import zip_longest from pathlib import Path -from typing import Iterable +from typing import Union, Iterable logger = logging.getLogger(__name__) +@total_ordering +class DiscourseVersion: + """Represents a Discourse style version number and git tag. + + This takes either a tag or version string as input and + extrapolates the other. Sorting is implemented to work as expected + in regard to A.B.C.betaD version numbers - 2.0.0.beta1 is + considered lower than 2.0.0. + + """ + + tag: str = "" + version: str = "" + split_version: Iterable[Union[None, int, str]] = [] + + def __init__(self, version: str): + """Take either a tag or version number, calculate the other.""" + if version.startswith('v'): + self.tag = version + self.version = version.lstrip('v') + else: + self.tag = 'v' + version + self.version = version + self.split_version = LooseVersion(self.version).version + + def __eq__(self, other: DiscourseVersion): + """Versions are equal when their individual parts are.""" + return self.split_version == other.split_version + + def __gt__(self, other: DiscourseVersion): + """Check if this version is greater than the other. + + Goes through the parts of the version numbers from most to + least significant, only continuing on to the next if the + numbers are equal and no decision can be made. If one version + ends in 'betaX' and the other doesn't, all else being equal, + the one without 'betaX' is considered greater, since it's the + release version. + + """ + for (this_ver, other_ver) in zip_longest(self.split_version, other.split_version): + if this_ver == other_ver: + continue + if type(this_ver) is int and type(other_ver) is int: + return this_ver > other_ver + elif 'beta' in [this_ver, other_ver]: + # release version (None) is greater than beta + return this_ver is None + else: + return False + + class DiscourseRepo: - version_regex = re.compile(r'^v\d+\.\d+\.\d+.beta\d+$') + version_regex = re.compile(r'^v\d+\.\d+\.\d+(\.beta\d+)?$') _latest_commit_sha = None def __init__(self, owner: str = 'discourse', repo: str = 'discourse'): @@ -30,15 +85,14 @@ class DiscourseRepo: self.repo = repo @property - def tags(self) -> Iterable[str]: + def versions(self) -> Iterable[str]: r = requests.get(f'https://api.github.com/repos/{self.owner}/{self.repo}/git/refs/tags').json() tags = [x['ref'].replace('refs/tags/', '') for x in r] # filter out versions not matching version_regex - versions = list(filter(self.version_regex.match, tags)) - - # sort, but ignore v for sorting comparisons - versions.sort(key=lambda x: LooseVersion(x.replace('v', '')), reverse=True) + versions = filter(self.version_regex.match, tags) + versions = [DiscourseVersion(x) for x in versions] + versions.sort(reverse=True) return versions @property @@ -50,24 +104,15 @@ class DiscourseRepo: return self._latest_commit_sha - @staticmethod - def rev2version(tag: str) -> str: - """ - normalize a tag to a version number. - This obviously isn't very smart if we don't pass something that looks like a tag - :param tag: the tag to normalize - :return: a normalized version number - """ - # strip v prefix - return re.sub(r'^v', '', tag) - def get_file(self, filepath, rev): """returns file contents at a given rev :param filepath: the path to the file, relative to the repo root :param rev: the rev to fetch at :return: """ - return requests.get(f'https://raw.githubusercontent.com/{self.owner}/{self.repo}/{rev}/{filepath}').text + r = requests.get(f'https://raw.githubusercontent.com/{self.owner}/{self.repo}/{rev}/{filepath}') + r.raise_for_status() + return r.text def _call_nix_update(pkg, version): @@ -89,13 +134,13 @@ def _get_current_package_version(pkg: str): return _nix_eval(f'{pkg}.version') -def _diff_file(filepath: str, old_version: str, new_version: str): +def _diff_file(filepath: str, old_version: DiscourseVersion, new_version: DiscourseVersion): repo = DiscourseRepo() current_dir = Path(__file__).parent - old = repo.get_file(filepath, 'v' + old_version) - new = repo.get_file(filepath, 'v' + new_version) + old = repo.get_file(filepath, old_version.tag) + new = repo.get_file(filepath, new_version.tag) if old == new: click.secho(f'{filepath} is unchanged', fg='green') @@ -111,7 +156,7 @@ def _diff_file(filepath: str, old_version: str, new_version: str): text=True ) - click.secho(f'Diff for {filepath} ({old_version} -> {new_version}):', fg='bright_blue', bold=True) + click.secho(f'Diff for {filepath} ({old_version.version} -> {new_version.version}):', fg='bright_blue', bold=True) click.echo(diff_proc.stdout + '\n') return @@ -153,10 +198,10 @@ def print_diffs(rev, reverse): """ if rev == 'latest': repo = DiscourseRepo() - rev = repo.tags[0] + rev = repo.versions[0].tag - old_version = _get_current_package_version('discourse') - new_version = DiscourseRepo.rev2version(rev) + old_version = DiscourseVersion(_get_current_package_version('discourse')) + new_version = DiscourseVersion(rev) if reverse: old_version, new_version = new_version, old_version @@ -170,30 +215,32 @@ def print_diffs(rev, reverse): def update(rev): """Update gem files and version. - REV should be the git rev to update to ('vX.Y.Z') or 'latest'; - defaults to 'latest'. + REV should be the git rev to update to ('vX.Y.Z[.betaA]') or + 'latest'; defaults to 'latest'. """ repo = DiscourseRepo() if rev == 'latest': - rev = repo.tags[0] - logger.debug(f"Using rev {rev}") + version = repo.versions[0] + else: + version = DiscourseVersion(rev) - version = repo.rev2version(rev) - logger.debug(f"Using version {version}") + logger.debug(f"Using rev {version.tag}") + logger.debug(f"Using version {version.version}") rubyenv_dir = Path(__file__).parent / "rubyEnv" for fn in ['Gemfile.lock', 'Gemfile']: with open(rubyenv_dir / fn, 'w') as f: - f.write(repo.get_file(fn, rev)) + f.write(repo.get_file(fn, version.tag)) subprocess.check_output(['bundle', 'lock'], cwd=rubyenv_dir) _remove_platforms(rubyenv_dir) subprocess.check_output(['bundix'], cwd=rubyenv_dir) - _call_nix_update('discourse', repo.rev2version(rev)) + _call_nix_update('discourse', version.version) + @cli.command() def update_plugins(): @@ -229,13 +276,34 @@ def update_plugins(): repo = DiscourseRepo(owner=owner, repo=repo_name) + # implement the plugin pinning algorithm laid out here: + # https://meta.discourse.org/t/pinning-plugin-and-theme-versions-for-older-discourse-installs/156971 + # this makes sure we don't upgrade plugins to revisions that + # are incompatible with the packaged Discourse version + try: + compatibility_spec = repo.get_file('.discourse-compatibility', repo.latest_commit_sha) + versions = [(DiscourseVersion(discourse_version), plugin_rev.strip(' ')) + for [discourse_version, plugin_rev] + in [line.split(':') + for line + in compatibility_spec.splitlines()]] + discourse_version = DiscourseVersion(_get_current_package_version('discourse')) + versions = list(filter(lambda ver: ver[0] >= discourse_version, versions)) + if versions == []: + rev = repo.latest_commit_sha + else: + rev = versions[0][1] + print(rev) + except requests.exceptions.HTTPError: + rev = repo.latest_commit_sha + filename = _nix_eval(f'builtins.unsafeGetAttrPos "src" discourse.plugins.{name}') if filename is None: filename = Path(__file__).parent / 'plugins' / name / 'default.nix' filename.parent.mkdir() has_ruby_deps = False - for line in repo.get_file('plugin.rb', repo.latest_commit_sha).splitlines(): + for line in repo.get_file('plugin.rb', rev).splitlines(): if 'gem ' in line: has_ruby_deps = True break @@ -277,7 +345,7 @@ def update_plugins(): prev_commit_sha = _nix_eval(f'discourse.plugins.{name}.src.rev') - if prev_commit_sha == repo.latest_commit_sha: + if prev_commit_sha == rev: click.echo(f'Plugin {name} is already at the latest revision') continue @@ -286,14 +354,14 @@ def update_plugins(): 'nix-universal-prefetch', fetcher, '--owner', owner, '--repo', repo_name, - '--rev', repo.latest_commit_sha, + '--rev', rev, ], text=True).strip("\n") - click.echo(f"Update {name}, {prev_commit_sha} -> {repo.latest_commit_sha} in {filename}") + click.echo(f"Update {name}, {prev_commit_sha} -> {rev} in {filename}") with open(filename, 'r+') as f: content = f.read() - content = content.replace(prev_commit_sha, repo.latest_commit_sha) + content = content.replace(prev_commit_sha, rev) content = content.replace(prev_hash, new_hash) f.seek(0) f.write(content) @@ -303,14 +371,14 @@ def update_plugins(): gemfile = rubyenv_dir / "Gemfile" version_file_regex = re.compile(r'.*File\.expand_path\("\.\./(.*)", __FILE__\)') gemfile_text = '' - for line in repo.get_file('plugin.rb', repo.latest_commit_sha).splitlines(): + for line in repo.get_file('plugin.rb', rev).splitlines(): if 'gem ' in line: gemfile_text = gemfile_text + line + os.linesep version_file_match = version_file_regex.match(line) if version_file_match is not None: filename = version_file_match.groups()[0] - content = repo.get_file(filename, repo.latest_commit_sha) + content = repo.get_file(filename, rev) with open(rubyenv_dir / filename, 'w') as f: f.write(content) -- cgit 1.4.1 From 125bb7dac1fcf9829ff93a33ed19665a72872ecd Mon Sep 17 00:00:00 2001 From: talyz Date: Mon, 6 Dec 2021 14:21:39 +0100 Subject: discourse: Don't patch the public path Instead of patching the path to /public in Discourse's sources, make the nginx configuration refer to the symlink in the discourse package which points to the real path. When there is a mismatch between the path nginx serves and the path Discourse thinks it serves, we can run into issues like files not being served - at least when sendfile requests from the ruby app are processed by nginx. The issue I ran into most recently is that backup downloads don't work. Since Discourse refers to the public directory relative to the Rails root in many places, it's much easier to just sync this path to the nginx configuration than trying to patch all occurrences in the sources. This should hopefully mean less potential for breakage in future Discourse releases, too. --- nixos/modules/services/web-apps/discourse.nix | 8 ++++---- pkgs/servers/web-apps/discourse/default.nix | 5 ----- pkgs/servers/web-apps/discourse/public_dir_path.patch | 13 ------------- 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 pkgs/servers/web-apps/discourse/public_dir_path.patch diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix index 1c7ffd59a596e..18b61200aa1b0 100644 --- a/nixos/modules/services/web-apps/discourse.nix +++ b/nixos/modules/services/web-apps/discourse.nix @@ -841,7 +841,7 @@ in inherit (cfg) sslCertificate sslCertificateKey enableACME; forceSSL = lib.mkDefault tlsEnabled; - root = "/run/discourse/public"; + root = "${cfg.package}/share/discourse/public"; locations = let @@ -893,7 +893,7 @@ in "~ ^/uploads/" = proxy { extraConfig = cache_1y + '' proxy_set_header X-Sendfile-Type X-Accel-Redirect; - proxy_set_header X-Accel-Mapping /run/discourse/public/=/downloads/; + proxy_set_header X-Accel-Mapping ${cfg.package}/share/discourse/public/=/downloads/; # custom CSS location ~ /stylesheet-cache/ { @@ -915,7 +915,7 @@ in "~ ^/admin/backups/" = proxy { extraConfig = '' proxy_set_header X-Sendfile-Type X-Accel-Redirect; - proxy_set_header X-Accel-Mapping /run/discourse/public/=/downloads/; + proxy_set_header X-Accel-Mapping ${cfg.package}/share/discourse/public/=/downloads/; ''; }; "~ ^/(svg-sprite/|letter_avatar/|letter_avatar_proxy/|user_avatar|highlight-js|stylesheets|theme-javascripts|favicon/proxied|service-worker)" = proxy { @@ -942,7 +942,7 @@ in }; "/downloads/".extraConfig = '' internal; - alias /run/discourse/public/; + alias ${cfg.package}/share/discourse/public/; ''; }; }; diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 62e9be80bcd9a..6134b307c24da 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -264,11 +264,6 @@ let # Make sure the notification email setting applies ./notification_email.patch - - # Change the path to the public directory reported by Discourse - # to its real path instead of the symlink in the store, since - # the store path won't be matched by any nginx rules - ./public_dir_path.patch ]; postPatch = '' diff --git a/pkgs/servers/web-apps/discourse/public_dir_path.patch b/pkgs/servers/web-apps/discourse/public_dir_path.patch deleted file mode 100644 index 0c6579736e22f..0000000000000 --- a/pkgs/servers/web-apps/discourse/public_dir_path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/file_store/local_store.rb b/lib/file_store/local_store.rb -index 25649532c0..614e062dc1 100644 ---- a/lib/file_store/local_store.rb -+++ b/lib/file_store/local_store.rb -@@ -88,7 +88,7 @@ module FileStore - end - - def public_dir -- File.join(Rails.root, "public") -+ "/run/discourse/public" - end - - def tombstone_dir -- cgit 1.4.1