gitlab 3.5.0 → 3.6.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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -1
  3. data/README.md +17 -0
  4. data/Rakefile +1 -1
  5. data/exe/gitlab +1 -1
  6. data/lib/gitlab.rb +5 -3
  7. data/lib/gitlab/cli.rb +1 -1
  8. data/lib/gitlab/cli_helpers.rb +24 -26
  9. data/lib/gitlab/client.rb +1 -1
  10. data/lib/gitlab/client/branches.rb +2 -5
  11. data/lib/gitlab/client/commits.rb +5 -5
  12. data/lib/gitlab/client/groups.rb +8 -9
  13. data/lib/gitlab/client/issues.rb +7 -7
  14. data/lib/gitlab/client/labels.rb +3 -3
  15. data/lib/gitlab/client/merge_requests.rb +7 -7
  16. data/lib/gitlab/client/milestones.rb +5 -5
  17. data/lib/gitlab/client/namespaces.rb +1 -1
  18. data/lib/gitlab/client/notes.rb +7 -7
  19. data/lib/gitlab/client/projects.rb +22 -21
  20. data/lib/gitlab/client/repositories.rb +7 -7
  21. data/lib/gitlab/client/repository_files.rb +10 -10
  22. data/lib/gitlab/client/snippets.rb +6 -6
  23. data/lib/gitlab/client/system_hooks.rb +1 -1
  24. data/lib/gitlab/client/users.rb +5 -6
  25. data/lib/gitlab/configuration.rb +1 -1
  26. data/lib/gitlab/help.rb +19 -15
  27. data/lib/gitlab/objectified_hash.rb +2 -2
  28. data/lib/gitlab/page_links.rb +33 -0
  29. data/lib/gitlab/paginated_response.rb +97 -0
  30. data/lib/gitlab/request.rb +24 -26
  31. data/lib/gitlab/shell.rb +4 -5
  32. data/lib/gitlab/shell_history.rb +3 -5
  33. data/lib/gitlab/version.rb +1 -1
  34. data/spec/gitlab/cli_helpers_spec.rb +8 -9
  35. data/spec/gitlab/cli_spec.rb +0 -2
  36. data/spec/gitlab/client/branches_spec.rb +2 -2
  37. data/spec/gitlab/client/commits_spec.rb +16 -16
  38. data/spec/gitlab/client/groups_spec.rb +11 -14
  39. data/spec/gitlab/client/issues_spec.rb +9 -9
  40. data/spec/gitlab/client/labels_spec.rb +6 -6
  41. data/spec/gitlab/client/merge_requests_spec.rb +23 -23
  42. data/spec/gitlab/client/milestones_spec.rb +9 -9
  43. data/spec/gitlab/client/namespaces_spec.rb +2 -2
  44. data/spec/gitlab/client/notes_spec.rb +10 -10
  45. data/spec/gitlab/client/projects_spec.rb +29 -28
  46. data/spec/gitlab/client/repositories_spec.rb +7 -7
  47. data/spec/gitlab/client/snippets_spec.rb +7 -7
  48. data/spec/gitlab/client/system_hooks_spec.rb +2 -2
  49. data/spec/gitlab/client/users_spec.rb +20 -21
  50. data/spec/gitlab/help_spec.rb +1 -4
  51. data/spec/gitlab/objectified_hash_spec.rb +2 -2
  52. data/spec/gitlab/page_links_spec.rb +16 -0
  53. data/spec/gitlab/paginated_response_spec.rb +60 -0
  54. data/spec/gitlab/request_spec.rb +12 -13
  55. data/spec/gitlab/shell_history_spec.rb +1 -1
  56. data/spec/gitlab/shell_spec.rb +6 -6
  57. data/spec/spec_helper.rb +12 -12
  58. metadata +8 -2
@@ -13,7 +13,7 @@ class Gitlab::Client
13
13
  # @option options [Integer] :per_page The number of results per page.
14
14
  # @return [Array<Gitlab::ObjectifiedHash>]
15
15
  def milestones(project, options={})
16
- get("/projects/#{project}/milestones", :query => options)
16
+ get("/projects/#{project}/milestones", query: options)
17
17
  end
18
18
 
19
19
  # Gets a single milestone.
@@ -39,7 +39,7 @@ class Gitlab::Client
39
39
  # @option options [Integer] :per_page The number of results per page.
40
40
  # @return [Array<Gitlab::ObjectifiedHash>]
