gitlab 4.2.0 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +33 -0
  3. data/.travis.yml +8 -3
  4. data/README.md +7 -7
  5. data/Rakefile +11 -3
  6. data/gitlab.gemspec +11 -11
  7. data/lib/gitlab.rb +2 -2
  8. data/lib/gitlab/api.rb +2 -1
  9. data/lib/gitlab/cli.rb +2 -6
  10. data/lib/gitlab/cli_helpers.rb +18 -20
  11. data/lib/gitlab/client.rb +8 -5
  12. data/lib/gitlab/client/branches.rb +4 -4
  13. data/lib/gitlab/client/build_variables.rb +64 -2
  14. data/lib/gitlab/client/deployments.rb +32 -0
  15. data/lib/gitlab/client/groups.rb +49 -0
  16. data/lib/gitlab/client/issues.rb +71 -0
  17. data/lib/gitlab/client/merge_requests.rb +1 -0
  18. data/lib/gitlab/client/pipeline_schedules.rb +133 -0
  19. data/lib/gitlab/client/pipeline_triggers.rb +2 -2
  20. data/lib/gitlab/client/projects.rb +1 -1
  21. data/lib/gitlab/client/repository_files.rb +2 -2
  22. data/lib/gitlab/client/users.rb +5 -5
  23. data/lib/gitlab/configuration.rb +2 -2
  24. data/lib/gitlab/error.rb +10 -2
  25. data/lib/gitlab/file_response.rb +1 -1
  26. data/lib/gitlab/help.rb +5 -6
  27. data/lib/gitlab/page_links.rb +2 -2
  28. data/lib/gitlab/request.rb +34 -50
  29. data/lib/gitlab/shell.rb +5 -8
  30. data/lib/gitlab/version.rb +1 -1
  31. data/spec/fixtures/deployment.json +57 -0
  32. data/spec/fixtures/deployments.json +116 -0
  33. data/spec/fixtures/group_edit.json +14 -0
  34. data/spec/fixtures/group_subgroups.json +16 -0
  35. data/spec/fixtures/pipeline_schedule.json +32 -0
  36. data/spec/fixtures/pipeline_schedule_create.json +21 -0
  37. data/spec/fixtures/pipeline_schedule_update.json +26 -0
  38. data/spec/fixtures/pipeline_schedule_variable.json +5 -0
  39. data/spec/fixtures/pipeline_schedule_variable_update.json +5 -0
  40. data/spec/fixtures/pipeline_schedules.json +22 -0
  41. data/spec/gitlab/api_spec.rb +11 -0
  42. data/spec/gitlab/cli_helpers_spec.rb +14 -15
  43. data/spec/gitlab/cli_spec.rb +11 -11
  44. data/spec/gitlab/client/award_emojis_spec.rb +55 -55
  45. data/spec/gitlab/client/boards_spec.rb +12 -12
  46. data/spec/gitlab/client/branches_spec.rb +22 -22
  47. data/spec/gitlab/client/build_variables_spec.rb +93 -10
  48. data/spec/gitlab/client/builds_spec.rb +36 -36
  49. data/spec/gitlab/client/commits_spec.rb +21 -21
  50. data/spec/gitlab/client/deployments_spec.rb +38 -0
  51. data/spec/gitlab/client/environments_spec.rb +18 -18
  52. data/spec/gitlab/client/groups_spec.rb +73 -22
  53. data/spec/gitlab/client/issues_spec.rb +121 -22
  54. data/spec/gitlab/client/jobs_spec.rb +13 -13
  55. data/spec/gitlab/client/keys_spec.rb +2 -2
  56. data/spec/gitlab/client/labels_spec.rb +12 -12
  57. data/spec/gitlab/client/merge_requests_spec.rb +23 -23
  58. data/spec/gitlab/client/milestones_spec.rb +12 -12
  59. data/spec/gitlab/client/namespaces_spec.rb +3 -3
  60. data/spec/gitlab/client/notes_spec.rb +40 -40
  61. data/spec/gitlab/client/pipeline_schedules_spec.rb +158 -0
  62. data/spec/gitlab/client/pipeline_triggers_spec.rb +17 -17
  63. data/spec/gitlab/client/pipelines_spec.rb +22 -22
  64. data/spec/gitlab/client/projects_spec.rb +75 -75
  65. data/spec/gitlab/client/repositories_spec.rb +16 -16
  66. data/spec/gitlab/client/repository_files_spec.rb +10 -10
  67. data/spec/gitlab/client/runners_spec.rb +20 -22
  68. data/spec/gitlab/client/services_spec.rb +6 -6
  69. data/spec/gitlab/client/snippets_spec.rb +12 -12
  70. data/spec/gitlab/client/system_hooks_spec.rb +12 -12
  71. data/spec/gitlab/client/tags_spec.rb +19 -20
  72. data/spec/gitlab/client/todos_spec.rb +12 -12
  73. data/spec/gitlab/client/users_spec.rb +49 -49
  74. data/spec/gitlab/error_spec.rb +50 -23
  75. data/spec/gitlab/file_response_spec.rb +6 -6
  76. data/spec/gitlab/help_spec.rb +5 -5
  77. data/spec/gitlab/objectified_hash_spec.rb +8 -8
  78. data/spec/gitlab/page_links_spec.rb +1 -1
  79. data/spec/gitlab/paginated_response_spec.rb +4 -4
  80. data/spec/gitlab/request_spec.rb +19 -19
  81. data/spec/gitlab/shell_spec.rb +12 -12
  82. data/spec/gitlab_spec.rb +13 -14
  83. data/spec/spec_helper.rb +10 -45
  84. metadata +46 -3
