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>2020-02-25 21:09:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-25 21:09:02 +0300
commit951616a26a61e880860ad862c1d45a8e3762b4bc (patch)
treeed6fe722e955aff38e13ca02d2aa7fdd4239c863 /lib/gitlab/with_request_store.rb
parente06d0e779673d745972863302858105aad9032e5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/with_request_store.rb')
-rw-r--r--lib/gitlab/with_request_store.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/with_request_store.rb b/lib/gitlab/with_request_store.rb
new file mode 100644
index 00000000000..d6c05e1e256
--- /dev/null
+++ b/lib/gitlab/with_request_store.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module WithRequestStore
+ def with_request_store
+ RequestStore.begin!
+ yield
+ ensure
+ RequestStore.end!
+ RequestStore.clear!
+ end
+ end
+end