41
41
  def milestone_issues(project, milestone, options={})
42
- get("/projects/#{project}/milestones/#{milestone}/issues", :query => options)
42
+ get("/projects/#{project}/milestones/#{milestone}/issues", query: options)
43
43
  end
44
44
 
45
45
  # Creates a new milestone.
@@ -54,8 +54,8 @@ class Gitlab::Client
54
54
  # @option options [String] :due_date The due date of a milestone.
55
55
  # @return [Gitlab::ObjectifiedHash] Information about created milestone.
56
56
  def create_milestone(project, title, options={})
57
- body = {:title => title}.merge(options)
58
- post("/projects/#{project}/milestones", :body => body)
57
+ body = { title: title }.merge(options)
58
+ post("/projects/#{project}/milestones", body: body)
59
59
  end
60
60
 
61
61
  # Updates a milestone.
@@ -72,7 +72,7 @@ class Gitlab::Client
72
72
  # @option options [String] :state_event The state of a milestone ('close' or 'activate').
73
73
  # @return [Gitlab::ObjectifiedHash] Information about updated milestone.
74
74
  def edit_milestone(project, id, options={})
75
- put("/projects/#{project}/milestones/#{id}", :body => options)
75
+ put("/projects/#{project}/milestones/#{id}", body: options)
76
76
  end
77
77
  end
78
78
  end
@@ -13,7 +13,7 @@ class Gitlab::Client
13
13
  # @options opttion [String] :search The string to search for.
14
14
  # @return [Array<Gitlab::ObjectifiedHash>]
15
15
  def namespaces(options={})
16
- get("/namespaces", :query => options)
16
+ get("/namespaces", query: options)
17
17
  end
18
18
  end
19
19
  end
@@ -12,7 +12,7 @@ class Gitlab::Client
12
12
  # @option options [Integer] :per_page The number of results per page.
13
13
  # @return [Array<Gitlab::ObjectifiedHash>]
14
14
  def notes(project, options={})
15
- get("/projects/#{project}/notes", :query => options)
15
+ get("/projects/#{project}/notes", query: options)
16
16
  end
17
17
 
18
18
  # Gets a list of notes for a issue.
@@ -26,7 +26,7 @@ class Gitlab::Client
26
26
  # @option options [Integer] :per_page The number of results per page.
27
27
  # @return [Array<Gitlab::ObjectifiedHash>]
28
28
  def issue_notes(project, issue, options={})
29
- get("/projects/#{project}/issues/#{issue}/notes", :query => options)
29
+ get("/projects/#{project}/issues/#{issue}/notes", query: options)
30
30
  end
31
31
 
32
32
  # Gets a list of notes for a snippet.
@@ -40,7 +40,7 @@ class Gitlab::Client
40
40
  # @option options [Integer] :per_page The number of results per page.
41
41
  # @return [Array<Gitlab::ObjectifiedHash>]
42
42
  def snippet_notes(project, snippet, options={})
43
- get("/projects/#{project}/snippets/#{snippet}/notes", :query => options)
43
+ get("/projects/#{project}/snippets/#{snippet}/notes", query: options)
44
44
  end
45
45
 
46
46
  # Gets a single wall note.
@@ -90,7 +90,7 @@ class Gitlab::Client
90
90
  # @param [String] body The body of a note.
91
91
  # @return [Gitlab::ObjectifiedHash] Information about created note.
92
92
  def create_note(project, body)
93
- post("/projects/#{project}/notes", :body => {:body => body})
93
+ post("/projects/#{project}/notes", body: { body: body })
94
94
  end
95
95
 
96
96
  # Creates a new issue note.
@@ -103,7 +103,7 @@ class Gitlab::Client
103
103
  # @param [String] body The body of a note.
104
104
  # @return [Gitlab::ObjectifiedHash] Information about created note.
105
105
  def create_issue_note(project, issue, body)
106
- post("/projects/#{project}/issues/#{issue}/notes", :body => {:body => body})
106
+ post("/projects/#{project}/issues/#{issue}/notes", body: { body: body })
107
107
  end
108
108
 
109
109
  # Creates a new snippet note.
@@ -116,7 +116,7 @@ class Gitlab::Client
116
116
  # @param [String] body The body of a note.
117
117
  # @return [Gitlab::ObjectifiedHash] Information about created note.
118
118
  def create_snippet_note(project, snippet, body)
