Commit Graph
10463 Commits
Author SHA1 Message Date
evazion 0bf60b3a53 Merge pull request #4826 from nonamethanks/add-disapproval-includes
Add post disapprovals to available includes
2021-06-24 03:52:45 -05:00
evazion 0ff107831e Merge pull request #4822 from nonamethanks/disallow-swf
Upload page: disallow swf uploads in javascript too
2021-06-24 03:50:50 -05:00
evazion 00ca7526bb docs: add remaining docs for classes in app/logical. 2021-06-24 01:31:41 -05:00
evazion c6855261fe gems: update activerecord-hierarchical_query gem.
The bug that blocked Rails 6.1 support was finally fixed upstream.
2021-06-23 06:23:29 -05:00
evazion 7fab2231c0 Update Ruby gems and Yarn packages. 2021-06-23 06:23:29 -05:00
evazion d482b87a9e docs: fix outdated link in dtext help.
`kaga_(kantai_collection)` was aliased to `kaga_(kancolle)`.
2021-06-23 06:23:29 -05:00
evazion ed302fdf4d docs: add documentation for various classes in app/logical. 2021-06-23 06:23:29 -05:00
evazion e5cfb7904c CurrentUser: remove #as method.
Replace with CurrentUser#scoped.
2021-06-22 23:39:30 -05:00
nonamethanks b7c73d7c9d Add post disapprovals to available includes 2021-06-21 21:12:00 +02:00
nonamethanks 89c14717ec Upload page: disallow swf uploads in javascript too 2021-06-21 03:32:16 +02:00
evazion 7f0edc32dd html: fix incorrect self-closing tags.
`<img/>` is incorrect in html5.
2021-06-19 19:23:54 -05:00
evazion 7de862deb2 test: fix random ip ban test failure.
Fix IP ban tests randomly failing because the randomly generated IP was
for a private network, which caused validation to fail.
2021-06-17 05:06:40 -05:00
evazion 8af946a49d tests: fix duplicate PostVersionTest class.
Fix `PostVersionTest` being defined in two different places, which broke
the test runner if you tried to run the system tests at the same time as
the regular tests.
2021-06-17 04:58:17 -05:00
evazion 3c79888610 Update Ruby gems and Yarn packages. 2021-06-17 04:56:42 -05:00
evazion 07e23204b6 rubocop: fix various Rubocop warnings. 2021-06-17 04:17:53 -05:00
evazion cfe471e0b5 gems: don't require Rubocop in Gemfile.
Requiring isn't necessary because it's a standalone tool, not a library.
2021-06-17 04:17:53 -05:00
evazion 9b59ba780b gems: add solargraph gem
Add the Solargraph gem to enable Ruby language integration for
supporting text editors.

This enables various features, including code completion, inline
documentation, type checking, syntax checking, linting, and jump to
definition/references.

