gitlab 3.0.0 → 4.0.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 (172) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/.travis.yml +6 -2
  4. data/CHANGELOG.md +244 -0
  5. data/CONTRIBUTING.md +195 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.md +122 -10
  8. data/Rakefile +1 -1
  9. data/bin/console +10 -0
  10. data/bin/setup +6 -0
  11. data/exe/gitlab +7 -0
  12. data/gitlab.gemspec +9 -3
  13. data/lib/gitlab.rb +18 -2
  14. data/lib/gitlab/api.rb +6 -4
  15. data/lib/gitlab/cli.rb +89 -0
  16. data/lib/gitlab/cli_helpers.rb +241 -0
  17. data/lib/gitlab/client.rb +42 -6
  18. data/lib/gitlab/client/branches.rb +91 -0
  19. data/lib/gitlab/client/build_triggers.rb +51 -0
  20. data/lib/gitlab/client/build_variables.rb +66 -0
  21. data/lib/gitlab/client/builds.rb +106 -0
  22. data/lib/gitlab/client/commits.rb +146 -0
  23. data/lib/gitlab/client/groups.rb +66 -10
  24. data/lib/gitlab/client/issues.rb +61 -16
  25. data/lib/gitlab/client/labels.rb +57 -0
  26. data/lib/gitlab/client/merge_requests.rb +137 -26
  27. data/lib/gitlab/client/milestones.rb +44 -9
  28. data/lib/gitlab/client/namespaces.rb +20 -0
  29. data/lib/gitlab/client/notes.rb +71 -16
  30. data/lib/gitlab/client/pipelines.rb +68 -0
  31. data/lib/gitlab/client/projects.rb +236 -27
  32. data/lib/gitlab/client/repositories.rb +39 -45
  33. data/lib/gitlab/client/repository_files.rb +107 -0
  34. data/lib/gitlab/client/runners.rb +115 -0
  35. data/lib/gitlab/client/services.rb +50 -0
  36. data/lib/gitlab/client/snippets.rb +26 -21
  37. data/lib/gitlab/client/system_hooks.rb +59 -0
  38. data/lib/gitlab/client/tags.rb +96 -0
  39. data/lib/gitlab/client/users.rb +151 -7
  40. data/lib/gitlab/configuration.rb +20 -4
  41. data/lib/gitlab/error.rb +55 -12
  42. data/lib/gitlab/file_response.rb +46 -0
  43. data/lib/gitlab/help.rb +95 -0
  44. data/lib/gitlab/objectified_hash.rb +19 -3
  45. data/lib/gitlab/page_links.rb +33 -0
  46. data/lib/gitlab/paginated_response.rb +97 -0
  47. data/lib/gitlab/request.rb +65 -33
  48. data/lib/gitlab/shell.rb +84 -0
  49. data/lib/gitlab/shell_history.rb +59 -0
  50. data/lib/gitlab/version.rb +1 -1
  51. data/spec/fixtures/{project_branch.json → branch.json} +1 -1
  52. data/spec/fixtures/branch_delete.json +3 -0
  53. data/spec/fixtures/{project_branches.json → branches.json} +0 -0
  54. data/spec/fixtures/build.json +38 -0
  55. data/spec/fixtures/build_artifacts.json +0 -0
  56. data/spec/fixtures/build_cancel.json +24 -0
  57. data/spec/fixtures/build_erase.json +24 -0
  58. data/spec/fixtures/build_retry.json +24 -0
  59. data/spec/fixtures/builds.json +78 -0
  60. data/spec/fixtures/builds_commits.json +64 -0
  61. data/spec/fixtures/compare_merge_request_diff.json +31 -0
  62. data/spec/fixtures/error_project_not_found.json +1 -0
  63. data/spec/fixtures/get_repository_file.json +1 -0
  64. data/spec/fixtures/group_create_with_description.json +1 -0
  65. data/spec/fixtures/group_delete.json +1 -0
  66. data/spec/fixtures/group_member_edit.json +1 -0
  67. data/spec/fixtures/group_projects.json +44 -0
  68. data/spec/fixtures/group_search.json +2 -0
  69. data/spec/fixtures/label.json +1 -0
  70. data/spec/fixtures/labels.json +1 -0
  71. data/spec/fixtures/merge_request_changes.json +1 -0
  72. data/spec/fixtures/merge_request_closes_issues.json +1 -0
  73. data/spec/fixtures/{comment_merge_request.json → merge_request_comment.json} +0 -0
  74. data/spec/fixtures/merge_request_comments.json +1 -0
  75. data/spec/fixtures/merge_request_commits.json +1 -0
  76. data/spec/fixtures/milestone_issues.json +1 -0
  77. data/spec/fixtures/milestone_merge_requests.json +1 -0
  78. data/spec/fixtures/namespaces.json +1 -0
  79. data/spec/fixtures/pipeline.json +23 -0
  80. data/spec/fixtures/pipeline_cancel.json +23 -0
  81. data/spec/fixtures/pipeline_create.json +23 -0
  82. data/spec/fixtures/pipeline_retry.json +23 -0
  83. data/spec/fixtures/pipelines.json +48 -0
  84. data/spec/fixtures/project_commit.json +13 -0
  85. data/spec/fixtures/project_commit_comment.json +1 -0
  86. data/spec/fixtures/project_commit_comments.json +1 -0
  87. data/spec/fixtures/project_commit_create.json +22 -0
  88. data/spec/fixtures/project_commit_diff.json +10 -0
  89. data/spec/fixtures/project_commit_status.json +42 -0
  90. data/spec/fixtures/project_edit.json +21 -0
  91. data/spec/fixtures/project_events.json +1 -0
  92. data/spec/fixtures/project_fork.json +50 -0
  93. data/spec/fixtures/project_forked_for_user.json +50 -0
  94. data/spec/fixtures/project_runner_enable.json +7 -0
  95. data/spec/fixtures/project_runners.json +16 -0
  96. data/spec/fixtures/project_search.json +1 -0
  97. data/spec/fixtures/project_star.json +44 -0
  98. data/spec/fixtures/project_tag_annotated.json +1 -0
  99. data/spec/fixtures/project_tag_lightweight.json +1 -0
  100. data/spec/fixtures/project_unstar.json +44 -0
  101. data/spec/fixtures/project_update_commit_status.json +20 -0
  102. data/spec/fixtures/push_rule.json +1 -0
  103. data/spec/fixtures/raw_file.json +2 -0
  104. data/spec/fixtures/release_create.json +1 -0
  105. data/spec/fixtures/release_update.json +1 -0
  106. data/spec/fixtures/repository_file.json +1 -0
  107. data/spec/fixtures/runner.json +26 -0
  108. data/spec/fixtures/runner_delete.json +7 -0
  109. data/spec/fixtures/runner_edit.json +26 -0
  110. data/spec/fixtures/runners.json +16 -0
  111. data/spec/fixtures/runners_all.json +30 -0
  112. data/spec/fixtures/service.json +1 -0
  113. data/spec/fixtures/shell_history.json +2 -0
  114. data/spec/fixtures/snippet_content.json +3 -0
  115. data/spec/fixtures/system_hook.json +1 -0
  116. data/spec/fixtures/system_hooks.json +1 -0
  117. data/spec/fixtures/tag.json +1 -0
  118. data/spec/fixtures/tag_create.json +1 -0
  119. data/spec/fixtures/tag_create_with_description.json +1 -0
  120. data/spec/fixtures/tag_delete.json +1 -0
  121. data/spec/fixtures/tags.json +1 -0
  122. data/spec/fixtures/tree.json +1 -0
  123. data/spec/fixtures/trigger.json +7 -0
  124. data/spec/fixtures/triggers.json +16 -0
  125. data/spec/fixtures/user.json +1 -1
  126. data/spec/fixtures/user_block_unblock.json +1 -0
  127. data/spec/fixtures/user_email.json +1 -0
  128. data/spec/fixtures/user_emails.json +1 -0
  129. data/spec/fixtures/user_search.json +1 -0
  130. data/spec/fixtures/users.json +1 -1
  131. data/spec/fixtures/variable.json +4 -0
  132. data/spec/fixtures/variables.json +10 -0
  133. data/spec/gitlab/cli_helpers_spec.rb +57 -0
  134. data/spec/gitlab/cli_spec.rb +119 -0
  135. data/spec/gitlab/client/branches_spec.rb +99 -0
  136. data/spec/gitlab/client/build_triggers_spec.rb +67 -0
  137. data/spec/gitlab/client/build_variables_spec.rb +86 -0
  138. data/spec/gitlab/client/builds_spec.rb +148 -0
  139. data/spec/gitlab/client/client_spec.rb +11 -0
  140. data/spec/gitlab/client/commits_spec.rb +168 -0
  141. data/spec/gitlab/client/groups_spec.rb +116 -30
  142. data/spec/gitlab/client/issues_spec.rb +93 -29
  143. data/spec/gitlab/client/labels_spec.rb +68 -0
  144. data/spec/gitlab/client/merge_requests_spec.rb +171 -39
  145. data/spec/gitlab/client/milestones_spec.rb +45 -13
  146. data/spec/gitlab/client/namespaces_spec.rb +22 -0
  147. data/spec/gitlab/client/notes_spec.rb +82 -33
  148. data/spec/gitlab/client/pipelines_spec.rb +95 -0
  149. data/spec/gitlab/client/projects_spec.rb +371 -71
  150. data/spec/gitlab/client/repositories_spec.rb +51 -30
  151. data/spec/gitlab/client/repository_files_spec.rb +77 -0
  152. data/spec/gitlab/client/runners_spec.rb +185 -0
  153. data/spec/gitlab/client/services_spec.rb +55 -0
  154. data/spec/gitlab/client/snippets_spec.rb +35 -20
  155. data/spec/gitlab/client/system_hooks_spec.rb +69 -0
  156. data/spec/gitlab/client/tags_spec.rb +109 -0
  157. data/spec/gitlab/client/users_spec.rb +296 -34
  158. data/spec/gitlab/error_spec.rb +45 -0
  159. data/spec/gitlab/file_response_spec.rb +33 -0
  160. data/spec/gitlab/help_spec.rb +46 -0
  161. data/spec/gitlab/objectified_hash_spec.rb +48 -0
  162. data/spec/gitlab/page_links_spec.rb +16 -0
  163. data/spec/gitlab/paginated_response_spec.rb +60 -0
  164. data/spec/gitlab/request_spec.rb +73 -0
  165. data/spec/gitlab/shell_history_spec.rb +53 -0
  166. data/spec/gitlab/shell_spec.rb +80 -0
  167. data/spec/gitlab_spec.rb +48 -7
  168. data/spec/spec_helper.rb +24 -13
  169. metadata +287 -33
  170. data/spec/fixtures/create_merge_request.json +0 -1
  171. data/spec/fixtures/project_delete_key.json +0 -8
  172. data/spec/fixtures/update_merge_request.json +0 -1
@@ -5,41 +5,71 @@ describe Gitlab do
5
5
 
6
6
  describe ".client" do
7
7
  it "should be a Gitlab::Client" do
8
- Gitlab.client.should be_a Gitlab::Client
8
+ expect(Gitlab.client).to be_a Gitlab::Client
9
+ end
10
+
11
+ it "should not override each other" do
12
+ client1 = Gitlab.client(endpoint: 'https://api1.example.com', private_token: '001')
13
+ client2 = Gitlab.client(endpoint: 'https://api2.example.com', private_token: '002')
14
+ expect(client1.endpoint).to eq('https://api1.example.com')
15
+ expect(client2.endpoint).to eq('https://api2.example.com')
16
+ expect(client1.private_token).to eq('001')
17
+ expect(client2.private_token).to eq('002')
18
+ end
19
+
20
+ it "should set private_token to the auth_token when provided" do
21
+ client = Gitlab.client(endpoint: 'https://api2.example.com', auth_token: '3225e2804d31fea13fc41fc83bffef00cfaedc463118646b154acc6f94747603')
22
+ expect(client.private_token).to eq('3225e2804d31fea13fc41fc83bffef00cfaedc463118646b154acc6f94747603')
23
+ end
24
+ end
25
+
26
+ describe ".actions" do
27
+ it "should return an array of client methods" do
28
+ actions = Gitlab.actions
29
+ expect(actions).to be_an Array
30
+ expect(actions.first).to be_a Symbol
31
+ expect(actions.sort.first).to eq(:accept_merge_request)
9
32
  end