119
- post("/projects/#{project}/snippets/#{snippet}/notes", :body => {:body => body})
119
+ post("/projects/#{project}/snippets/#{snippet}/notes", body: { body: body })
120
120
  end
121
121
 
122
122
  # Creates a new note for a single merge request.
@@ -128,7 +128,7 @@ class Gitlab::Client
128
128
  # @param [Integer] merge_request The ID of a merge request.
129
129
  # @param [String] body The content of a note.
130
130
  def create_merge_request_note(project, merge_request, body)
131
- post("/projects/#{project}/merge_requests/#{merge_request}/notes", :body => {:body => body})
131
+ post("/projects/#{project}/merge_requests/#{merge_request}/notes", body: { body: body })
132
132
  end
133
133
  end
134
134
  end
@@ -13,18 +13,19 @@ class Gitlab::Client
13
13
  # @option options [String] :scope Scope of projects. 'owned' for list of projects owned by the authenticated user, 'all' to get all projects (admin only)
14
14
  # @return [Array<Gitlab::ObjectifiedHash>]
15
15
  def projects(options={})
16
- if (options[:scope])
17
- get("/projects/#{options[:scope]}", :query => options)
16
+ if options[:scope]
17
+ get("/projects/#{options[:scope]}", query: options)
18
18
  else
19
- get("/projects", :query => options)
19
+ get("/projects", query: options)
20
20
  end
21
21
  end
22
22
 
23
- # Search for projects by name
23
+ # Search for projects by name.
24
24
  #
25
25
  # @example
26
26
  # Gitlab.project_search('gitlab')
27
- # Gitlab.project_search('gitlab', :order_by => 'last_activity_at')
27
+ # Gitlab.project_search('gitlab', order_by: 'last_activity_at')
28
+ # Gitlab.search_projects('gitlab', order_by: 'name', sort: 'asc')
28
29
  #
29
30
  # @param [Hash] options A customizable set of options.
30
31
  # @option options [String] :per_page Number of projects to return per page
@@ -33,9 +34,9 @@ class Gitlab::Client
33
34
  # @option options [String] :sort Return requests sorted in asc or desc order
34
35
  # @return [Array<Gitlab::ObjectifiedHash>]
35
36
  def project_search(query, options={})
36
- get("/projects/search/#{query}", :query => options)
37
+ get("/projects/search/#{query}", query: options)
37
38
  end
38
-
39
+ alias_method :search_projects, :project_search
39
40
 
40
41
  # Gets information about a project.
41
42
  #
@@ -61,7 +62,7 @@ class Gitlab::Client
61
62
  # @option options [Integer] :per_page The number of results per page.
62
63
  # @return [Array<Gitlab::ObjectifiedHash>]
63
64
  def project_events(project, options={})
64
- get("/projects/#{project}/events", :query => options)
65
+ get("/projects/#{project}/events", query: options)
65
66
  end
66
67
 
67
68
  # Creates a new project.
@@ -87,7 +88,7 @@ class Gitlab::Client
87
88
  # @return [Gitlab::ObjectifiedHash] Information about created project.
88
89
  def create_project(name, options={})
89
90
  url = options[:user_id] ? "/projects/user/#{options[:user_id]}" : "/projects"
90
- post(url, :body => {:name => name}.merge(options))
91
+ post(url, body: { name: name }.merge(options))
91
92
  end
92
93
 
93
94
  # Deletes a project.
@@ -114,7 +115,7 @@ class Gitlab::Client
114
115
  # @option options [Integer] :per_page The number of results per page.
115
116
  # @return [Array<Gitlab::ObjectifiedHash>]
116
117
  def team_members(project, options={})
117
- get("/projects/#{project}/members", :query => options)
118
+ get("/projects/#{project}/members", query: options)
118
119
  end
119
120
 
120
121
  # Gets a project team member.
@@ -140,7 +141,7 @@ class Gitlab::Client
140
141
  # @param [Hash] options A customizable set of options.
141
142
  # @return [Gitlab::ObjectifiedHash] Information about added team member.
142
143
  def add_team_member(project, id, access_level)
143
- post("/projects/#{project}/members", :body => {:user_id => id, :access_level => access_level})
144
+ post("/projects/#{project}/members", body: { user_id: id, access_level: access_level })
144
145
  end
145
146
 
146
147
  # Updates a team member's project access level.
@@ -154,7 +155,7 @@ class Gitlab::Client
154
155
  # @param [Hash] options A customizable set of options.
155
156
  # @return [Array<Gitlab::ObjectifiedHash>] Information about updated team member.