Usage:

  Install Solargraph extension for your editor (see https://solargraph.org/guides)
  Run `bin/solargraph download-core` to install core Ruby language docs.
  Run `bin/solargraph bundle` to install Ruby gem docs.

See also:

* https://github.com/castwide/solargraph
* https://solargraph.org/guides/getting-started
* https://marketplace.visualstudio.com/items?itemName=castwide.solargraph
2021-06-17 04:10:26 -05:00
Thayol 6e2a5c6dde Mobile uncropped thumbnails: Fix sizing and overflow (#4818)
Fix #4460: Disabling cropped thumbnails is broken #4460

* Change width/height to max-width/max-height
* Change for cropped too
2021-06-17 04:09:20 -05:00
evazion 94d78d74a9 Merge pull request #4812 from nonamethanks/reorder-feedback-type
Reorder feedback type dropdown search
2021-06-17 04:01:54 -05:00
evazion 70f69a082b Merge pull request #4811 from nonamethanks/bur-link-to-forum-post
BUR individual page: show link to forum, not topic, if it exists
2021-06-17 04:01:41 -05:00
evazion 5648176f0e docker: add IQDB to Docker Compose file. 2021-06-16 07:14:07 -05:00
evazion 0f36bbf8d3 iqdb: update API client to use new version of IQDB.
Replace the old IQDB API client with a new client for the new forked
version of IQDB at https://github.com/danbooru/iqdb.

Changes:

* The /iqdb_queries endpoint now returns `hash` and `signature` fields.
  The `signature` is the full decoded Haar signature, while the `hash`
  is a encoded version of the signature.
* The /iqdb_queries endpoint no longer returns `width` and `height`
  fields in the response (these were always 128x128).
* We no longer need the IQDBs frontend server, now we talk to the IQDB
  instance directly.
* We no longer send add/remove image commands to IQDB through AWS SQS,
  now we send them to IQDB directly. They are sent in a delayed job so
  that if IQDB is down, uploading images is still possible, the add
  image commands will just get queued up.
* Fix a bug where regenerating an image's thumbnails didn't regenerate
  IQDB, because IQDB silently ignored add image commands when the image
  already existed in the database.
2021-06-16 05:36:24 -05:00
nonamethanks 9a49a257e1 Reorder feedback type dropdown search 2021-06-04 15:45:00 +02:00
evazion 5b208ddb78 discord: fix /posts command inside DMs
Fix a bug where the /posts command failed when used in a DM channel,
because we were trying to fetch a `nsfw` key that didn't exist.
2021-06-02 23:32:08 -05:00
nonamethanks 90823d7ee1 BUR individual page: show link to forum, not topic, if it exists 2021-06-02 23:58:51 +02:00
evazion 4003ddd788 Merge pull request #4808 from nonamethanks/fix-weibo
Weibo: fix new lengthier image urls breaking the batch bookmarklet
2021-06-02 15:17:54 -05:00
evazion 0c1caa5e8a Merge pull request #4806 from nonamethanks/fix-nijie-bookmarklet
Nijie: get correct image when using batch bookmarklet
2021-06-02 15:17:41 -05:00
evazion b4ccb3bede Merge pull request #4805 from nonamethanks/add-bur-help-link
BUR: add link to wiki help page in navbar
2021-06-02 15:17:32 -05:00
nonamethanks ac4b4a151c Weibo: fix new lengthier image urls breaking the batch bookmarklet 2021-05-31 00:36:53 +02:00
evazion e5a8736fab docker: fix failure to restart app with Docker Compose.
Fix docker-compose sometimes failing to restart the app. Puma's pidfile
was stored in /tmp, which was persisted across restarts, which caused
restarts to fail because the pidfile already existed. The fix is to
mount /tmp as a tmpfs.
2021-05-26 02:51:58 -05:00
evazion 55b7b96c6c docker: add redis to compose file. 2021-05-26 02:44:10 -05:00
evazion aab19a8cbb Update Ruby gems and Yarn packages. 2021-05-25 15:09:53 -05:00
nonamethanks 1234d93292 Nijie: get correct image when using bookmarklet 2021-05-25 12:20:39 +02:00
evazion f65f24be0b docker: add cron service to compose file. 2021-05-25 01:16:59 -05:00
evazion 37a51a941e Fix #4795: The first user created will not be an administrator account. 2021-05-24 22:10:57 -05:00
evazion 4439293bf1 newrelic: fix newrelic starting without license key.
Fix an issue where the New Relic agent always started in the production
environment, even when a license key wasn't configured.

Also make the New Relic agent log to stdout instead of log/newrelic_agent.log.
2021-05-24 21:58:01 -05:00
evazion 896ddab55d docker: add delayed job worker to compose file. 2021-05-24 20:15:05 -05:00
evazion c22df03804 Move script/delayed_job to bin/delayed_job.
This has been the recommended location since Rails 4.
2021-05-24 17:38:56 -05:00
nonamethanks b7fa8027a5 BUR: add link to wiki help page in navbar 2021-05-24 16:31:23 +02:00
evazion 2e2d75df0f Merge pull request #4804 from nonamethanks/fix-lofter-second-theme
Lofter: fix strategy for additional type of html theme
2021-05-23 11:07:31 -05:00
nonamethanks ac071b147f Lofter: fix strategy for additional type of html theme 2021-05-23 18:05:16 +02:00
evazion 8c52a070e3 tests: fix syntax error in tests.
Fix syntax error introduced in 24ead500. This broke the test suite in CI
which caused Codecov to report zero coverage.
2021-05-23 06:55:26 -05:00
evazion c7fda2772f posts: fix rare bug with first post.
Fix a rare bug that occurs once per year that causes post 1 to appear
insufficiently festive.
2021-05-23 06:33:29 -05:00
evazion 6cfdf51795 Merge pull request #4801 from nonamethanks/feat-lofter
Add Lofter support
2021-05-23 05:56:41 -05:00
evazion 3f6587089e docker: rename docker-compose file.
Move the docker-compose file up to the root directory so you can just do
`docker-compose up` to bring up Danbooru.
2021-05-21 08:05:02 -05:00
evazion 01dbd34d68 docker: use prebuilt docker images for quickstart script.
Use the prebuilt Docker images instead of building them locally in the
Docker Compose script. This is faster, but it means that local changes
to the code will be ignored.
2021-05-21 06:46:06 -05:00
evazion 6ca88f7e19 docker: fix issues with quickstart docker compose script.
* Fix installing the wrong Docker package on Ubuntu.
* Fix the package install steps asking for confirmation.
* Fix missing sudo calls in a couple places.
2021-05-21 06:44:04 -05:00
nonamethanks bc4fd16c2c Add Lofter support 2021-05-19 16:40:33 +02:00
evazion bafd341df0 docker: fix the Docker quickstart not working with Ubuntu 18.04.
Fix the quickstart command in the README not working for Ubuntu 18.04.
This was because the Docker Compose file was set to version 3.7, but
Ubuntu 18.04 ships an older version of Docker Compose that only supports
version 3.4.
2021-05-19 01:10:03 -05:00
evazion 24ead500f0 users: use sudo mode when changing email addresses.
When a user tries to change their email, redirect them to the confirm
password page (like Github's sudo mode) instead of having them re-enter
their password on the change email page. This is the same thing we do
when a user updates their API keys. This way we have can use the same
confirm password authentication flow for everything that needs a
password.
2021-05-19 01:10:03 -05:00