fs-gitlab 4.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/CHANGELOG.md +270 -0
 - data/LICENSE.txt +24 -0
 - data/README.md +260 -0
 - data/exe/gitlab +11 -0
 - data/lib/gitlab/api.rb +24 -0
 - data/lib/gitlab/cli.rb +89 -0
 - data/lib/gitlab/cli_helpers.rb +243 -0
 - data/lib/gitlab/client/access_requests.rb +103 -0
 - data/lib/gitlab/client/application_settings.rb +172 -0
 - data/lib/gitlab/client/avatar.rb +21 -0
 - data/lib/gitlab/client/award_emojis.rb +137 -0
 - data/lib/gitlab/client/boards.rb +146 -0
 - data/lib/gitlab/client/branches.rb +135 -0
 - data/lib/gitlab/client/broadcast_messages.rb +75 -0
 - data/lib/gitlab/client/build_variables.rb +135 -0
 - data/lib/gitlab/client/builds.rb +108 -0
 - data/lib/gitlab/client/commits.rb +216 -0
 - data/lib/gitlab/client/container_registry.rb +85 -0
 - data/lib/gitlab/client/deployments.rb +34 -0
 - data/lib/gitlab/client/environments.rb +89 -0
 - data/lib/gitlab/client/epic_issues.rb +23 -0
 - data/lib/gitlab/client/epics.rb +73 -0
 - data/lib/gitlab/client/events.rb +60 -0
 - data/lib/gitlab/client/features.rb +48 -0
 - data/lib/gitlab/client/group_badges.rb +88 -0
 - data/lib/gitlab/client/group_boards.rb +141 -0
 - data/lib/gitlab/client/group_labels.rb +88 -0
 - data/lib/gitlab/client/group_milestones.rb +94 -0
 - data/lib/gitlab/client/groups.rb +358 -0
 - data/lib/gitlab/client/issue_links.rb +48 -0
 - data/lib/gitlab/client/issues.rb +231 -0
 - data/lib/gitlab/client/jobs.rb +250 -0
 - data/lib/gitlab/client/keys.rb +29 -0
 - data/lib/gitlab/client/labels.rb +88 -0
 - data/lib/gitlab/client/lint.rb +19 -0
 - data/lib/gitlab/client/markdown.rb +23 -0
 - data/lib/gitlab/client/merge_request_approvals.rb +265 -0
 - data/lib/gitlab/client/merge_requests.rb +386 -0
 - data/lib/gitlab/client/milestones.rb +106 -0
 - data/lib/gitlab/client/namespaces.rb +22 -0
 - data/lib/gitlab/client/notes.rb +313 -0
 - data/lib/gitlab/client/packages.rb +95 -0
 - data/lib/gitlab/client/pipeline_schedules.rb +147 -0
 - data/lib/gitlab/client/pipeline_triggers.rb +103 -0
 - data/lib/gitlab/client/pipelines.rb +105 -0
 - data/lib/gitlab/client/project_badges.rb +85 -0
 - data/lib/gitlab/client/project_clusters.rb +83 -0
 - data/lib/gitlab/client/project_release_links.rb +76 -0
 - data/lib/gitlab/client/project_releases.rb +79 -0
 - data/lib/gitlab/client/projects.rb +708 -0
 - data/lib/gitlab/client/protected_tags.rb +59 -0
 - data/lib/gitlab/client/remote_mirrors.rb +51 -0
 - data/lib/gitlab/client/repositories.rb +113 -0
 - data/lib/gitlab/client/repository_files.rb +131 -0
 - data/lib/gitlab/client/repository_submodules.rb +27 -0
 - data/lib/gitlab/client/resource_label_events.rb +82 -0
 - data/lib/gitlab/client/resource_state_events.rb +57 -0
 - data/lib/gitlab/client/runners.rb +211 -0
 - data/lib/gitlab/client/search.rb +66 -0
 - data/lib/gitlab/client/services.rb +53 -0
 - data/lib/gitlab/client/sidekiq.rb +39 -0
 - data/lib/gitlab/client/snippets.rb +95 -0
 - data/lib/gitlab/client/system_hooks.rb +64 -0
 - data/lib/gitlab/client/tags.rb +97 -0
 - data/lib/gitlab/client/templates.rb +100 -0
 - data/lib/gitlab/client/todos.rb +46 -0
 - data/lib/gitlab/client/user_snippets.rb +114 -0
 - data/lib/gitlab/client/users.rb +397 -0
 - data/lib/gitlab/client/versions.rb +18 -0
 - data/lib/gitlab/client/wikis.rb +79 -0
 - data/lib/gitlab/client.rb +95 -0
 - data/lib/gitlab/configuration.rb +57 -0
 - data/lib/gitlab/error.rb +170 -0
 - data/lib/gitlab/file_response.rb +48 -0
 - data/lib/gitlab/help.rb +94 -0
 - data/lib/gitlab/objectified_hash.rb +51 -0
 - data/lib/gitlab/page_links.rb +35 -0
 - data/lib/gitlab/paginated_response.rb +110 -0
 - data/lib/gitlab/request.rb +109 -0
 - data/lib/gitlab/shell.rb +83 -0
 - data/lib/gitlab/shell_history.rb +57 -0
 - data/lib/gitlab/version.rb +5 -0
 - data/lib/gitlab.rb +56 -0
 - metadata +204 -0
 
