From 1f98cc17ab3c2cc10af92053b9fbc0cba2a30b5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@ericsson.com>
Date: Wed, 18 Sep 2024 14:57:25 +0200
Subject: [PATCH] ver bump

---
 .codeclimate.yml       | 33 ----------------------------
 .gitlab-ci.yml         | 41 ++++++++++++++++++++++++++++++++++
 .travis.yml            | 50 ------------------------------------------
 LICENSE                |  2 +-
 setup.cfg              |  2 +-
 tests/test_minijson.py |  4 ++--
 6 files changed, 45 insertions(+), 87 deletions(-)
 delete mode 100644 .codeclimate.yml
 create mode 100644 .gitlab-ci.yml
 delete mode 100644 .travis.yml

diff --git a/.codeclimate.yml b/.codeclimate.yml
deleted file mode 100644
index 62b6105..0000000
--- a/.codeclimate.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-engines:
-  duplication:
-    enabled: true
-    config:
-      languages:
-        python:
-
-  fixme:
-    enabled: true
-  markdownlint:
-    enabled: true
-  pep8:
-    enabled: true
-exclude_paths:
-  - tests/**
-  - setup.py
-ratings:
-  paths:
-    - flask_minijson.py
-checks:
-  argument-count:
-    config:
-      threshold: 15
-  method-complexity:
-    config:
-      threshold: 50
-  method-count:
-    config:
-      threshold: 85
-  file-lines:
-    enabled: true
-    config:
-      threshold: 700
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..825d36e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,41 @@
+
+.test:
+  stage: test
+  before_script:
+    - pip install --break-system-packages --upgrade pytest setuptools pip coverage nose2
+    - pip install ".[dev,test]"
+  script:
+    - pytest -n 8 -vv --cov=satella
+    - coverage xml
+    - coverage report
+  coverage: /TOTAL.*\s+(\d+\%)/
+
+test_python37:
+  extends: .test
+  image: python:3.7
+
+test_python38:
+  extends: .test
+  image: python:3.8
+
+test_python39:
+  extends: .test
+  image: python:3.9
+
+
+build_python:
+  stage: build
+  before_script:
+    - pip install --break-system-packages --upgrade Cython setuptools pip twine
+  script:
+    - python setup.py bdist_wheel
+    - mv dist/*.whl .
+  artifacts:
+    paths:
+      - "*.whl"
+  after_script:
+    - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi *.whl
+  only:
+    - tags
+  except:
+    - branches
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 9b054a7..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-language: python
-stages:
-  - name: test
-
-cache: pip
-before_script:
-  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
-  - chmod +x ./cc-test-reporter
-  - ./cc-test-reporter before-build
-  - pip install -r requirements.txt
-  - pip install -U pytest-xdist pytest-cov pytest pytest-forked pluggy py
-  - python setup.py install
-jobs:
-  include:
-    - stage: test
-      python: "3.5"
-      script:
-        - pytest -n 8 --cov=flask_minijson
-      after_script:
-        - coverage xml
-        - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
-    - stage: test
-      python: "3.6"
-      script:
-        - pytest -n 8 --cov=flask_minijson
-      after_script:
-        - coverage xml
-        - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
-    - stage: test
-      python: "3.7"
-      script:
-        - pytest -n 8 --cov=flask_minijson
-      after_script:
-        - coverage xml
-        - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
-    - stage: test
-      python: "3.8"
-      script:
-        - pytest -n 8 --cov=flask_minijson
-      after_script:
-        - coverage xml
-        - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
-    - stage: test
-      python: "3.9"
-      script:
-        - pytest -n 8 --cov=flask_minijson
-      after_script:
-        - coverage xml
-        - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
-
diff --git a/LICENSE b/LICENSE
index f71070c..6a5437b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
 MIT License
 
 Copyright (c) 2021 Dronehub Group sp. z o. o.
-Copyright (c) 2024 Piotr Maślanka
+Copyright (c) 2024 SMOK sp. z o. o.
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/setup.cfg b/setup.cfg
index a8781f7..83e9cbf 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 # coding: utf-8
 [metadata]
-version = 0.4
+version = 0.5
 name = flask-minijson
 long_description = file: README.md
 long_description_content_type = text/markdown; charset=UTF-8
diff --git a/tests/test_minijson.py b/tests/test_minijson.py
index b2fa422..b66bfd2 100644
--- a/tests/test_minijson.py
+++ b/tests/test_minijson.py
@@ -11,9 +11,9 @@ class TestMiniJSON(unittest.TestCase):
 
     def test_minijson(self):
         data = minijson.dumps({'1': '2'})
-        resp = self.client.post('/v1', data=data, headers={'Content-Type': 'application/x-minijson'})
+        resp = self.client.post('/v1', data=data, headers={'Accept': 'application/x-minijson'})
         self.assertEqual(resp.get_json(), {'status': 'ok'})
-        resp = self.client.post('/v1', data=data, headers={'Content-Type': 'application/minijson'})
+        resp = self.client.post('/v1', data=data, headers={'Accept': 'application/minijson'})
         self.assertEqual(resp.get_json(), {'status': 'ok'})
         resp = self.client.post('/v1', json={'1': '3'})
         self.assertEqual(resp.get_json(), {'status': 'fail'})
-- 
GitLab