10
33
  end
11
34
 
12
35
  describe ".endpoint=" do
13
36
  it "should set endpoint" do
14
37
  Gitlab.endpoint = 'https://api.example.com'
15
- Gitlab.endpoint.should == 'https://api.example.com'
38
+ expect(Gitlab.endpoint).to eq('https://api.example.com')
16
39
  end
17
40
  end
18
41
 
19
42
  describe ".private_token=" do
20
43
  it "should set private_token" do
21
44
  Gitlab.private_token = 'secret'
22
- Gitlab.private_token.should == 'secret'
45
+ expect(Gitlab.private_token).to eq('secret')
46
+ end
47
+ end
48
+
49
+ describe ".auth_token=" do
50
+ it "should set auth_token", focus: true do
51
+ Gitlab.auth_token = 'auth_secret'
52
+ expect(Gitlab.private_token).to eq('auth_secret')
23
53
  end
24
54
  end
25
55
 
26
56
  describe ".sudo=" do
27
57
  it "should set sudo" do
28
58
  Gitlab.sudo = 'user'
29
- Gitlab.sudo.should == 'user'
59
+ expect(Gitlab.sudo).to eq('user')
30
60
  end
31
61
  end
32
62
 
33
63
  describe ".user_agent" do
34
64
  it "should return default user_agent" do
35
- Gitlab.user_agent.should == Gitlab::Configuration::DEFAULT_USER_AGENT
65
+ expect(Gitlab.user_agent).to eq(Gitlab::Configuration::DEFAULT_USER_AGENT)
36
66
  end
37
67
  end
38
68
 
39
69
  describe ".user_agent=" do
40
70
  it "should set user_agent" do
41
71
  Gitlab.user_agent = 'Custom User Agent'
42
- Gitlab.user_agent.should == 'Custom User Agent'
72
+ expect(Gitlab.user_agent).to eq('Custom User Agent')
43
73
  end
44
74
  end
45
75
 
@@ -48,9 +78,20 @@ describe Gitlab do
48
78
  it "should set #{key}" do
49
79
  Gitlab.configure do |config|
50
80
  config.send("#{key}=", key)
51
- Gitlab.send(key).should == key
81
+ expect(Gitlab.send(key)).to eq(key)
52
82
  end
53
83
  end
54
84
  end
55
85
  end