| 
         @@ -0,0 +1,110 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Gitlab
         
     | 
| 
      
 4 
     | 
    
         
            +
              # Wrapper class of paginated response.
         
     | 
| 
      
 5 
     | 
    
         
            +
              class PaginatedResponse
         
     | 
| 
      
 6 
     | 
    
         
            +
                attr_accessor :client
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize(array)
         
     | 
| 
      
 9 
     | 
    
         
            +
                  @array = array
         
     | 
| 
      
 10 
     | 
    
         
            +
                end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                def ==(other)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @array == other
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                def inspect
         
     | 
| 
      
 17 
     | 
    
         
            +
                  @array.inspect
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                def method_missing(name, *args, &block)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  if @array.respond_to?(name)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    @array.send(name, *args, &block)
         
     | 
| 
      
 23 
     | 
    
         
            +
                  else
         
     | 
| 
      
 24 
     | 
    
         
            +
                    super
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                def respond_to_missing?(method_name, include_private = false)
         
     | 
| 
      
 29 
     | 
    
         
            +
                  super || @array.respond_to?(method_name, include_private)
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                def parse_headers!(headers)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  @links = PageLinks.new headers
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                def each_page
         
     | 
| 
      
 37 
     | 
    
         
            +
                  current = self
         
     | 
| 
      
 38 
     | 
    
         
            +
                  yield current
         
     | 
| 
      
 39 
     | 
    
         
            +
                  while current.has_next_page?
         
     | 
| 
      
 40 
     | 
    
         
            +
                    current = current.next_page
         
     | 
| 
      
 41 
     | 
    
         
            +
                    yield current
         
     | 
| 
      
 42 
     | 
    
         
            +
                  end
         
     | 
| 
      
 43 
     | 
    
         
            +
                end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                def lazy_paginate
         
     | 
| 
      
 46 
     | 
    
         
            +
                  to_enum(:each_page).lazy.flat_map(&:to_ary)
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                def auto_paginate(&block)
         
     | 
| 
      
 50 
     | 
    
         
            +
                  return lazy_paginate.to_a unless block
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                  lazy_paginate.each(&block)
         
     | 
| 
      
 53 
     | 
    
         
            +
                end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                def paginate_with_limit(limit, &block)
         
     | 
| 
      
 56 
     | 
    
         
            +
                  return lazy_paginate.take(limit).to_a unless block
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                  lazy_paginate.take(limit).each(&block)
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                def last_page?
         
     | 
| 
      
 62 
     | 
    
         
            +
                  !(@links.nil? || @links.last.nil?)
         
     | 
| 
      
 63 
     | 
    
         
            +
                end
         
     | 
| 
      
 64 
     | 
    
         
            +
                alias has_last_page? last_page?
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                def last_page
         
     | 
| 
      
 67 
     | 
    
         
            +
                  return nil if @client.nil? || !has_last_page?
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
                  @client.get(client_relative_path(@links.last))
         
     | 
| 
      
 70 
     | 
    
         
            +
                end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                def first_page?
         
     | 
| 
      
 73 
     | 
    
         
            +
                  !(@links.nil? || @links.first.nil?)
         
     | 
| 
      
 74 
     | 
    
         
            +
                end
         
     | 
| 
      
 75 
     | 
    
         
            +
                alias has_first_page? first_page?
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                def first_page
         
     | 
| 
      
 78 
     | 
    
         
            +
                  return nil if @client.nil? || !has_first_page?
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                  @client.get(client_relative_path(@links.first))
         
     | 
| 
      
 81 
     | 
    
         
            +
                end
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
                def next_page?
         
     | 
| 
      
 84 
     | 
    
         
            +
                  !(@links.nil? || @links.next.nil?)
         
     | 
| 
      
 85 
     | 
    
         
            +
                end
         
     | 
| 
      
 86 
     | 
    
         
            +
                alias has_next_page? next_page?
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                def next_page
         
     | 
| 
      
 89 
     | 
    
         
            +
                  return nil if @client.nil? || !has_next_page?
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
                  @client.get(client_relative_path(@links.next))
         
     | 
| 
      
 92 
     | 
    
         
            +
                end
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                def prev_page?
         
     | 
| 
      
 95 
     | 
    
         
            +
                  !(@links.nil? || @links.prev.nil?)
         
     | 
| 
      
 96 
     | 
    
         
            +
                end
         
     | 
| 
      
 97 
     | 
    
         
            +
                alias has_prev_page? prev_page?
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
                def prev_page
         
     | 
| 
      
 100 
     | 
    
         
            +
                  return nil if @client.nil? || !has_prev_page?
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                  @client.get(client_relative_path(@links.prev))
         
     | 
| 
      
 103 
     | 
    
         
            +
                end
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
                def client_relative_path(link)
         
     | 
| 
      
 106 
     | 
    
         
            +
                  client_endpoint_path = URI.parse(@client.endpoint).request_uri # api/v4
         
     | 
