Module: Gitlab

Extended by:
Configuration
Defined in:
lib/gitlab.rb,
lib/gitlab/api.rb,
lib/gitlab/error.rb,
lib/gitlab/client.rb,
lib/gitlab/request.rb,
lib/gitlab/version.rb,
lib/gitlab/configuration.rb,
lib/gitlab/file_response.rb,
lib/gitlab/headers/total.rb,
lib/gitlab/objectified_hash.rb,
lib/gitlab/headers/page_links.rb,
lib/gitlab/paginated_response.rb

Defined Under Namespace

Modules: Configuration, Error, Headers, Help Classes: API, CLI, Client, FileResponse, ObjectifiedHash, PaginatedResponse, Request, Shell

Constant Summary collapse

VERSION =
'4.19.3'

Constants included from Configuration

Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.actionsArray<Symbol>

Returns an unsorted array of available client methods.

Returns:

  • (Array<Symbol>)


52
53
54
55
56
57
58
# File 'lib/gitlab.rb', line 52

def self.actions
  # rubocop:disable Layout/LineLength
  hidden =
    /endpoint|private_token|auth_token|user_agent|sudo|get|post|put|patch|\Adelete\z|validate\z|request_defaults|httparty/
  # rubocop:enable Layout/LineLength
  (Gitlab::Client.instance_methods - Object.methods).reject { |e| e[hidden] }
end

.client(options = {}) ⇒ Gitlab::Client

Alias for Gitlab::Client.new

Returns:



21
22
23
# File 'lib/gitlab.rb', line 21

def self.client(options = {})
  Gitlab::Client.new(options)
end

.http_proxy(address = nil, port = nil, username = nil, password = nil) ⇒ Object

Delegate to HTTParty.http_proxy



45
46
47
# File 'lib/gitlab.rb', line 45

def self.http_proxy(address = nil, port = nil, username = nil, password = nil)
  Gitlab::Request.http_proxy(address, port, username, password)
end

.method_missing(method, *args, &block) ⇒ Object



26
27
28
29
30
# File 'lib/gitlab.rb', line 26

def self.method_missing(method, *args, **keywargs, &block)
  return super unless client.respond_to?(method)

  client.send(method, *args, **keywargs, &block)
end

.respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Delegate to Gitlab::Client

Returns:

  • (Boolean)


40
41
42
# File 'lib/gitlab.rb', line 40

def self.respond_to_missing?(method_name, include_private = false)
  client.respond_to?(method_name) || super
end