@@ -7,11 +7,11 @@ describe Gitlab::Client do
7
7
  @boards = Gitlab.boards(3)
8
8
  end
9
9
 
10
- it "should get the correct resource" do
10
+ it "gets the correct resource" do
11
11
  expect(a_get("/projects/3/boards")).to have_been_made
12
12
  end
13
13
 
14
- it "should return a paginated response of project's boards" do
14
+ it "returns a paginated response of project's boards" do
15
15
  expect(@boards).to be_a Gitlab::PaginatedResponse
16
16
  end
17
17
  end
@@ -22,11 +22,11 @@ describe Gitlab::Client do
22
22
  @board_lists = Gitlab.board_lists(3, 1)
23
23
  end
24
24
 
25
- it "should get the correct resource" do
25
+ it "gets the correct resource" do
26
26
  expect(a_get("/projects/3/boards/1/lists")).to have_been_made
27
27
  end
28
28
 
29
- it "should return a paginated response of board's lists" do
29
+ it "returns a paginated response of board's lists" do
30
30
  expect(@board_lists).to be_a Gitlab::PaginatedResponse
31
31
  expect(@board_lists.first.id).to eq(1)
32
32
  end
@@ -38,11 +38,11 @@ describe Gitlab::Client do
38
38
  @board_list = Gitlab.board_list(3, 1, 1)
39
39
  end
40
40
 
41
- it "should get the correct resource" do
41
+ it "gets the correct resource" do
42
42
  expect(a_get("/projects/3/boards/1/lists/1")).to have_been_made
43
43
  end
44
44
 
45
- it "should return information about the list" do
45
+ it "returns information about the list" do
46
46
  expect(@board_list.id).to eq(1)
47
47
  end
48
48
  end
@@ -53,11 +53,11 @@ describe Gitlab::Client do
53
53
  @board_list = Gitlab.create_board_list(3, 1, 4)
54
54
  end
55
55
 
56
- it "should get the correct resource" do
56
+ it "gets the correct resource" do
57
57
  expect(a_post("/projects/3/boards/1/lists")).to have_been_made
58
58
  end