| 
      
 107 
     | 
    
         
            +
                  URI.parse(link).request_uri.sub(client_endpoint_path, '')
         
     | 
| 
      
 108 
     | 
    
         
            +
                end
         
     | 
| 
      
 109 
     | 
    
         
            +
              end
         
     | 
| 
      
 110 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,109 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'httparty'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'json'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            module Gitlab
         
     | 
| 
      
 7 
     | 
    
         
            +
              # @private
         
     | 
| 
      
 8 
     | 
    
         
            +
              class Request
         
     | 
| 
      
 9 
     | 
    
         
            +
                include HTTParty
         
     | 
| 
      
 10 
     | 
    
         
            +
                format :json
         
     | 
| 
      
 11 
     | 
    
         
            +
                maintain_method_across_redirects true
         
     | 
| 
      
 12 
     | 
    
         
            +
                headers 'Accept' => 'application/json', 'Content-Type' => 'application/x-www-form-urlencoded'
         
     | 
| 
      
 13 
     | 
    
         
            +
                parser(proc { |body, _| parse(body) })
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                attr_accessor :private_token, :endpoint
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                # Converts the response body to an ObjectifiedHash.
         
     | 
| 
      
 18 
     | 
    
         
            +
                def self.parse(body)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  body = decode(body)
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  if body.is_a? Hash
         
     | 
| 
      
 22 
     | 
    
         
            +
                    ObjectifiedHash.new body
         
     | 
| 
      
 23 
     | 
    
         
            +
                  elsif body.is_a? Array
         
     | 
| 
      
 24 
     | 
    
         
            +
                    PaginatedResponse.new(body.collect! { |e| ObjectifiedHash.new(e) })
         
     | 
| 
      
 25 
     | 
    
         
            +
                  elsif body
         
     | 
| 
      
 26 
     | 
    
         
            +
                    true
         
     | 
| 
      
 27 
     | 
    
         
            +
                  elsif !body
         
     | 
| 
      
 28 
     | 
    
         
            +
                    false
         
     | 
| 
      
 29 
     | 
    
         
            +
                  else
         
     | 
| 
      
 30 
     | 
    
         
            +
                    raise Error::Parsing, "Couldn't parse a response body"
         
     | 
| 
      
 31 
     | 
    
         
            +
                  end
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                # Decodes a JSON response into Ruby object.
         
     | 
| 
      
 35 
     | 
    
         
            +
                def self.decode(response)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  response ? JSON.load(response) : {}
         
     | 
| 
      
 37 
     | 
    
         
            +
                rescue JSON::ParserError
         
     | 
| 
      
 38 
     | 
    
         
            +
                  raise Error::Parsing, 'The response is not a valid JSON'
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                %w[get post put delete].each do |method|
         
     | 
| 
      
 42 
     | 
    
         
            +
                  define_method method do |path, options = {}|
         
     | 
| 
      
 43 
     | 
    
         
            +
                    params = options.dup
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                    httparty_config(params)
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                    unless params[:unauthenticated]
         
     | 
| 
      
 48 
     | 
    
         
            +
                      params[:headers] ||= {}
         
     | 
| 
      
 49 
     | 
    
         
            +
                      params[:headers].merge!(authorization_header)
         
     | 
| 
      
 50 
     | 
    
         
            +
                    end
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                    retries_left = params[:ratelimit_retries] || 3
         
     | 
| 
      
 53 
     | 
    
         
            +
                    begin
         
     | 
| 
      
 54 
     | 
    
         
            +
                      response = self.class.send(method, endpoint + path, params)
         
     | 
| 
      
 55 
     | 
    
         
            +
                      validate response
         
     | 
| 
      
 56 
     | 
    
         
            +
                    rescue Gitlab::Error::TooManyRequests => e
         
     | 
| 
      
 57 
     | 
    
         
            +
                      retries_left -= 1
         
     | 
| 
      
 58 
     | 
    
         
            +
                      raise e if retries_left.zero?
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                      wait_time = response.headers['Retry-After'] || 2
         
     | 
| 
      
 61 
     | 
    
         
            +
                      sleep(wait_time.to_i)
         
     | 
| 
      
 62 
     | 
    
         
            +
                      retry
         
     | 
| 
      
 63 
     | 
    
         
            +
                    end
         
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
                # Checks the response code for common errors.
         
     | 
| 
      
 68 
     | 
    
         
            +
                # Returns parsed response for successful requests.
         
     | 
| 
      
 69 
     | 
    
         
            +
                def validate(response)
         
     | 
| 
      
 70 
     | 
    
         
            +
                  error_klass = Error.klass(response)
         
     | 
| 
      
 71 
     | 
    
         
            +
                  raise error_klass, response if error_klass
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
                  parsed = response.parsed_response
         
     | 
| 
      
 74 
     | 
    
         
            +
                  parsed.client = self if parsed.respond_to?(:client=)
         
     | 
| 
      
 75 
     | 
    
         
            +
                  parsed.parse_headers!(response.headers) if parsed.respond_to?(:parse_headers!)
         
     | 
| 
      
 76 
     | 
    
         
            +
                  parsed
         
     | 
| 
      
 77 
     | 
    
         
            +
                end
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                # Sets a base_uri and default_params for requests.
         
     | 
| 
      
 80 
     | 
    
         
            +
                # @raise [Error::MissingCredentials] if endpoint not set.
         
     | 
| 
      
 81 
     | 
    
         
            +
                def request_defaults(sudo = nil)
         
     | 
| 
      
 82 
     | 
    
         
            +
                  raise Error::MissingCredentials, 'Please set an endpoint to API' unless endpoint
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                  self.class.default_params sudo: sudo
         
     | 
| 
      
 85 
     | 
    
         
            +
                  self.class.default_params.delete(:sudo) if sudo.nil?
         
     | 
| 
      
 86 
     | 
    
         
            +
                end
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                private
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
                # Returns an Authorization header hash
         
     | 
| 
      
 91 
     | 
    
         
            +
                #
         
     | 
| 
      
 92 
     | 
    
         
            +
                # @raise [Error::MissingCredentials] if private_token and auth_token are not set.
         
     | 
| 
      
 93 
     | 
    
         
            +
                def authorization_header
         
     | 
| 
      
 94 
     | 
    
         
            +
                  raise Error::MissingCredentials, 'Please provide a private_token or auth_token for user' unless private_token
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                  if private_token.size < 21
         
     | 
| 
      
 97 
     | 
    
         
            +
                    { 'PRIVATE-TOKEN' => private_token }
         
     | 
| 
      
 98 
     | 
    
         
            +
                  else
         
     | 
| 
      
 99 
     | 
    
         
            +
                    { 'Authorization' => "Bearer #{private_token}" }
         
     | 
| 
      
 100 
     | 
    
         
            +
                  end
         
     | 
| 
      
 101 
     | 
    
         
            +
                end
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
                # Set HTTParty configuration
         
     | 
| 
      
 104 
     | 
    
         
            +
                # @see https://github.com/jnunemaker/httparty
         
     | 
| 
      
 105 
     | 
    
         
            +
                def httparty_config(options)
         
     | 
| 
      
 106 
     | 
    
         
            +
                  options.merge!(httparty) if httparty
         
     | 
| 
      
 107 
     | 
    
         
            +
                end
         
     | 
| 
      
 108 
     | 
    
         
            +
              end
         
     | 
| 
      
 109 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/gitlab/shell.rb
    ADDED
    
    | 
         @@ -0,0 +1,83 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'gitlab'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'gitlab/help'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require 'gitlab/cli_helpers'
         
     | 
| 
      
 6 
     | 
    
         
            +
            require 'gitlab/shell_history'
         
     | 
| 
      
 7 
     | 
    
         
            +
            require 'readline'
         
     | 
| 
      
 8 
     | 
    
         
            +
            require 'shellwords'
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            class Gitlab::Shell
         
     | 
| 
      
 11 
     | 
    
         
            +
              extend Gitlab::CLI::Helpers
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 14 
     | 
    
         
            +
                attr_reader :arguments, :command
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                def start
         
     | 
| 
      
 17 
     | 
    
         
            +
                  trap('INT') { quit_shell } # capture ctrl-c
         
     | 
| 
      
 18 
     | 
    
         
            +
                  setup
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                  while (buffer = Readline.readline('gitlab> '))
         
     | 
| 
      
 21 
     | 
    
         
            +
                    begin
         
     | 
| 
      
 22 
     | 
    
         
            +
                      parse_input buffer
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                      @arguments.map! { |arg| symbolize_keys(yaml_load(arg)) }
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                      case buffer
         
     | 
| 
      
 27 
     | 
    
         
            +
                      when nil, ''
         
     | 
| 
      
 28 
     | 
    
         
            +
                        next
         
     | 
| 
      
 29 
     | 
    
         
            +
                      when 'exit'
         
     | 
| 
      
 30 
     | 
    
         
            +
                        quit_shell
         
     | 
| 
      
 31 
     | 
    
         
            +
                      when /^\bhelp\b+/
         
     | 
| 
      
 32 
     | 
    
         
            +
                        puts help(arguments[0]) { |out| out.gsub!(/Gitlab\./, 'gitlab> ') }
         
     | 
| 
      
 33 
     | 
    
         
            +
                      else
         
     | 
| 
      
 34 
     | 
    
         
            +
                        history << buffer
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                        data = execute command, arguments
         
     | 
| 
      
 37 
     | 
    
         
            +
                        output_table command, arguments, data
         
     | 
| 
      
 38 
     | 
    
         
            +
                      end
         
     | 
| 
      
 39 
     | 
    
         
            +
                    rescue StandardError => e
         
     | 
| 
      
 40 
     | 
    
         
            +
                      puts e.message
         
     | 
| 
      
 41 
     | 
    
         
            +
                    end
         
     | 
| 
      
 42 
     | 
    
         
            +
                  end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                  quit_shell # save history if user presses ctrl-d
         
     | 
| 
      
 45 
     | 
    
         
            +
                end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                def parse_input(buffer)
         
     | 
| 
      
 48 
     | 
    
         
            +
                  buf = Shellwords.shellwords(buffer)
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                  @command = buf.shift
         
     | 
| 
      
 51 
     | 
    
         
            +
                  @arguments = buf.count.positive? ? buf : []
         
     | 
