Commit Graph

10449 Commits

Author SHA1 Message Date
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
evazion
12eacbe76f Merge pull request #4800 from nonamethanks/fix-skeb
Skeb: add support for multi-image posts and fix tests
2021-05-17 12:16:21 -05:00
nonamethanks
1bc266a3db Skeb: add support for multi-image posts and fix tests 2021-05-16 12:50:39 +02:00
evazion
efcfb9a440 users: don't show upgrade notice to banned users.
No point in shilling Danbooru Gold to banned users.
2021-05-15 04:36:22 -05:00
evazion
90a4ac3bf5 users: reword ban notice messages.
* Show the ban length instead of the ban expiration date in ban notices.
* Fix the ban notice to not say "Your account has been temporarily
  banned" when it's a permanent ban.
2021-05-15 04:36:22 -05:00
evazion
8ca757244a users: rename recent_ban to active_ban. 2021-05-15 04:36:22 -05:00
evazion
2537145b02 users: disallow banned users from changing email or deleting account.
This is to prevent people from wiping their email address after they've
been banned and reusing it to verify a new account.
2021-05-15 04:36:22 -05:00
GlassedSilver
4cf62c520c Script unflat (#4798)
Added fix script to unflatten data w/o symlinking
2021-05-15 02:58:56 -05:00
evazion
ffbf7f1ccf tests: fix broken tests. 2021-05-15 02:48:13 -05:00
evazion
cb8cbed0ec views: fix deprecated keyword argument warnings in current_page?. 2021-05-15 02:48:13 -05:00
evazion
ca8bfb9149 Update Ruby gems and Yarn packages. 2021-05-15 02:48:13 -05:00
evazion
e36fb6fee3 /status: show HTTP request headers and client IP.
Show the HTTP request headers and the client IP on the /status page.
This is for debugging request headers added by reverse proxies such as
Cloudflare and Nginx, and for making sure the client IP is correctly set
by the X-Forwarded-For header.
2021-05-06 00:32:24 -05:00
evazion
ba5a2dcd79 Merge pull request #4794 from nonamethanks/fix-skeb
Skeb: fix broken strategy
2021-05-05 05:08:52 -05:00
evazion
0a199e73c5 Merge pull request #4782 from nonamethanks/feat-nicoseiga-spoiler
Nicoseiga: auto-add spoiler tags to commentary
2021-05-05 05:07:13 -05:00
nonamethanks
e95731d58f Skeb: fix broken strategy 2021-05-04 21:18:12 +02:00