socialforge/lib/git/backend/shell_env.rb

18 lines
329 B
Ruby
Raw Normal View History

2013-08-19 10:24:02 +08:00
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