86
+
87
+ describe ".http_proxy" do
88
+ it "delegates the method to Gitlab::Request" do
89
+ Gitlab.endpoint = 'https://api.example.com'
90
+ request = class_spy(Gitlab::Request).as_stubbed_const
91
+
92
+ Gitlab.http_proxy('fazbearentertainment.com', 1987, 'ffazbear', 'itsme')
93
+ expect(request).to have_received(:http_proxy).
94
+ with('fazbearentertainment.com', 1987, 'ffazbear', 'itsme')
95
+ end
96
+ end
56
97
  end
@@ -2,6 +2,17 @@ require 'rspec'
2
2
  require 'webmock/rspec'
3
3
 
4
4
  require File.expand_path('../../lib/gitlab', __FILE__)
5
+ require File.expand_path('../../lib/gitlab/cli', __FILE__)
6
+
7
+ def capture_output
8
+ out = StringIO.new
9
+ $stdout = out
10
+ $stderr = out
11
+ yield
12
+ $stdout = STDOUT
13
+ $stderr = STDERR
14
+ out.string
15
+ end
5
16
 
6
17
  def load_fixture(name)
7
18
  File.new(File.dirname(__FILE__) + "/fixtures/#{name}.json")
@@ -15,49 +26,49 @@ RSpec.configure do |config|
15
26
  end
16
27
 
17
28
  # GET
18
- def stub_get(path, fixture)
29
+ def stub_get(path, fixture, status_code=200)
19
30
  stub_request(:get, "#{Gitlab.endpoint}#{path}").
20
- with(:query => {:private_token => Gitlab.private_token}).
21
- to_return(:body => load_fixture(fixture))
31
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token }).
32
+ to_return(body: load_fixture(fixture), status: status_code)
22
33
  end
23
34
 
24
35
  def a_get(path)
25
36
  a_request(:get, "#{Gitlab.endpoint}#{path}").
26
- with(:query => {:private_token => Gitlab.private_token})
37
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token })
27
38
  end
28
39
 
29
40
  # POST
30
41
  def stub_post(path, fixture, status_code=200)
31
42
  stub_request(:post, "#{Gitlab.endpoint}#{path}").
32
- with(:query => {:private_token => Gitlab.private_token}).
33
- to_return(:body => load_fixture(fixture), :status => status_code)
43
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token }).
44
+ to_return(body: load_fixture(fixture), status: status_code)
34
45
  end
35
46
 
36
47
  def a_post(path)
37
48
  a_request(:post, "#{Gitlab.endpoint}#{path}").
38
- with(:query => {:private_token => Gitlab.private_token})
49
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token })
39
50
  end
40
51
 
41
52
  # PUT
42
53
  def stub_put(path, fixture)
43
54
  stub_request(:put, "#{Gitlab.endpoint}#{path}").
44
- with(:query => {:private_token => Gitlab.private_token}).
45
- to_return(:body => load_fixture(fixture))
55
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token }).
56
+ to_return(body: load_fixture(fixture))
46
57
  end
47
58
 
48
59
  def a_put(path)
49
60
  a_request(:put, "#{Gitlab.endpoint}#{path}").
50
- with(:query => {:private_token => Gitlab.private_token})
61
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token })
51
62
  end
52
63
 
53
64
  # DELETE
54
65
  def stub_delete(path, fixture)
55
66
  stub_request(:delete, "#{Gitlab.endpoint}#{path}").
56
- with(:query => {:private_token => Gitlab.private_token}).
57
- to_return(:body => load_fixture(fixture))
67
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token }).
68
+ to_return(body: load_fixture(fixture))
58
69
  end
59
70
 
60
71
  def a_delete(path)
61
72
  a_request(:delete, "#{Gitlab.endpoint}#{path}").
62
- with(:query => {:private_token => Gitlab.private_token})
73
+ with(headers: { 'PRIVATE-TOKEN' => Gitlab.private_token })
63
74
  end
metadata CHANGED
@@ -1,156 +1,311 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nihad Abbasov
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2013-10-22 00:00:00.000000000 Z
11
+ date: 2017-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: terminal-table
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.7.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.7.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
25
53
  - !ruby/object:Gem::Version
26
54
  version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rake
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - '>='
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
61
  version: '0'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - '>='
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: rspec
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
- - - '>='
73
+ - - ">="
46
74
  - !ruby/object:Gem::Version
47
75
  version: '0'
48
76
  type: :development
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
- - - '>='
80
+ - - ">="
53
81
  - !ruby/object:Gem::Version
54
82
  version: '0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: webmock
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
- - - '>='
87
+ - - ">="
60
88
  - !ruby/object:Gem::Version
61
89
  version: '0'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - '>='
94
+ - - ">="
67
95
  - !ruby/object:Gem::Version
68
96
  version: '0'
69
- description: Ruby client for GitLab API
97
+ description: Ruby client and CLI for GitLab API
70
98
  email:
71
99
  - mail@narkoz.me
72
- executables: []
100
+ executables:
101
+ - gitlab
73
102
  extensions: []
74
103
  extra_rdoc_files: []
75
104
  files:
76
- - .gitignore
77
- - .travis.yml
105
+ - ".gitignore"
106
+ - ".travis.yml"
107
+ - CHANGELOG.md
108
+ - CONTRIBUTING.md
78
109
  - Gemfile