59
59
 
60
- it "should return information about a created board" do
60
+ it "returns information about a created board" do
61
61
  expect(@board_list.position).to eq(1)
62
62
  end
63
63
  end
@@ -68,11 +68,11 @@ describe Gitlab::Client do
68
68
  @board_list = Gitlab.edit_board_list(3, 1, 1, 3)
69
69
  end
70
70
 
71
- it "should get the correct resource" do
71
+ it "gets the correct resource" do
72
72
  expect(a_put("/projects/3/boards/1/lists/1")).to have_been_made
73
73
  end
74
74
 
75
- it "should return information about an edited board" do
75
+ it "returns information about an edited board" do
76
76
  expect(@board_list.id).to eq(1)
77
77
  end
78
78
  end
@@ -83,11 +83,11 @@ describe Gitlab::Client do
83
83
  @board_list = Gitlab.delete_board_list(3, 1, 1)
84
84
  end
85
85
 
86
- it "should get the correct resource" do
86
+ it "gets the correct resource" do
87
87
  expect(a_delete("/projects/3/boards/1/lists/1")).to have_been_made
88
88
  end
89
89
 
90
- it "should return information about the deleted board list" do
90
+ it "returns information about the deleted board list" do
91
91
  expect(@board_list.id).to eq(1)
92
92
  end
93
93
  end
@@ -1,10 +1,10 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Gitlab::Client do
4
- it { should respond_to :repo_branches }
5
- it { should respond_to :repo_branch }
6
- it { should respond_to :repo_protect_branch }
7
- it { should respond_to :repo_unprotect_branch }
4
+ it { is_expected.to respond_to :repo_branches }
5
+ it { is_expected.to respond_to :repo_branch }
6
+ it { is_expected.to respond_to :repo_protect_branch }
7
+ it { is_expected.to respond_to :repo_unprotect_branch }
8
8
 
9
9
  describe ".branches" do
10
10
  before do
@@ -12,11 +12,11 @@ describe Gitlab::Client do
12
12
  @branches = Gitlab.branches(3)
13
13
  end
14
14
 
15
- it "should get the correct resource" do
15
+ it "gets the correct resource" do
16
16
  expect(a_get("/projects/3/repository/branches")).to have_been_made
17
17
  end
18
18
 
19
- it "should return a paginated response of repository branches" do
19
+ it "returns a paginated response of repository branches" do
20
20
  expect(@branches).to be_a Gitlab::PaginatedResponse
21
21
  expect(@branches.first.name).to eq("api")
22
22
  end
@@ -28,18 +28,18 @@ describe Gitlab::Client do
28
28
  @branch = Gitlab.branch(3, "api")
29
29
  end
30
30
 
31
- it "should get the correct resource" do
31
+ it "gets the correct resource" do
32
32
  expect(a_get("/projects/3/repository/branches/api")).to have_been_made
33
33
  end
34
34
 
35
- it "should return information about a repository branch" do
35
+ it "returns information about a repository branch" do
36
36
  expect(@branch.name).to eq("api")
37
37
  end
38
38
  end
39
39
 
40
40
  describe ".protect_branch" do
41
41
  before do
42
- stub_put("/projects/3/repository/branches/api/protect", "branch")
42
+ stub_post("/projects/3/protected_branches", "branch")
43
43
  end
44
44
 
45
45
  context "without options" do
@@ -47,11 +47,11 @@ describe Gitlab::Client do
47
47
  @branch = Gitlab.protect_branch(3, "api")
48
48
  end
49
49
 
50
- it "should update the correct resource" do
51
- expect(a_put("/projects/3/repository/branches/api/protect")).to have_been_made
50
+ it "updates the correct resource" do
51
+ expect(a_post("/projects/3/protected_branches")).to have_been_made
52
52
  end
53
53
 
54
- it "should return information about a protected repository branch" do
54
+ it "returns information about a protected repository branch" do
55
55
  expect(@branch.name).to eq("api")
