about summary refs log tree commit diff
path: root/spec/lib
AgeCommit message (Collapse)Author
2017-07-21Use the same emoji data on the frontend and backend (#4284)Eugen Rochko
* Use the same emoji data on the frontend and backend * Move emoji.json to repository, add tests This way you don't need to install node dependencies if you only want to run Ruby code
2017-07-19Correct OStatus inflection (Ostatus -> OStatus) (#4255)Eugen Rochko
2017-07-18Add unfollow modal (optional) (#4246)Yamagishi Kazutoshi
* Add unfollow modal * unfollowing someone * remove unnecessary prop
2017-07-18Introduce Ostatus name space (#4164)Akihiko Odaki
* Wrap methods of ProcessFeedService::ProcessEntry in classes This is a change same with 425acecfdb15093a265b191120fb2d4e4c4135c4, except that it has the following changes: * Revert irrelevant change in find_or_create_conversation * Fix error handling for RemoteActivity * Introduce Ostatus name space
2017-07-14Fix subsequent replies to unresolved status not being filtered from home (#4190)Eugen Rochko
Resolves #4177 - smaller changeset
2017-07-14HTTP signatures (#4146)Eugen Rochko
* Add Request class with HTTP signature generator Spec: https://tools.ietf.org/html/draft-cavage-http-signatures-06 * Add HTTP signature verification concern * Add test for SignatureVerification concern * Add basic test for Request class * Make PuSH subscribe/unsubscribe requests use new Request class Accidentally fix lease_seconds not being set and sent properly, and change the new minimum subscription duration to 1 day * Make all PuSH workers use new Request class * Make Salmon sender use new Request class * Make FetchLinkService use new Request class * Make FetchAtomService use the new Request class * Make Remotable use the new Request class * Make ResolveRemoteAccountService use the new Request class * Add more tests * Allow +-30 seconds window for signed request to remain valid * Disable time window validation for signed requests, restore 7 days as PuSH subscription duration (which was previous default due to a bug)
2017-07-10Add setting a always mark media as sensitive (#4136)Yamagishi Kazutoshi
2017-07-07Refactor JSON templates to be generated with ActiveModelSerializers instead ↵Eugen Rochko
of Rabl (#4090)
2017-07-06Add a setting allowing the use of system's default font in Web UI (#4033)Damien Erambert
* add a system_font_ui setting on the server * Plug the system_font_ui on the front-end * add EN/FR locales for the new setting * put Roboto after all other fonts * remove trailing whitespace so CodeClimate is happy * fix user_spec.rb * correctly write user_spect this time * slightly better way of adding the classes * add comments to the system-font stack for clarification * use .system-font for the class instead * don't use multiple lines for comments * remove trailing whitespace * use the classnames module for consistency * use `mastodon-font-sans-serif` instead of Roboto directly
2017-06-29Reduce number of commands in FeedManager#trim (#3989)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-17Whitelist allowed classes for federated statuses (#3810)nightpool
* Whitelist allowed classes for federated statuses Allowed classes are currently: - Any microformats class (h/p/u/dt/e-*) - the classes mention, hashtag, ellipses and invisible. this last one is somewhat suspect, but Mastodon currently uses it to render hidden link text. resolved #3790 * Fix code style
2017-06-15Fix regression from #3490 - filter out hidden statuses from ↵Eugen Rochko
ancestors/descendants even if the viewer is anonymous (#3752)
2017-06-09Language detection defaults to nil (#3666)Matt Jankowski
* Default to nil for statuses.language * Language detection defaults to nil instead of instance UI default
2017-06-05Introduce StatusThreadingConcern (#3490)Matt Jankowski
* Add a StatusFilter class to identify visibility of statuses by accounts * Extract StatusThreadingConcern from Status * Clarify purpose of checking for nil account
2017-06-05Fix randomly fail (regression from #3560) (#3580)Yamagishi Kazutoshi
2017-06-05Skip image length check (regression from #3528) (#3581)Yamagishi Kazutoshi
2017-06-04Cover WebfingerResource more (#3560)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04Remove some code in TagManager and spec (#3547)Akihiko Odaki (@fn_aki@pawoo.net)
* Do not fall back to StreamEntry if object_type is unavailable in TagManager Since 6d6a429af8fe4bd92ed497f401676353fdc603e0, when Status, the only model with stream_entry, and StreamEntry got its own logic in uri_for and url_for, the purpose of the fallbacks to activity_type of StreamEntry became unclear. This commit removes the fallbacks. When adding another model with stream_entry in future, consider to update uri_for and url_for. * Cover TagManager more
2017-06-04Spec InlineRablScope (#3542)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04Spec HashObject (#3544)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04A minor change for ProviderDiscovery and spec (#3543)Akihiko Odaki (@fn_aki@pawoo.net)
* Do not default the format in ProviderDiscovery The format should be determined when discovering, as it is in the current implementation, and it is a flaw if it is not determined. * Spec ProviderDiscovery
2017-06-04Remove some arguments of Formatter.instance.format and spec (#3541)Akihiko Odaki (@fn_aki@pawoo.net)
* Remove some arguments of Formatter.instance.format * Improve spec for Formatter
2017-06-04Spec Extractor (#3540)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-04Spec action verification of StreamEntryFinder (#3549)Akihiko Odaki (@fn_aki@pawoo.net)
2017-06-03Remove redundant code in AtomSerializer and spec (#3528)Akihiko Odaki (@fn_aki@pawoo.net)
* Remove redundant status.reply? in AtomSerializer#object * Cover AtomSerializer more
2017-06-01Remove usernames and hashtags from language detection (#3503)Matt Jankowski
* Add failing specs for hashtag and username extraction in language detector * Remove usernames and hashtags from text before language detection * Handle multiple instances of special case, and reduce whitespace
2017-05-30Improve api oembed controller (#3450)Matt Jankowski
* Add StreamEntryFinder class to parse URLs * Use StreamEntryFinder and clean up api/oembed controller
2017-05-29Add preference setting for delete toot modal (#3368)Atsushi Yamamoto
* Set delete_modal preference to true by default * Does not show confirmation modal if delete_modal is false * Add ja translation for preference setting page
2017-05-24Add test when hashtag and URL are concatenated (#3279)abcang
2017-05-24Skip formatting for cashtag in status text (#3275)Yamagishi Kazutoshi
Resolve #3270
2017-05-19Account domain blocks (#2381)Eugen Rochko
* Add <ostatus:conversation /> tag to Atom input/output Only uses ref attribute (not href) because href would be the alternate link that's always included also. Creates new conversation for every non-reply status. Carries over conversation for every reply. Keeps remote URIs verbatim, generates local URIs on the fly like the rest of them. * Conversation muting - prevents notifications that reference a conversation (including replies, favourites, reblogs) from being created. API endpoints /api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute Currently no way to tell when a status/conversation is muted, so the web UI only has a "disable notifications" button, doesn't work as a toggle * Display "Dismiss notifications" on all statuses in notifications column, not just own * Add "muted" as a boolean attribute on statuses JSON For now always false on contained reblogs, since it's only relevant for statuses returned from the notifications endpoint, which are not nested Remove "Disable notifications" from detailed status view, since it's only relevant in the notifications column * Up max class length * Remove pending test for conversation mute * Add tests, clean up * Rename to "mute conversation" and "unmute conversation" * Raise validation error when trying to mute/unmute status without conversation * Adding account domain blocks that filter notifications and public timelines * Add tests for domain blocks in notifications, public timelines Filter reblogs of blocked domains from home * Add API for listing and creating account domain blocks * API for creating/deleting domain blocks, tests for Status#ancestors and Status#descendants, filter domain blocks from them * Filter domains in streaming API * Update account_domain_block_spec.rb
2017-05-12Prepend reblogs' wrapper content with "RT @original_author", (#3013)Eugen Rochko
so that when a reblog parse fails on another instance, it doesn't look like a misattributed/stolen text
2017-05-11Fix regressions from #2683 (#2970)Eugen Rochko
* Fix regressions from #2683 Properly format spoiler text HTML, while keeping old logic for blankness intact Process hashtags and mentions in spoiler text Format spoiler text for Atom Change "show more" toggle into a button instead of anchor Fix style regression on dropdowns for detailed statuses * Fix lint issue * Convert spoiler text to plaintext in desktop notifications
2017-05-09Use CLD3 (#2949)Akihiko Odaki
Compact Language Detector v3 (CLD3) is the successor of CLD2, which was used in the previous implementation. CLD3 includes improvements since CLD2, and supports newer compilers. On the other hand, it has additional requirements and cld3-ruby, the FFI of CLD3 for Ruby, is still new and may be still inmature. Though CLD3 is named after CLD2, it is implemented with a neural network model, different from the old implementation, which is based on a Naïve Bayesian classifier. CLD3 supports newer compilers, such as GCC 6. CLD2 is not compatible with GCC 6 because it assigns negative values to varibales typed unsigned. (see internal/cld_generated_cjk_uni_prop_80.cc) The support for GCC 6 and newer compilers are essential today, when some server operating system such as Ubuntu Server 16.10 has GCC 6 by default. On the one hand, CLD3 requires C++11 support. Environments with old compilers such as Ubuntu Server 14.04 needs to update the system or install a newer compiler. CLD3 needs protocol buffers as a new dependency. However,it is not considered problematic because major server operating systems, CentOS and Ubuntu Server provide them. The FFI cld3-ruby was written by me (Akihiko Odaki) for use in Mastodon. It is still new and may be inmature, but confirmed to pass existing tests.
2017-05-09Fixed bug that timeline can not be displayed by InvalidURIError (#2947)abcang
2017-05-08Delegate Account#user_locale method and allow nil (#2927)Matt Jankowski
2017-05-05use Twitter::Extractor for creating links (#2502)masarakki
2017-05-03Language improvements, replace whatlanguage with CLD (#2753)Matt Jankowski
* add failing en specs * add cld2 gem * Replace WhatLanguage with CLD
2017-04-30Revert "Use PostgreSQL inheritance for blocks and mutes (#2520)" (#2634)Akihiko Odaki
This reverts commit 5135d609b774b177d3d3894b176a822d86b73d3c.
2017-04-30Use PostgreSQL inheritance for blocks and mutes (#2520)Akihiko Odaki
2017-04-25Decodes URL containing IDN (#2436)Yamagishi Kazutoshi
2017-04-24Add more FeedManager#filter? tests (#2413)Eugen
2017-04-22[WIP] Html lang on statuses (#2297)Matt Jankowski
* Add html lang attributes around statuses * Remove urls from language detection
2017-04-21Clean up settings/preferences controller (#2237)Matt Jankowski
* Add missing fields group on preferences page * Clean up settings/preferences controller * Extract a UserSettingsDecorator
2017-04-19Fix html escape characters in the URL (#2138)abcang
* fix character escaping in URL * add tests * put a comma after the last item * add HTML escape test
2017-04-18Fix wording on admin instances view, fix typos in language detector spec (#2106)Eugen
2017-04-18Add more tests for AtomSerializer (#2096)Eugen
2017-04-18Language detection refactor (#2099)Matt Jankowski
* Extract detect_language to separate class * Use default locale, not just en * Add spec to confirm that whatlanguage cant identify empty string * Allow account locale to override default in language detector * PostStatusService supplies an account to detect language
2017-04-18Add forgotten AtomSerializer spec (#2047)Eugen
2017-04-13Fix tests issue introduced in #1607 (#1639)Eugen