docbrown/spec/services
Jeremy Friesen fbce226c08
Low Stakes Refactor of Feed class (#15180)
* Removing state change and unused method

Prior to this commit, the `@comment_weight` value would change.  This is
not ideal as depending on the call sequence, can notably change the
output.  I suspect this state change occurred so as to not alter an
underlying spec.

What this change does is remove the state change, removes a dead method,
renames a method (to the dead method name), and leverages
parameterization to better test a spec that was brittle based on
possible state changes.

I believe, from a logical stand point, that this change does not impact
the functionality nor the actual logic that is part of the production
call path.

* Marking methods as @api private

The goal is to highlight that we really shouldn't be calling these
outside of their contained class.  Ideally, I'd love to make them
private methods, but there are specs and would prefer to not use
`__send__` to change those specs.

This is a noop change.

* Renaming method to refelct returned param order

Prior to this commit the "default_home_feed_and_featured_story" returned
an array of `[featured_story, default_home_feed]`.  The method name and
the order of the returned values were misaligned.  This change helps
align the method name and the order of those returned values.

Note, methods such as `each_with_index` have an `element, index`
parameter order.
2021-10-26 09:57:33 -04:00
..
articles Low Stakes Refactor of Feed class (#15180) 2021-10-26 09:57:33 -04:00
audit Remove Audit::Event::Util (#8704) 2020-06-16 12:50:53 -04:00
authentication Forem passport (cont) (#14759) 2021-09-30 06:47:45 -06:00
badges Split Settings::Community from SiteConfig (#13403) 2021-04-26 10:46:35 +02:00
broadcasts/welcome_notification Forem passport (cont) (#14759) 2021-09-30 06:47:45 -06:00
chat_channels Rubocop: Enable and fix Style/StringConcatenation (#9844) 2020-08-18 14:50:15 +02:00
color Move HexComparer to Hex::Comparer service (#12202) 2021-01-12 11:34:30 -05:00
credits Refactoring user_controller separating some classes to service (#10384) 2020-10-05 10:41:59 +02:00
discover Add Forem Discover registration worker and service (#14865) 2021-10-01 10:27:31 -04:00
edge_cache ✂✂✂ Remove events (#15062) 2021-10-15 09:31:08 -04:00
exporter Create Settings::SMTP (#13943) 2021-06-14 10:29:43 -04:00
fastly_config Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
feeds Record cassette to import feed from rss for two users (#14788) 2021-09-21 15:44:15 -05:00
follows Move app/labor/follow_checker.rb to service (#11613) 2020-12-01 14:14:36 +07:00
giphy Adjust type tags for RSpec (#4864) 2019-11-20 13:01:30 -05:00
github Don't use "not_to raise_error" with specific class (#10602) 2020-10-05 17:29:01 +02:00
homepage Serialize tag flares correctly in Homepage::ArticleSerializer (#13537) 2021-04-27 16:07:05 +02:00
html Rubocop fixes (#14868) 2021-09-30 13:22:09 -04:00
images Fix rotation of images uploaded from iPhones (#15010) 2021-10-11 15:17:14 -04:00
loggers Move LogWorkerQueueStats from labor to services (#11642) 2020-11-30 09:31:15 +07:00
mailchimp Handle GibbonError when Mailchimp api key was not set (#14695) 2021-09-13 10:30:35 -05:00
markdown_processor Remove button from allowed tags (#14434) 2021-08-11 10:48:07 -04:00
mentions Fix notifications not deleting because mentions already destroyed (#14987) 2021-10-14 09:41:10 -06:00
moderator Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
notification_subscriptions Add Article post_commit when user_id changes with specs (#15132) 2021-10-25 10:53:21 +07:00
notifications Don't notify authors about own org posts (#15113) 2021-10-19 21:32:44 +07:00
organizations Organizations delete optimizations and refactoring (#13610) 2021-05-11 12:14:55 +03:00
payments Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
podcasts handle openssl errors when checking podcast episode for https (#14439) 2021-08-09 12:52:20 -05:00
profile_fields Remove check_box type from profile fields (#14832) 2021-09-30 13:27:39 -04:00
push_notifications Adds validations to avoid creating unnecessary PNs (#14621) 2021-08-31 15:00:30 -06:00
re_captcha Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
search Prevent occasional matching on random name by specifying one (#14087) 2021-06-28 09:48:27 -05:00
secrets Use a sortable unique ID for the event_id (#3972) 2019-09-09 10:15:12 -04:00
slack Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
tag_moderators Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
twitter_client Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
user_blocks Rubocop: move dot in multi-line calls to leading position (#9262) 2020-07-16 15:51:11 +02:00
user_subscriptions Update CODEOWNERS and team names in TODO comments (#9460) 2020-07-24 12:17:20 +07:00
users Fix bug where OAuth signups were not pulling in OAuth provider's profile image (#14711) 2021-09-14 22:13:16 -04:00
webhook [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
analytics_service_spec.rb Add counts for number of views when showing referrers (#14600) 2021-08-27 08:03:43 -05:00
article_with_video_creation_service_spec.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
bulk_sql_delete_spec.rb Routine rubocop fixes (#10237) 2020-09-08 12:06:47 -04:00
email_digest_article_collector_spec.rb Don't include "anti-followed" tags in email digest (#14782) 2021-09-30 10:44:38 +07:00
email_digest_spec.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
feature_flag_spec.rb Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
flare_tag_spec.rb [deploy] Optimization: Dont Use Redis For Flare Tag IDs, Load Them On Boot (#8987) 2020-06-30 09:48:08 -05:00
medium_article_retrieval_service_spec.rb Nokogiri::HTML should receive the body, not the response object (#5297) 2019-12-31 08:46:49 -05:00
rate_limit_checker_spec.rb Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
tag_adjustment_creation_service_spec.rb nothing to see here....except maybe reverting a push to master (#8308) 2020-06-05 20:34:21 -05:00
tag_adjustment_update_service_spec.rb nothing to see here....except maybe reverting a push to master (#8308) 2020-06-05 20:34:21 -05:00