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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-03 12:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-03 12:18:50 +0300
commit642ed51ed88d96df94cd56cdbfaff0f58c0433b1 (patch)
tree9ac2846625dab484a55f4d9e3c2180a2993af924 /lib/gitlab/cycle_analytics
parentb5e7873e3f08a518106a1548f5806bc8e45f6ec7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/cycle_analytics')
-rw-r--r--lib/gitlab/cycle_analytics/summary/base.rb18
-rw-r--r--lib/gitlab/cycle_analytics/summary/defaults.rb29
2 files changed, 31 insertions, 16 deletions
diff --git a/lib/gitlab/cycle_analytics/summary/base.rb b/lib/gitlab/cycle_analytics/summary/base.rb
index f867dbd4d68..5605d48c543 100644
--- a/lib/gitlab/cycle_analytics/summary/base.rb
+++ b/lib/gitlab/cycle_analytics/summary/base.rb
@@ -4,27 +4,13 @@ module Gitlab
module CycleAnalytics
module Summary
class Base
+ include Gitlab::CycleAnalytics::Summary::Defaults
+
def initialize(project:, options:)
@project = project
@options = options
end
- def identifier
- self.class.name.demodulize.underscore.to_sym
- end
-
- def title
- raise NotImplementedError, "Expected #{self.name} to implement title"
- end
-
- def value
- raise NotImplementedError, "Expected #{self.name} to implement value"
- end
-
- def links
- []
- end
-
private
attr_reader :project, :options
diff --git a/lib/gitlab/cycle_analytics/summary/defaults.rb b/lib/gitlab/cycle_analytics/summary/defaults.rb
new file mode 100644
index 00000000000..468494a8ab8
--- /dev/null
+++ b/lib/gitlab/cycle_analytics/summary/defaults.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module CycleAnalytics
+ module Summary
+ module Defaults
+ def identifier
+ self.class.name.demodulize.underscore.to_sym
+ end
+
+ # :nocov: the class including this concern is expected to test this method.
+ def title
+ raise NotImplementedError, "Expected #{self.name} to implement title"
+ end
+ # :nocov:
+
+ # :nocov: the class including this concern is expected to test this method.
+ def value
+ raise NotImplementedError, "Expected #{self.name} to implement value"
+ end
+ # :nocov:
+
+ def links
+ []
+ end
+ end
+ end
+ end
+end