Commit Graph
100 Commits
Author SHA1 Message Date
Matt JankowskiandEugen Rochko 6dd5eac7fc Add controller spec for manifests controller (#4003) 2017-06-30 13:43:34 +02:00
Matt JankowskiandEugen Rochko 59ddf81a45 Version bumps for gems (#4002)
* Update aws-sdk to version 2.10.4

* Update bootsnap to version 1.1.1

* Update capistrano to version 3.8.2

* Update capybara to version 2.14.4

* Update cld3 to version 3.1.3

* Update http_accept_language to version 2.1.1

* Update sidekiq to version 5.0.3

* Update rspec-sidekiq to version 3.0.3

* Update sidekiq-scheduler to version 2.1.7

* Update oj to version 3.2.0

* Update openssl to version 2.0.4

* Update pg to version 0.21.0

* Update twitter-text to version 1.14.6

* Update unicode-display_width to version 1.3.0

* Update scss_lint to version 0.54.0

* Update hamlit to version 2.8.4

* Update erubi to version 1.6.1

* Update httplog to version 0.99.4

* Update aws-sdk to version 2.10.6
2017-06-30 13:42:04 +02:00
Matt JankowskiandEugen Rochko 47338bc13d Gem versions, including security-related mail gem update (#3687)
* Update mail to version 2.6.6

* Update aws-sdk to version 2.9.37

* Update capybara to version 2.14.2

* Update oj to version 3.1.0

* Update sidekiq to version 5.0.2

* Update puma to version 3.9.1

* Update sanitize to version 4.5.0

* Update capistrano-rails to version 1.3.0
2017-06-10 20:26:50 +02:00
Matt JankowskiandEugen Rochko 2925372ff4 Move create/destroy actions for api/v1/statuses to namespace (#3678)
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
2017-06-10 09:39:26 +02:00
Matt JankowskiandGitHub 5282ba862a Move reblogged_by and favourited_by actions out of api/v1/statuses and into 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
2017-06-09 14:12:40 -04:00
Matt JankowskiandEugen Rochko 022008a2a6 Language detection defaults to nil (#3666)
* Default to nil for statuses.language

* Language detection defaults to nil instead of instance UI default
2017-06-09 18:09:37 +02:00
Matt JankowskiandEugen Rochko 73540ffe6b Clean up for api/base controller (#3629)
* Move ApiController to Api/BaseController

* API controllers inherit from Api::BaseController

* Add coverage for various error cases in api/base controller
2017-06-07 20:09:25 +02:00
Matt JankowskiandEugen Rochko f0634ba876 Coverage improvement and concern extraction for rate limit headers in API 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
2017-06-07 17:23:26 +02:00
Matt JankowskiandEugen Rochko 6201f96b8a Introduce StatusThreadingConcern (#3490)
* Add a StatusFilter class to identify visibility of statuses by accounts

* Extract StatusThreadingConcern from Status

* Clarify purpose of checking for nil account
2017-06-05 16:07:44 +02:00
Matt JankowskiandEugen Rochko 5be1214c26 Gem version bumps (#3524)
* Update annotate to version 2.7.2

* Update puma to version 3.9.0

* Update aws-sdk to version 2.9.28

* Update bootsnap to version 1.0.0

* Update nio4r to version 2.1.0

* Update nokogumbo to version 1.4.12

* Update oj to version 3.0.11

* Update pkg-config to version 1.2.3

* Update rubocop to version 0.49.1

* Update sidekiq-scheduler to version 2.1.5
2017-06-05 01:10:13 +02:00
Matt JankowskiandEugen Rochko 1fd5251376 Add index to media_attachments.account_id (#3510) 2017-06-02 16:18:54 +02:00
Matt JankowskiandEugen Rochko 2212dc4aaa Update Rails to version 5.1.1 (#3121)
* Update rails to version 5.1.1

* Run `rails app:update`

* Remove the override of polymorphic activity relationship

* Silence warning about otp_secret attribute being unknown to rails

* We will only introduce form_with where we want to use remote data
2017-06-01 20:53:37 +02:00
Matt JankowskiandEugen Rochko cb7ee4698f Rubocop changes (#3501)
* Update renamed rubocop configuration options

* Remove duplicate rubocop configuration, sort options
2017-06-01 17:24:30 +02:00
Matt JankowskiandGitHub d010e270e6 Remove usernames and hashtags from language detection (#3503)
* 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-06-01 09:29:14 -04:00
Matt JankowskiandGitHub d1e08bd38c Handle nil and blank cases in Account finders (#3500) 2017-06-01 08:20:36 -04:00
Matt JankowskiandEugen Rochko 5c63523972 Spec coverage and refactor for the api/v1/accounts controllers (#3451) 2017-05-31 21:36:24 +02:00
Matt JankowskiandEugen Rochko de4681b2be Move admin/pubsubhubbub controller to admin/subscriptions (#3442) 2017-05-31 20:39:35 +02:00
Matt JankowskiandEugen Rochko a132332b86 Add Instance class to list admin records (#3443) 2017-05-31 20:38:44 +02:00
Matt JankowskiandEugen Rochko b25e42a77f Misc tidying and clean ups (#3445)
* Remove trailing whitespace in i18n mailers

* Use query methods instead of #present? on AR attributes

* Delegate Status#account_domain method

* Delegate Mention #account_username and #account_acct methods
2017-05-31 20:38:17 +02:00
Matt JankowskiandEugen Rochko 5236a62861 Improve spec coverage and clean up api/v1/blocks controller (#3464) 2017-05-31 20:34:51 +02:00
Matt JankowskiandEugen Rochko 0f155829b7 Improve spec coverage and clean up api/v1/follow_requests controller (#3465) 2017-05-31 20:32:11 +02:00
Matt JankowskiandEugen Rochko 84dda45df9 Improve spec coverage and clean up api/v1/domain_blocks controller (#3466) 2017-05-31 20:31:14 +02:00
Matt JankowskiandEugen Rochko 9c7505489f Refactor api/v1/notifications controller (#3470) 2017-05-31 20:30:55 +02:00
Matt JankowskiandEugen Rochko 75cad1d9d6 Improve spec coverage and clean up api/v1/favourites controller (#3472) 2017-05-31 20:30:39 +02:00
Matt JankowskiandEugen Rochko 2cc3111a77 Expand spec coverage and refactor the Account.find_ methods (#3485)
* 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
2017-05-31 20:28:45 +02:00
Matt JankowskiandEugen Rochko bf811e4d4a Improve spec coverage and clean up api/v1/mutes controller (#3481) 2017-05-31 20:27:34 +02:00
Matt JankowskiandEugen Rochko d6774d2ca3 Refactor and spec coverage for api/v1/timelines actions (#3482) 2017-05-31 20:27:17 +02:00
Matt JankowskiandGitHub 79335e46fd Refactor api/v1/apps controller (#3471) 2017-05-30 21:16:28 -04:00
Matt JankowskiandGitHub 7c6e02aaf3 Refactor api/v1/reports controller (#3469) 2017-05-30 21:13:31 -04:00
Matt JankowskiandGitHub 7f55430652 Refactor api/v1/search controller (#3468) 2017-05-30 21:11:54 -04:00
Matt JankowskiandGitHub 8235623362 Improve spec coverage and clean up api/v1/media controller (#3467) 2017-05-30 21:11:29 -04:00
Matt JankowskiandEugen Rochko 83435c49ea Clean up api/subscriptions controller (#3448) 2017-05-31 02:15:09 +02:00
Matt JankowskiandGitHub 3576fa0d59 Improve api oembed controller (#3450)
* Add StreamEntryFinder class to parse URLs

* Use StreamEntryFinder and clean up api/oembed controller
2017-05-30 16:30:06 -04:00
Matt JankowskiandGitHub 1dcfb90202 Clean up api/salmon controller (#3449) 2017-05-30 16:28:58 -04:00
Matt JankowskiandEugen Rochko 0ebe7d6d23 Remove exports/base controller in favor of shared concern (#3444) 2017-05-30 19:06:01 +02:00
Matt JankowskiandEugen Rochko 5e2c5e95b6 Version bumps for non-rails gems (#3398)
* Update xpath to version 2.1.0

* Update aws-sdk to version 2.9.25

* Update oj to version 3.0.10

* Update brakeman to version 3.6.2

* Update rufus-scheduler to version 3.4.2

* Update doorkeeper to version 4.2.6

* Update rubocop to version 0.49.0
2017-05-29 18:18:06 +02:00
Matt JankowskiandEugen Rochko 6267759607 Disable the Rubocop Style/GuardClause cop (#3316)
There are many spots throughout the codebase which are showing as covered by
specs in the simplecov output -- but which are not actually run, because they
are on the same line as a guard clause.

I plan on fixing some of these issues, but don't want to keep triggering this
rubocop style violation.

My preference would be that we use the PR review process to identify places
where a guard clause might be appropriate, but that we leave this cop turned off
by default.
2017-05-25 21:15:14 +02:00
Matt JankowskiandEugen Rochko 4289ed1d13 Refactor of API timeline actions (#3263)
- 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
2017-05-23 18:11:39 +02:00
Matt JankowskiandGitHub 8e84177305 Use local default for postgres host in node streaming service (#3240)
This location varies across postgres installations, and it seems like the pg
package knows how to guess correctly on each system.
2017-05-22 20:27:24 -04:00
Matt JankowskiandEugen Rochko a28ce13b3e Coverage for api/web/settings controller (#3238) 2017-05-22 23:12:28 +02:00
Matt JankowskiandGitHub e1b42e9aa0 Add coverage for ReportFilter and AccountFilter (#3236) 2017-05-22 15:50:58 -04:00
Matt JankowskiandEugen Rochko ec34ec63b1 Specs for cleanup workers (#3235)
* Add spec files for feed and media cleanup workers

* Add coverage for feed and media cleanup schedulers

* Clean up feed and media cleanup workers
2017-05-22 19:36:21 +02:00
Matt JankowskiandEugen Rochko 8f4b7c1820 Filter languages with opt out (#3175)
* Remove allowed_languages and add filtered_languages

* Use filtered_languages instead of allowed_languages
2017-05-20 17:32:44 +02:00
Matt JankowskiandEugen Rochko b6f6152e26 Add coverage for api/v1 controllers (#3155) 2017-05-19 23:32:37 +02:00
Matt JankowskiandEugen Rochko d2e0edd721 Add spec coverage for regeneration worker (#3143) 2017-05-19 16:55:09 +02:00
Matt JankowskiandEugen Rochko 3002a89419 Remove unused style helper (#3145) 2017-05-19 16:54:47 +02:00
Matt JankowskiandEugen Rochko 17ba662004 Gem updates without rails five one (#3137)
* Update terminal-table to version 1.8.0

* Update aws-sdk to version 2.9.20

* Update cld3 to version 3.1.2

* Update microformats2 to version 3.1.0

* Update rails-controller-testing to version 1.0.2

* Update oj to version 3.0.8

* Update http-form_data to version 1.0.3

* Update nokogumbo to version 1.4.11

* Update simplecov-html to version 0.10.1

* Update aws-sdk to version 2.9.21

* Update oj to version 3.0.9

* Update sass to version 3.4.24

* Update simple_form to version 3.5.0
2017-05-19 16:22:10 +02:00
Matt JankowskiandEugen Rochko db4119f971 Specs for precompute feed service (#3142)
* Add spec for precompute feed service

* Refactor PrecomputeFeedService

* spec wip
2017-05-19 16:21:52 +02:00
Matt JankowskiandEugen Rochko 8e4fc5d5d2 Improve how params from controller are permitted in filter helper (#3129)
The `params` variable here was quite overloaded.

It exists via the controller to hold the request params, and was sometimes being
used in this helper as that object, but other times was being used as a local
variable, or to pass to another method, and this was confusing.

This change renames the args for a method away from `params` for more clarity,
and extracts the actual usage of the controller-provided `params` to a
better-named method for clarity.
2017-05-19 11:43:20 +02:00
Matt JankowskiandEugen Rochko 6e4c7d6211 Conditional validations no longer accept strings for if/unless (#3124) 2017-05-19 03:11:23 +02:00
Matt JankowskiandEugen Rochko d2542dcec0 Use stylesheet_pack_tag in embedded layout, avoids pipeline deprecation warning (#3123) 2017-05-19 03:11:17 +02:00
Matt JankowskiandEugen Rochko 25e5aa645d Skip asset pipeline for static file in public/ (#3125) 2017-05-19 02:41:56 +02:00
Matt JankowskiandEugen Rochko 8ec8410651 After remote follow worker specs (#3098)
* Add specs for the after remote follow workers

* Refactor the after remote follow workers
2017-05-18 21:10:41 +02:00
Matt JankowskiandEugen Rochko 0b34ade66b Update devise to version 4.3.0 (#3074)
Supports rails 5.1
2017-05-15 22:36:45 +02:00
Matt JankowskiandEugen Rochko 5f727f9068 Update rails to version 5.0.3 (#3054)
* Update rails to version 5.0.3

* Update aws-sdk to version 2.9.17

* Update capistrano to version 3.8.1

* Update climate_control to version 0.2.0

* Update debug_inspector to version 0.0.3

* Update et-orbi to version 1.0.4

* Update oj to version 3.0.7

* Update microformats2 to version 2.9.0

* Update lograge to version 0.5.1

* Clean up usage of Microformats2 object to remove deprecation warnings

* Update microformats2 to version 3.0.1
2017-05-14 16:30:14 +02:00
Matt JankowskiandEugen Rochko 0d70fe2659 Spec coverage and refactor for pubsub/delivery worker (#3021)
* Framework for delivery worker spec

* Refactor of pubsub delivery worker
2017-05-12 20:35:36 +02:00
Matt JankowskiandEugen Rochko 02412429ab Remove reference to non-existent table in schema rb (#3019) 2017-05-12 19:22:33 +02:00
Matt JankowskiandEugen Rochko 60ecfb87ae Coverage for domain block worker (#2997) 2017-05-11 22:25:15 +02:00
Matt JankowskiandEugen Rochko 08949cca41 Pubsub confirmation worker spec (#2974)
* Add specs for valid challenge response from pubsub confirmation worker

* Refactor the pubsub confirmation worker
2017-05-11 00:19:37 +02:00
Matt JankowskiandEugen Rochko cc9a6a710f Spec feed insert worker (#2965)
* Spec for feed insert worker when missing records

* more specs!

* Refactor feed insert worker
2017-05-10 20:32:05 +02:00
Matt JankowskiandEugen Rochko fd66f7cdc0 Disable sidekiq logging in test mode (#2962) 2017-05-10 16:16:42 +02:00
Matt JankowskiandEugen Rochko d142544159 Spec coverage and refactor of digest mailer worker (#2961) 2017-05-10 15:45:43 +02:00
Matt JankowskiandEugen Rochko 682507bc3c Specs for pubsub subscribe service (#2951)
* Add spec for pubsubhubbub/subscribe

* Refactor pubsubhubbub/subscribe service
2017-05-09 20:48:30 +02:00
Matt JankowskiandEugen Rochko 441d6dc734 Spec and refactor for pubsubhubbub/unsubscribe service (#2946)
* Add coverage for pubsub unsubscribe service

* Refactor pubsub unsubscribe service
2017-05-09 19:58:18 +02:00
Matt JankowskiandEugen Rochko 5bea42412e Services specs for subscribe and unsubscribe (#2928)
* Add specs for unsubscribe service

* Fix non existent methods in unsubscribe service

* Clean up status handling in subscribe service
2017-05-09 00:45:02 +02:00
Matt JankowskiandEugen Rochko 04166c4a35 Specs for API push controller, with refactor (#2926)
* Coverage for api push controller

* Refactor the api/push controller
2017-05-09 00:44:30 +02:00
Matt JankowskiandEugen Rochko 7a7d12d27f Delegate Account#user_locale method and allow nil (#2927) 2017-05-08 23:10:50 +02:00
Matt JankowskiandEugen Rochko cd830a2fab Improve error message for non-existent user being made an admin (#2929) 2017-05-08 23:08:55 +02:00
Matt JankowskiandEugen Rochko aef554d553 Misc gem bumps (#2919)
* Update bundler-audit to version 0.5.0

* Update oj to version 3.0.6

* Update http-form_data to version 1.0.2

* Update parallel to version 1.11.2

* Update rails-i18n to version 5.0.4

* Update rack-protection to version 2.0.0

* Update haml to version 5.0.1

* Update scss_lint to version 0.53.0

* Relax requirement on i18n-tasks

* Remove haml and haml_lint gem requirement
2017-05-08 18:55:42 +02:00
Matt JankowskiandEugen Rochko b85dec2b97 Improve scss color variables (#2912)
- Updates scss variables file to use better-named variables for black/white/etc
- Arranges the "mastodon classic" colors into variables
- Remove all references to `$color-*` naming, replacing with new

This does not in itself introduce "theme" support, but:

- It would probably be easier to start working on theme support after this
  change and others
- Even without the goal of themes, these changes make it more clear how the
  colors are being used.

There is almost definitely some edge case in here where I've guessed the
intent/context of some color usage incorrectly, but it still seems like a net
improvement.
2017-05-08 15:57:49 +02:00
Matt JankowskiandEugen Rochko bba537a7be Improve allowed language handling (#2897)
* Dont allow empty value in user allowed languages

* Sanitize language input to reject blank values in array
2017-05-08 03:32:52 +02:00
Matt JankowskiandEugen Rochko b8ba719f73 Unblock domain service specs/refactor (#2867)
* Add spec for unblock domain service

* Refactor UnblockDomainService
2017-05-07 14:44:28 +02:00
Matt JankowskiandEugen Rochko fa033c4d5f Version bumps for gems (#2838)
* Update aws-sdk to version 2.9.15

* Update ox to version 2.5.0

* Update sidekiq-unique-jobs to version 5.0.8

* Update rspec-rails to version 3.6.0
2017-05-06 13:37:07 +02:00
Matt JankowskiandEugen Rochko 3f5b994ff0 Stream entry specs and refactor to use delegate (#2827)
* Add coverage for stream entry delegated methods

* Use delegate with allow_nil to clean up stream entry
2017-05-06 04:00:21 +02:00
Matt JankowskiandEugen Rochko 4e05751346 Move account header and avatar methods to a concern (#2825) 2017-05-05 21:37:02 +02:00
Matt JankowskiandGitHub 484c9709b6 Misc spec coverage improvements (#2821)
* Dont use raise_error by itself (avoids warning)

* Add coverage for AccountFilter

* Improve coverage and refactor for Subscription#lease_seconds

* Improve coverage and refactor for NotificationMailer

* Simplify assignment of min/max threshold on subscription
2017-05-05 14:56:00 -04:00
Matt JankowskiandEugen Rochko 20c37ed0f9 Add specs (and refactor) of FetchRemoteResourceService and SearchService (#2812)
* Coverage for fetch remote resource service

* Refactor fetch remote resource service

* Coverage for search service

* Refactor search service
2017-05-05 17:26:04 +02:00
Matt JankowskiandEugen Rochko f9d398e8fb Remove the react-rails gem (#2801)
* Remove react-rails gem

* Fix broken view spec
2017-05-04 23:45:18 +02:00
Matt JankowskiandEugen Rochko 84eb425f38 Remove redis clear from before in spec (#2795) 2017-05-04 20:53:39 +02:00
Matt JankowskiandEugen Rochko 2bd132d458 Replace best_in_place editor on admin settings page (#2789)
* Remove best_in_place

* Replace best_in_place usage with rails helpers

* Move admin/settings#index to #edit action

* Remove click_to__edit from i18n
2017-05-04 18:12:44 +02:00
Matt JankowskiandEugen Rochko d91ba3c8d0 Remove screenshot image (#2736) 2017-05-03 17:03:10 +02:00
Matt JankowskiandEugen Rochko 8c5ad23b24 Language improvements, replace whatlanguage with CLD (#2753)
* add failing en specs

* add cld2 gem

* Replace WhatLanguage with CLD
2017-05-03 16:59:31 +02:00
Matt JankowskiandEugen Rochko 2b9bc9c154 Use puma config for Procfile.dev (#2735) 2017-05-03 02:28:47 +02:00
Matt JankowskiandEugen Rochko 268dd32d76 Auth sign out (#2511)
* Add a spec for signing out

* Add spec showing that suspended user gets a 403 forbidden on sign out

* Allow suspended account users to sign out
2017-05-02 23:37:58 +02:00
Matt JankowskiandEugen Rochko b5eec34230 Add admin area view partials for each record type (#2700) 2017-05-02 20:56:28 +02:00
Matt JankowskiandEugen Rochko a4859446ab Coverage for remote follows (#2694)
* Add coverage for create with empty acct value

* Add coverage for create with webfinger failure

* Add coverage for create with webfinger providing bad values

* Add coverage for create when webfinger is good

* Add coverage for session[:remote_follow] having data

* Simplify how remote follow pulls acct from session

* Remote follow behaves more like model

* Move the discovery portions of remote follow out of controller

* Check for suspended accounts
2017-05-02 00:44:23 +02:00
Matt JankowskiandEugen Rochko 7bffd16024 Error responses cleanup (#2692)
* Use respond_with_error for forbidden errors

* Wrap up common error code into single method
2017-05-01 22:24:36 +02:00
Matt JankowskiandEugen Rochko f025cc6782 Filter on allowed user language preferences (#2361)
* Naive approached to timeline filtering

* Convert allowed_languages into a db column

* Allow users to choose languages to see statuses in

* Style list items as two columns

* Add a hint to explain language filtering preference
2017-05-01 17:42:13 +02:00
Matt JankowskiandEugen Rochko 5259319cf5 Reports spec for media attachments, clean up method (#2660)
* Add coverage for Report#media_attachments

* Direct query on media attachment
2017-04-30 18:15:49 +02:00
Matt JankowskiandEugen Rochko fdcf884cf7 Extract user tracking into concern (#2600) 2017-04-30 00:28:16 +02:00
Matt JankowskiandEugen Rochko f48cb3eb17 More coverage yes more even more (#2627)
* Add coverage for admin/confirmations controller

* Coverage for statuses controller show action

* Add coverage for admin/domain_blocks controller

* Add coverage for settings/profiles#update
2017-04-30 00:25:38 +02:00
Matt JankowskiandEugen Rochko a823509b99 Fix broken view spec for about/links (#2591) 2017-04-28 17:54:03 +02:00
Matt JankowskiandEugen Rochko 9262f6968b Fix broken spec for about/links view partial (#2586) 2017-04-28 16:45:24 +02:00
Matt JankowskiandEugen Rochko 9566893cc9 More controller specs (#2561)
* Add render_views in more places

* Delegate methods from account to user with allow nil true, so that admin accounts show view renders when missing a user

* Use actual account instances in authorize follow controller spec
2017-04-28 15:12:37 +02:00
Matt JankowskiandEugen Rochko 429480bb77 Return missing page when tag does not exist (#2563) 2017-04-28 15:11:21 +02:00
Matt JankowskiandEugen Rochko 61067dc2e6 Gem version updates (#2566)
* Update autoprefixer-rails to version 6.7.7.2

* Update aws-sdk to version 2.9.12

* Update http to version 2.2.2

* Update mail to version 2.6.5

* Update pghero to version 1.6.5

* Update ox to version 2.4.13

* Update json to version 2.1.0

* Update capistrano-rbenv to version 2.1.1

* Update httplog to version 0.99.3

* Update rainbow to version 2.2.2

* Update pkg-config to version 1.2.0

* Update globalid to version 0.4.0

* Update redis-rack to version 2.0.2

* Update webmock to version 3.0.1

* Update oj to version 3.0.2
2017-04-28 15:10:58 +02:00
Matt JankowskiandEugen Rochko effb08edbb More status specs (#2564)
* Add rough outline of coverage needed for public timeline

* Specs for visibility, replies, boosts

* Specs for silenced account

* Specs for local_only option

* Specs for blocks and mutes

* Add tentative spec around including other silenced account statuses

* Add with_public_visibility scope

* Add simple coverage for tag_timeline

* Tag timeline includes replies

* Replace tag.statuses with a tagged_with scope in tag timeline method

* Use with_public_visibility in tag timeline

* Extract common scope between public and tag timelines to method

* Extract local domain check to local_only scope

* Extract local_only check to starting scope method

* Move list of excluded from timeline account ids to account model

* Simplify excluded accounts list on account model

* Only join accounts when needed

* Rename method for account specific filtering

* Extract method for account exclusions

* Fix bug where silenced accounts were not including statuses from other silenced accounts

* DRY up filter application from account or no account

* timeline_scope can be private

* Add spec showing that account can find its excluded accounts ids

* Add spec which fails if local_only does not have a left outer join

* rubocop
2017-04-28 15:10:41 +02:00
Matt JankowskiandEugen Rochko a39e719b39 Add render_views to admin/reports controller spec (#2548) 2017-04-28 01:21:38 +02:00
Matt JankowskiandEugen Rochko 9736753985 Fix remote follow (#2547)
* Add coverage for remote_follow#new

* Fix reference to authorize_follows/card partial
2017-04-28 00:16:44 +02:00
Matt JankowskiandEugen Rochko b48f2cbc8b Catch error when server decryption fails on 2FA (#2512) 2017-04-27 15:18:21 +02:00