56
56
  end
57
57
  end
@@ -61,9 +61,9 @@ describe Gitlab::Client do
61
61
  @branch = Gitlab.protect_branch(3, "api", developers_can_push: true)
62
62
  end
63
63
 
64
- it "should update the correct resource with the correct options" do
64
+ it "updates the correct resource with the correct options" do
65
65
  expect(
66
- a_put("/projects/3/repository/branches/api/protect").with(body: { developers_can_push: 'true' })
66
+ a_post("/projects/3/protected_branches").with(body: { name: "api", developers_can_push: 'true' })
67
67
  ).to have_been_made
68
68
  end
69
69
  end
@@ -71,15 +71,15 @@ describe Gitlab::Client do
71
71
 
72
72
  describe ".unprotect_branch" do
73
73
  before do
74
- stub_put("/projects/3/repository/branches/api/unprotect", "branch")
74
+ stub_delete("/projects/3/protected_branches/api","branch")
75
75
  @branch = Gitlab.unprotect_branch(3, "api")
76
76
  end
77
77
 
78
- it "should get the correct resource" do
79
- expect(a_put("/projects/3/repository/branches/api/unprotect")).to have_been_made
78
+ it "gets the correct resource" do
79
+ expect(a_delete("/projects/3/protected_branches/api")).to have_been_made
80
80
  end
81
81
 
82
- it "should return information about an unprotected repository branch" do
82
+ it "returns information about an unprotected repository branch" do
83
83
  expect(@branch.name).to eq("api")
84
84
  end
85
85
  end
@@ -90,11 +90,11 @@ describe Gitlab::Client do
90
90
  @branch = Gitlab.create_branch(3, "api", "master")
91
91
  end
92
92
 
93
- it "should get the correct resource" do
93
+ it "gets the correct resource" do
94
94
  expect(a_post("/projects/3/repository/branches")).to have_been_made
95
95
  end
96
96
 
97
- it "should return information about a new repository branch" do
97
+ it "returns information about a new repository branch" do
98
98
  expect(@branch.name).to eq("api")
99
99
  end
100
100
  end
@@ -105,11 +105,11 @@ describe Gitlab::Client do
105
105
  @branch = Gitlab.delete_branch(3, "api")
106
106
  end
107
107
 
108
- it "should get the correct resource" do
108
+ it "gets the correct resource" do
109
109
  expect(a_delete("/projects/3/repository/branches/api")).to have_been_made
110
110
  end
111
111
 
112
- it "should return information about the deleted repository branch" do
112
+ it "returns information about the deleted repository branch" do
113
113
  expect(@branch.branch_name).to eq("api")
114
114
  end
115
115
  end
@@ -7,11 +7,11 @@ describe Gitlab::Client do
7
7
  @variables = Gitlab.variables(3)
8
8
  end
9
9
 
10
- it "should get the correct resource" do
10
+ it "gets the correct resource" do
11
11
  expect(a_get("/projects/3/variables")).to have_been_made
12
12
  end
13
13
 
14
- it "should return an array of project's variables" do
14
+ it "returns an array of project's variables" do
15
15
  expect(@variables).to be_a Gitlab::PaginatedResponse
16
16
  expect(@variables.first.key).to eq("TEST_VARIABLE_1")
17
17
  expect(@variables.first.value).to eq("TEST_1")
@@ -24,11 +24,11 @@ describe Gitlab::Client do
24
24
  @variable = Gitlab.variable(3, "VARIABLE")
25
25
  end
26
26
 
27
- it "should get the correct resource" do
27
+ it "gets the correct resource" do
28
28
  expect(a_get("/projects/3/variables/VARIABLE")).to have_been_made
29
29
  end
30
30
 
31
- it "should return information about a variable" do
31
+ it "returns information about a variable" do
32
32
  expect(@variable.key).to eq("VARIABLE")
