gitlab-org--gitlab-foss/spec/models
Yorick Peterse 38b8ae641f
Clean up ActiveRecord code in TodoService
This refactors the TodoService class according to our code reuse
guidelines. The resulting code is a wee bit more verbose, but it allows
us to decouple the column names from the input, resulting in fewer
changes being necessary when we change the schema.

One particular noteworthy line in TodoService is the following:

    todos_ids = todos.update_state(state)

Technically this is a violation of the guidelines, because
`update_state` is a class method, which services are not supposed to use
(safe for a few allowed ones). I decided to keep this, since there is no
alternative. `update_state` doesn't produce a relation so it doesn't
belong in a Finder, and we can't move it to another Service either. As
such I opted to just use the method directly.

Cases like this may happen more frequently, at which point we should
update our documentation with some sort of recommendation. For now, I
want to refrain from doing so until we have a few more examples.
2018-10-08 15:19:12 +02:00
..
application_setting
badges
blob_viewer Fix xss vulnerability sourced from package.json's homepage 2018-09-19 09:13:33 +08:00
ci Rails 5: fix mysql milliseconds problems in scheduled build specs 2018-10-06 14:13:13 +02:00
clusters Add GitLab cluster id to jupyter config 2018-09-18 13:40:42 +03:00
concerns Merge branch 'master-ce' into scheduled-manual-jobs 2018-10-05 10:13:06 +09:00
conversational_development_index
cycle_analytics
diff_viewer
hooks Migrate sensitive web hook data in the background 2018-10-01 15:34:16 +01:00
issue
members Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
merge_request
network
postgresql Respond to DB health in background migrations 2018-08-06 15:20:36 +02:00
project_services Fix activity titles for MRs in chat notification services 2018-09-20 11:52:14 +01:00
protected_branch Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
ability_spec.rb
abuse_report_spec.rb
active_session_spec.rb
appearance_spec.rb
application_setting_spec.rb Make single diff patch limit configurable 2018-10-01 11:58:21 -03:00
award_emoji_spec.rb Refactor AutocompleteController 2018-08-20 13:53:00 +02:00
badge_spec.rb
blob_spec.rb
board_spec.rb
broadcast_message_spec.rb
chat_name_spec.rb
chat_team_spec.rb
commit_collection_spec.rb
commit_range_spec.rb
commit_spec.rb Merge branch 'fix-committer-typo' into 'master' 2018-09-25 17:08:23 +00:00
commit_status_spec.rb Add unit tests for CommitStatus and Ci::Stage 2018-10-02 17:08:11 +02:00
compare_spec.rb
container_repository_spec.rb
cycle_analytics_spec.rb
deploy_key_spec.rb
deploy_keys_project_spec.rb
deploy_token_spec.rb Fix deploy tokens without expire_at crashes 2018-08-02 19:43:36 +02:00
deployment_spec.rb Remove unused stop_action? method from deployment class 2018-07-12 12:31:33 +02:00
diff_discussion_spec.rb
diff_note_spec.rb
discussion_spec.rb
email_spec.rb
environment_spec.rb Rename environments stop action method 2018-07-12 12:22:11 +02:00
event_collection_spec.rb Refactor EventFilter and increase its test coverage 2018-09-26 18:34:26 +02:00
event_spec.rb Check snippet note event visibility 2018-09-21 17:05:08 +01:00
external_issue_spec.rb
fork_network_member_spec.rb Whitelist existing destroy_all offenses 2018-08-16 17:29:37 +02:00
fork_network_spec.rb
forked_project_link_spec.rb
generic_commit_status_spec.rb
global_milestone_spec.rb
gpg_key_spec.rb
gpg_key_subkey_spec.rb
gpg_signature_spec.rb
group_custom_attribute_spec.rb
group_label_spec.rb
group_milestone_spec.rb
group_spec.rb Applies the CE backport of EE#657 2018-09-24 12:02:01 +01:00
guest_spec.rb
identity_spec.rb
import_export_upload_spec.rb Update Import/Export to use object storage (based on aa feature flag) 2018-07-06 15:46:18 +02:00
instance_configuration_spec.rb Instance Configuration page now displays correct SSH fingerprints 2018-10-03 15:25:42 +01:00
internal_id_spec.rb Make GitLab pages support access control 2018-10-05 13:41:11 +00:00
issue_collection_spec.rb
issue_spec.rb Move issue related_branches to service 2018-10-04 15:59:14 -03:00
key_spec.rb
label_link_spec.rb
label_note_spec.rb Use ResourceLabelEvent for tracking label changes 2018-09-07 13:39:20 +00:00
label_priority_spec.rb
label_spec.rb Add subscribe filter to labels page 2018-10-04 10:24:50 +02:00
legacy_diff_discussion_spec.rb
lfs_file_lock_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
lfs_object_spec.rb
lfs_objects_project_spec.rb
license_template_spec.rb Backport project template API to CE 2018-10-05 11:34:43 +01:00
list_spec.rb
member_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
merge_request_diff_commit_spec.rb
merge_request_diff_file_spec.rb
merge_request_diff_spec.rb Only serializes diff files found by paths query 2018-08-01 10:26:38 -03:00
merge_request_spec.rb #13650 added wip search functionality and tests 2018-10-03 08:15:00 +00:00
milestone_spec.rb Don't use MilestoneFinder for group milestones 2018-09-18 11:35:21 -03:00
namespace_spec.rb Merge branch 'remove-rugged' into 'master' 2018-10-03 09:06:32 +00:00
note_diff_file_spec.rb
note_spec.rb Filter system notes with public and private cross references 2018-10-02 17:01:49 -05:00
notification_recipient_spec.rb
notification_setting_spec.rb Add email_events to replace EMAIL_EVENTS because it needs to be dynamic, 2018-08-14 14:59:29 +08:00
pages_domain_spec.rb
personal_access_token_spec.rb
programming_language_spec.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
project_authorization_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
project_auto_devops_spec.rb Add timed incremental rollout to Auto DevOps 2018-10-05 21:14:59 +02:00
project_ci_cd_setting_spec.rb
project_custom_attribute_spec.rb
project_deploy_token_spec.rb
project_feature_spec.rb Make GitLab pages support access control 2018-10-05 13:41:11 +00:00
project_group_link_spec.rb Whitelist existing destroy_all offenses 2018-08-16 17:29:37 +02:00
project_import_state_spec.rb
project_label_spec.rb
project_snippet_spec.rb
project_spec.rb Clean up ActiveRecord code in TodosFinder 2018-10-08 15:19:12 +02:00
project_statistics_spec.rb Update total storage size when changing size of artifacts 2018-07-27 17:21:41 +02:00
project_team_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
project_wiki_spec.rb Guard against regressions in commit email specs 2018-09-18 12:04:49 +01:00
prometheus_metric_spec.rb Fix query_series specs 2018-09-05 21:05:40 +02:00
protectable_dropdown_spec.rb
protected_branch_spec.rb
protected_tag_spec.rb
push_event_payload_spec.rb
push_event_spec.rb
redirect_route_spec.rb
release_spec.rb
remote_mirror_spec.rb Remove Gitlab::Git::Repository#rugged and Gollum code 2018-10-02 16:34:28 -03:00
repository_language_spec.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
repository_spec.rb Remove Gitlab::Git::Repository#rugged and Gollum code 2018-10-02 16:34:28 -03:00
resource_label_event_spec.rb Use ResourceLabelEvent for tracking label changes 2018-09-07 13:39:20 +00:00
route_spec.rb Updates from rubocop -a 2018-07-09 21:13:08 +08:00
sent_notification_spec.rb
service_spec.rb Move project services log to a separate file 2018-09-06 14:48:31 -03:00
site_statistic_spec.rb Geo: sync disabled wikis. Stage 2 2018-09-25 17:49:39 +03:00
snippet_blob_spec.rb
snippet_spec.rb
spam_log_spec.rb Replace 'Sidekiq::Testing.inline!' with 'perform_enqueued_jobs' 2018-07-23 15:34:54 +11:00
subscription_spec.rb
system_note_metadata_spec.rb
term_agreement_spec.rb
timelog_spec.rb
todo_spec.rb Clean up ActiveRecord code in TodoService 2018-10-08 15:19:12 +02:00
tree_spec.rb
trending_project_spec.rb
upload_spec.rb
user_agent_detail_spec.rb
user_callout_spec.rb
user_custom_attribute_spec.rb
user_interacted_project_spec.rb
user_spec.rb Filter out archived projects from issue/mr count 2018-09-17 11:35:26 -05:00
user_status_spec.rb Allow users to set a status 2018-07-30 15:01:26 +02:00
wiki_directory_spec.rb
wiki_page_spec.rb Remove Gitlab::Git::Repository#rugged and Gollum code 2018-10-02 16:34:28 -03:00