79
110
  - LICENSE.txt
80
111
  - README.md
81
112
  - Rakefile
113
+ - bin/console
114
+ - bin/setup
115
+ - exe/gitlab
82
116
  - gitlab.gemspec
83
117
  - lib/gitlab.rb
84
118
  - lib/gitlab/api.rb
119
+ - lib/gitlab/cli.rb
120
+ - lib/gitlab/cli_helpers.rb
85
121
  - lib/gitlab/client.rb
122
+ - lib/gitlab/client/branches.rb
123
+ - lib/gitlab/client/build_triggers.rb
124
+ - lib/gitlab/client/build_variables.rb
125
+ - lib/gitlab/client/builds.rb
126
+ - lib/gitlab/client/commits.rb
86
127
  - lib/gitlab/client/groups.rb
87
128
  - lib/gitlab/client/issues.rb
129
+ - lib/gitlab/client/labels.rb
88
130
  - lib/gitlab/client/merge_requests.rb
89
131
  - lib/gitlab/client/milestones.rb
132
+ - lib/gitlab/client/namespaces.rb
90
133
  - lib/gitlab/client/notes.rb
134
+ - lib/gitlab/client/pipelines.rb
91
135
  - lib/gitlab/client/projects.rb
92
136
  - lib/gitlab/client/repositories.rb
137
+ - lib/gitlab/client/repository_files.rb
138
+ - lib/gitlab/client/runners.rb
139
+ - lib/gitlab/client/services.rb
93
140
  - lib/gitlab/client/snippets.rb
141
+ - lib/gitlab/client/system_hooks.rb
142
+ - lib/gitlab/client/tags.rb
94
143
  - lib/gitlab/client/users.rb
95
144
  - lib/gitlab/configuration.rb
96
145
  - lib/gitlab/error.rb
146
+ - lib/gitlab/file_response.rb
147
+ - lib/gitlab/help.rb
97
148
  - lib/gitlab/objectified_hash.rb
149
+ - lib/gitlab/page_links.rb
150
+ - lib/gitlab/paginated_response.rb
98
151
  - lib/gitlab/request.rb
152
+ - lib/gitlab/shell.rb
153
+ - lib/gitlab/shell_history.rb
99
154
  - lib/gitlab/version.rb
100
- - spec/fixtures/comment_merge_request.json
101
- - spec/fixtures/create_merge_request.json
155
+ - spec/fixtures/branch.json
156
+ - spec/fixtures/branch_delete.json
157
+ - spec/fixtures/branches.json
158
+ - spec/fixtures/build.json
159
+ - spec/fixtures/build_artifacts.json
160
+ - spec/fixtures/build_cancel.json
161
+ - spec/fixtures/build_erase.json
162
+ - spec/fixtures/build_retry.json
163
+ - spec/fixtures/builds.json
164
+ - spec/fixtures/builds_commits.json
165
+ - spec/fixtures/compare_merge_request_diff.json
102
166
  - spec/fixtures/error_already_exists.json
167
+ - spec/fixtures/error_project_not_found.json
168
+ - spec/fixtures/get_repository_file.json
103
169
  - spec/fixtures/group.json
104
170
  - spec/fixtures/group_create.json
171
+ - spec/fixtures/group_create_with_description.json
172
+ - spec/fixtures/group_delete.json
105
173
  - spec/fixtures/group_member.json
106
174
  - spec/fixtures/group_member_delete.json
175
+ - spec/fixtures/group_member_edit.json
107
176
  - spec/fixtures/group_members.json
177
+ - spec/fixtures/group_projects.json
178
+ - spec/fixtures/group_search.json
108
179
  - spec/fixtures/groups.json
109
180
  - spec/fixtures/issue.json
110
181
  - spec/fixtures/issues.json
111
182
  - spec/fixtures/key.json
112
183
  - spec/fixtures/keys.json
184
+ - spec/fixtures/label.json
185
+ - spec/fixtures/labels.json
113
186
  - spec/fixtures/merge_request.json
187
+ - spec/fixtures/merge_request_changes.json
188
+ - spec/fixtures/merge_request_closes_issues.json
189
+ - spec/fixtures/merge_request_comment.json
190
+ - spec/fixtures/merge_request_comments.json
191
+ - spec/fixtures/merge_request_commits.json
114
192
  - spec/fixtures/merge_requests.json
115
193
  - spec/fixtures/milestone.json
194
+ - spec/fixtures/milestone_issues.json
195
+ - spec/fixtures/milestone_merge_requests.json
116
196
  - spec/fixtures/milestones.json
197
+ - spec/fixtures/namespaces.json
117
198
  - spec/fixtures/note.json
118
199
  - spec/fixtures/notes.json
200
+ - spec/fixtures/pipeline.json
201
+ - spec/fixtures/pipeline_cancel.json
202
+ - spec/fixtures/pipeline_create.json
203
+ - spec/fixtures/pipeline_retry.json
204
+ - spec/fixtures/pipelines.json
119
205
  - spec/fixtures/project.json
