gitlab 3.6.1 → 3.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 (86) hide show
  1. data/.travis.yml +2 -0
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +9 -2
  4. data/gitlab.gemspec +5 -1
  5. data/lib/gitlab.rb +3 -2
  6. data/lib/gitlab/cli_helpers.rb +8 -3
  7. data/lib/gitlab/client.rb +6 -0
  8. data/lib/gitlab/client/build_triggers.rb +51 -0
  9. data/lib/gitlab/client/build_variables.rb +66 -0
  10. data/lib/gitlab/client/builds.rb +106 -0
  11. data/lib/gitlab/client/commits.rb +5 -5
  12. data/lib/gitlab/client/groups.rb +36 -3
  13. data/lib/gitlab/client/issues.rb +16 -3
  14. data/lib/gitlab/client/labels.rb +2 -2
  15. data/lib/gitlab/client/merge_requests.rb +49 -8
  16. data/lib/gitlab/client/milestones.rb +1 -1
  17. data/lib/gitlab/client/notes.rb +28 -1
  18. data/lib/gitlab/client/projects.rb +60 -7
  19. data/lib/gitlab/client/repositories.rb +1 -32
  20. data/lib/gitlab/client/runners.rb +115 -0
  21. data/lib/gitlab/client/services.rb +48 -0
  22. data/lib/gitlab/client/snippets.rb +2 -2
  23. data/lib/gitlab/client/tags.rb +96 -0
  24. data/lib/gitlab/client/users.rb +72 -2
  25. data/lib/gitlab/error.rb +53 -10
  26. data/lib/gitlab/file_response.rb +45 -0
  27. data/lib/gitlab/help.rb +1 -0
  28. data/lib/gitlab/objectified_hash.rb +1 -1
  29. data/lib/gitlab/paginated_response.rb +2 -2
  30. data/lib/gitlab/request.rb +13 -34
  31. data/lib/gitlab/version.rb +1 -1
  32. data/spec/fixtures/build.json +38 -0
  33. data/spec/fixtures/build_artifacts.json +0 -0
  34. data/spec/fixtures/build_cancel.json +24 -0
  35. data/spec/fixtures/build_erase.json +24 -0
  36. data/spec/fixtures/build_retry.json +24 -0
  37. data/spec/fixtures/builds.json +78 -0
  38. data/spec/fixtures/builds_commits.json +64 -0
  39. data/spec/fixtures/error_project_not_found.json +1 -0
  40. data/spec/fixtures/git_hook.json +1 -0
  41. data/spec/fixtures/group_delete.json +1 -0
  42. data/spec/fixtures/group_member_edit.json +1 -0
  43. data/spec/fixtures/group_projects.json +44 -0
  44. data/spec/fixtures/merge_request_commits.json +1 -0
  45. data/spec/fixtures/project_runner_enable.json +7 -0
  46. data/spec/fixtures/project_runners.json +16 -0
  47. data/spec/fixtures/release_create.json +1 -0
  48. data/spec/fixtures/release_update.json +1 -0
  49. data/spec/fixtures/runner.json +26 -0
  50. data/spec/fixtures/runner_delete.json +7 -0
  51. data/spec/fixtures/runner_edit.json +26 -0
  52. data/spec/fixtures/runners.json +16 -0
  53. data/spec/fixtures/runners_all.json +30 -0
  54. data/spec/fixtures/service.json +1 -0
  55. data/spec/fixtures/tag.json +1 -0
  56. data/spec/fixtures/tag_create.json +1 -0
  57. data/spec/fixtures/tag_create_with_description.json +1 -0
  58. data/spec/fixtures/tag_delete.json +1 -0
  59. data/spec/fixtures/tags.json +1 -0
  60. data/spec/fixtures/trigger.json +7 -0
  61. data/spec/fixtures/triggers.json +16 -0
  62. data/spec/fixtures/user_email.json +1 -0
  63. data/spec/fixtures/user_emails.json +1 -0
  64. data/spec/fixtures/user_search.json +1 -0
  65. data/spec/fixtures/variable.json +4 -0
  66. data/spec/fixtures/variables.json +10 -0
  67. data/spec/gitlab/client/build_triggers_spec.rb +67 -0
  68. data/spec/gitlab/client/build_variables_spec.rb +86 -0
  69. data/spec/gitlab/client/builds_spec.rb +148 -0
  70. data/spec/gitlab/client/groups_spec.rb +51 -0
  71. data/spec/gitlab/client/issues_spec.rb +16 -0
  72. data/spec/gitlab/client/merge_requests_spec.rb +27 -4
  73. data/spec/gitlab/client/notes_spec.rb +32 -0
  74. data/spec/gitlab/client/projects_spec.rb +79 -0
  75. data/spec/gitlab/client/runners_spec.rb +185 -0
  76. data/spec/gitlab/client/services_spec.rb +55 -0
  77. data/spec/gitlab/client/tags_spec.rb +109 -0
  78. data/spec/gitlab/client/users_spec.rb +136 -0
  79. data/spec/gitlab/error_spec.rb +45 -0
  80. data/spec/gitlab/file_response_spec.rb +28 -0
  81. data/spec/gitlab/help_spec.rb +6 -1
  82. data/spec/gitlab/request_spec.rb +0 -27
  83. data/spec/gitlab/shell_spec.rb +1 -1
  84. data/spec/spec_helper.rb +2 -2
  85. metadata +131 -23
  86. checksums.yaml +0 -7
