Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
47b30384
Commit
47b30384
authored
Sep 11, 2018
by
gfyoung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable frozen string in app/graphql + app/finders
Partially addresses #47424.
parent
e91dc8f4
Changes
70
Show whitespace changes
Inline
Side-by-side
Showing
70 changed files
with
143 additions
and
0 deletions
+143
-0
app/finders/access_requests_finder.rb
app/finders/access_requests_finder.rb
+2
-0
app/finders/admin/projects_finder.rb
app/finders/admin/projects_finder.rb
+2
-0
app/finders/branches_finder.rb
app/finders/branches_finder.rb
+2
-0
app/finders/clusters_finder.rb
app/finders/clusters_finder.rb
+2
-0
app/finders/concerns/created_at_filter.rb
app/finders/concerns/created_at_filter.rb
+2
-0
app/finders/concerns/custom_attributes_filter.rb
app/finders/concerns/custom_attributes_filter.rb
+2
-0
app/finders/concerns/finder_methods.rb
app/finders/concerns/finder_methods.rb
+2
-0
app/finders/concerns/finder_with_cross_project_access.rb
app/finders/concerns/finder_with_cross_project_access.rb
+2
-0
app/finders/contributed_projects_finder.rb
app/finders/contributed_projects_finder.rb
+2
-0
app/finders/environments_finder.rb
app/finders/environments_finder.rb
+2
-0
app/finders/events_finder.rb
app/finders/events_finder.rb
+2
-0
app/finders/fork_projects_finder.rb
app/finders/fork_projects_finder.rb
+2
-0
app/finders/group_descendants_finder.rb
app/finders/group_descendants_finder.rb
+2
-0
app/finders/group_finder.rb
app/finders/group_finder.rb
+2
-0
app/finders/group_members_finder.rb
app/finders/group_members_finder.rb
+2
-0
app/finders/group_projects_finder.rb
app/finders/group_projects_finder.rb
+2
-0
app/finders/groups_finder.rb
app/finders/groups_finder.rb
+2
-0
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+2
-0
app/finders/issues_finder.rb
app/finders/issues_finder.rb
+2
-0
app/finders/joined_groups_finder.rb
app/finders/joined_groups_finder.rb
+2
-0
app/finders/labels_finder.rb
app/finders/labels_finder.rb
+2
-0
app/finders/license_template_finder.rb
app/finders/license_template_finder.rb
+2
-0
app/finders/members_finder.rb
app/finders/members_finder.rb
+2
-0
app/finders/merge_request_target_project_finder.rb
app/finders/merge_request_target_project_finder.rb
+2
-0
app/finders/merge_requests_finder.rb
app/finders/merge_requests_finder.rb
+2
-0
app/finders/milestones_finder.rb
app/finders/milestones_finder.rb
+2
-0
app/finders/notes_finder.rb
app/finders/notes_finder.rb
+2
-0
app/finders/personal_access_tokens_finder.rb
app/finders/personal_access_tokens_finder.rb
+2
-0
app/finders/personal_projects_finder.rb
app/finders/personal_projects_finder.rb
+2
-0
app/finders/pipeline_schedules_finder.rb
app/finders/pipeline_schedules_finder.rb
+2
-0
app/finders/pipelines_finder.rb
app/finders/pipelines_finder.rb
+2
-0
app/finders/projects_finder.rb
app/finders/projects_finder.rb
+2
-0
app/finders/runner_jobs_finder.rb
app/finders/runner_jobs_finder.rb
+2
-0
app/finders/snippets_finder.rb
app/finders/snippets_finder.rb
+2
-0
app/finders/tags_finder.rb
app/finders/tags_finder.rb
+2
-0
app/finders/template_finder.rb
app/finders/template_finder.rb
+2
-0
app/finders/todos_finder.rb
app/finders/todos_finder.rb
+2
-0
app/finders/union_finder.rb
app/finders/union_finder.rb
+2
-0
app/finders/user_recent_events_finder.rb
app/finders/user_recent_events_finder.rb
+2
-0
app/finders/users_finder.rb
app/finders/users_finder.rb
+2
-0
app/graphql/functions/base_function.rb
app/graphql/functions/base_function.rb
+2
-0
app/graphql/functions/echo.rb
app/graphql/functions/echo.rb
+2
-0
app/graphql/gitlab_schema.rb
app/graphql/gitlab_schema.rb
+2
-0
app/graphql/mutations/concerns/mutations/resolves_project.rb
app/graphql/mutations/concerns/mutations/resolves_project.rb
+2
-0
app/graphql/mutations/merge_requests/base.rb
app/graphql/mutations/merge_requests/base.rb
+2
-0
app/graphql/resolvers/base_resolver.rb
app/graphql/resolvers/base_resolver.rb
+2
-0
app/graphql/resolvers/concerns/resolves_pipelines.rb
app/graphql/resolvers/concerns/resolves_pipelines.rb
+2
-0
app/graphql/resolvers/full_path_resolver.rb
app/graphql/resolvers/full_path_resolver.rb
+2
-0
app/graphql/resolvers/merge_request_pipelines_resolver.rb
app/graphql/resolvers/merge_request_pipelines_resolver.rb
+2
-0
app/graphql/resolvers/merge_request_resolver.rb
app/graphql/resolvers/merge_request_resolver.rb
+2
-0
app/graphql/resolvers/project_pipelines_resolver.rb
app/graphql/resolvers/project_pipelines_resolver.rb
+2
-0
app/graphql/resolvers/project_resolver.rb
app/graphql/resolvers/project_resolver.rb
+2
-0
app/graphql/types/base_enum.rb
app/graphql/types/base_enum.rb
+2
-0
app/graphql/types/base_field.rb
app/graphql/types/base_field.rb
+2
-0
app/graphql/types/base_input_object.rb
app/graphql/types/base_input_object.rb
+2
-0
app/graphql/types/base_interface.rb
app/graphql/types/base_interface.rb
+2
-0
app/graphql/types/base_object.rb
app/graphql/types/base_object.rb
+2
-0
app/graphql/types/base_scalar.rb
app/graphql/types/base_scalar.rb
+2
-0
app/graphql/types/base_union.rb
app/graphql/types/base_union.rb
+2
-0
app/graphql/types/ci/pipeline_status_enum.rb
app/graphql/types/ci/pipeline_status_enum.rb
+2
-0
app/graphql/types/ci/pipeline_type.rb
app/graphql/types/ci/pipeline_type.rb
+2
-0
app/graphql/types/merge_request_type.rb
app/graphql/types/merge_request_type.rb
+2
-0
app/graphql/types/permission_types/base_permission_type.rb
app/graphql/types/permission_types/base_permission_type.rb
+2
-0
app/graphql/types/permission_types/ci/pipeline.rb
app/graphql/types/permission_types/ci/pipeline.rb
+2
-0
app/graphql/types/permission_types/merge_request.rb
app/graphql/types/permission_types/merge_request.rb
+2
-0
app/graphql/types/permission_types/project.rb
app/graphql/types/permission_types/project.rb
+2
-0
app/graphql/types/project_type.rb
app/graphql/types/project_type.rb
+2
-0
app/graphql/types/query_type.rb
app/graphql/types/query_type.rb
+2
-0
app/graphql/types/time_type.rb
app/graphql/types/time_type.rb
+2
-0
changelogs/unreleased/frozen-string-app-finders-graphql.yml
changelogs/unreleased/frozen-string-app-finders-graphql.yml
+5
-0
No files found.
app/finders/access_requests_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
AccessRequestsFinder
attr_accessor
:source
...
...
app/finders/admin/projects_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
Admin::ProjectsFinder
attr_reader
:params
,
:current_user
...
...
app/finders/branches_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
BranchesFinder
def
initialize
(
repository
,
params
=
{})
@repository
=
repository
...
...
app/finders/clusters_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
ClustersFinder
def
initialize
(
project
,
user
,
scope
)
@project
=
project
...
...
app/finders/concerns/created_at_filter.rb
View file @
47b30384
# frozen_string_literal: true
module
CreatedAtFilter
def
by_created_at
(
items
)
items
=
items
.
created_before
(
params
[
:created_before
])
if
params
[
:created_before
].
present?
...
...
app/finders/concerns/custom_attributes_filter.rb
View file @
47b30384
# frozen_string_literal: true
module
CustomAttributesFilter
def
by_custom_attributes
(
items
)
return
items
unless
params
[
:custom_attributes
].
is_a?
(
Hash
)
...
...
app/finders/concerns/finder_methods.rb
View file @
47b30384
# frozen_string_literal: true
module
FinderMethods
def
find_by!
(
*
args
)
raise_not_found_unless_authorized
execute
.
find_by!
(
*
args
)
...
...
app/finders/concerns/finder_with_cross_project_access.rb
View file @
47b30384
# frozen_string_literal: true
# Module to prepend into finders to specify wether or not the finder requires
# cross project access
#
...
...
app/finders/contributed_projects_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
ContributedProjectsFinder
<
UnionFinder
def
initialize
(
user
)
@user
=
user
...
...
app/finders/environments_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
EnvironmentsFinder
attr_reader
:project
,
:current_user
,
:params
...
...
app/finders/events_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
EventsFinder
prepend
FinderMethods
prepend
FinderWithCrossProjectAccess
...
...
app/finders/fork_projects_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
ForkProjectsFinder
<
ProjectsFinder
def
initialize
(
project
,
params:
{},
current_user:
nil
)
project_ids
=
project
.
forks
.
includes
(
:creator
).
select
(
:id
)
...
...
app/finders/group_descendants_finder.rb
View file @
47b30384
# frozen_string_literal: true
# GroupDescendantsFinder
#
# Used to find and filter all subgroups and projects of a passed parent group
...
...
app/finders/group_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
GroupFinder
include
Gitlab
::
Allowable
...
...
app/finders/group_members_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
GroupMembersFinder
def
initialize
(
group
)
@group
=
group
...
...
app/finders/group_projects_finder.rb
View file @
47b30384
# frozen_string_literal: true
# GroupProjectsFinder
#
# Used to filter Projects by set of params
...
...
app/finders/groups_finder.rb
View file @
47b30384
# frozen_string_literal: true
# GroupsFinder
#
# Used to filter Groups by a set of params
...
...
app/finders/issuable_finder.rb
View file @
47b30384
# frozen_string_literal: true
# IssuableFinder
#
# Used to filter Issues and MergeRequests collections by set of params
...
...
app/finders/issues_finder.rb
View file @
47b30384
# frozen_string_literal: true
# Finders::Issues class
#
# Used to filter Issues collections by set of params
...
...
app/finders/joined_groups_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
JoinedGroupsFinder
<
UnionFinder
def
initialize
(
user
)
@user
=
user
...
...
app/finders/labels_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
LabelsFinder
<
UnionFinder
prepend
FinderWithCrossProjectAccess
include
FinderMethods
...
...
app/finders/license_template_finder.rb
View file @
47b30384
# frozen_string_literal: true
# LicenseTemplateFinder
#
# Used to find license templates, which may come from a variety of external
...
...
app/finders/members_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
MembersFinder
attr_reader
:project
,
:current_user
,
:group
...
...
app/finders/merge_request_target_project_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
MergeRequestTargetProjectFinder
include
FinderMethods
...
...
app/finders/merge_requests_finder.rb
View file @
47b30384
# frozen_string_literal: true
# Finders::MergeRequest class
#
# Used to filter MergeRequests collections by set of params
...
...
app/finders/milestones_finder.rb
View file @
47b30384
# frozen_string_literal: true
# Search for milestones
#
# params - Hash
...
...
app/finders/notes_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
NotesFinder
FETCH_OVERLAP
=
5
.
seconds
...
...
app/finders/personal_access_tokens_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
PersonalAccessTokensFinder
attr_accessor
:params
...
...
app/finders/personal_projects_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
PersonalProjectsFinder
<
UnionFinder
include
Gitlab
::
Allowable
...
...
app/finders/pipeline_schedules_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
PipelineSchedulesFinder
attr_reader
:project
,
:pipeline_schedules
...
...
app/finders/pipelines_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
PipelinesFinder
attr_reader
:project
,
:pipelines
,
:params
,
:current_user
...
...
app/finders/projects_finder.rb
View file @
47b30384
# frozen_string_literal: true
# ProjectsFinder
#
# Used to filter Projects by set of params
...
...
app/finders/runner_jobs_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
RunnerJobsFinder
attr_reader
:runner
,
:params
...
...
app/finders/snippets_finder.rb
View file @
47b30384
# frozen_string_literal: true
# Snippets Finder
#
# Used to filter Snippets collections by a set of params
...
...
app/finders/tags_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
TagsFinder
def
initialize
(
repository
,
params
)
@repository
=
repository
...
...
app/finders/template_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
TemplateFinder
VENDORED_TEMPLATES
=
{
dockerfiles:
::
Gitlab
::
Template
::
DockerfileTemplate
,
...
...
app/finders/todos_finder.rb
View file @
47b30384
# frozen_string_literal: true
# TodosFinder
#
# Used to filter Todos by set of params
...
...
app/finders/union_finder.rb
View file @
47b30384
# frozen_string_literal: true
class
UnionFinder
def
find_union
(
segments
,
klass
)
if
segments
.
length
>
1
...
...
app/finders/user_recent_events_finder.rb
View file @
47b30384
# frozen_string_literal: true
# Get user activity feed for projects common for a user and a logged in user
#
# - current_user: The user viewing the events
...
...
app/finders/users_finder.rb
View file @
47b30384
# frozen_string_literal: true
# UsersFinder
#
# Used to filter users by set of params
...
...
app/graphql/functions/base_function.rb
View file @
47b30384
# frozen_string_literal: true
module
Functions
class
BaseFunction
<
GraphQL
::
Function
end
...
...
app/graphql/functions/echo.rb
View file @
47b30384
# frozen_string_literal: true
module
Functions
class
Echo
<
BaseFunction
argument
:text
,
GraphQL
::
STRING_TYPE
...
...
app/graphql/gitlab_schema.rb
View file @
47b30384
# frozen_string_literal: true
class
GitlabSchema
<
GraphQL
::
Schema
use
BatchLoader
::
GraphQL
use
Gitlab
::
Graphql
::
Authorize
...
...
app/graphql/mutations/concerns/mutations/resolves_project.rb
View file @
47b30384
# frozen_string_literal: true
module
Mutations
module
ResolvesProject
extend
ActiveSupport
::
Concern
...
...
app/graphql/mutations/merge_requests/base.rb
View file @
47b30384
# frozen_string_literal: true
module
Mutations
module
MergeRequests
class
Base
<
BaseMutation
...
...
app/graphql/resolvers/base_resolver.rb
View file @
47b30384
# frozen_string_literal: true
module
Resolvers
class
BaseResolver
<
GraphQL
::
Schema
::
Resolver
end
...
...
app/graphql/resolvers/concerns/resolves_pipelines.rb
View file @
47b30384
# frozen_string_literal: true
module
ResolvesPipelines
extend
ActiveSupport
::
Concern
...
...
app/graphql/resolvers/full_path_resolver.rb
View file @
47b30384
# frozen_string_literal: true
module
Resolvers
module
FullPathResolver
extend
ActiveSupport
::
Concern
...
...
app/graphql/resolvers/merge_request_pipelines_resolver.rb
View file @
47b30384
# frozen_string_literal: true
module
Resolvers
class
MergeRequestPipelinesResolver
<
BaseResolver
include
::
ResolvesPipelines
...
...
app/graphql/resolvers/merge_request_resolver.rb
View file @
47b30384
# frozen_string_literal: true
module
Resolvers
class
MergeRequestResolver
<
BaseResolver
argument
:iid
,
GraphQL
::
ID_TYPE
,
...
...
app/graphql/resolvers/project_pipelines_resolver.rb
View file @
47b30384
# frozen_string_literal: true
module
Resolvers
class
ProjectPipelinesResolver
<
BaseResolver
include
ResolvesPipelines
...
...
app/graphql/resolvers/project_resolver.rb
View file @
47b30384
# frozen_string_literal: true
module
Resolvers
class
ProjectResolver
<
BaseResolver
prepend
FullPathResolver
...
...
app/graphql/types/base_enum.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
BaseEnum
<
GraphQL
::
Schema
::
Enum
end
...
...
app/graphql/types/base_field.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
BaseField
<
GraphQL
::
Schema
::
Field
prepend
Gitlab
::
Graphql
::
Authorize
...
...
app/graphql/types/base_input_object.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
BaseInputObject
<
GraphQL
::
Schema
::
InputObject
end
...
...
app/graphql/types/base_interface.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
module
BaseInterface
include
GraphQL
::
Schema
::
Interface
...
...
app/graphql/types/base_object.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
BaseObject
<
GraphQL
::
Schema
::
Object
prepend
Gitlab
::
Graphql
::
Present
...
...
app/graphql/types/base_scalar.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
BaseScalar
<
GraphQL
::
Schema
::
Scalar
end
...
...
app/graphql/types/base_union.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
BaseUnion
<
GraphQL
::
Schema
::
Union
end
...
...
app/graphql/types/ci/pipeline_status_enum.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
module
Ci
class
PipelineStatusEnum
<
BaseEnum
...
...
app/graphql/types/ci/pipeline_type.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
module
Ci
class
PipelineType
<
BaseObject
...
...
app/graphql/types/merge_request_type.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
MergeRequestType
<
BaseObject
expose_permissions
Types
::
PermissionTypes
::
MergeRequest
...
...
app/graphql/types/permission_types/base_permission_type.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
module
PermissionTypes
class
BasePermissionType
<
BaseObject
...
...
app/graphql/types/permission_types/ci/pipeline.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
module
PermissionTypes
module
Ci
...
...
app/graphql/types/permission_types/merge_request.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
module
PermissionTypes
class
MergeRequest
<
BasePermissionType
...
...
app/graphql/types/permission_types/project.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
module
PermissionTypes
class
Project
<
BasePermissionType
...
...
app/graphql/types/project_type.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
ProjectType
<
BaseObject
expose_permissions
Types
::
PermissionTypes
::
Project
...
...
app/graphql/types/query_type.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
QueryType
<
BaseObject
graphql_name
'Query'
...
...
app/graphql/types/time_type.rb
View file @
47b30384
# frozen_string_literal: true
module
Types
class
TimeType
<
BaseScalar
graphql_name
'Time'
...
...
changelogs/unreleased/frozen-string-app-finders-graphql.yml
0 → 100644
View file @
47b30384
---
title
:
Enable frozen string in app/graphql + app/finders
merge_request
:
author
:
gfyoung
type
:
performance
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment