Commit Graph

221 Commits

Author SHA1 Message Date
Earlopain
a34c2217b6 [Tests] Use factory_bot_rails and clean up test_helper requires 2022-11-25 19:56:14 +01:00
Earlopain
32112d9e42
[Tests] Remove unused mock_redis 2022-11-25 14:33:58 +01:00
Earlopain
55d020877f
[Tests] Replace FFaker with FactoryBot sequences 2022-11-25 14:33:02 +01:00
Earlopain
c9f65608de
[Tests] Replace timecop with native Rails method
Also removes it at a bunch of places where it's not needed
2022-11-25 14:32:56 +01:00
Earlopain
044901ab44
[Gems] Lock sidekiq to v6
sidekiq-unique-jobs is incompatible with sidekiq 7, but doesn't prevent the upgrade.
2022-11-25 09:13:30 +01:00
Earlopain
dd3fb80b8c
Merge remote-tracking branch 'origin/master' into rails-7 2022-10-23 19:35:57 +02:00
Earlopain
179a948cf2
[Docker] Add solargraph to the image, and a few more things
* Allow modifying .env without git complainging about changes to commit
* Require COMPOSE_PROFILE=solargraph for solargraph to be included in the image
* Set required vscode settings for solargraph to correctly work in docker
* Clean up .solargraph.yml. All these removed values are the default
* Disable autocomplete in the rails console
* Add a compose service to run rubocop

* Upddate rubocop config

Added some, removed some, ordered alphabetically.
Before: 844 files inspected, 6871 offenses detected, 6095 offenses autocorrectable
After: 844 files inspected, 8024 offenses detected, 7538 offenses autocorrectable
Most of the new offences are because of Style/StringLiterals (1312)
2022-10-18 23:35:18 +02:00
Earlopain
fbc06182cc
[Rails] Update to 7 and run app:update 2022-10-10 13:22:35 +02:00
Earlopain
7331b9a5de
[Cleanup] Remove unused packages 2022-06-12 20:58:18 +02:00
Earlopain
57f711bb4d
Merge branch 'master' into ruby-3 2022-05-28 15:45:25 +02:00
Kira
42578e58a5 [Gems] Add missing gems needed for prod config.
It seems like active_mailer loads these even if they aren't used.
2022-05-26 15:51:05 -07:00
Earlopain
eff1500059
[Cleanup] Remove some unusted dev/test gems 2022-05-26 19:23:25 +02:00
Earlopain
b05a8a5a51
[Cleanup] Replace ruby-imagespec with Vips::Image
ImageSpec is also capable of providing sizes for flash, but that isn't
exactly relevant anymore
2022-05-26 18:10:20 +02:00
Earlopain
87235d6e92
[Ruby] Update to 3.1
net-smtp is no longer bundled by default
Webrick is no longer bundled by default, new rails projects are created
with puma in the gemfile
2022-04-25 21:27:09 +02:00
Earlopain
326bf9594f
[Cleanup] Remove mock services 2022-05-19 12:04:56 +02:00
Earlopain
3de690961d
[Cleanup] Remove unused gems and tables/columns 2022-04-07 19:17:33 +02:00
Earlopain
a80c9af67f
[Uploads] Improve invalid file ext error reporting 2022-03-21 16:50:17 +01:00
Kira
048e5d7182 [Rails] Update to rails 6
Fix sidekiq initializer
2021-02-25 12:08:09 -08:00
Kira
32e81770ef Update tests 2021-02-25 12:00:09 -08:00
Kira
4d996fed54 Update allowed tag naming patterns 2020-12-20 11:31:52 -08:00
Kira
70ff62dc73 [DText] New dtext version - Fix wiki links with anchors 2020-05-22 00:27:15 -07:00
Kira
52bf44cc8f Revert "Fetch post counts instead of relying on the estimate"
This reverts commit e50094f588.
2020-01-23 08:56:59 -08:00
Kira
e50094f588 Fetch post counts instead of relying on the estimate 2020-01-23 08:53:56 -08:00
Kira
0c69db869c Post serializer 2020-01-02 10:23:09 -08:00
Kira
3d7f1532f2 Send mail using mailgun 2019-09-13 12:46:44 -07:00
Kira
532e2c1e04 Update to rails 6 2019-08-28 21:50:40 -07:00
Kira
a1dc709594 Update all the gems. Game over YEAH! 2019-08-10 05:02:15 -07:00
Kira
e60cc2a46f Remove unused gems 2019-08-10 04:56:05 -07:00
Kira
c28ad3b8a3 Remove unused term-ansicolor and query tracer config 2019-08-10 04:49:18 -07:00
Kira
8f4c2e85e7 Use updated dtext and deferred posts 2019-05-01 13:17:08 -07:00
Kira
f72b9fd1e1 Add RequestStore gem 2019-04-30 04:46:40 -07:00
Kira
11f64ce743 Add Draper for decorators 2019-04-14 02:30:01 -07:00
Kira
e62099af44 A whole boatload of elasticsearch changes
Makes index job unique to account for changes to update triggering.
Fixes instances of mixed SQL and ES searches with tag_matches.
Adds utility methods for exists? and count_only ES searches.
Adds comment_bumped_at for comments page usage.
Adds random seeding capability.
Fixes random searches not working correctly.
Fixes status:active.
2019-03-28 14:04:01 -07:00
byte
d1aa2e69f5 add post index 2019-03-24 08:45:44 -04:00
Kira
22a077a2dd Convert delayed_jobs to activejob
Add sidekiq and create jobs for the majority of delayed actions.

Temporary hookup of sidekiq UI in routes for testing purposes.
2019-02-17 19:28:40 -08:00
Albert Yi
0508b127fd continue refactoring savedsearch 2018-11-15 12:06:13 -08:00
Albert Yi
df02eb7951 eliminate listbooru references 2018-11-12 18:02:49 -08:00
evazion
d3c135ec72 Downloads::File#http_get_streaming: clean up retry logic.
Replace handrolled retry logic with retriable gem (already pulled in by another gem).
2018-09-18 09:44:15 -05:00
Albert Yi
881c76c788 update readme, remove sprockets gem 2018-08-01 15:34:15 -07:00
Albert Yi
6fa0ae2cf1 Migrate assets to use Webpacker 2018-07-27 15:24:05 -07:00
r888888888
344c46ed00 add mock recommender service for development, add user-context recommended posts 2018-07-21 14:02:57 -07:00
Albert Yi
f1ca252b3c wip 2018-05-11 10:52:03 -07:00
evazion
18c40b0d60 Fix #3678: "Access denied" when adding commentary. 2018-04-27 18:32:15 -05:00
Albert Yi
c4a4394ea0 update gems (fixes #3665) 2018-04-25 14:35:52 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
evazion
dc9b7e5bda Fix #3582: Switch from ImageMagick to libvips 2018-03-28 17:15:57 -05:00
r888888888
3657cacd17 * post keeper is calculated synchronously
* add fallback mechanism in case archive service is not up
* pass along most recently added tags to any keeper calculation
2018-03-08 16:00:44 -08:00
r888888888
f82d6fa686 fixes #3512 2018-01-30 11:04:50 -08:00
evazion
074a4be38f Update gems. 2018-01-20 19:04:48 -06:00
r888888888
704816066d add recaptcha for signup process 2017-09-16 12:44:17 -07:00