Gitlab::ShellEnv added

This commit is contained in:
Dmitriy Zaporozhets 2013-02-14 15:17:43 +02:00
parent b698094d4d
commit 49cf9badbc
4 changed files with 22 additions and 3 deletions

View file

@ -0,0 +1,17 @@
module Gitlab
# This module provide 2 methods
# to set specific ENV variabled for GitLab Shell
module ShellEnv
extend self
def set_env(user)
# Set GL_ID env variable
ENV['GL_ID'] = "user-#{user.id}"
end
def reset_env
# Reset GL_ID env variable
ENV['GL_ID'] = nil
end
end
end