Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-08-27 15:35:31 +0300
committerJacopo <beschi.jacopo@gmail.com>2018-08-29 17:56:34 +0300
commitc6bddeacf4775b79edc9896f30da3c1f4136d4d1 (patch)
tree453164aca2281f6899f313f408b0fb37b98c3cdd /lib
parent8af40870e2208612a5af34e19f231032745a7f90 (diff)
Updates code using class_methods over module ClassMethods
Diffstat (limited to 'lib')
-rw-r--r--lib/api/api_guard.rb2
-rw-r--r--lib/api/projects_relation_builder.rb2
-rw-r--r--lib/gitlab/github_import/representation/expose_attribute.rb2
-rw-r--r--lib/gitlab/graphql/mount_mutation.rb2
-rw-r--r--lib/static_model.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb
index c17089759de..8ee7987cfff 100644
--- a/lib/api/api_guard.rb
+++ b/lib/api/api_guard.rb
@@ -84,7 +84,7 @@ module API
end
end
- module ClassMethods
+ class_methods do
private
def install_error_responders(base)
diff --git a/lib/api/projects_relation_builder.rb b/lib/api/projects_relation_builder.rb
index 6482fd94ab8..9fd79c491c2 100644
--- a/lib/api/projects_relation_builder.rb
+++ b/lib/api/projects_relation_builder.rb
@@ -2,7 +2,7 @@ module API
module ProjectsRelationBuilder
extend ActiveSupport::Concern
- module ClassMethods
+ class_methods do
def prepare_relation(projects_relation, options = {})
projects_relation = preload_relation(projects_relation, options)
execute_batch_counting(projects_relation)
diff --git a/lib/gitlab/github_import/representation/expose_attribute.rb b/lib/gitlab/github_import/representation/expose_attribute.rb
index c3405759631..d2438ee8094 100644
--- a/lib/gitlab/github_import/representation/expose_attribute.rb
+++ b/lib/gitlab/github_import/representation/expose_attribute.rb
@@ -6,7 +6,7 @@ module Gitlab
module ExposeAttribute
extend ActiveSupport::Concern
- module ClassMethods
+ class_methods do
# Defines getter methods for the given attribute names.
#
# Example:
diff --git a/lib/gitlab/graphql/mount_mutation.rb b/lib/gitlab/graphql/mount_mutation.rb
index 8cab84d7a5f..9048967d4e1 100644
--- a/lib/gitlab/graphql/mount_mutation.rb
+++ b/lib/gitlab/graphql/mount_mutation.rb
@@ -5,7 +5,7 @@ module Gitlab
module MountMutation
extend ActiveSupport::Concern
- module ClassMethods
+ class_methods do
def mount_mutation(mutation_class)
# Using an underscored field name symbol will make `graphql-ruby`
# standardize the field name
diff --git a/lib/static_model.rb b/lib/static_model.rb
index 60e2dd82e4e..44673c2b5f6 100644
--- a/lib/static_model.rb
+++ b/lib/static_model.rb
@@ -2,7 +2,7 @@
module StaticModel
extend ActiveSupport::Concern
- module ClassMethods
+ class_methods do
# Used by ActiveRecord's polymorphic association to set object_id
def primary_key
'id'