Commit Graph

202 Commits

Author SHA1 Message Date
evazion
648ba14021 gems: add rake to gemfile.
Fixes issue with newrelic failing to set up rake instrumentation:

    ERROR : Error while detecting rake_instrumentation:
    ERROR : NameError: uninitialized constant Rake::VERSION
2019-09-01 13:10:37 -05:00
evazion
6e7b882dda tests: skip ugoira tests if ffmpeg/mkvmerge not installed. 2019-09-01 13:10:37 -05:00
evazion
3f86a60457 Upgrade to Rails 6.0.0. 2019-08-27 18:13:30 -05:00
evazion
50df810e67 gems: drop foreman gem.
Foreman is unmaintained and locked to a really old version of thor,
which prevents upgrading to Rails 6.

The Procfile can still be used by manually installing Foreman with
`gem install foreman`. This is what Foreman's README recommends anyway.
2019-08-25 20:29:32 -05:00
evazion
dfe2b831a3 cache: replace memcache with redis.
Drop memcache. Use redis for all caching instead.
2019-08-22 23:15:34 -05:00
evazion
27a118dfc8 tests: drop timecop gem. 2019-08-18 11:24:41 -05:00
evazion
06b564cf76 Fix failure with did_you_mean in bundle install.
Deploying to production failed during `bundle install` because of an
incompatibility between did_you_mean-1.3.0 + ruby-2.6 + rubygems-3.0 +
bundler-2.0.

ref: `https://github.com/yuki24/did_you_mean/issues/117#issuecomment-482565387`
2019-08-15 01:23:10 -05:00
evazion
ca2e2c92b9 artist versions: fix uninitialized constant error.
Error appears intermittently depending on module load order.
2019-08-13 21:30:20 -05:00
evazion
601e58d5c5 Fix exception in legacy /post/index.xml endpoint.
Fixes intermittent `uninitialized constant LegacyController::Builder` exceptions.
2019-08-12 19:20:33 -05:00
evazion
266259de54 gems: add pry-rails, meta_request, rack-mini-profiler. 2019-08-09 00:05:50 -05:00
evazion
50fdb9fe92 Update gems. 2019-08-08 14:00:46 -05:00
evazion
853becbcfc circleci: try to fix the build. 2019-08-08 01:07:57 -05:00
evazion
5231371100 posts: drop img.ly source normalization.
There are only two posts from this site and the site itself is defunct:

* https://danbooru.donmai.us/posts/1561685
* https://danbooru.donmai.us/posts/1412508
* https://img.ly/ofxl
2019-08-07 22:11:07 -05:00
evazion
1be4ca5a98 Drop unused gems. 2019-08-07 22:11:07 -05:00
evazion
ef68d42dbe Drop unused query tracer code + term-ansicolor gem. 2019-08-07 22:11:07 -05:00
Albert Yi
a12f6badde add RequestStore gem, support universal only param for api endpoints (fixes #4068) 2019-04-17 12:00:42 -07: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
r888888888
b944b642b8 akismet integration 2017-09-14 13:37:36 -07:00
r888888888
d7690d24b0 fixes #3039 2017-06-29 16:05:01 -07:00
evazion
d5ce6c98ef tumblr: add tumblr api client. 2017-06-25 15:34:15 -05:00
evazion
48001c1293 gems: update sanitize to 4.5.0; add addressable. 2017-06-17 11:57:32 -05:00
Albert Yi
a7b8a0d9f7 Merge pull request #3158 from evazion/fix-expunge-post
Fix #3156: Expunging posts is broken
2017-06-15 11:34:02 -07:00
evazion
a844a1daf4 posts: fix expunging posts not deleting files.
Fix expungement to ignore the "file still in use" check.
2017-06-14 21:31:24 -05:00
r888888888
d691c1de36 fixes #3066: add bootsnap support 2017-06-14 16:35:16 -07:00
r888888888
b053a2d783 add source + rewrite strategy for pawoo 2017-04-20 15:50:22 -07:00
r888888888
621bef3ddf Revert "Merge pull request #2952 from evazion/fix-2950"
This reverts commit ae4509a541197684bfb0538f65afa827854b4335, reversing
changes made to eb008a0e765e231a8fdef594759a61798d6bd1d5.
2017-04-14 12:28:58 -07:00
evazion
3c89ee3199 tests: add more post/pool version creation tests.
Adds the `test_after_commit` gem too because after_commit callbacks
don't fire inside tests in rails <5.0.
2017-04-03 15:03:59 -07:00
r888888888
33db2b868f include daemons gem 2017-02-28 14:07:47 -08:00
evazion
176f5775b4 Gemfile.lock: update sass-rails to 5.0.6. 2017-02-28 00:11:26 -06:00
evazion
59bb705307 Gemfile.lock: update awesome_print to 1.7.0. 2017-02-28 00:11:25 -06:00
evazion
822d881096 Gemfile.lock: update pry-byebug to 3.4.2. 2017-02-28 00:11:25 -06:00
evazion
bdbf54aef7 Gemfile: remove unused gems.
coffee-rails and daemons are unused.

kgio, net-ssh, and nokogiri are pulled in by other gems, but they aren't
used by us directly, so they shouldn't need to be listed in the Gemfile.
2017-02-28 00:11:25 -06:00
evazion
615e4bbebd Gemfile: move test group to bottom. 2017-02-28 00:11:25 -06:00
Albert Yi
5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
evazion
e8cf417e9c tests: update gems to latest versions.
Also fix a few things that broke under shoulda-matchers 3.1.1.
2017-02-04 22:17:15 -06:00
evazion
3eb525ad01 dotenv: add gem. 2017-01-23 16:38:14 -06:00