Age | Commit message (Collapse) | Author |
|
of delete Salmon (#3672)
* Fix removal of status sending the original status to mentioned users instead
of delete Salmon, add test
* Create remove_status_service_spec.rb
|
|
* Localize date in digest
* Cover NotificationMailer more
|
|
When case insensitivity is enabled via devise's `config.case_insensitive_keys` then `.find_for_authentication` method needs to be used instead of `.find_by` because second mentioned returns `nil` when valid email with different cases is passed.
More info https://github.com/plataformatec/devise/wiki/How-To:-Use-case-insensitive-emails
|
|
* Improve default language decision
This change allows to takes account of accepted language determined by
the user agent even if the custom default locale of the instance is
configured.
* Cover Localized more
* Fix code style
|
|
Each of mute, favourite, reblog has been updated to:
- Have a separate controller with just a create and destroy action
- Preserve historical route names to not break the API
- Mild refactoring to break up long methods
|
|
unique controllers (#3646)
* Add specs for api statuses routes
* Update favourited_by and reblogged_by api routes
* Move methods into new controllers
* Use load_accounts methods to simplify index actions
* Clean up load_accounts methods
* Clean up link header generation
* Check for link headers in specs
* Remove unused actions from api/v1/statuses controller
* Remove specs for moved actions
|
|
* Default to nil for statuses.language
* Language detection defaults to nil instead of instance UI default
|
|
* Fix db:seed - only run some validations when the field was changed
* Add tests
|
|
https://github.com/codeclimate/codeclimate-rubocop/blob/08f8de84ebfb39caa96391e23816877278f6441c/Gemfile.lock#L38
Code Climate is using RuboCop v0.46.0.
Change several rules to maintain compatibility.
|
|
* Move ApiController to Api/BaseController
* API controllers inherit from Api::BaseController
* Add coverage for various error cases in api/base controller
|
|
|
|
controller (#3625)
* Coverage for rate limit headers
* Move rate limit headers methods to concern
* Move throttle check to condition on before_action
* Move match_data variable into method
* Move utc timestamp to separate method
* Move header setting into smaller methods
* specs cleanup
|
|
|
|
* Sort results by the name
* Switch search method to simple `LIKE` matching instead of tsvector/tsquery
Previously we used scores from ts_rank_cd() to sort results, but it didn't work
because the function returns same score for all results. It's not for calculate
similarity of single words. Sometimes this bug even push out exact matching tag
from results.
Additionally, PostgreSQL supports prefix searching with standard btree index.
Using it offers simpler code, but also less index size and some speed.
|
|
* Add quotes ESLint rule
* Add jsx-quotes ESlint rule
* Sort ESLint rules
|
|
* Add a StatusFilter class to identify visibility of statuses by accounts
* Extract StatusThreadingConcern from Status
* Clarify purpose of checking for nil account
|
|
* Redirect to streaming_api_base_url
When Rails receives a request to streaming API, it most likely
means that there is another host which is configured to respond
to it. This is to redirect clients to that host if
`STREAMING_API_BASE_URL` is set as another host.
* Use the new Ruby 1.9 hash syntax
|
|
|
|
|
|
Closes https://github.com/tootsuite/mastodon/issues/3102
|
|
* Added support for configurable reserved usernames
* Added reserved usernames from mastodon issue 1355
* Fix reserved usernames
|
|
|
|
|
|
* 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
|
|
|
|
|
|
* 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
|
|
* Remove some arguments of Formatter.instance.format
* Improve spec for Formatter
|
|
|
|
|
|
* Remove redundant status.reply? in AtomSerializer#object
* Cover AtomSerializer more
|
|
|
|
Remove protect_from_forgery in ApiController, which is disabled by the
following skip_before_action, as well.
|
|
- Upgrade dependencies
- chai (3.5.0 -> 4.0.1)
- chai-enzyme (0.6.1 -> 0.7.1)
- sinon (2.2.0 -> 2.3.2)
- Change extensions from .jsx to .js
- Don't assign `React` to `global`
- Check code format using ESLint
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Move specs for account finder methods to concern spec
* Move account finder methods to concern
* Improve spec wording
* Use more explicit comparison to ensure correct return value
* Add coverage for .find_local! and .find_remote!
* Add some methods to the finder
* Use arel on matching_username method
* Avoid ternary in matching domain method
* Simplify finder methods
* Use an AccountFinder class to simplify lookup
|
|
|
|
|
|
|
|
* Keep ENV['LOCAL_HTTPS'] with ApplicationControllerSpec (fix random fail)
* use climate_control
|
|
|
|
|