sonarqube 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/lib/sonarqube/client/groups.rb +10 -10
- data/lib/sonarqube/client/projects.rb +3 -4
- data/lib/sonarqube/client/users.rb +14 -14
- data/lib/sonarqube/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba2aa4fbcd9ee7798aa7b97b73469c91f8090dfe2de3157f167e2311c6e8a56e
|
4
|
+
data.tar.gz: 6bd2accd7888f5aa574e63a77ec7ea188db2936c6cfd36cbf12bdb6095a25429
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1a0fb6328cee65b598e7d633dc1dd3cfd11e313755e7b03fdce5946297d65bb09c498c7f3796b43fbad53cb8511c2d4284ff9b1d3a02e500524e3261b91c780
|
7
|
+
data.tar.gz: 2e6890ae9d74965df7dedc6978c5b7d736614b6a683fcc92bd5c109777a945c7d3682a8d4ca4be7c8c4cefd15a5cd98dc8087d31c489a8b7c633948c629b883b
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,16 @@
|
|
4
4
|
|
5
5
|
Please see: https://github.com/psyreactor/sonarqube-ruby/releases
|
6
6
|
|
7
|
+
### 1.0.1 (24/08/2020)
|
8
|
+
|
9
|
+
- Fix
|
10
|
+
* Fix YARD comments
|
7
11
|
|
8
12
|
### 1.0.0 (19/08/2020)
|
9
|
-
|
13
|
+
|
14
|
+
- New features
|
15
|
+
* Added support for users API
|
16
|
+
* Added support for user_groups API
|
17
|
+
* Added support for projects API
|
18
|
+
|
19
|
+
|
@@ -29,7 +29,7 @@ class Sonarqube::Client
|
|
29
29
|
# Sonarqube.create_group('new-group')
|
30
30
|
# Sonarqube.create_group('sonarqube', { description: 'New Sonarqube project' })
|
31
31
|
#
|
32
|
-
# @param [String] name(required) The name of a group.
|
32
|
+
# @param [String] name (required) The name of a group.
|
33
33
|
# @param [Hash] options A customizable set of options.
|
34
34
|
# @option options [String] :description Description for the new group. A group description cannot be larger than 200 characters.
|
35
35
|
# @return [Sonarqube::ObjectifiedHash] Information about created group.
|
@@ -44,7 +44,7 @@ class Sonarqube::Client
|
|
44
44
|
# @example
|
45
45
|
# Sonarqube.delete_group('projecto')
|
46
46
|
#
|
47
|
-
# @param [String] name(required) The name of a group
|
47
|
+
# @param [String] name (required) The name of a group
|
48
48
|
# @return [Sonarqube::ObjectifiedHash] Empty hash response.
|
49
49
|
def delete_group(name)
|
50
50
|
post('/api/user_groups/delete', body: { name: name })
|
@@ -57,7 +57,7 @@ class Sonarqube::Client
|
|
57
57
|
# Sonarqube.group_members('AXQRcKrW9pRiZzanEJ2E')
|
58
58
|
# Sonarqube.group_members('AXQRcKrW9pRiZzanEJ2E, { description: 'update group description })
|
59
59
|
#
|
60
|
-
# @param [String] id(required) The ID of a group.
|
60
|
+
# @param [String] id (required) The ID of a group.
|
61
61
|
# @param [Hash] options A customizable set of options.
|
62
62
|
# @option options [String] :description New optional description for the group. A group description cannot be larger than 200 characters. If value is not defined, then description is not changed.
|
63
63
|
# @option options [String] :name New optional name for the group. A group name cannot be larger than 255 characters and must be unique. Value 'anyone' (whatever the case) is reserved and cannot be used. If value is empty or not defined, then name is not changed.
|
@@ -73,8 +73,8 @@ class Sonarqube::Client
|
|
73
73
|
# Sonarqube.add_member('AXQRcKrW9pRiZzanEJ2E', 'test-user')
|
74
74
|
# Sonarqube.add_member('AXQRcKrW9pRiZzanEJ2E', 'test-user', {name: 'sonar-groups'})
|
75
75
|
#
|
76
|
-
# @param [String] id(required) The id of group.
|
77
|
-
# @param [String] login(required) The login of user.
|
76
|
+
# @param [String] id (required) The id of group.
|
77
|
+
# @param [String] login (required) The login of user.
|
78
78
|
# @param [Hash] options A customizable set of options.
|
79
79
|
# @option options [String] :name Optional name of group.
|
80
80
|
# @return [Sonarqube::ObjectifiedHash]
|
@@ -85,14 +85,14 @@ class Sonarqube::Client
|
|
85
85
|
end
|
86
86
|
alias member_add add_member
|
87
87
|
|
88
|
-
#
|
88
|
+
# Remove a user to a group.
|
89
89
|
#
|
90
90
|
# @example
|
91
91
|
# Sonarqube.remove_member('AXQRcKrW9pRiZzanEJ2E', 'test-user')
|
92
92
|
# Sonarqube.remove_member('AXQRcKrW9pRiZzanEJ2E', 'test-user', {name: 'sonar-groups'})
|
93
93
|
#
|
94
|
-
# @param [String] id(required) The id of group.
|
95
|
-
# @param [String] login(required) The login of user.
|
94
|
+
# @param [String] id (required) The id of group.
|
95
|
+
# @param [String] login (required) The login of user.
|
96
96
|
# @param [Hash] options A customizable set of options.
|
97
97
|
# @option options [String] :name Optional name of group.
|
98
98
|
# @return [Sonarqube::ObjectifiedHash]
|
@@ -110,8 +110,8 @@ class Sonarqube::Client
|
|
110
110
|
# Sonarqube.list_members({name: 'sonar-groups'})
|
111
111
|
#
|
112
112
|
# @param [Hash] options A customizable set of options.
|
113
|
-
# @option options [String] :name(required) Name of group.
|
114
|
-
# @option options [String] :id(required) Id of group.
|
113
|
+
# @option options [String] :name (required) Name of group.
|
114
|
+
# @option options [String] :id (required) Id of group.
|
115
115
|
# @return [Sonarqube::ObjectifiedHash] Information about added team member.
|
116
116
|
def list_members(options = {})
|
117
117
|
raise ArgumentError, 'Missing required parameters' if options[:id].nil? && options[:name].nil?
|
@@ -55,7 +55,7 @@ class Sonarqube::Client
|
|
55
55
|
end
|
56
56
|
|
57
57
|
alias project_delete delete_project
|
58
|
-
#
|
58
|
+
# Update project key.
|
59
59
|
#
|
60
60
|
# @example
|
61
61
|
# Sonarqube.project_update_key(42)
|
@@ -69,11 +69,10 @@ class Sonarqube::Client
|
|
69
69
|
end
|
70
70
|
|
71
71
|
alias update_key_project project_update_key
|
72
|
-
#
|
72
|
+
# Update project visibility.
|
73
73
|
#
|
74
74
|
# @example
|
75
|
-
#
|
76
|
-
# Sonarqube.project_hook('sonarqube', 5)
|
75
|
+
# project_update_visibility('sonarqube', 'public')
|
77
76
|
#
|
78
77
|
# @param [String] project The name fo project.
|
79
78
|
# @param [String] visibility The visibility of a project.
|
@@ -29,9 +29,9 @@ class Sonarqube::Client
|
|
29
29
|
# or
|
30
30
|
# Sonarqube.create_user('joe', 'joe', 'secret')
|
31
31
|
#
|
32
|
-
# @param [String] name(required) The name of a user.
|
33
|
-
# @param [String] login(required) The login of a user.
|
34
|
-
# @param [String] password(required only is local user) The password of a user.
|
32
|
+
# @param [String] name (required) The name of a user.
|
33
|
+
# @param [String] login (required) The login of a user.
|
34
|
+
# @param [String] password (required only is local user) The password of a user.
|
35
35
|
# @param [Hash] options A customizable set of options.
|
36
36
|
# @option options [String] :email The emails of a user.
|
37
37
|
# @option options [String] :local Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false.
|
@@ -50,7 +50,7 @@ class Sonarqube::Client
|
|
50
50
|
# @example
|
51
51
|
# Sonarqube.update_user('joe', { email: 'joe.smith@foo.org', name: 'Joe' })
|
52
52
|
#
|
53
|
-
# @param [String] login(required) The login of a user
|
53
|
+
# @param [String] login (required) The login of a user
|
54
54
|
# @param [Hash] options A customizable set of options.
|
55
55
|
# @option options [String] :email The email of a user.
|
56
56
|
# @option options [String] :name The name of a user.
|
@@ -65,9 +65,9 @@ class Sonarqube::Client
|
|
65
65
|
# Blocks the specified user. Available only for admin.
|
66
66
|
#
|
67
67
|
# @example
|
68
|
-
# Sonarqube.
|
68
|
+
# Sonarqube.deactivate_user('login')
|
69
69
|
#
|
70
|
-
# @param [String] login(required) The login of a user
|
70
|
+
# @param [String] login (required) The login of a user
|
71
71
|
# @param [Hash] options A customizable set of options.
|
72
72
|
def deactivate_user(login, options = {})
|
73
73
|
post('/api/users/deactivate', body: { login: login }.merge!(options))
|
@@ -80,9 +80,9 @@ class Sonarqube::Client
|
|
80
80
|
# Sonarqube.change_password_user('joe', 'password')
|
81
81
|
# Sonarqube.change_password_user('admin', 'password', admin)
|
82
82
|
#
|
83
|
-
# @param [String] login(required) The login of a user
|
84
|
-
# @param [String] password(required) New password for login
|
85
|
-
# @param [String] old_password(optional) Previous password. Required when changing one's own password.
|
83
|
+
# @param [String] login (required) The login of a user
|
84
|
+
# @param [String] password (required) New password for login
|
85
|
+
# @param [String] old_password (optional) Previous password. Required when changing one's own password.
|
86
86
|
# @param [Hash] options A customizable set of options.
|
87
87
|
def change_password_user(login, password, old_password = nil, options = {})
|
88
88
|
body = { login: login, password: password }
|
@@ -91,13 +91,13 @@ class Sonarqube::Client
|
|
91
91
|
end
|
92
92
|
|
93
93
|
alias user_change_password change_password_user
|
94
|
-
#
|
94
|
+
# Update login user.
|
95
95
|
#
|
96
96
|
# @example
|
97
|
-
# Sonarqube.
|
97
|
+
# Sonarqube.update_login_user('test', 'new_test')
|
98
98
|
#
|
99
|
-
# @param [String] login(required) The login of a user
|
100
|
-
# @param [String] new_login(required) The new login of a user
|
99
|
+
# @param [String] login (required) The login of a user
|
100
|
+
# @param [String] new_login (required) The new login of a user
|
101
101
|
# @param [Hash] options A customizable set of options.
|
102
102
|
# @return [Sonarqube::ObjectifiedHash]
|
103
103
|
def update_login_user(login, new_login, options = {})
|
@@ -108,7 +108,7 @@ class Sonarqube::Client
|
|
108
108
|
# Lists the groups a user belongs to.
|
109
109
|
#
|
110
110
|
# @example
|
111
|
-
# Sonarqube.group_user
|
111
|
+
# Sonarqube.group_user('login')
|
112
112
|
#
|
113
113
|
# @param [String] login A customizable set of options.
|
114
114
|
# @param [Hash] options A customizable set of options.
|
data/lib/sonarqube/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sonarqube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mariani Lucas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|