Merge pull request #9 from psyreactor/develop
Fix groups parameter validation
This commit is contained in:
commit
85f07d2ec6
|
@ -4,6 +4,11 @@
|
|||
|
||||
Please see: https://github.com/psyreactor/sonarqube-ruby/releases
|
||||
|
||||
### 1.2.1 (08/09/2020)
|
||||
|
||||
- Fix
|
||||
* Fix groups parameter validation
|
||||
|
||||
### 1.2.0 (03/09/2020)
|
||||
|
||||
- New features
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
[documentation](https://www.rubydoc.info/gems/sonarqube/frames)
|
||||
|
||||
Sonarqube is a Ruby wrapper and CLI for the Sonarqube API
|
||||
As of version `1.2.0` this gem only supports Sonarqube 7.9.
|
||||
As of version `1.2.1` this gem only supports Sonarqube 7.9.
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ group = Sonarqube.add_member('AXQRcKrW9pRiZzanEJ2E', 'test-user')
|
|||
# => #<Sonarqube::ObjectifiedHash:46220 {hash: {}}
|
||||
group.to_hash.empty?
|
||||
# => true
|
||||
group = Sonarqube.add_member('AXQRcKrW9pRiZzanEJ2E', 'test-user', {name: 'sonar-groups'})
|
||||
group = Sonarqube.add_member(nil, 'test-user', {name: 'sonar-groups'})
|
||||
# => #<Sonarqube::ObjectifiedHash:46220 {hash: {}}
|
||||
group.to_hash.empty?
|
||||
# => true
|
||||
|
|
|
@ -79,7 +79,7 @@ class Sonarqube::Client
|
|||
# @option options [String] :name Optional name of group.
|
||||
# @return [Sonarqube::ObjectifiedHash]
|
||||
def add_member(id = nil, login = nil, options = {})
|
||||
raise ArgumentError, 'Missing required parameters' if id.nil? || login.nil?
|
||||
raise ArgumentError, 'Missing required parameters' if id.nil? && login.nil?
|
||||
|
||||
post('/api/user_groups/add_user', body: { id: id, login: login }.merge!(options))
|
||||
end
|
||||
|
@ -97,7 +97,7 @@ class Sonarqube::Client
|
|||
# @option options [String] :name Optional name of group.
|
||||
# @return [Sonarqube::ObjectifiedHash]
|
||||
def remove_member(id = nil, login = nil, options = {})
|
||||
raise ArgumentError, 'Missing required parameters' if id.nil? || login.nil?
|
||||
raise ArgumentError, 'Missing required parameters' if id.nil? && login.nil?
|
||||
|
||||
post('/api/user_groups/remove_user', body: { id: id, login: login }.merge!(options))
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Sonarqube
|
||||
VERSION = '1.2.0'
|
||||
VERSION = '1.2.1'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue