Commit Graph

29 Commits

Author SHA1 Message Date
Earlopain
2e140a5607
[Posts] Use addressable for source parsing
Fixes no icons for links with square brackets
2024-03-18 18:59:19 +01:00
Earlopain
45fd9d52a8
[RuboCop] Disallow logging in tests
Don't want these committed
2024-02-27 16:18:01 +01:00
Earlopain
2d7e507555
[Posts] Show an icon for non-matches urls 2024-02-27 15:48:52 +01:00
Cinder
e1e4b94a50
[Misc] External link favicons (now without a spritesheet) (#610)
* [Misc] Add favicons to some external links

* RuboCop changes from master

* Use packs for favicon images

This works better with caching.
If the file changes, the url changes

* Add favicons to an artists domain list

* Fix aliases

The lookup is done by strings, the keys were symbols

* Add old deviantart cdn alias

* Guard against links with that parse down to no host

http:twitter.com for example

* Tweak flow

* Add basic tests, fix some of what I probably broke

---------

Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
2024-02-25 20:27:54 +01:00
Earlopain
fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00
Earlopain
2620ea983e
[Wiki] Better diffing view 2023-10-15 13:08:28 +02:00
Earlopain
6eeacde1da
[Gems] Bump DText
This imports 3 years of commits from Danbooru. See #487
2023-04-09 15:50:43 +02:00
Earlopain
3740599920
[Tests] Fix a bunch of tests 2022-04-05 18:50:34 +02:00
evazion
88f4a56890 Fix #3497: Invalid DText denial of service attack. 2018-01-14 16:14:18 -06:00
evazion
4f543671a2 tests: move test/helpers to test/test_helpers.
The Rails convention is for test/helpers to be used for testing the view
helpers in app/helpers. We were using it to store certain utility
methods instead. Move these to test/test_helpers so that test/helpers
can be used for its intended purpose.
2018-01-14 16:11:15 -06:00
evazion
8125d8e796 Set the default User-Agent sent for outgoing http requests.
* Add a `Danbooru.config.http_headers` config option.

* Refactor various places to use this option instead of setting the user
  agent manually.
2017-07-19 20:25:27 -05:00
r888888888
d7690d24b0 fixes #3039 2017-06-29 16:05:01 -07:00
evazion
5684ba3b1d tests: factor out assert_downloaded to DownloadTestHelper. 2017-06-21 21:10:07 -05:00
evazion
d84feaa4bb posts: fix expunging posts not removing image from iqdb.
`File.exists?(preview_file_path)` is always false because the file has
already been deleted by this point. Remove the check entirely.
2017-06-14 21:31:30 -05:00
evazion
cdef9fda7d tests: fix send_message in post/pool archive helpers.
Since efe5e0e send_message is called with an extra param; fix mocked
send_message to handle this param.
2017-06-14 14:13:52 -05:00
r888888888
0b8d4105aa fix tests 2017-04-04 12:39:17 -07:00
r888888888
d9a26975ba fix tests 2017-03-15 16:08:47 -07:00
r888888888
43f31529d7 fixes #2920: "Undo" function not working for Post Versions 2017-03-09 11:44:28 -08:00
Albert Yi
5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
evazion
35b3398142 post_test.rb: add more metatag search tests. 2017-02-06 18:48:39 -06:00
evazion
3edd814be5 tests: add iqdb queries controller tests. 2017-02-06 18:48:37 -06:00
evazion
e26fb61ee9 tests: add explore/posts controller tests. 2017-02-06 18:48:36 -06:00
evazion
9b16c45edc test_helper.rb: factor out upload test helpers. 2017-02-04 17:18:52 -06:00
evazion
ace7d0c12d Fix moving saved searches tests.
4) Failure:
TagAliasTest#test_: A tag alias should move saved searches. [/home/danbooru/src/danbooru/test/unit/tag_alias_test.rb:80]:
Expected: "123 bbb 456"
  Actual: "123 ... 456"

 36) Failure:
Moderator::TagBatchChangeTest#test_: a tag batch change should move saved searches. [/home/danbooru/src/danbooru/test/unit/moderator/tag_batch_change_test.rb:40]:
Expected: "123 456 bbb"
  Actual: "123 ... 456"
2017-02-03 04:03:44 -06:00
Albert Yi
0ea7d78584 remove usage of vcr cassettes; delete unused fixtures; fix some broken unit tests 2016-12-28 15:47:28 -08:00
Albert Yi
62956be384 hide saved search functionality if not enabled 2016-12-21 14:53:39 -08:00
Albert Yi
ee4ebce4d7 support pool version archive 2016-12-21 11:43:46 -08:00
r888888888
f02f72fac1 implement saved searches, move user boolean settings to bitprefs 2014-06-18 16:16:27 -07:00
r888888888
7b97ca192c fixes #2190 2014-06-12 21:16:21 -07:00