BigW Consortium Gitlab

shell_env.rb 329 Bytes
Newer Older
1 2
module Gitlab
  # This module provide 2 methods
Johannes Schleifenbaum committed
3
  # to set specific ENV variables for GitLab Shell
4 5 6 7 8 9 10 11 12 13 14 15 16 17
  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