156
157
  def edit_team_member(project, id, access_level)
157
- put("/projects/#{project}/members/#{id}", :body => {:access_level => access_level})
158
+ put("/projects/#{project}/members/#{id}", body: { access_level: access_level })
158
159
  end
159
160
 
160
161
  # Removes a user from project team.
@@ -182,7 +183,7 @@ class Gitlab::Client
182
183
  # @option options [Integer] :per_page The number of results per page.
183
184
  # @return [Array<Gitlab::ObjectifiedHash>]
184
185
  def project_hooks(project, options={})
185
- get("/projects/#{project}/hooks", :query => options)
186
+ get("/projects/#{project}/hooks", query: options)
186
187
  end
187
188
 
188
189
  # Gets a project hook.
@@ -212,8 +213,8 @@ class Gitlab::Client
212
213
  # @param option [Boolean] :tag_push_events Trigger hook on push_tag events (0 = false, 1 = true)
213
214
  # @return [Gitlab::ObjectifiedHash] Information about added hook.
214
215
  def add_project_hook(project, url, options={})
215
- body = {:url => url}.merge(options)
216
- post("/projects/#{project}/hooks", :body => body)
216
+ body = { url: url }.merge(options)
217
+ post("/projects/#{project}/hooks", body: body)
217
218
  end
218
219
 
219
220
  # Updates a project hook URL.
@@ -231,8 +232,8 @@ class Gitlab::Client
231
232
  # @param option [Boolean] :tag_push_events Trigger hook on push_tag events (0 = false, 1 = true)
232
233
  # @return [Gitlab::ObjectifiedHash] Information about updated hook.
233
234
  def edit_project_hook(project, id, url, options={})
234
- body = {:url => url}.merge(options)
235
- put("/projects/#{project}/hooks/#{id}", :body => body)
235
+ body = { url: url }.merge(options)
236
+ put("/projects/#{project}/hooks/#{id}", body: body)
236
237
  end
237
238
 
238
239
  # Deletes a hook from project.
@@ -282,7 +283,7 @@ class Gitlab::Client
282
283
  # @option options [Integer] :per_page The number of results per page.
283
284
  # @return [Array<Gitlab::ObjectifiedHash>]
284
285
  def deploy_keys(project, options={})
285
- get("/projects/#{project}/keys", :query => options)
286
+ get("/projects/#{project}/keys", query: options)
286
287
  end
287
288
 
288
289
  # Gets a single project deploy key.
@@ -307,7 +308,7 @@ class Gitlab::Client
307
308
  # @param [String] key The content of a deploy key.
308
309
  # @return [Gitlab::ObjectifiedHash] Information about created deploy key.
309
310
  def create_deploy_key(project, title, key)
310
- post("/projects/#{project}/keys", body: {title: title, key: key})
311
+ post("/projects/#{project}/keys", body: { title: title, key: key })
311
312
  end
312
313
 
313
314
  # Deletes a deploy key from project.
@@ -332,7 +333,7 @@ class Gitlab::Client
332
333
  # @param [Hash] options A customizable set of options.
333
334
  # @option options [String] :sudo The username the project will be forked for
334
335
  # @return [Gitlab::ObjectifiedHash] Information about the forked project.
335
- def create_fork(id, options = {})
336
+ def create_fork(id, options={})
336
337
  post("/projects/fork/#{id}", body: options)
337
338
  end
338
339
 
@@ -349,7 +350,7 @@ class Gitlab::Client
349
350
  # @option options [String] :description The name of a project
350
351
  # @return [Gitlab::ObjectifiedHash] Information about the edited project.
351
352
  def edit_project(id, options={})
352
- put("/projects/#{id}", :query => options)
353
+ put("/projects/#{id}", query: options)
353
354
  end
354
355
  end
355
356
  end
@@ -13,7 +13,7 @@ class Gitlab::Client
13
13
  # @option options [Integer] :per_page The number of results per page.
14
14
  # @return [Array<Gitlab::ObjectifiedHash>]
15
15
  def tags(project, options={})
16
- get("/projects/#{project}/repository/tags", :query => options)
16
+ get("/projects/#{project}/repository/tags", query: options)
17
17
  end
18
18
  alias_method :repo_tags, :tags
19
19
 
@@ -29,7 +29,7 @@ class Gitlab::Client
29
29
  # @param [String] message Optional message for tag, creates annotated tag if specified.