120
- - spec/fixtures/project_branch.json
121
- - spec/fixtures/project_branches.json
206
+ - spec/fixtures/project_commit.json
207
+ - spec/fixtures/project_commit_comment.json
208
+ - spec/fixtures/project_commit_comments.json
209
+ - spec/fixtures/project_commit_create.json
210
+ - spec/fixtures/project_commit_diff.json
211
+ - spec/fixtures/project_commit_status.json
122
212
  - spec/fixtures/project_commits.json
123
- - spec/fixtures/project_delete_key.json
213
+ - spec/fixtures/project_edit.json
214
+ - spec/fixtures/project_events.json
124
215
  - spec/fixtures/project_for_user.json
216
+ - spec/fixtures/project_fork.json
125
217
  - spec/fixtures/project_fork_link.json
218
+ - spec/fixtures/project_forked_for_user.json
126
219
  - spec/fixtures/project_hook.json
127
220
  - spec/fixtures/project_hooks.json
128
221
  - spec/fixtures/project_issues.json
129
222
  - spec/fixtures/project_key.json
130
223
  - spec/fixtures/project_keys.json
224
+ - spec/fixtures/project_runner_enable.json
225
+ - spec/fixtures/project_runners.json
226
+ - spec/fixtures/project_search.json
227
+ - spec/fixtures/project_star.json
228
+ - spec/fixtures/project_tag_annotated.json
229
+ - spec/fixtures/project_tag_lightweight.json
131
230
  - spec/fixtures/project_tags.json
231
+ - spec/fixtures/project_unstar.json
232
+ - spec/fixtures/project_update_commit_status.json
132
233
  - spec/fixtures/projects.json
234
+ - spec/fixtures/push_rule.json
235
+ - spec/fixtures/raw_file.json
236
+ - spec/fixtures/release_create.json
237
+ - spec/fixtures/release_update.json
238
+ - spec/fixtures/repository_file.json
239
+ - spec/fixtures/runner.json
240
+ - spec/fixtures/runner_delete.json
241
+ - spec/fixtures/runner_edit.json
242
+ - spec/fixtures/runners.json
243
+ - spec/fixtures/runners_all.json
244
+ - spec/fixtures/service.json
133
245
  - spec/fixtures/session.json
246
+ - spec/fixtures/shell_history.json
134
247
  - spec/fixtures/snippet.json
248
+ - spec/fixtures/snippet_content.json
135
249
  - spec/fixtures/snippets.json
250
+ - spec/fixtures/system_hook.json
251
+ - spec/fixtures/system_hooks.json
252
+ - spec/fixtures/tag.json
253
+ - spec/fixtures/tag_create.json
254
+ - spec/fixtures/tag_create_with_description.json
255
+ - spec/fixtures/tag_delete.json
256
+ - spec/fixtures/tags.json
136
257
  - spec/fixtures/team_member.json
137
258
  - spec/fixtures/team_members.json
138
- - spec/fixtures/update_merge_request.json
259
+ - spec/fixtures/tree.json
260
+ - spec/fixtures/trigger.json
261
+ - spec/fixtures/triggers.json
139
262
  - spec/fixtures/user.json
263
+ - spec/fixtures/user_block_unblock.json
264
+ - spec/fixtures/user_email.json
265
+ - spec/fixtures/user_emails.json
266
+ - spec/fixtures/user_search.json
140
267
  - spec/fixtures/users.json
268
+ - spec/fixtures/variable.json
269
+ - spec/fixtures/variables.json
270
+ - spec/gitlab/cli_helpers_spec.rb
271
+ - spec/gitlab/cli_spec.rb
272
+ - spec/gitlab/client/branches_spec.rb
273
+ - spec/gitlab/client/build_triggers_spec.rb
274
+ - spec/gitlab/client/build_variables_spec.rb
275
+ - spec/gitlab/client/builds_spec.rb
276
+ - spec/gitlab/client/client_spec.rb
277
+ - spec/gitlab/client/commits_spec.rb
141
278
  - spec/gitlab/client/groups_spec.rb
142
279
  - spec/gitlab/client/issues_spec.rb
280
+ - spec/gitlab/client/labels_spec.rb
143
281
  - spec/gitlab/client/merge_requests_spec.rb
144
282
  - spec/gitlab/client/milestones_spec.rb
283
+ - spec/gitlab/client/namespaces_spec.rb
145
284
  - spec/gitlab/client/notes_spec.rb
285
+ - spec/gitlab/client/pipelines_spec.rb
146
286
  - spec/gitlab/client/projects_spec.rb
147
287
  - spec/gitlab/client/repositories_spec.rb
288
+ - spec/gitlab/client/repository_files_spec.rb
289
+ - spec/gitlab/client/runners_spec.rb
290
+ - spec/gitlab/client/services_spec.rb
148
291
  - spec/gitlab/client/snippets_spec.rb
292
+ - spec/gitlab/client/system_hooks_spec.rb
293
+ - spec/gitlab/client/tags_spec.rb
149
294
  - spec/gitlab/client/users_spec.rb