33
33
  expect(@variable.value).to eq("the value")
34
34
  end
@@ -40,12 +40,12 @@ describe Gitlab::Client do
40
40
  @variable = Gitlab.create_variable(3, "NEW_VARIABLE", "new value")
41
41
  end
42
42
 
43
- it "should get the correct resource" do
43
+ it "gets the correct resource" do
44
44
  body = { key: "NEW_VARIABLE", value: "new value" }
45
45
  expect(a_post("/projects/3/variables").with(body: body)).to have_been_made
46
46
  end
47
47
 
48
- it "should return information about a new variable" do
48
+ it "returns information about a new variable" do
49
49
  expect(@variable.key).to eq("VARIABLE")
50
50
  expect(@variable.value).to eq("the value")
51
51
  end
@@ -57,12 +57,12 @@ describe Gitlab::Client do
57
57
  @variable = Gitlab.update_variable(3, "UPD_VARIABLE", "updated value")
58
58
  end
59
59
 
60
- it "should put the correct resource" do
60
+ it "puts the correct resource" do
61
61
  body = { value: "updated value" }
62
62
  expect(a_put("/projects/3/variables/UPD_VARIABLE").with(body: body)).to have_been_made
63
63
  end
64
64
 
65
- it "should return information about an updated variable" do
65
+ it "returns information about an updated variable" do
66
66
  expect(@variable.key).to eq("VARIABLE")
67
67
  expect(@variable.value).to eq("the value")
68
68
  end
@@ -74,11 +74,94 @@ describe Gitlab::Client do
74
74
  @variable = Gitlab.remove_variable(3, "DEL_VARIABLE")
75
75
  end
76
76
 
77
- it "should get the correct resource" do
77
+ it "gets the correct resource" do
78
78
  expect(a_delete("/projects/3/variables/DEL_VARIABLE")).to have_been_made
79
79
  end
80
80
 
81
- it "should return information about a deleted variable" do
81
+ it "returns information about a deleted variable" do
82
+ expect(@variable.key).to eq("VARIABLE")
83
+ expect(@variable.value).to eq("the value")
84
+ end
85
+ end
86
+
87
+ describe ".group_variables" do
88
+ before do
89
+ stub_get("/groups/3/variables", "variables")
90
+ @variables = Gitlab.group_variables(3)
91
+ end
92
+
93
+ it "gets the correct resource" do
94
+ expect(a_get("/groups/3/variables")).to have_been_made
95
+ end
96
+
97
+ it "returns an array of group's variables" do
98
+ expect(@variables).to be_a Gitlab::PaginatedResponse
99
+ expect(@variables.first.key).to eq("TEST_VARIABLE_1")
100
+ expect(@variables.first.value).to eq("TEST_1")
101
+ end
102
+ end
103
+
104
+ describe ".group_variable" do
105
+ before do
106
+ stub_get("/groups/3/variables/VARIABLE", "variable")
107
+ @variable = Gitlab.group_variable(3, "VARIABLE")
108
+ end
109
+
110
+ it "gets the correct resource" do
111
+ expect(a_get("/groups/3/variables/VARIABLE")).to have_been_made
112
+ end
113
+
114
+ it "returns information about a variable" do
115
+ expect(@variable.key).to eq("VARIABLE")
116
+ expect(@variable.value).to eq("the value")
117
+ end
118
+ end
119
+
120
+ describe ".create_group_variable" do
121
+ before do
122
+ stub_post("/groups/3/variables", "variable")
123
+ @variable = Gitlab.create_group_variable(3, "NEW_VARIABLE", "new value")
124
+ end
125
+
126
+ it "gets the correct resource" do
127
+ body = { key: "NEW_VARIABLE", value: "new value" }
128
+ expect(a_post("/groups/3/variables").with(body: body)).to have_been_made
129
+ end
130
+
131
+ it "returns information about a new variable" do
132
+ expect(@variable.key).to eq("VARIABLE")
133
+ expect(@variable.value).to eq("the value")
134
+ end
135
+ end
136
+
137
+ describe ".update_group_variable" do
138
+ before do
139
+ stub_put("/groups/3/variables/UPD_VARIABLE", "variable")
140
+ @variable = Gitlab.update_group_variable(3, "UPD_VARIABLE", "updated value")
141
+ end
142
+
143
+ it "puts the correct resource" do
144
+ body = { value: "updated value" }
145
+ expect(a_put("/groups/3/variables/UPD_VARIABLE").with(body: body)).to have_been_made
146
+ end
147
+
148
+ it "returns information about an updated variable" do
149
+ expect(@variable.key).to eq("VARIABLE")
150
+ expect(@variable.value).to eq("the value")
151
+ end
152
+ end
153
+
154
+ describe ".remove_group_variable" do
155
+ before do
156
+ stub_delete("/groups/3/variables/DEL_VARIABLE", "variable")
157
+ @variable = Gitlab.remove_group_variable(3, "DEL_VARIABLE")
158
+ end
159
+
160
+ it "gets the correct resource" do
161
+ expect(a_delete("/groups/3/variables/DEL_VARIABLE")).to have_been_made
162
+ end
163
+
164
+ it "returns information about a deleted variable" do
82
165
  expect(@variable.key).to eq("VARIABLE")
