about summary refs log tree commit diff
path: root/spec
AgeCommit message (Collapse)Author
2018-04-03Improve require_admin! and require_staff! filters (#7018)Emelia Smith
Previously these returns 302 redirects instead of 403s, which meant posting links to admin pages in slack caused them to unfurl, rather than stay as a link. Additionally, require_admin! doesn't appear to be actively used, on require_staff!
2018-04-02Feature: Report improvements (#6967) (#7000)Emelia Smith
* Implement Assignment of Reports (#6967) * Change translation of admin.report.comment.label to "Report Comment" for clarity As we'll soon add the ability for reports to have comments on them, this clarification makes sense. * Implement notes for Reports This enables moderators to leave comments about a report whilst they work on it * Fix display of report moderation notes * Allow reports to be reopened / marked as unresolved * Redirect to reports listing upon resolution of report * Implement "resolve with note" functionality * Add inverse relationship for report notes * Remove additional database querying when loading report notes * Fix tests for reports * Fix localisations for report notes / reports
2018-04-01Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
Conflicts: app/javascript/mastodon/locales/en.json app/javascript/mastodon/locales/ja.json app/javascript/mastodon/locales/pl.json app/views/accounts/_header.html.haml
2018-04-01[WIP] Enable custom emoji on account pages and in the sidebar (#6124)David Underwood
Federate custom emojis with accounts
2018-03-27Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
2018-03-27Merge remote-tracking branch 'origin/master' into gs-masterDavid Yip
Conflicts: app/javascript/styles/mastodon/components.scss app/models/media_attachment.rb
2018-03-27Add a spec for UniqueUsernameValidator (#6927)unarist
Note that this spec has a pending test about dots in the username, because allowing it has been reverted for now.
2018-03-26Validate HTTP response length while receiving (#6891)Akihiko Odaki
to_s method of HTTP::Response keeps blocking while it receives the whole content, no matter how it is big. This means it may waste time to receive unacceptably large files. It may also consume memory and disk in the process. This solves the inefficency by checking response length while receiving.
2018-03-25Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-24Change columns in notifications nonnullable (#6764)Akihiko Odaki
2018-03-24Close http connection in perform method of Request class (#6889)Akihiko Odaki
HTTP connections must be explicitly closed in many cases, and letting perform method close connections makes its callers less redundant and prevent them from forgetting to close connections.
2018-03-20Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-20request: in the event of failure, try other IPs (#6761) (#6813)Rey Tucker
* request: in the event of failure, try other IPs (#6761) In the case where a name has multiple A/AAAA records, we should try subsequent records instead of immediately failing when we have a failure on the first IP address. This significantly improves delivery success when there are network connectivity problems affecting only IPv4 or IPv6. * fix method call style * request_spec: adjust test case to use Addrinfo * request: Request/open: move private addr check to within begin/rescue * request_spec: add case to test failover, fix exception check * Double Addrinfo.foreach so that it correctly yields instances
2018-03-09Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-03-07Fix #6657 - Use target instead of origin in Remove activity (#6664)Eugen Rochko
2018-03-05Redirect from Web tag timeline to public tag timeline if not signed in (#6633)Akihiko Odaki
This is also implemented in Pawoo: https://github.com/pixiv/mastodon/commit/ceafdbd1bbf30fe20a2a814df0f8cae429a4e9db
2018-03-04Do not default site_title with site_hostname in InstanceHelper (#6624)Akihiko Odaki
site_title is "Mastodon" by default configuration, and there is no need to default site_title with site_hostname in InstanceHelper.
2018-03-04Set the default locale in config (#6580)Akihiko Odaki
Previously the default locale was set by Localized concern for controllers, but it was not enforced for mailers. config is enforced throughout the application and an appropriate place to set the default locale.
2018-03-04Federate pinned statuses over ActivityPub (#6610)Eugen Rochko
* Federate pinned statuses over ActivityPub * Display pinned toots in web UI Fix #6117 * Fix migration * Fix tests * Update outbox_serializer.rb * Update remove_serializer.rb * Update add_serializer.rb * Update fetch_featured_collection_service.rb
2018-03-04Fix missing focalPoint in ActivityPub JSON (#6609)Eugen Rochko
2018-03-02Merge remote-tracking branch 'origin/master' into merge-upstreamDavid Yip
Conflicts: README.md app/controllers/follower_accounts_controller.rb app/controllers/following_accounts_controller.rb app/serializers/rest/instance_serializer.rb app/views/stream_entries/_simple_status.html.haml config/locales/simple_form.ja.yml
2018-02-28Federated reports (#6570)Eugen Rochko
* Fix #2176: Federated reports * UI for federated reports * Add spec for ActivityPub Flag handler * Add spec for ReportService
2018-02-24Raise Mastodon::HostValidationError when host for HTTP request is private ↵Akihiko Odaki
(#6410)
2018-02-24Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-24Do not push status to feed if its reblog is already inserted (#6488)Akihiko Odaki
A complemental change for precompute_feed_service_spec.rb also fixes its random failure which is caused by the Snowlake randomization of the order of an original status and its reblog.
2018-02-23Merge branch 'master' of https://github.com/tootsuite/mastodonimncls
# Conflicts: # app/controllers/settings/exports_controller.rb # app/models/media_attachment.rb # app/models/status.rb # app/views/about/show.html.haml # docker_entrypoint.sh # spec/views/about/show.html.haml_spec.rb
2018-02-22Redesign landing page (again) (#6486)Eugen Rochko
* Redesign landing page (again) * Move login form in small version to the right column * Display closed registrations message * Add site setting for the hero image * Fix test * Increase spacing, maximum width, change call to action section
2018-02-21Fix bug in relationships API introduced by #6482 (#6527)Eugen Rochko
It was merge when it needed to be deep_merge. And added some tests
2018-02-21Account archive download (#6460)Eugen Rochko
* Fix #201: Account archive download * Export actor and private key in the archive * Optimize BackupService - Add conversation to cached associations of status, because somehow it was forgotten and is source of N+1 queries - Explicitly call GC between batches of records being fetched (Model class allocations are the worst offender) - Stream media files into the tar in 1MB chunks (Do not allocate media file (up to 8MB) as string into memory) - Use #bytesize instead of #size to calculate file size for JSON (Fix FileOverflow error) - Segment media into subfolders by status ID because apparently GIF-to-MP4 media are all named "media.mp4" for some reason * Keep uniquely generated filename in Paperclip::GifTranscoder * Ensure dumped files do not overwrite each other by maintaing directory partitions * Give tar archives a good name * Add scheduler to remove week-old backups * Fix code style issue
2018-02-20Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-20Improve performance of feed_manager_spec (#6517)abcang
2018-02-19Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-18Added fetch_remote_status_service call spec case actibitypub (#6500)Kazushige Tominaga
* Added #link_header spec * Added #call spec * Delete spec of private methods * Added call test case activitypub
2018-02-17Isolate each specs for cache store (#6450)Akihiko Odaki
The cache store is explicitly used by some specs, but they were not isolated and therefore not reliable. This fixes the issue by clearing the cache after each specs.
2018-02-17Limit the languages used for notification mailer test (#6487)Akihiko Odaki
Some available languages lack translations for notification mails. Now it tests for two languages which is certain to have required translations: German and English. German is the language the current project owner, Eugen Rochko speaks, and providing English translations for new messages is de facto mandatory.
2018-02-17Merge remote-tracking branch 'tootsuite/master' into merge-upstreamDavid Yip
Conflicts: Gemfile config/locales/simple_form.pl.yml
2018-02-16Save video metadata and improve video OpenGraph tags (#6481)Eugen Rochko
* Save metadata from video attachments, put correct dimensions into OG tags * Add twitter:player for videos * Fix code style and test
2018-02-11Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-11Fix URLs incorrectly having trailing hyphen removed (#6465)Daniel King
In cases where a URL has a trailing hyphen the FetchLinkCardService incorrectly removes the hyphen when it is parsed The hyphen is not a reserved character in the URI spec https://tools.ietf.org/html/rfc3986#section-2.2
2018-02-11Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-10Merge remote-tracking branch 'origin/merge-upstream'David Yip
2018-02-10Use Html2Text to generate plaintext for keyword mutes. #236.David Yip
This allows us to match URLs inside link hrefs.
2018-02-10Glitch::FilterHelper -> Glitch::KeywordMuteHelper. #234.David Yip
The class helps out with keyword mutes, not just some general concept of "filtering".
2018-02-10Added FetchRemoteAccountService spec (#6456)Kazushige Tominaga
* Added #link_header spec * Added #call spec * Delete spec of private methods * Added #call spec
2018-02-10Fill out some examples for Glitch::FilterHelper. #234.David Yip
Also add HTML entity decoding to Glitch::FilterHelper, which is needed to e.g. match "<" to the tag-stripped version of "<p><3</p>" or "<p>&lt;3</p>".
2018-02-10Added #call spec (#6455)Kazushige Tominaga
* Added #link_header spec * Added #call spec * Delete spec of private methods
2018-02-09Full-text search for authorized statuses (#6423)Eugen Rochko
* Add full-text search for authorized statuses - Search API will return statuses that match the query - Only for logged in users - Only if you are author of the status, - Or you were mentioned in it - Or you favourited or reblogged it - Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX` - Run `rails chewy:deploy` to create & populate index Fix #5880 Fix #4293 Fix #1152 * Add commented out docker-compose configuration for ES container * Optimize index import, filter search results * Add basic normalization to the index * Add better stemming and normalization to the index * Skip webfinger request if search query includes both @ and a space * Fix code style * Visually separate search result sections * Fix code style issues
2018-02-08Merge remote-tracking branch 'tootsuite/master' into glitchsoc/masterJenkins
2018-02-09Perform request spec (#6446)Kazushige Tominaga
* Added #link_header spec * Added #perform_request spec
2018-02-08Fix response of signature_verification_failure_reason (#6441)abcang