295
+ - spec/gitlab/error_spec.rb
296
+ - spec/gitlab/file_response_spec.rb
297
+ - spec/gitlab/help_spec.rb
298
+ - spec/gitlab/objectified_hash_spec.rb
299
+ - spec/gitlab/page_links_spec.rb
300
+ - spec/gitlab/paginated_response_spec.rb
301
+ - spec/gitlab/request_spec.rb
302
+ - spec/gitlab/shell_history_spec.rb
303
+ - spec/gitlab/shell_spec.rb
150
304
  - spec/gitlab_spec.rb
151
305
  - spec/spec_helper.rb
152
306
  homepage: https://github.com/narkoz/gitlab
153
- licenses: []
307
+ licenses:
308
+ - BSD
154
309
  metadata: {}
155
310
  post_install_message:
156
311
  rdoc_options: []
@@ -158,70 +313,169 @@ require_paths:
158
313
  - lib
159
314
  required_ruby_version: !ruby/object:Gem::Requirement
160
315
  requirements:
161
- - - '>='
316
+ - - ">="
162
317
  - !ruby/object:Gem::Version
163
- version: '0'
318
+ version: 2.0.0
164
319
  required_rubygems_version: !ruby/object:Gem::Requirement
165
320
  requirements:
166
- - - '>='
321
+ - - ">="
167
322
  - !ruby/object:Gem::Version
168
323
  version: '0'
169
324
  requirements: []
170
325
  rubyforge_project:
171
- rubygems_version: 2.1.7
326
+ rubygems_version: 2.5.2
172
327
  signing_key:
173
328
  specification_version: 4
174
- summary: A Ruby wrapper for the GitLab API
329
+ summary: A Ruby wrapper and CLI for the GitLab API
175
330
  test_files:
176
- - spec/fixtures/comment_merge_request.json
177
- - spec/fixtures/create_merge_request.json
331
+ - spec/fixtures/branch.json
332
+ - spec/fixtures/branch_delete.json
333
+ - spec/fixtures/branches.json
334
+ - spec/fixtures/build.json
335
+ - spec/fixtures/build_artifacts.json
336
+ - spec/fixtures/build_cancel.json
337
+ - spec/fixtures/build_erase.json
338
+ - spec/fixtures/build_retry.json
339
+ - spec/fixtures/builds.json
340
+ - spec/fixtures/builds_commits.json
341
+ - spec/fixtures/compare_merge_request_diff.json
178
342
  - spec/fixtures/error_already_exists.json
343
+ - spec/fixtures/error_project_not_found.json
344
+ - spec/fixtures/get_repository_file.json
179
345
  - spec/fixtures/group.json
180
346
  - spec/fixtures/group_create.json
347
+ - spec/fixtures/group_create_with_description.json
348
+ - spec/fixtures/group_delete.json
181
349
  - spec/fixtures/group_member.json
182
350
  - spec/fixtures/group_member_delete.json
351
+ - spec/fixtures/group_member_edit.json
183
352
  - spec/fixtures/group_members.json
353
+ - spec/fixtures/group_projects.json
354
+ - spec/fixtures/group_search.json
184
355
  - spec/fixtures/groups.json
185
356
  - spec/fixtures/issue.json
186
357
  - spec/fixtures/issues.json
187
358
  - spec/fixtures/key.json
188
359
  - spec/fixtures/keys.json
360
+ - spec/fixtures/label.json
361
+ - spec/fixtures/labels.json
189
362
  - spec/fixtures/merge_request.json
363
+ - spec/fixtures/merge_request_changes.json
364
+ - spec/fixtures/merge_request_closes_issues.json
365
+ - spec/fixtures/merge_request_comment.json
366
+ - spec/fixtures/merge_request_comments.json
367
+ - spec/fixtures/merge_request_commits.json
190
368
  - spec/fixtures/merge_requests.json
191
369
  - spec/fixtures/milestone.json
370
+ - spec/fixtures/milestone_issues.json
371
+ - spec/fixtures/milestone_merge_requests.json
192
372
  - spec/fixtures/milestones.json
373
+ - spec/fixtures/namespaces.json
193
374
  - spec/fixtures/note.json
194
375
  - spec/fixtures/notes.json
376
+ - spec/fixtures/pipeline.json
377
+ - spec/fixtures/pipeline_cancel.json
378
+ - spec/fixtures/pipeline_create.json
379
+ - spec/fixtures/pipeline_retry.json
380
+ - spec/fixtures/pipelines.json
195
381
  - spec/fixtures/project.json
196
- - spec/fixtures/project_branch.json
197
- - spec/fixtures/project_branches.json
382
+ - spec/fixtures/project_commit.json
383
+ - spec/fixtures/project_commit_comment.json
384
+ - spec/fixtures/project_commit_comments.json
385
+ - spec/fixtures/project_commit_create.json
386
+ - spec/fixtures/project_commit_diff.json
387
+ - spec/fixtures/project_commit_status.json
198
388
  - spec/fixtures/project_commits.json
199
- - spec/fixtures/project_delete_key.json
389
+ - spec/fixtures/project_edit.json
390
+ - spec/fixtures/project_events.json
200
391
  - spec/fixtures/project_for_user.json
