gitlab 4.6.0 → 4.7.0

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gitlab/client/access_requests.rb +92 -90
  3. data/lib/gitlab/client/award_emojis.rb +126 -124
  4. data/lib/gitlab/client/boards.rb +81 -79
  5. data/lib/gitlab/client/branches.rb +89 -87
  6. data/lib/gitlab/client/build_variables.rb +117 -115
  7. data/lib/gitlab/client/builds.rb +98 -96
  8. data/lib/gitlab/client/commits.rb +167 -152
  9. data/lib/gitlab/client/deployments.rb +29 -27
  10. data/lib/gitlab/client/environments.rb +80 -78
  11. data/lib/gitlab/client/events.rb +54 -52
  12. data/lib/gitlab/client/group_milestones.rb +85 -83
  13. data/lib/gitlab/client/groups.rb +178 -176
  14. data/lib/gitlab/client/issues.rb +212 -188
  15. data/lib/gitlab/client/jobs.rb +150 -148
  16. data/lib/gitlab/client/keys.rb +14 -12
  17. data/lib/gitlab/client/labels.rb +79 -77
  18. data/lib/gitlab/client/merge_request_approvals.rb +101 -99
  19. data/lib/gitlab/client/merge_requests.rb +291 -277
  20. data/lib/gitlab/client/milestones.rb +85 -83
  21. data/lib/gitlab/client/namespaces.rb +18 -16
  22. data/lib/gitlab/client/notes.rb +260 -258
  23. data/lib/gitlab/client/pipeline_schedules.rb +123 -121
  24. data/lib/gitlab/client/pipeline_triggers.rb +93 -91
  25. data/lib/gitlab/client/pipelines.rb +73 -60
  26. data/lib/gitlab/client/projects.rb +538 -524
  27. data/lib/gitlab/client/repositories.rb +67 -65
  28. data/lib/gitlab/client/repository_files.rb +103 -101
  29. data/lib/gitlab/client/runners.rb +114 -112
  30. data/lib/gitlab/client/services.rb +45 -43
  31. data/lib/gitlab/client/sidekiq.rb +32 -30
  32. data/lib/gitlab/client/snippets.rb +86 -84
  33. data/lib/gitlab/client/system_hooks.rb +57 -55
  34. data/lib/gitlab/client/tags.rb +88 -86
  35. data/lib/gitlab/client/todos.rb +40 -38
  36. data/lib/gitlab/client/users.rb +243 -241
  37. data/lib/gitlab/client/versions.rb +13 -11
  38. data/lib/gitlab/error.rb +1 -1
  39. data/lib/gitlab/help.rb +1 -1
  40. data/lib/gitlab/page_links.rb +1 -1
  41. data/lib/gitlab/version.rb +1 -1
  42. metadata +3 -3
@@ -1,16 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Defines methods related to version
4
- # @see https://docs.gitlab.com/ce/api/version.html
5
- module Versions
6
- # Returns server version.
3
+ class Gitlab::Client
4
+ # Defines methods related to version
7
5
  # @see https://docs.gitlab.com/ce/api/version.html
8
- #
9
- # @example
10
- # Gitlab.version
11
- #
12
- # @return [Array<Gitlab::ObjectifiedHash>]
13
- def version
14
- get('/version')
6
+ module Versions
7
+ # Returns server version.
8
+ # @see https://docs.gitlab.com/ce/api/version.html
9
+ #
10
+ # @example
11
+ # Gitlab.version
12
+ #
13
+ # @return [Array<Gitlab::ObjectifiedHash>]
14
+ def version
15
+ get('/version')
16
+ end
15
17
  end
16
18
  end
@@ -59,7 +59,7 @@ module Gitlab
59
59
  case message
60
60
  when Gitlab::ObjectifiedHash
61
61
  message.to_h.sort.map do |key, val|
62
- "'#{key}' #{(val.is_a?(Hash) ? val.sort.map { |k, v| "(#{k}: #{v.join(' ')})" } : val).join(' ')}"
62
+ "'#{key}' #{(val.is_a?(Hash) ? val.sort.map { |k, v| "(#{k}: #{v.join(' ')})" } : [val].flatten).join(' ')}"
63
63
  end.join(', ')
64
64
  when Array
65
65
  message.join(' ')
@@ -74,7 +74,7 @@ module Gitlab::Help
74
74
  # Returns full namespace of a command (e.g. Gitlab::Client::Branches.cmd)
75
75
  def namespace(cmd)
76
76
  method_owners.select { |method| method[:name] == cmd }
77
- .map { |method| 'Gitlab::Client::' + method[:owner] + '.' + method[:name] }
77
+ .map { |method| method[:owner] + '.' + method[:name] }
78
78
  .shift
79
79
  end
80
80
 
@@ -7,7 +7,7 @@ module Gitlab
7
7
  class PageLinks
8
8
  HEADER_LINK = 'Link'
9
9
  DELIM_LINKS = ','
10
- LINK_REGEX = /<([^>]+)>; rel=\"([^\"]+)\"/
10
+ LINK_REGEX = /<([^>]+)>; rel=\"([^\"]+)\"/.freeze
11
11
  METAS = %w[last next first prev].freeze
12
12
 
13
13
  attr_accessor(*METAS)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gitlab
4
- VERSION = '4.6.0'
4
+ VERSION = '4.7.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.0
4
+ version: 4.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nihad Abbasov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-10-15 00:00:00.000000000 Z
12
+ date: 2018-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  requirements: []
205
205
  rubyforge_project:
206
- rubygems_version: 2.7.7
206
+ rubygems_version: 2.7.8
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: A Ruby wrapper and CLI for the GitLab API