83
166
  expect(@variable.value).to eq("the value")
84
167
  end
@@ -7,30 +7,30 @@ describe Gitlab::Client do
7
7
  @builds = Gitlab.builds(3)
8
8
  end
9
9
 
10
- it "should get the correct resource" do
10
+ it "gets the correct resource" do
11
11
  expect(a_get("/projects/3/builds")).to have_been_made
12
12
  end
13
13
 
14
- it "should return a paginated response of project's builds" do
14
+ it "returns a paginated response of project's builds" do
15
15
  expect(@builds).to be_a Gitlab::PaginatedResponse
16
16
  end
17
17
  end
18
-
18
+
19
19
  describe ".build" do
20
20
  before do
21
21
  stub_get("/projects/3/builds/8", "build")
22
22
  @build = Gitlab.build(3, 8)
23
23
  end
24
-
25
- it "should get the correct resource" do
24
+
25
+ it "gets the correct resource" do
26
26
  expect(a_get("/projects/3/builds/8")).to have_been_made
27
27
  end
28
28
 
29
- it "should return a single build" do
29
+ it "returns a single build" do
30
30
  expect(@build).to be_a Gitlab::ObjectifiedHash
31
31
  end
32
-
33
- it "should return information about a build" do
32
+
33
+ it "returns information about a build" do
34
34
  expect(@build.id).to eq(8)
35
35
  expect(@build.user.name).to eq("John Smith")
36
36
  end
@@ -46,22 +46,22 @@ describe Gitlab::Client do
46
46
  to_return(body: fixture.read, headers: { 'Content-Disposition' => "attachment; filename=artifacts.zip" })
47
47
  @build_artifacts = Gitlab.build_artifacts(3, 8)
48
48
  end
49
-
50
- it "should get the correct resource" do
49
+
50
+ it "gets the correct resource" do
51
51
  expect(a_get("/projects/3/builds/8/artifacts")).to have_been_made
52
52
  end
53
-
54
- it "should return a FileResponse" do
53
+
54
+ it "returns a FileResponse" do
55
55
  expect(@build_artifacts).to be_a Gitlab::FileResponse
56
56
  end
57
-
58
- it "should return a file with filename" do
57
+
58
+ it "returns a file with filename" do
59
59
  expect(@build_artifacts.filename).to eq "artifacts.zip"
60
60
  end
61
61
  end
62
62
 
63
63
  context "when bad request" do
64
- it "should throw an exception" do
64
+ it "throws an exception" do
65
65
  stub_get("/projects/3/builds/8/artifacts", "error_project_not_found", 404)