392
+ - spec/fixtures/project_fork.json
201
393
  - spec/fixtures/project_fork_link.json
394
+ - spec/fixtures/project_forked_for_user.json
202
395
  - spec/fixtures/project_hook.json
203
396
  - spec/fixtures/project_hooks.json
204
397
  - spec/fixtures/project_issues.json
205
398
  - spec/fixtures/project_key.json
206
399
  - spec/fixtures/project_keys.json
400
+ - spec/fixtures/project_runner_enable.json
401
+ - spec/fixtures/project_runners.json
402
+ - spec/fixtures/project_search.json
403
+ - spec/fixtures/project_star.json
404
+ - spec/fixtures/project_tag_annotated.json
405
+ - spec/fixtures/project_tag_lightweight.json
207
406
  - spec/fixtures/project_tags.json
407
+ - spec/fixtures/project_unstar.json
408
+ - spec/fixtures/project_update_commit_status.json
208
409
  - spec/fixtures/projects.json
410
+ - spec/fixtures/push_rule.json
411
+ - spec/fixtures/raw_file.json
412
+ - spec/fixtures/release_create.json
413
+ - spec/fixtures/release_update.json
414
+ - spec/fixtures/repository_file.json
415
+ - spec/fixtures/runner.json
416
+ - spec/fixtures/runner_delete.json
417
+ - spec/fixtures/runner_edit.json
418
+ - spec/fixtures/runners.json
419
+ - spec/fixtures/runners_all.json
420
+ - spec/fixtures/service.json
209
421
  - spec/fixtures/session.json
422
+ - spec/fixtures/shell_history.json
210
423
  - spec/fixtures/snippet.json
424
+ - spec/fixtures/snippet_content.json
211
425
  - spec/fixtures/snippets.json
426
+ - spec/fixtures/system_hook.json
427
+ - spec/fixtures/system_hooks.json
428
+ - spec/fixtures/tag.json
429
+ - spec/fixtures/tag_create.json
430
+ - spec/fixtures/tag_create_with_description.json
431
+ - spec/fixtures/tag_delete.json
432
+ - spec/fixtures/tags.json
212
433
  - spec/fixtures/team_member.json
213
434
  - spec/fixtures/team_members.json
214
- - spec/fixtures/update_merge_request.json
435
+ - spec/fixtures/tree.json
436
+ - spec/fixtures/trigger.json
437
+ - spec/fixtures/triggers.json
215
438
  - spec/fixtures/user.json
439
+ - spec/fixtures/user_block_unblock.json
440
+ - spec/fixtures/user_email.json
441
+ - spec/fixtures/user_emails.json
442
+ - spec/fixtures/user_search.json
216
443
  - spec/fixtures/users.json
444
+ - spec/fixtures/variable.json
445
+ - spec/fixtures/variables.json
446
+ - spec/gitlab/cli_helpers_spec.rb
447
+ - spec/gitlab/cli_spec.rb
448
+ - spec/gitlab/client/branches_spec.rb
449
+ - spec/gitlab/client/build_triggers_spec.rb
450
+ - spec/gitlab/client/build_variables_spec.rb
451
+ - spec/gitlab/client/builds_spec.rb
452
+ - spec/gitlab/client/client_spec.rb
453
+ - spec/gitlab/client/commits_spec.rb
217
454
  - spec/gitlab/client/groups_spec.rb
218
455
  - spec/gitlab/client/issues_spec.rb
456
+ - spec/gitlab/client/labels_spec.rb
219
457
  - spec/gitlab/client/merge_requests_spec.rb
220
458
  - spec/gitlab/client/milestones_spec.rb
459
+ - spec/gitlab/client/namespaces_spec.rb
221
460
  - spec/gitlab/client/notes_spec.rb
461
+ - spec/gitlab/client/pipelines_spec.rb
222
462
  - spec/gitlab/client/projects_spec.rb
223
463
  - spec/gitlab/client/repositories_spec.rb
464
+ - spec/gitlab/client/repository_files_spec.rb
465
+ - spec/gitlab/client/runners_spec.rb
466
+ - spec/gitlab/client/services_spec.rb
224
467
  - spec/gitlab/client/snippets_spec.rb
468
+ - spec/gitlab/client/system_hooks_spec.rb
469
+ - spec/gitlab/client/tags_spec.rb
225
470
  - spec/gitlab/client/users_spec.rb
471
+ - spec/gitlab/error_spec.rb
472
+ - spec/gitlab/file_response_spec.rb
473
+ - spec/gitlab/help_spec.rb
474
+ - spec/gitlab/objectified_hash_spec.rb
475
+ - spec/gitlab/page_links_spec.rb
476
+ - spec/gitlab/paginated_response_spec.rb
477
+ - spec/gitlab/request_spec.rb
478
+ - spec/gitlab/shell_history_spec.rb
479
+ - spec/gitlab/shell_spec.rb
226
480
  - spec/gitlab_spec.rb
227
481
  - spec/spec_helper.rb