30
30
  # @return [Gitlab::ObjectifiedHash]
31
31
  def create_tag(project, tag_name, ref, message='')
32
- post("/projects/#{project}/repository/tags", body: {tag_name: tag_name, ref: ref, message: message})
32
+ post("/projects/#{project}/repository/tags", body: { tag_name: tag_name, ref: ref, message: message })
33
33
  end
34
34
  alias_method :repo_create_tag, :create_tag
35
35
 
@@ -43,12 +43,12 @@ class Gitlab::Client
43
43
  # @param [String] filepath The relative path of the file in the repository
44
44
  # @param [String] ref The name of a repository branch or tag or if not given the default branch.
45
45
  # @return [String]
46
- def file_contents(project, filepath, ref = 'master')
46
+ def file_contents(project, filepath, ref='master')
47
47
  ref = URI.encode(ref, /\W/)
48
48
  get "/projects/#{project}/repository/blobs/#{ref}?filepath=#{filepath}",
49
- format: nil,
50
- headers: { Accept: 'text/plain' },
51
- parser: ::Gitlab::Request::Parser
49
+ format: nil,
50
+ headers: { Accept: 'text/plain' },
51
+ parser: ::Gitlab::Request::Parser
52
52
  end
53
53
  alias_method :repo_file_contents, :file_contents
54
54
 
@@ -79,7 +79,7 @@ class Gitlab::Client
79
79
  # @param [String] to The commit SHA or branch name of to branch.
80
80
  # @return [Gitlab::ObjectifiedHash]
81
81
  def compare(project, from, to)
82
- get("/projects/#{project}/repository/compare", :query => {:from => from, :to => to})
82
+ get("/projects/#{project}/repository/compare", query: { from: from, to: to })
83
83
  end
84
84
  alias_method :repo_compare, :compare
85
85
  end
@@ -15,9 +15,9 @@ class Gitlab::Client
15
15
  # @return [Gitlab::ObjectifiedHash]
16
16
  def get_file(project, file_path, ref)
17
17
  get("/projects/#{project}/repository/files", query: {
18
- file_path: file_path,
19
- ref: ref,
20
- })
18
+ file_path: file_path,
19
+ ref: ref
20
+ })
21
21
  end
22
22
 
23
23
  # Creates a new repository file.
@@ -35,7 +35,7 @@ class Gitlab::Client
35
35
  post("/projects/#{project}/repository/files", body: {
36
36
  file_path: path,
37
37
  branch_name: branch,
38
- commit_message: commit_message,
38
+ commit_message: commit_message
39
39
  }.merge(encoded_content_attributes(content)))
40
40
  end
41
41
 
@@ -54,7 +54,7 @@ class Gitlab::Client
54
54
  put("/projects/#{project}/repository/files", body: {
55
55
  file_path: path,
56
56
  branch_name: branch,
57
- commit_message: commit_message,
57
+ commit_message: commit_message
58
58
  }.merge(encoded_content_attributes(content)))
59
59
  end
60
60
 
@@ -70,10 +70,10 @@ class Gitlab::Client
70
70
  # @return [Gitlab::ObjectifiedHash]
71
71
  def remove_file(project, path, branch, commit_message)
72
72
  delete("/projects/#{project}/repository/files", body: {
73
- file_path: path,
74
- branch_name: branch,
75
- commit_message: commit_message,
76
- })
73
+ file_path: path,
74
+ branch_name: branch,
75
+ commit_message: commit_message
76
+ })
77
77
  end
78
78
 
79
79
  private
@@ -81,7 +81,7 @@ class Gitlab::Client
81
81
  def encoded_content_attributes(content)
82
82
  {
83
83
  encoding: 'base64',
84
- content: Base64.encode64(content),
84
+ content: Base64.encode64(content)
85
85
  }
86
86
  end
87
87
  end
@@ -13,7 +13,7 @@ class Gitlab::Client
13
13
  # @option options [Integer] :per_page The number of results per page.
14
14
  # @return [Gitlab::ObjectifiedHash]
15
15
  def snippets(project, options={})
16
- get("/projects/#{project}/snippets", :query => options)
16
+ get("/projects/#{project}/snippets", query: options)
17
17
  end
18
18
 
19
19
  # Gets information about a snippet.
@@ -41,7 +41,7 @@ class Gitlab::Client
41
41
  # @option options [String] :lifetime (optional) The expiration date of a snippet.
42
42
  # @return [Gitlab::ObjectifiedHash] Information about created snippet.
