summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-19 10:34:58 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-19 10:34:58 +0200
commitac4b954c5fabbfa98fb72d88526a30713a20af5d (patch)
treea1fccb6ca951e96374e54872b548f160decd034b /lib
parent416076610e7b1674669ad33bae604155f55a3d02 (diff)
downloadgitlab-ce-ac4b954c5fabbfa98fb72d88526a30713a20af5d.tar.gz
Rename authentication activity observer methods
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth/activity.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/gitlab/auth/activity.rb b/lib/gitlab/auth/activity.rb
index c0254ca81cd..b8a0979ac35 100644
--- a/lib/gitlab/auth/activity.rb
+++ b/lib/gitlab/auth/activity.rb
@@ -39,28 +39,18 @@ module Gitlab
self.class.user_session_fetched_counter.increment
end
- def user_set_manually!
+ def user_session_override!
self.class.user_session_override_counter.increment
end
- def user_logout!
+ def user_signed_out!
self.class.user_signed_out_counter.increment
end
- class StubCounter
- def initialize(metric)
- Rails.logger.warn("METRIC #{metric}")
- end
-
- def increment
- end
- end
-
COUNTERS.each_pair do |metric, description|
define_singleton_method("#{metric}_counter") do
strong_memoize(metric) do
- StubCounter.new(metric)
- # Gitlab::Metrics.counter("gitlab_auth_#{metric}_total", description)
+ Gitlab::Metrics.counter("gitlab_auth_#{metric}_total".to_sym, description)
end
end
end