66
66
  expect{ Gitlab.build_artifacts(3, 8) }.to raise_error(Gitlab::Error::NotFound, "Server responded with code 404, message: 404 Project Not Found. Request URI: #{Gitlab.endpoint}/projects/3/builds/8/artifacts")
67
67
  end
@@ -73,16 +73,16 @@ describe Gitlab::Client do
73
73
  stub_get("/projects/3/repository/commits/0ff3ae198f8601a285adcf5c0fff204ee6fba5fd/builds", "builds_commits")
74
74
  @builds_commits = Gitlab.commit_builds(3, "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd")
75
75
  end
76
-
77
- it "should get the correct resource" do
76
+
77
+ it "gets the correct resource" do
78
78
  expect(a_get("/projects/3/repository/commits/0ff3ae198f8601a285adcf5c0fff204ee6fba5fd/builds")).to have_been_made
79
79
  end
80
80
 
81
- it "should return a paginated response of commit builds" do
81
+ it "returns a paginated response of commit builds" do
82
82
  expect(@builds_commits).to be_a Gitlab::PaginatedResponse
83
83
  end
84
-
85
- it "should return information about the builds" do
84
+
85
+ it "returns information about the builds" do
86
86
  expect(@builds_commits.count).to eq(2)
87
87
  end
88
88
  end
@@ -94,35 +94,35 @@ describe Gitlab::Client do
94
94
  stub_post("/projects/3/builds/8/cancel", "build_cancel")
95
95
  @build_cancel = Gitlab.build_cancel(3, 8)
96
96
  end
97
-
98
- it "should get the correct resource" do
97
+
98
+ it "gets the correct resource" do
99
99
  expect(a_post("/projects/3/builds/8/cancel")).to have_been_made
100
100
  end
101
101
 
102
- it "should return a single build" do
102
+ it "returns a single build" do
103
103
  expect(@build_cancel).to be_a Gitlab::ObjectifiedHash
104
104
  end
105
-
106
- it "should return information about a build" do
105
+
106
+ it "returns information about a build" do
107
107
  expect(@build_cancel.commit.author_name).to eq("John Smith")
108
108
  end
109
109
  end
110
-
110
+
111
111
  describe ".build_retry" do
112
112
  before do
113
113
  stub_post("/projects/3/builds/69/retry", "build_retry")
114
114
  @build_retry = Gitlab.build_retry(3, 69)
115
115
  end
116
-
117
- it "should get the correct resource" do
116
+
117
+ it "gets the correct resource" do
118
118
  expect(a_post("/projects/3/builds/69/retry")).to have_been_made
119
119
  end
120
120
 
121
- it "should return a single build" do
121
+ it "returns a single build" do
122
122
  expect(@build_retry).to be_a Gitlab::ObjectifiedHash
123
123
  end
124
-
125
- it "should return information about a build" do
124
+
125
+ it "returns information about a build" do
126
126
  expect(@build_retry.commit.author_name).to eq("John Smith")
127
127
  end
128
128
  end
@@ -132,16 +132,16 @@ describe Gitlab::Client do
132
132
  stub_post("/projects/3/builds/69/erase", "build_erase")
133
133
  @build_retry = Gitlab.build_erase(3, 69)
134
134
  end
135
-
136
- it "should get the correct resource" do
135
+
136
+ it "gets the correct resource" do
137
137
  expect(a_post("/projects/3/builds/69/erase")).to have_been_made
138
138
  end
139
139
 
140
- it "should return a single build" do
140
+ it "returns a single build" do
141
141
  expect(@build_retry).to be_a Gitlab::ObjectifiedHash
142
142
  end
143
-
144
- it "should return information about a build" do
143
+
144
+ it "returns information about a build" do
145
145
  expect(@build_retry.commit.author_name).to eq("John Smith")
146
146
  end
147
147
  end