diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-04-28 17:10:42 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-05-11 12:21:31 -0300 |
commit | ee259653e7a00359740ca36cef606f9c3cc1a7cb (patch) | |
tree | 6f53403454defd386c4455a6a9ffcf052d4c6695 /lib/gitlab_access_status.rb | |
parent | 1cf14770f3bf5c3255f4c3a8f69ccfab74317fcd (diff) | |
download | gitlab-shell-ee259653e7a00359740ca36cef606f9c3cc1a7cb.tar.gz |
Handle GL_REPOSITORY env variable and use it in api calls
Diffstat (limited to 'lib/gitlab_access_status.rb')
-rw-r--r-- | lib/gitlab_access_status.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab_access_status.rb b/lib/gitlab_access_status.rb index 7fb88be..6a906f1 100644 --- a/lib/gitlab_access_status.rb +++ b/lib/gitlab_access_status.rb @@ -1,17 +1,18 @@ require 'json' class GitAccessStatus - attr_reader :message, :repository_path + attr_reader :message, :gl_repository, :repository_path - def initialize(status, message, repository_path) + def initialize(status, message, gl_repository, repository_path) @status = status @message = message + @gl_repository = gl_repository @repository_path = repository_path end def self.create_from_json(json) values = JSON.parse(json) - self.new(values["status"], values["message"], values["repository_path"]) + self.new(values["status"], values["message"], values["gl_repository"], values["repository_path"]) end def allowed? |