@@ -1,3 +1,3 @@
1
1
  module Gitlab
2
- VERSION = "3.6.1"
2
+ VERSION = "3.7.0"
3
3
  end
@@ -0,0 +1,38 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "Administrator",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "created_at": "2015-12-24T15:51:21.880Z",
13
+ "download_url": null,
14
+ "finished_at": "2015-12-24T17:54:31.198Z",
15
+ "id": 8,
16
+ "name": "rubocop",
17
+ "ref": "master",
18
+ "runner": null,
19
+ "stage": "test",
20
+ "started_at": "2015-12-24T17:54:30.733Z",
21
+ "status": "failed",
22
+ "tag": false,
23
+ "user": {
24
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
25
+ "bio": null,
26
+ "created_at": "2015-12-21T13:14:24.077Z",
27
+ "id": 1,
28
+ "is_admin": true,
29
+ "linkedin": "",
30
+ "name": "John Smith",
31
+ "skype": "",
32
+ "state": "active",
33
+ "twitter": "",
34
+ "username": "root",
35
+ "web_url": "http://gitlab.dev/u/root",
36
+ "website_url": ""
37
+ }
38
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "John Smith",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "created_at": "2016-01-11T10:13:33.506Z",
13
+ "download_url": null,
14
+ "finished_at": "2016-01-11T10:14:09.526Z",
15
+ "id": 69,
16
+ "name": "rubocop",
17
+ "ref": "master",
18
+ "runner": null,
19
+ "stage": "test",
20
+ "started_at": null,
21
+ "status": "canceled",
22
+ "tag": false,
23
+ "user": null
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "John Smith",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "download_url": null,
13
+ "id": 69,
14
+ "name": "rubocop",
15
+ "ref": "master",
16
+ "runner": null,
17
+ "stage": "test",
18
+ "created_at": "2016-01-11T10:13:33.506Z",
19
+ "started_at": "2016-01-11T10:13:33.506Z",
20
+ "finished_at": "2016-01-11T10:15:10.506Z",
21
+ "status": "failed",
22
+ "tag": false,
23
+ "user": null
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "commit": {
3
+ "author_email": "admin@example.com",
4
+ "author_name": "John Smith",
5
+ "created_at": "2015-12-24T16:51:14.000+01:00",
6
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
7
+ "message": "Test the CI integration.",
8
+ "short_id": "0ff3ae19",
9
+ "title": "Test the CI integration."
10
+ },
11
+ "coverage": null,
12
+ "created_at": "2016-01-11T10:13:33.506Z",
13
+ "download_url": null,
14
+ "finished_at": null,
15
+ "id": 69,
16
+ "name": "rubocop",
17
+ "ref": "master",
18
+ "runner": null,
19
+ "stage": "test",
20
+ "started_at": null,
21
+ "status": "pending",
22
+ "tag": false,
23
+ "user": null
24
+ }
@@ -0,0 +1,78 @@
1
+ [
2
+ {
3
+ "commit": {
4
+ "author_email": "admin@example.com",
5
+ "author_name": "Administrator",
6
+ "created_at": "2015-12-24T16:51:14.000+01:00",
7
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
8
+ "message": "Test the CI integration.",
9
+ "short_id": "0ff3ae19",
10
+ "title": "Test the CI integration."
11
+ },
12
+ "coverage": null,
13
+ "created_at": "2015-12-24T15:51:21.802Z",
14
+ "download_url": null,
15
+ "finished_at": "2015-12-24T17:54:27.895Z",
16
+ "id": 7,
17
+ "name": "teaspoon",
18
+ "ref": "master",
19
+ "runner": null,
20
+ "stage": "test",
21
+ "started_at": "2015-12-24T17:54:27.722Z",
22
+ "status": "failed",
23
+ "tag": false,
24
+ "user": {
25
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
26
+ "bio": null,
27
+ "created_at": "2015-12-21T13:14:24.077Z",
28
+ "id": 1,
29
+ "is_admin": true,
30
+ "linkedin": "",
31
+ "name": "Administrator",
32
+ "skype": "",
33
+ "state": "active",
34
+ "twitter": "",
35
+ "username": "root",
36
+ "web_url": "http://gitlab.dev/u/root",
37
+ "website_url": ""
38
+ }
39
+ },
40
+ {
41
+ "commit": {
42
+ "author_email": "admin@example.com",
43
+ "author_name": "Administrator",
44
+ "created_at": "2015-12-24T16:51:14.000+01:00",
45
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
46
+ "message": "Test the CI integration.",
47
+ "short_id": "0ff3ae19",
48
+ "title": "Test the CI integration."
49
+ },
50
+ "coverage": null,
51
+ "created_at": "2015-12-24T15:51:21.727Z",
52
+ "download_url": null,
53
+ "finished_at": "2015-12-24T17:54:24.921Z",
54
+ "id": 6,
55
+ "name": "spinach:other",
56
+ "ref": "master",
57
+ "runner": null,
58
+ "stage": "test",
59
+ "started_at": "2015-12-24T17:54:24.729Z",
60
+ "status": "failed",
61
+ "tag": false,
62
+ "user": {
63
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
64
+ "bio": null,
65
+ "created_at": "2015-12-21T13:14:24.077Z",
66
+ "id": 1,
67
+ "is_admin": true,
68
+ "linkedin": "",
69
+ "name": "Administrator",
70
+ "skype": "",
71
+ "state": "active",
72
+ "twitter": "",
73
+ "username": "root",
74
+ "web_url": "http://gitlab.dev/u/root",
75
+ "website_url": ""
76
+ }
77
+ }
78
+ ]
@@ -0,0 +1,64 @@
1
+ [
2
+ {
3
+ "commit": {
4
+ "author_email": "admin@example.com",
5
+ "author_name": "Administrator",
6
+ "created_at": "2015-12-24T16:51:14.000+01:00",
7
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
8
+ "message": "Test the CI integration.",
9
+ "short_id": "0ff3ae19",
10
+ "title": "Test the CI integration."
11
+ },
12
+ "coverage": null,
13
+ "created_at": "2016-01-11T10:13:33.506Z",
14
+ "download_url": null,
15
+ "finished_at": "2016-01-11T10:14:09.526Z",
16
+ "id": 69,
17
+ "name": "rubocop",
18
+ "ref": "master",
19
+ "runner": null,
20
+ "stage": "test",
21
+ "started_at": null,
22
+ "status": "canceled",
23
+ "tag": false,
24
+ "user": null
25
+ },
26
+ {
27
+ "commit": {
28
+ "author_email": "admin@example.com",
29
+ "author_name": "Administrator",
30
+ "created_at": "2015-12-24T16:51:14.000+01:00",
31
+ "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
32
+ "message": "Test the CI integration.",
33
+ "short_id": "0ff3ae19",
34
+ "title": "Test the CI integration."
35
+ },
36
+ "coverage": null,
37
+ "created_at": "2015-12-24T15:51:21.957Z",
38
+ "download_url": null,
39
+ "finished_at": "2015-12-24T17:54:33.913Z",
40
+ "id": 9,
41
+ "name": "brakeman",
42
+ "ref": "master",
43
+ "runner": null,
44
+ "stage": "test",
45
+ "started_at": "2015-12-24T17:54:33.727Z",
46
+ "status": "failed",
47
+ "tag": false,
48
+ "user": {
49
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
50
+ "bio": null,
51
+ "created_at": "2015-12-21T13:14:24.077Z",
52
+ "id": 1,
53
+ "is_admin": true,
54
+ "linkedin": "",
55
+ "name": "Administrator",
56
+ "skype": "",
57
+ "state": "active",
58
+ "twitter": "",
59
+ "username": "root",
60
+ "web_url": "http://gitlab.dev/u/root",
61
+ "website_url": ""
62
+ }
63
+ }
64
+ ]
@@ -0,0 +1 @@
1
+ {"message": "404 Project Not Found"}
@@ -0,0 +1 @@
1
+ {"id": 1, "project_id": 1, "created_at": "2016-05-25T20:27:15.545Z", "commit_message_regex": "\\b[A-Z]{3}-[0-9]+\\b", "deny_delete_tag": false}
@@ -0,0 +1 @@
1
+ {"id":42,"name":"Gitlab-Group","path":"gitlab-group","created_at":"2016-02-24T20:16:42.906Z","updated_at":"2016-02-24T20:16:42.906Z"}
@@ -0,0 +1 @@
1
+ {"id":2,"username":"jsmith","email":"jsmith@local.host","name":"John Smith","state":"active","created_at":"2013-09-04T18:15:30Z","access_level":50}
@@ -0,0 +1,44 @@
1
+ [
2
+ {
3
+ "id": 4,
4
+ "description": null,
5
+ "default_branch": "master",
6
+ "public": false,
7
+ "visibility_level": 0,
8
+ "ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
9
+ "http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
10
+ "web_url": "http://example.com/diaspora/diaspora-client",
11
+ "tag_list": [
12
+ "example",
13
+ "disapora client"
14
+ ],
15
+ "owner": {
16
+ "id": 3,
17
+ "name": "Diaspora",
18
+ "created_at": "2013-09-30T13: 46: 02Z"
19
+ },
20
+ "name": "Diaspora Client",
21
+ "name_with_namespace": "Diaspora / Diaspora Client",
22
+ "path": "diaspora-client",
23
+ "path_with_namespace": "diaspora/diaspora-client",
24
+ "issues_enabled": true,
25
+ "merge_requests_enabled": true,
26
+ "builds_enabled": true,
27
+ "wiki_enabled": true,
28
+ "snippets_enabled": false,
29
+ "created_at": "2013-09-30T13: 46: 02Z",
30
+ "last_activity_at": "2013-09-30T13: 46: 02Z",
31
+ "creator_id": 3,
32
+ "namespace": {
33
+ "created_at": "2013-09-30T13: 46: 02Z",
34
+ "description": "",
35
+ "id": 3,
36
+ "name": "Diaspora",
37
+ "owner_id": 1,
38
+ "path": "diaspora",
39
+ "updated_at": "2013-09-30T13: 46: 02Z"
40
+ },
41
+ "archived": false,
42
+ "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png"
43
+ }
44
+ ]
@@ -0,0 +1 @@
1
+ [{"id":"a2da7552f26d5b46a6a09bb8b7b066e3a102be7d","short_id":"a2da7552","title": "piyo","author_name":"example","author_email":"example@example.com","created_at":"2015-12-19T18:02:31.000+09:00","message":"fuga"},{"id":"3ce509590f37dbce5b877c3e1c78bd3903493170","short_id":"3ce50959","title":"hoge","author_name":"example","author_email":"example@example.com","created_at":"2015-12-19T17:53:46.000+09:00","message":"Hoge"}]
@@ -0,0 +1,7 @@
1
+ {
2
+ "active": true,
3
+ "description": "test-2016-02-01",
4
+ "id": 9,
5
+ "is_shared": false,
6
+ "name": null
7
+ }
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "active": true,
4
+ "description": "test-2-20150125",
5
+ "id": 8,
6
+ "is_shared": false,
7
+ "name": null
8
+ },
9
+ {
10
+ "active": true,
11
+ "description": "development_runner",
12
+ "id": 5,
13
+ "is_shared": true,
14
+ "name": null
15
+ }
16
+ ]
@@ -0,0 +1 @@
1
+ {"tag_name":"0.0.1","description":"Amazing release. Wow"}
@@ -0,0 +1 @@
1
+ {"tag_name":"0.0.1","description":"Amazing release. Wow"}
@@ -0,0 +1,26 @@
1
+ {
2
+ "active": true,
3
+ "architecture": null,
4
+ "description": "test-1-20150125",
5
+ "id": 6,
6
+ "is_shared": false,
7
+ "contacted_at": "2016-01-25T16:39:48.066Z",
8
+ "name": null,
9
+ "platform": null,
10
+ "projects": [
11
+ {
12
+ "id": 1,
13
+ "name": "GitLab Community Edition",
14
+ "name_with_namespace": "GitLab.org / GitLab Community Edition",
15
+ "path": "gitlab-ce",
16
+ "path_with_namespace": "gitlab-org/gitlab-ce"
17
+ }
18
+ ],
19
+ "token": "205086a8e3b9a2b818ffac9b89d102",
20
+ "revision": null,
21
+ "tag_list": [
22
+ "ruby",
23
+ "mysql"
24
+ ],
25
+ "version": null
26
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "active": true,
3
+ "description": "test-1-20150125-test",
4
+ "id": 6,
5
+ "is_shared": false,
6
+ "name": null
7
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "active": true,
3
+ "architecture": null,
4
+ "description": "abcefg",
5
+ "id": 6,
6
+ "is_shared": false,
7
+ "contacted_at": "2016-01-25T16:39:48.066Z",
8
+ "name": null,
9
+ "platform": null,
10
+ "projects": [
11
+ {
12
+ "id": 1,
13
+ "name": "GitLab Community Edition",
14
+ "name_with_namespace": "GitLab.org / GitLab Community Edition",
15
+ "path": "gitlab-ce",
16
+ "path_with_namespace": "gitlab-org/gitlab-ce"
17
+ }
18
+ ],
19
+ "token": "205086a8e3b9a2b818ffac9b89d102",
20
+ "revision": null,
21
+ "tag_list": [
22
+ "ruby",
23
+ "mysql"
24
+ ],
25
+ "version": null
26
+ }
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "active": true,
4
+ "description": "test-1-20150125",
5
+ "id": 6,
6
+ "is_shared": false,
7
+ "name": null
8
+ },
9
+ {
10
+ "active": true,
11
+ "description": "test-2-20150125",
12
+ "id": 8,
13
+ "is_shared": false,
14
+ "name": null
15
+ }
16
+ ]
@@ -0,0 +1,30 @@
1
+ [
2
+ {
3
+ "active": true,
4
+ "description": "shared-runner-1",
5
+ "id": 1,
6
+ "is_shared": true,
7
+ "name": null
8
+ },
9
+ {
10
+ "active": true,
11
+ "description": "shared-runner-2",
12
+ "id": 3,
13
+ "is_shared": true,
14
+ "name": null
15
+ },
16
+ {
17
+ "active": true,
18
+ "description": "test-1-20150125",
19
+ "id": 6,
20
+ "is_shared": false,
21
+ "name": null
22
+ },
23
+ {
24
+ "active": true,
25
+ "description": "test-2-20150125",
26
+ "id": 8,
27
+ "is_shared": false,
28
+ "name": null
29
+ }
30
+ ]