43
43
  def create_snippet(project, options={})
44
- post("/projects/#{project}/snippets", :body => options)
44
+ post("/projects/#{project}/snippets", body: options)
45
45
  end
46
46
 
47
47
  # Updates a snippet.
@@ -58,7 +58,7 @@ class Gitlab::Client
58
58
  # @option options [String] :lifetime The expiration date of a snippet.
59
59
  # @return [Gitlab::ObjectifiedHash] Information about updated snippet.
60
60
  def edit_snippet(project, id, options={})
61
- put("/projects/#{project}/snippets/#{id}", :body => options)
61
+ put("/projects/#{project}/snippets/#{id}", body: options)
62
62
  end
63
63
 
64
64
  # Deletes a snippet.
@@ -83,9 +83,9 @@ class Gitlab::Client
83
83
  # @return [Gitlab::ObjectifiedHash] Information about deleted snippet.
84
84
  def snippet_content(project, id)
85
85
  get("/projects/#{project}/snippets/#{id}/raw",
86
- format: nil,
87
- headers: { Accept: 'text/plain' },
88
- parser: ::Gitlab::Request::Parser)
86
+ format: nil,
87
+ headers: { Accept: 'text/plain' },
88
+ parser: ::Gitlab::Request::Parser)
89
89
  end
90
90
  end
91
91
  end
@@ -26,7 +26,7 @@ class Gitlab::Client
26
26
  # @param [String] url The hook URL.
27
27
  # @return [Gitlab::ObjectifiedHash]
28
28
  def add_hook(url)
29
- post("/hooks", :body => {:url => url})
29
+ post("/hooks", body: { url: url })
30
30
  end
31
31
  alias_method :add_system_hook, :add_hook
32
32
 
@@ -13,7 +13,7 @@ class Gitlab::Client
13
13
  # @option options [Integer] :per_page The number of results per page.
14
14
  # @return [Array<Gitlab::ObjectifiedHash>]
15
15
  def users(options={})
16
- get("/users", :query => options)
16
+ get("/users", query: options)
17
17
  end
18
18
 
19
19
  # Gets information about a user.
@@ -74,7 +74,7 @@ class Gitlab::Client
74
74
  # @option options [Integer] :projects_limit The limit of projects for a user.
75
75
  # @return [Gitlab::ObjectifiedHash] Information about created user.
76
76
  def edit_user(user_id, options={})
77
- put("/users/#{user_id}", :body => options)
77
+ put("/users/#{user_id}", body: options)
78
78
  end
79
79
 
80
80
  # Deletes a user.
@@ -120,7 +120,7 @@ class Gitlab::Client
120
120
  # @return [Gitlab::ObjectifiedHash]
121
121
  # @note This method doesn't require private_token to be set.
122
122
  def session(email, password)
123
- post("/session", :body => {:email => email, :password => password})
123
+ post("/session", body: { email: email, password: password })
124
124
  end
125
125
 
126
126
  # Gets a list of user's SSH keys.
@@ -133,7 +133,7 @@ class Gitlab::Client
133
133
  # @option options [Integer] :per_page The number of results per page.
134
134
  # @return [Array<Gitlab::ObjectifiedHash>]
135
135
  def ssh_keys(options={})
136
- get("/user/keys", :query => options)
136
+ get("/user/keys", query: options)
137
137
  end
138
138
 
139
139
  # Gets information about SSH key.
@@ -156,7 +156,7 @@ class Gitlab::Client
156
156
  # @param [String] key The SSH key body.
157
157
  # @return [Gitlab::ObjectifiedHash] Information about created SSH key.
158
158
  def create_ssh_key(title, key)
159
- post("/user/keys", :body => {:title => title, :key => key})
159
+ post("/user/keys", body: { title: title, key: key })
160
160
  end
161
161
 
162
162
  # Deletes an SSH key.
@@ -169,6 +169,5 @@ class Gitlab::Client
169
169
  def delete_ssh_key(id)
170
170
  delete("/user/keys/#{id}")
171
171
  end
172
-
173
172
  end
174
173
  end
@@ -43,7 +43,7 @@ module Gitlab
43
43
  private
44
44
 
45
45
  # Allows HTTParty config to be specified in ENV using YAML hash.
46
- def get_httparty_config options
46
+ def get_httparty_config(options)
47
47
  return options if options.nil?
48
48
 
49
49
  httparty = Gitlab::CLI::Helpers.yaml_load(options)