1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 21:26:44 +02:00
Commit Graph

809 Commits

Author SHA1 Message Date
Anatoli Babenia fec99a7a54 Properly setup Flask logging to stderr
Sometimes there is nothing, sometimes lines are duplicated.

Duplicated lines problem appears, because Python root logger
handler and Flask's `werkzeug` logger handler both write the
same message. `cheat.sh` is hit, because it sets this root
logging handler.

Normally `werkzeug` doesn't setup its own handler if it sees
that there are some handlers that process its messages. This
in case of `cheat.sh` resulted in no stderr logging at all.
No Exceptions either. Because `werkzeug` catches the
exceptions and logs them.

Hovewer, sometimes `werkzeug` starts too early, befora app
is imported (https://github.com/pallets/werkzeug/issues/1969)
and sets its logger anyway, before the app itself, resulting
in duplicating lines. In that case app root handler needs to
skip lines from `werkzeug`.

Kudos to @brandon-rhodes for `logging_tree` awesomeness
2020-11-17 13:38:16 +03:00
Igor Chubin a4be5d8025 Merge pull request #255 from chubin/chubin.ci
Chubin.ci
2020-11-17 01:04:24 +01:00
Igor Chubin a0a2268966 Update tests/results/7 (:random) 2020-11-16 23:59:42 +00:00
Igor Chubin d20cf0ca2a Merge branch 'master' into chubin.ci 2020-11-16 23:59:05 +00:00
Igor Chubin 426d251dcd Return 'cache' property in answer_dict 2020-11-16 23:58:57 +00:00
Igor Chubin 99c793fa29 Reorder commands in Dockerfile 2020-11-16 23:03:42 +00:00
Igor Chubin b8df31004c Disable caching for UpstreamAdapter 2020-11-16 22:54:18 +00:00
Igor Chubin f13d4f6b03 Merge pull request #260 from chubin/unboxing
Decouple Flask `app` from `gevent` monkeypatching
2020-11-16 20:33:25 +01:00
Igor Chubin 121298d786 Merge pull request #257 from fedebuonco/random-help
Added :random to the help page.
2020-11-16 18:56:58 +01:00
Anatoli Babenia 277b45e83c Decouple Flask app from gevent monkeypatching 2020-11-16 12:02:12 +03:00
fedeb 4eb5e618d1 Added :random to the help page. 2020-11-15 19:54:05 +01:00
Igor Chubin a538409f70 Upgrade pygments 2020-11-13 19:02:43 +00:00
Igor Chubin 372c5d0289 Copy requirements.txt 2020-11-13 18:39:50 +01:00
Igor Chubin 1245f7850f Merge pull request #254 from chubin/travis-cleanup
Clean up Travis files
2020-11-13 18:34:35 +01:00
Igor Chubin 0a80be83ae Move pip3 to right place 2020-11-13 18:31:23 +01:00
Igor Chubin 96fb2b1355 Move pip3 to right place 2020-11-13 18:21:28 +01:00
Anatoli Babenia c0f6f17623 Clean up Travis files 2020-11-13 16:04:06 +03:00
Anatoli Babenia 027d107c93 Fix invalid .yml for Actions
Ref. #253
2020-11-13 13:52:04 +01:00
Anatoli Babenia f568e3e306 Port .travis.yml to GitHub Actions 2020-11-13 13:52:04 +01:00
Anatoli Babenia 3cc9338d50 Try to build container with GitHub Actions 2020-11-13 13:52:04 +01:00
Anatoli Babenia 78aab551ad Fix invalid .yml for Actions
Ref. #253
2020-11-13 15:45:00 +03:00
Igor Chubin 28bcb58a54 Merge pull request #253 from chubin/travis2actions 2020-11-13 13:39:37 +01:00
Anatoli Babenia 9ab2987c0b Port .travis.yml to GitHub Actions 2020-11-13 15:37:41 +03:00
Anatoli Babenia 2bed107b4e Try to build container with GitHub Actions 2020-11-13 15:31:29 +03:00
Igor Chubin 1e5803aefe Install python requirements in Dockerfile (ci) 2020-11-13 12:49:24 +01:00
Igor Chubin fdb1deea76 Merge pull request #252 from chubin/chubin.ci
Show package versions
2020-11-13 12:27:50 +01:00
Igor Chubin bfa74bf526 Remove pip freeze from ci 2020-11-13 12:22:26 +01:00
Igor Chubin 62920beb75 Upgrade packages if they are already installed 2020-11-13 11:57:03 +01:00
Igor Chubin 11e7c6a2bd Show package versions 2020-11-13 11:47:22 +01:00
Igor Chubin d6e0b4220e Merge pull request #248 from fedebuonco/Random
Random
2020-11-13 08:31:08 +01:00
Igor Chubin d4cf5af1c1 Merge pull request #250 from chubin/actions-fetch
Fetch cheat sheets in GitHub actions
2020-11-12 22:54:34 +01:00
Igor Chubin 046de81a63 Add python-Levenshtein to requirements.txt 2020-11-12 21:48:11 +00:00
Igor Chubin 2a728c9dd0 Update tests/results/15 (python/:learn) 2020-11-12 20:18:53 +00:00
Anatoli Babenia bd87109242 Run GitHub build every week at Thursday 9am 2020-11-12 15:00:50 +03:00
Anatoli Babenia e1ec13dfd4 Python 3 is default on 20.04+ 2020-11-12 15:00:50 +03:00
Anatoli Babenia ae8edf01dd Fetch cheat sheets in GitHub actions 2020-11-12 15:00:50 +03:00
Igor Chubin b45e9555e4 Merge pull request #251 from chubin/chubin.log-dir-creation
Create logdir for fetch
2020-11-12 12:56:04 +01:00
Igor Chubin d8a7732806 Update lib/fetch.py
Co-authored-by: Anatoli Babenia <anatoli@rainforce.org>
2020-11-12 12:55:11 +01:00
Igor Chubin 72d2370843 Create logdir for fetch 2020-11-12 12:42:42 +01:00
Igor Chubin ee0f4c494b Merge pull request #249 from abitrolly/master
Test "production" container on Travis
2020-11-12 11:12:07 +01:00
Anatoli Babenia 067e0de4d7 Run GitHub tests on Ubuntu 20.04 2020-11-12 13:08:04 +03:00
Anatoli Babenia 48c7fc60fa Move all server init into before_install: section 2020-11-12 13:06:20 +03:00
Anatoli Babenia 80014fa037 Test "production" container on Travis 2020-11-12 12:48:02 +03:00
fedeb 45c803a274 Further removing of special cases 2020-11-10 11:19:43 +01:00
fedeb 73e4e46e3e Fixed readme & style, removed special cases from random pool. 2020-11-09 18:39:52 +01:00
fedeb f4cd21e4e0 Another check if a given topic has just the :list and rosetta/ 2020-11-07 21:15:26 +01:00
fedeb 2c9185d835 Added a line on the readme 2020-11-07 21:00:27 +01:00
fedeb f788f238a4 Minor fix on checking if is a random request 2020-11-07 20:48:38 +01:00
fedeb cb75302567 Fixed typo 2020-11-07 20:25:23 +01:00
fedeb e3ab4eafcb Fixed comments regarding :random 2020-11-07 20:15:54 +01:00