teamdrive_api 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5628c9b99ba6df0495720948e1ac9a9198f5f99e
4
- data.tar.gz: d23f9caa6f5a17f305660a33f7b65b06fa0fd174
3
+ metadata.gz: 5902b38ba32c886b739e8ef4ff04d7391339fd04
4
+ data.tar.gz: 2fdd61e169a1dbe061257899a408308b2d9552ed
5
5
  SHA512:
6
- metadata.gz: 495b0289cc4bb3f28a0f5b857c0d18f99b931e16f0bdd5926e82e0b9f65ce08a43d66e01aaccf8edcec0cb901de38204d08eda468c8dcb7b25471caaf2a85e55
7
- data.tar.gz: c6668c0a33fcfbc3bc88eb97099c4895118692b7c653bb61f9732ce869a2fe022a2dec0a4eb2e6076d4a5ab69d347d4dcfbd84fdf89029de007bd138b4fc820a
6
+ metadata.gz: feef0512be72b9a388d3eae0c6b74945e80b19ebde973dfe8337345cbf396e0cdc5d1bfb85154a03751febfbccc9fcfec64831a3fa2f447946061c0e2a2241d6
7
+ data.tar.gz: c4790b975de7a5be8326a42387c53d2473a6940cbfbc5115175cb70d27005dae6c4eda02a16bdd6f3d888cd9b70bdaa8585adfce62bde60ef83960c955f69cfb
@@ -164,18 +164,23 @@ module TeamdriveApi
164
164
 
165
165
  # Remove user (added in RegServ API v1.0.003)
166
166
  #
167
- # @param [String] username User to be deleted
168
- # @param [Boolean] delete_license delete the user's license aswell
169
- # @param [Boolean] delete_depot delete the user's depot (data) aswell
170
- # @param [String] distributor Distributor. Only used if allowed by the API
171
- # (see +APIAllowSettingDistributor+ in the Teamdrive Register docs).
167
+ # @param username [String] User to be deleted
168
+ # @param [Hash] opts Options
169
+ # @option opts [Boolean] :deletelicense Remove the users licenses aswell.
170
+ # -- Default: +false+
171
+ # @option opts [Boolean] :deletedepot Remove the users depot (data) aswell.
172
+ # -- Default: +false+
173
+ # @option opts [String] :distributor Distributor. Only used if allowed by
174
+ # the API (see +APIAllowSettingDistributor+ in the TD Register docs).
175
+ # -- Default: +nil+
172
176
  # @return [Boolean] success?
173
- def remove_user(username:, delete_license: false, delete_depot: false, distributor: nil)
174
- res = send_request :removeuser,
175
- username: username,
176
- deletelicense: delete_license,
177
- deletedepot: delete_depot,
178
- distributor: distributor
177
+ def remove_user(username, opts = {})
178
+ opts = {
179
+ username: username,
180
+ deletelicense: false,
181
+ deletedepot: false
182
+ }.merge(opts)
183
+ res = send_request :removeuser, opts
179
184
 
180
185
  res[:intresult].eql?('0')
181
186
  end
@@ -1,4 +1,4 @@
1
1
  # :nodoc:
2
2
  module TeamdriveApi
3
- VERSION = '0.3.4'
3
+ VERSION = '0.3.5'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamdrive_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Hutter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-29 00:00:00.000000000 Z
11
+ date: 2015-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty