Unverified Commit d7353943 authored by Emily's avatar Emily Committed by GitHub
Browse files

lasuite-docs: 4.8.1 -> 4.8.4 (#504291)

parents 1b383355 86463cdd
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -13,20 +13,20 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "lasuite-docs-collaboration-server";
  version = "4.8.1";
  version = "4.8.4";

  src = fetchFromGitHub {
    owner = "suitenumerique";
    repo = "docs";
    tag = "v${finalAttrs.version}";
    hash = "sha256-R8DO7hsWt8+aKnHFEoZ06f1f+r8dNmNoPZRVBfr9VCY=";
    hash = "sha256-k90JxFxXL3vEGBMkgbQABUCK99utJ88E/v9Zcj/2oBo=";
  };

  sourceRoot = "${finalAttrs.src.name}/src/frontend";

  offlineCache = fetchYarnDeps {
    yarnLock = "${finalAttrs.src}/src/frontend/yarn.lock";
    hash = "sha256-F8VXjGY6Ct2Y8btqOmxZevCkxBvqg6xWZLYTZA2uUnM=";
    hash = "sha256-ElI6WWKPCsO7Viexgp2XtcjXAXzFnG2ZPN5PjOaKO2g=";
  };

  nativeBuildInputs = [
@@ -60,7 +60,10 @@ stdenv.mkDerivation (finalAttrs: {
    changelog = "https://github.com/suitenumerique/docs/blob/${finalAttrs.src.tag}/CHANGELOG.md";
    mainProgram = "docs-collaboration-server";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ soyouzpanda ];
    maintainers = with lib.maintainers; [
      soyouzpanda
      ma27
    ];
    platforms = lib.platforms.all;
  };
})
+18 −4
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  fetchFromGitHub,
  stdenv,
  fetchpatch,
  fetchYarnDeps,
  nodejs,
  fixup-yarn-lock,
@@ -12,20 +13,30 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "lasuite-docs-frontend";
  version = "4.8.1";
  version = "4.8.4";

  src = fetchFromGitHub {
    owner = "suitenumerique";
    repo = "docs";
    tag = "v${finalAttrs.version}";
    hash = "sha256-R8DO7hsWt8+aKnHFEoZ06f1f+r8dNmNoPZRVBfr9VCY=";
    hash = "sha256-k90JxFxXL3vEGBMkgbQABUCK99utJ88E/v9Zcj/2oBo=";
  };

  sourceRoot = "${finalAttrs.src.name}/src/frontend";

  patches = [
    # from https://github.com/suitenumerique/docs/pull/2147,
    # fixes the frontend when using the MIT build.
    (fetchpatch {
      url = "https://github.com/suitenumerique/docs/commit/79e909cf6489428d8f6644d772006f73503b7073.patch";
      hash = "sha256-Ucw1KtsFrPvtoeeG2fH5L64Jfcog4RV38Qg+EykGcQY=";
      stripLen = 2;
    })
  ];

  offlineCache = fetchYarnDeps {
    yarnLock = "${finalAttrs.src}/src/frontend/yarn.lock";
    hash = "sha256-F8VXjGY6Ct2Y8btqOmxZevCkxBvqg6xWZLYTZA2uUnM=";
    hash = "sha256-ElI6WWKPCsO7Viexgp2XtcjXAXzFnG2ZPN5PjOaKO2g=";
  };

  nativeBuildInputs = [
@@ -51,7 +62,10 @@ stdenv.mkDerivation (finalAttrs: {
    homepage = "https://github.com/suitenumerique/docs";
    changelog = "https://github.com/suitenumerique/docs/blob/${finalAttrs.src.tag}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ soyouzpanda ];
    maintainers = with lib.maintainers; [
      soyouzpanda
      ma27
    ];
    platforms = lib.platforms.all;
  };
})
+10 −4
Original line number Diff line number Diff line
@@ -11,12 +11,12 @@
  yarnConfigHook,
}:
let
  version = "4.8.1";
  version = "4.8.4";
  src = fetchFromGitHub {
    owner = "suitenumerique";
    repo = "docs";
    tag = "v${version}";
    hash = "sha256-R8DO7hsWt8+aKnHFEoZ06f1f+r8dNmNoPZRVBfr9VCY=";
    hash = "sha256-k90JxFxXL3vEGBMkgbQABUCK99utJ88E/v9Zcj/2oBo=";
  };

  mail-templates = stdenv.mkDerivation {
@@ -29,7 +29,7 @@ let

    offlineCache = fetchYarnDeps {
      yarnLock = "${src}/src/mail/yarn.lock";
      hash = "sha256-ag9+g48dWl5Ww/78qqgtcKwiyPVlpNiJ7w7+DPaar2U=";
      hash = "sha256-Fd9HJ7c7fh8YYZrfzRK7BnlnHAXeyeQ9UBabnRlA+w0=";
    };

    nativeBuildInputs = [
@@ -88,6 +88,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
      django-storages
      django-timezone-field
      django-treebeard
      django-waffle
      djangorestframework
      drf-spectacular
      drf-spectacular-sidecar
@@ -145,6 +146,8 @@ python3Packages.buildPythonApplication (finalAttrs: {

      mkdir -p $out/${python3.sitePackages}/core/templates
      ln -sv ${mail-templates}/ $out/${python3.sitePackages}/core/templates/mail

      cp -r impress/configuration $out/${python3.sitePackages}/impress/configuration
    '';

  passthru.tests = {
@@ -156,7 +159,10 @@ python3Packages.buildPythonApplication (finalAttrs: {
    homepage = "https://github.com/suitenumerique/docs";
    changelog = "https://github.com/suitenumerique/docs/blob/${finalAttrs.src.tag}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ soyouzpanda ];
    maintainers = with lib.maintainers; [
      soyouzpanda
      ma27
    ];
    mainProgram = "docs";
    platforms = lib.platforms.all;
  };
+48 −0
Original line number Diff line number Diff line
{
  buildPythonPackage,
  fetchFromGitHub,
  django,
  lib,
  setuptools,
  pytestCheckHook,
  pytest-django,
}:

buildPythonPackage (finalAttrs: {
  pname = "django-waffle";
  version = "5.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "django-waffle";
    repo = "django-waffle";
    tag = "v${finalAttrs.version}";
    hash = "sha256-wirB2Y4iONmAMVt9o8aTkeB1WQzcvktQOAMEeXMM1x8=";
  };

  patches = [
    # Middleware object requires a request -> response callable
    ./middleware-compat.patch
  ];

  build-system = [ setuptools ];

  dependencies = [ django ];

  nativeCheckInputs = [
    pytest-django
    pytestCheckHook
  ];

  preCheck = ''
    export DJANGO_SETTINGS_MODULE=test_settings
  '';

  meta = {
    changelog = "https://github.com/django-waffle/django-waffle/releases/tag/${finalAttrs.src.tag}";
    description = "Feature flipper for Django";
    homepage = "https://waffle.readthedocs.io/en/stable/";
    maintainers = [ lib.maintainers.ma27 ];
    license = lib.licenses.bsd3;
  };
})
+31 −0
Original line number Diff line number Diff line
diff --git a/waffle/tests/test_middleware.py b/waffle/tests/test_middleware.py
index 11af7c9..27293df 100644
--- a/waffle/tests/test_middleware.py
+++ b/waffle/tests/test_middleware.py
@@ -13,7 +13,7 @@ def test_set_cookies():
     assert 'dwf_foo' not in resp.cookies
     assert 'dwf_bar' not in resp.cookies
 
-    resp = WaffleMiddleware().process_response(get, resp)
+    resp = WaffleMiddleware(lambda request: HttpResponse()).process_response(get, resp)
     assert 'dwf_foo' in resp.cookies
     assert 'dwf_bar' in resp.cookies
 
@@ -27,7 +27,7 @@ def test_rollout_cookies():
                    'baz': [True, False],
                    'qux': [False, False]}
     resp = HttpResponse()
-    resp = WaffleMiddleware().process_response(get, resp)
+    resp = WaffleMiddleware(lambda request: HttpResponse()).process_response(get, resp)
     for k in get.waffles:
         cookie = f'dwf_{k}'
         assert cookie in resp.cookies
@@ -42,7 +42,7 @@ def test_testing_cookies():
     get.waffles = {}
     get.waffle_tests = {'foo': True, 'bar': False}
     resp = HttpResponse()
-    resp = WaffleMiddleware().process_response(get, resp)
+    resp = WaffleMiddleware(lambda request: HttpResponse()).process_response(get, resp)
     for k in get.waffle_tests:
         cookie = f'dwft_{k}'
         assert str(get.waffle_tests[k]) == resp.cookies[cookie].value
Loading