Commit Graph

15 Commits (462e0717d6a467e8ac060ee0fd1da6a4cbc8f886)

Author SHA1 Message Date
Christian Schmidt 33d3ca7cf1
Support /.well-known/host-meta.json ()
Matt Jankowski f1003b2560
Enable "zero monkey patching" mode in RSpec ()
Tim Rogers 2ce99c51dd
Fixed Rails route covering %40-encoded profile URL paths to not 404 ()
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs ()
Nick Schonning 7a3d4c3d4b
Enable Rubocop RSpec/MultipleDescribes ()
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length ()
Eugen Rochko 839f893168
Change public accounts pages to mount the web UI ()
* Change public accounts pages to mount the web UI

* Fix handling of remote usernames in routes

- When logged in, serve web app
- When logged out, redirect to permalink
- Fix `app-body` class not being set sometimes due to name conflict

* Fix missing `multiColumn` prop

* Fix failing test

* Use `discoverable` attribute to control indexing directives

* Fix `<ColumnLoading />` not using `multiColumn`

* Add `noindex` to accounts in REST API

* Change noindex directive to not be rendered by default before a route is mounted

* Add loading indicator for detailed status in web UI

* Fix missing indicator appearing while account is loading in web UI
Matt Jankowski 2925372ff4 Move create/destroy actions for api/v1/statuses to namespace ()
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
Matt Jankowski 5282ba862a Move reblogged_by and favourited_by actions out of api/v1/statuses and into unique controllers ()
* 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
Matt Jankowski 5c63523972 Spec coverage and refactor for the api/v1/accounts controllers ()
Matt Jankowski d6774d2ca3 Refactor and spec coverage for api/v1/timelines actions ()
Matt Jankowski 4289ed1d13 Refactor of API timeline actions ()
- Increase coverage to exercise all parts of each action
- Move into namespace to share common code
- Misc refactor of each action for smaller methods, simpler code
Matt Jankowski 8bac0350d1 Restful refactor of accounts/ routes ()
* Add routing specs for accounts followers and following actions

* Use more restful route naming for public account follow pages

Moves two actions:
- accounts#followers to accounts/follower_accounts#index
- accounts#following to accounts/following_accounts#index

Adds routing spec to ensure prior URLs are preserved.
Matt Jankowski 21a767dcfa Improve handling of HTTP_ACCEPT for webfinger ()
This change includes:

- Improve the spec coverage for incoming request to the webfinger action
- For requests without an accept header (ie, what a browser might look like),
  return a JSON response.
- For requests with an explicit format of xml or json, return that format.
- For requests using an accept header, return that format.

Also adds failing spec showing webfinger does not return xml, which covers the
issue described in: https://github.com/tootsuite/mastodon/issues/1983
Matt Jankowski 137100dcf3 Clean up well-known routes/controllers ()
* Add request spec for host meta route returning xml

* Add routing spec for xrd routes

* Update well-known routes

* Move webfinger and host-meta actions to their own controllers