| 
      
 52 
     | 
    
         
            +
                end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
                def setup
         
     | 
| 
      
 55 
     | 
    
         
            +
                  history.load
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                  Readline.completion_proc = completion
         
     | 
| 
      
 58 
     | 
    
         
            +
                  Readline.completion_append_character = ' '
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                # Gets called when user hits TAB key to do completion
         
     | 
| 
      
 62 
     | 
    
         
            +
                def completion
         
     | 
| 
      
 63 
     | 
    
         
            +
                  proc { |str| actions.map(&:to_s).grep(/^#{Regexp.escape(str)}/) }
         
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                # Execute a given command with arguements
         
     | 
| 
      
 67 
     | 
    
         
            +
                def execute(cmd = command, args = arguments)
         
     | 
| 
      
 68 
     | 
    
         
            +
                  raise "Unknown command: #{cmd}. See the 'help' for a list of valid commands." unless actions.include?(cmd.to_sym)
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                  confirm_command(cmd)
         
     | 
| 
      
 71 
     | 
    
         
            +
                  gitlab_helper(cmd, args)
         
     | 
| 
      
 72 
     | 
    
         
            +
                end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                def quit_shell
         
     | 
| 
      
 75 
     | 
    
         
            +
                  history.save
         
     | 
| 
      
 76 
     | 
    
         
            +
                  exit
         
     | 
| 
      
 77 
     | 
    
         
            +
                end
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                def history
         
     | 
| 
      
 80 
     | 
    
         
            +
                  @history ||= History.new
         
     | 
| 
      
 81 
     | 
    
         
            +
                end
         
     | 
| 
      
 82 
     | 
    
         
            +
              end
         
     | 
| 
      
 83 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,57 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class Gitlab::Shell
         
     | 
| 
      
 4 
     | 
    
         
            +
              class History
         
     | 
| 
      
 5 
     | 
    
         
            +
                DEFAULT_HISTFILESIZE = 200
         
     | 
| 
      
 6 
     | 
    
         
            +
                DEFAULT_FILE_PATH = File.join(Dir.home, '.gitlab_shell_history')
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize(options = {})
         
     | 
| 
      
 9 
     | 
    
         
            +
                  @file_path = options[:file_path] || DEFAULT_FILE_PATH
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Readline::HISTORY.clear
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                def load
         
     | 
| 
      
 14 
     | 
    
         
            +
                  read_from_file { |line| Readline::HISTORY << line.chomp }
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                def save
         
     | 
| 
      
 18 
     | 
    
         
            +
                  lines.each { |line| history_file&.puts line }
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                def push(line)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  Readline::HISTORY << line
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
                alias << push
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                def lines
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Readline::HISTORY.to_a.last(max_lines)
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                private
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                def history_file
         
     | 
| 
      
 33 
     | 
    
         
            +
                  @history_file ||= File.open(history_file_path, 'w', 0o600).tap do |file|
         
     | 
| 
      
 34 
     | 
    
         
            +
                    file.sync = true
         
     | 
| 
      
 35 
     | 
    
         
            +
                  end
         
     | 
| 
      
 36 
     | 
    
         
            +
                rescue Errno::EACCES
         
     | 
| 
      
 37 
     | 
    
         
            +
                  warn 'History not saved; unable to open your history file for writing.'
         
     | 
| 
      
 38 
     | 
    
         
            +
                  @history_file = false
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                def history_file_path
         
     | 
| 
      
 42 
     | 
    
         
            +
                  File.expand_path(@file_path)
         
     | 
| 
      
 43 
     | 
    
         
            +
                end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                def read_from_file(&block)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  path = history_file_path
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                  File.foreach(path, &block) if File.exist?(path)
         
     | 
| 
      
 49 
     | 
    
         
            +
                rescue StandardError => e
         
     | 
| 
      
 50 
     | 
    
         
            +
                  warn "History file not loaded: #{e.message}"
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                def max_lines
         
     | 
| 
      
 54 
     | 
    
         
            +
                  (ENV['GITLAB_HISTFILESIZE'] || DEFAULT_HISTFILESIZE).to_i
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
              end
         
     | 
| 
      
 57 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/gitlab.rb
    ADDED
    
    | 
         @@ -0,0 +1,56 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'gitlab/version'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'gitlab/objectified_hash'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require 'gitlab/configuration'
         
     | 
| 
      
 6 
     | 
    
         
            +
            require 'gitlab/error'
         
     | 
| 
      
 7 
     | 
    
         
            +
            require 'gitlab/page_links'
         
     | 
| 
      
 8 
     | 
    
         
            +
            require 'gitlab/paginated_response'
         
     | 
| 
      
 9 
     | 
    
         
            +
            require 'gitlab/file_response'
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'gitlab/request'
         
     | 
| 
      
 11 
     | 
    
         
            +
            require 'gitlab/api'
         
     | 
| 
      
 12 
     | 
    
         
            +
            require 'gitlab/client'
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            module Gitlab
         
     | 
| 
      
 15 
     | 
    
         
            +
              extend Configuration
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              # Alias for Gitlab::Client.new
         
     | 
| 
      
 18 
     | 
    
         
            +
              #
         
     | 
| 
      
 19 
     | 
    
         
            +
              # @return [Gitlab::Client]
         
     | 
| 
      
 20 
     | 
    
         
            +
              def self.client(options = {})
         
     | 
| 
      
 21 
     | 
    
         
            +
                Gitlab::Client.new(options)
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              if Gem::Version.new(RUBY_VERSION).release >= Gem::Version.new('3.0.0')
         
     | 
| 
      
 25 
     | 
    
         
            +
                def self.method_missing(method, *args, **keywargs, &block)
         
     | 
| 
      
 26 
     | 
    
         
            +
                  return super unless client.respond_to?(method)
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                  client.send(method, *args, **keywargs, &block)
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
              else
         
     | 
| 
      
 31 
     | 
    
         
            +
                def self.method_missing(method, *args, &block)
         
     | 
| 
      
 32 
     | 
    
         
            +
                  return super unless client.respond_to?(method)
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  client.send(method, *args, &block)
         
     | 
| 
      
 35 
     | 
    
         
            +
                end
         
     | 
| 
      
 36 
     | 
    
         
            +
              end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
              # Delegate to Gitlab::Client
         
     | 
| 
      
 39 
     | 
    
         
            +
              def self.respond_to_missing?(method_name, include_private = false)
         
     | 
| 
      
 40 
     | 
    
         
            +
                client.respond_to?(method_name) || super
         
     | 
| 
      
 41 
     | 
    
         
            +
              end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
              # Delegate to HTTParty.http_proxy
         
     | 
| 
      
 44 
     | 
    
         
            +
              def self.http_proxy(address = nil, port = nil, username = nil, password = nil)
         
     | 
| 
      
 45 
     | 
    
         
            +
                Gitlab::Request.http_proxy(address, port, username, password)
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
              # Returns an unsorted array of available client methods.
         
     | 
| 
      
 49 
     | 
    
         
            +
              #
         
     | 
| 
      
 50 
     | 
    
         
            +
              # @return [Array<Symbol>]
         
     | 
| 
      
 51 
     | 
    
         
            +
              def self.actions
         
     | 
| 
      
 52 
     | 
    
         
            +
                hidden =
         
     | 
| 
      
 53 
     | 
    
         
            +
                  /endpoint|private_token|auth_token|user_agent|sudo|get|post|put|\Adelete\z|validate\z|request_defaults|httparty/
         
     | 
| 
      
 54 
     | 
    
         
            +
                (Gitlab::Client.instance_methods - Object.methods).reject { |e| e[hidden] }
         
     | 
| 
      
 55 
     | 
    
         
            +
              end
         
     | 
| 
      
 56 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,204 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: fs-gitlab
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 4.18.1
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Nihad Abbasov
         
     | 
| 
      
 8 
     | 
    
         
            +
            - Sean Edge
         
     | 
| 
      
 9 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 10 
     | 
    
         
            +
            bindir: exe
         
     | 
| 
      
 11 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2022-06-03 00:00:00.000000000 Z
         
     | 
| 
      
 13 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 14 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 15 
     | 
    
         
            +
              name: httparty
         
     | 
| 
      
 16 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 17 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 18 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 20 
     | 
    
         
            +
                    version: '0.20'
         
     | 
| 
      
 21 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 22 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 23 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 24 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 25 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 27 
     | 
    
         
            +
                    version: '0.20'
         
     | 
| 
      
 28 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 29 
     | 
    
         
            +
              name: terminal-table
         
     | 
| 
      
 30 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 31 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 32 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 33 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 34 
     | 
    
         
            +
                    version: 1.5.1
         
     | 
| 
      
 35 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 36 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 37 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 38 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 39 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 41 
     | 
    
         
            +
                    version: 1.5.1
         
     | 
| 
      
 42 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 43 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 44 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 45 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 46 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 47 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 48 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 49 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 50 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 51 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 52 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 53 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 54 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 55 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 56 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 57 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 58 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 59 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 60 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 61 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 62 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 63 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 64 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 65 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 66 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 67 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 68 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 69 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 70 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 71 
     | 
    
         
            +
              name: webmock
         
     | 
| 
      
 72 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 73 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 74 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 76 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 77 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 78 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 79 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 80 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 81 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 82 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 83 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 84 
     | 
    
         
            +
            description: Ruby client and CLI for GitLab API
         
     | 
| 
      
 85 
     | 
    
         
            +
            email:
         
     | 
| 
      
 86 
     | 
    
         
            +
            - nihad@42na.in
         
     | 
| 
      
 87 
     | 
    
         
            +
            - asedge@gmail.com
         
     | 
| 
      
 88 
     | 
    
         
            +
            executables:
         
     | 
| 
      
 89 
     | 
    
         
            +
            - gitlab
         
     | 
| 
      
 90 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 91 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 92 
     | 
    
         
            +
            files:
         
     | 
| 
      
 93 
     | 
    
         
            +
            - CHANGELOG.md
         
     | 
| 
      
 94 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 95 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 96 
     | 
    
         
            +
            - exe/gitlab
         
     | 
| 
      
 97 
     | 
    
         
            +
            - lib/gitlab.rb
         
     | 
| 
      
 98 
     | 
    
         
            +
            - lib/gitlab/api.rb
         
     | 
| 
      
 99 
     | 
    
         
            +
            - lib/gitlab/cli.rb
         
     | 
| 
      
 100 
     | 
    
         
            +
            - lib/gitlab/cli_helpers.rb
         
     | 
| 
      
 101 
     | 
    
         
            +
            - lib/gitlab/client.rb
         
     | 
| 
      
 102 
     | 
    
         
            +
            - lib/gitlab/client/access_requests.rb
         
     | 
| 
      
 103 
     | 
    
         
            +
            - lib/gitlab/client/application_settings.rb
         
     | 
| 
      
 104 
     | 
    
         
            +
            - lib/gitlab/client/avatar.rb
         
     | 
| 
      
 105 
     | 
    
         
            +
            - lib/gitlab/client/award_emojis.rb
         
     | 
| 
      
 106 
     | 
    
         
            +
            - lib/gitlab/client/boards.rb
         
     | 
| 
      
 107 
     | 
    
         
            +
            - lib/gitlab/client/branches.rb
         
     | 
| 
      
 108 
     | 
    
         
            +
            - lib/gitlab/client/broadcast_messages.rb
         
     | 
| 
      
 109 
     | 
    
         
            +
            - lib/gitlab/client/build_variables.rb
         
     | 
| 
      
 110 
     | 
    
         
            +
            - lib/gitlab/client/builds.rb
         
     | 
| 
      
 111 
     | 
    
         
            +
            - lib/gitlab/client/commits.rb
         
     | 
| 
      
 112 
     | 
    
         
            +
            - lib/gitlab/client/container_registry.rb
         
     | 
| 
      
 113 
     | 
    
         
            +
            - lib/gitlab/client/deployments.rb
         
     | 
| 
      
 114 
     | 
    
         
            +
            - lib/gitlab/client/environments.rb
         
     | 
| 
      
 115 
     | 
    
         
            +
            - lib/gitlab/client/epic_issues.rb
         
     | 
| 
      
 116 
     | 
    
         
            +
            - lib/gitlab/client/epics.rb
         
     | 
| 
      
 117 
     | 
    
         
            +
            - lib/gitlab/client/events.rb
         
     | 
| 
      
 118 
     | 
    
         
            +
            - lib/gitlab/client/features.rb
         
     | 
| 
      
 119 
     | 
    
         
            +
            - lib/gitlab/client/group_badges.rb
         
     | 
| 
      
 120 
     | 
    
         
            +
            - lib/gitlab/client/group_boards.rb
         
     | 
| 
      
 121 
     | 
    
         
            +
            - lib/gitlab/client/group_labels.rb
         
     | 
| 
      
 122 
     | 
    
         
            +
            - lib/gitlab/client/group_milestones.rb
         
     | 
| 
      
 123 
     | 
    
         
            +
            - lib/gitlab/client/groups.rb
         
     | 
| 
      
 124 
     | 
    
         
            +
            - lib/gitlab/client/issue_links.rb
         
     | 
| 
      
 125 
     | 
    
         
            +
            - lib/gitlab/client/issues.rb
         
     | 
| 
      
 126 
     | 
    
         
            +
            - lib/gitlab/client/jobs.rb
         
     | 
| 
      
 127 
     | 
    
         
            +
            - lib/gitlab/client/keys.rb
         
     | 
| 
      
 128 
     | 
    
         
            +
            - lib/gitlab/client/labels.rb
         
     | 
| 
      
 129 
     | 
    
         
            +
            - lib/gitlab/client/lint.rb
         
     | 
| 
      
 130 
     | 
    
         
            +
            - lib/gitlab/client/markdown.rb
         
     | 
| 
      
 131 
     | 
    
         
            +
            - lib/gitlab/client/merge_request_approvals.rb
         
     | 
| 
      
 132 
     | 
    
         
            +
            - lib/gitlab/client/merge_requests.rb
         
     | 
| 
      
 133 
     | 
    
         
            +
            - lib/gitlab/client/milestones.rb
         
     | 
| 
      
 134 
     | 
    
         
            +
            - lib/gitlab/client/namespaces.rb
         
     | 
| 
      
 135 
     | 
    
         
            +
            - lib/gitlab/client/notes.rb
         
     | 
| 
      
 136 
     | 
    
         
            +
            - lib/gitlab/client/packages.rb
         
     | 
| 
      
 137 
     | 
    
         
            +
            - lib/gitlab/client/pipeline_schedules.rb
         
     | 
| 
      
 138 
     | 
    
         
            +
            - lib/gitlab/client/pipeline_triggers.rb
         
     | 
| 
      
 139 
     | 
    
         
            +
            - lib/gitlab/client/pipelines.rb
         
     | 
| 
      
 140 
     | 
    
         
            +
            - lib/gitlab/client/project_badges.rb
         
     | 
| 
      
 141 
     | 
    
         
            +
            - lib/gitlab/client/project_clusters.rb
         
     | 
| 
      
 142 
     | 
    
         
            +
            - lib/gitlab/client/project_release_links.rb
         
     | 
| 
      
 143 
     | 
    
         
            +
            - lib/gitlab/client/project_releases.rb
         
     | 
| 
      
 144 
     | 
    
         
            +
            - lib/gitlab/client/projects.rb
         
     | 
| 
      
 145 
     | 
    
         
            +
            - lib/gitlab/client/protected_tags.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            - lib/gitlab/client/remote_mirrors.rb
         
     | 
| 
      
 147 
     | 
    
         
            +
            - lib/gitlab/client/repositories.rb
         
     | 
| 
      
 148 
     | 
    
         
            +
            - lib/gitlab/client/repository_files.rb
         
     | 
| 
      
 149 
     | 
    
         
            +
            - lib/gitlab/client/repository_submodules.rb
         
     | 
| 
      
 150 
     | 
    
         
            +
            - lib/gitlab/client/resource_label_events.rb
         
     | 
| 
      
 151 
     | 
    
         
            +
            - lib/gitlab/client/resource_state_events.rb
         
     | 
| 
      
 152 
     | 
    
         
            +
            - lib/gitlab/client/runners.rb
         
     | 
| 
      
 153 
     | 
    
         
            +
            - lib/gitlab/client/search.rb
         
     | 
| 
      
 154 
     | 
    
         
            +
            - lib/gitlab/client/services.rb
         
     | 
| 
      
 155 
     | 
    
         
            +
            - lib/gitlab/client/sidekiq.rb
         
     | 
| 
      
 156 
     | 
    
         
            +
            - lib/gitlab/client/snippets.rb
         
     | 
| 
      
 157 
     | 
    
         
            +
            - lib/gitlab/client/system_hooks.rb
         
     | 
| 
      
 158 
     | 
    
         
            +
            - lib/gitlab/client/tags.rb
         
     | 
| 
      
 159 
     | 
    
         
            +
            - lib/gitlab/client/templates.rb
         
     | 
| 
      
 160 
     | 
    
         
            +
            - lib/gitlab/client/todos.rb
         
     | 
| 
      
 161 
     | 
    
         
            +
            - lib/gitlab/client/user_snippets.rb
         
     | 
| 
      
 162 
     | 
    
         
            +
            - lib/gitlab/client/users.rb
         
     | 
| 
      
 163 
     | 
    
         
            +
            - lib/gitlab/client/versions.rb
         
     | 
| 
      
 164 
     | 
    
         
            +
            - lib/gitlab/client/wikis.rb
         
     | 
| 
      
 165 
     | 
    
         
            +
            - lib/gitlab/configuration.rb
         
     | 
| 
      
 166 
     | 
    
         
            +
            - lib/gitlab/error.rb
         
     | 
| 
      
 167 
     | 
    
         
            +
            - lib/gitlab/file_response.rb
         
     | 
| 
      
 168 
     | 
    
         
            +
            - lib/gitlab/help.rb
         
     | 
| 
      
 169 
     | 
    
         
            +
            - lib/gitlab/objectified_hash.rb
         
     | 
| 
      
 170 
     | 
    
         
            +
            - lib/gitlab/page_links.rb
         
     | 
| 
      
 171 
     | 
    
         
            +
            - lib/gitlab/paginated_response.rb
         
     | 
| 
      
 172 
     | 
    
         
            +
            - lib/gitlab/request.rb
         
     | 
| 
      
 173 
     | 
    
         
            +
            - lib/gitlab/shell.rb
         
     | 
| 
      
 174 
     | 
    
         
            +
            - lib/gitlab/shell_history.rb
         
     | 
| 
      
 175 
     | 
    
         
            +
            - lib/gitlab/version.rb
         
     | 
| 
      
 176 
     | 
    
         
            +
            homepage: https://github.com/NARKOZ/gitlab
         
     | 
| 
      
 177 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 178 
     | 
    
         
            +
            - BSD-2-Clause
         
     | 
| 
      
 179 
     | 
    
         
            +
            metadata:
         
     | 
| 
      
 180 
     | 
    
         
            +
              homepage_uri: https://github.com/NARKOZ/gitlab
         
     | 
| 
      
 181 
     | 
    
         
            +
              source_code_uri: https://github.com/NARKOZ/gitlab
         
     | 
| 
      
 182 
     | 
    
         
            +
              bug_tracker_uri: https://github.com/NARKOZ/gitlab/issues
         
     | 
| 
      
 183 
     | 
    
         
            +
              changelog_uri: https://github.com/NARKOZ/gitlab/releases
         
     | 
| 
      
 184 
     | 
    
         
            +
              funding_uri: https://github.com/NARKOZ/SponsorMe
         
     | 
| 
      
 185 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 186 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 187 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 188 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 189 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 190 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 191 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 192 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 193 
     | 
    
         
            +
                  version: '2.6'
         
     | 
| 
      
 194 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 195 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 196 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 197 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 198 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 199 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 200 
     | 
    
         
            +
            rubygems_version: 3.1.6
         
     | 
| 
      
 201 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 202 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 203 
     | 
    
         
            +
            summary: A Ruby wrapper and CLI for the GitLab API
         
     | 
| 
      
 204 
     | 
    
         
            +
            test_files: []
         
     |