Class: Fgi::GitServices::Gitlab
- Inherits:
-
Object
- Object
- Fgi::GitServices::Gitlab
- Defined in:
- lib/fgi/git_services/gitlab.rb
Instance Attribute Summary collapse
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
-
#token_header ⇒ Object
readonly
Returns the value of attribute token_header.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(config: CONFIG) ⇒ Gitlab
constructor
A new instance of Gitlab.
- #to_s ⇒ Object
- #to_sym ⇒ Object
Constructor Details
#initialize(config: CONFIG) ⇒ Gitlab
Returns a new instance of Gitlab.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fgi/git_services/gitlab.rb', line 8 def initialize(config: CONFIG) @version = 'v4' @main_url = "#{config[:url]}/api/#{@version}" @token_header = 'PRIVATE-TOKEN' @routes = { projects: "#{@main_url}/projects", search_projects: "#{@main_url}/projects?search=", issues: "#{@main_url}/projects/#{config[:project_id]}/issues", branches: "#{@main_url}/projects/#{config[:project_id]}/repository/branches" } end |
Instance Attribute Details
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
6 7 8 |
# File 'lib/fgi/git_services/gitlab.rb', line 6 def routes @routes end |
#token_header ⇒ Object (readonly)
Returns the value of attribute token_header.
6 7 8 |
# File 'lib/fgi/git_services/gitlab.rb', line 6 def token_header @token_header end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/fgi/git_services/gitlab.rb', line 6 def version @version end |
Instance Method Details
#to_s ⇒ Object
24 25 26 |
# File 'lib/fgi/git_services/gitlab.rb', line 24 def to_s 'Gitlab' end |
#to_sym ⇒ Object
20 21 22 |
# File 'lib/fgi/git_services/gitlab.rb', line 20 def to_sym :gitlab end |