rocketchat 0.1.13 → 0.1.14

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: e09d8e7433b161f2eb8e4e0c6ce3d8b87a22e847
4
- data.tar.gz: 7a7923ec50a526e4311e7279b613c0c685a606e8
3
+ metadata.gz: 3a4260fbfa0f01e1d9f1fd9e8341affcd48404c4
4
+ data.tar.gz: 65a3681a1f94a249399c8c720f7c4e20cce41288
5
5
  SHA512:
6
- metadata.gz: 399591e7a351f07d6a71f5aa17bdd858a9d332dac20fd2531c3ee29a3d056be84ce0c08b0541fec6008b2765ba61bdb49822079609c67d4c53c1ce43ba486cbb
7
- data.tar.gz: be8cdd10af5faa415ac9f0427bbdcdc384bf78e4968e4a1c1149750e40e53409a031cc53c2fe9311bea568052728dce2e8555b4038e66504d2f94c2485312be6
6
+ metadata.gz: 5cfa92adcb979b85873c050e6e2ba5a0aace501f4143493a2eaa8c11d265ef812e038a5a5891f0812c23ee85f8c6cb758960ed59f603f058b621e4d76a3ba166
7
+ data.tar.gz: 4dca501b337c776b98adc9166f91876c802faae13bc34d3ce38062dac452fce682571070c2b146c9bb35d63d8966daeb48b16e07fd6a2f87a5deac38ea862a1f
@@ -1,3 +1,3 @@
1
1
  module RocketChat
2
- VERSION = '0.1.13'.freeze
2
+ VERSION = '0.1.14'.freeze
3
3
  end
@@ -184,6 +184,24 @@ module RocketChat
184
184
  )['success']
185
185
  end
186
186
 
187
+ #
188
+ # *.kick REST API
189
+ # @param [String] room_id Rocket.Chat room id
190
+ # @param [String] name Rocket.Chat room name (coming soon)
191
+ # @param [String] user_id Rocket.Chat user id
192
+ # @param [String] username Rocket.Chat username
193
+ # @return [Boolean]
194
+ # @raise [HTTPError, StatusError]
195
+ #
196
+ def kick(room_id: nil, name: nil, user_id: nil, username: nil)
197
+ session.request_json(
198
+ self.class.api_path('kick'),
199
+ method: :post,
200
+ body: room_params(room_id, name)
201
+ .merge(user_params(user_id, username))
202
+ )['success']
203
+ end
204
+
187
205
  #
188
206
  # *.archive REST API
189
207
  # @param [String] room_id Rocket.Chat room id
@@ -26,7 +26,7 @@ module RocketChat
26
26
  # Last login
27
27
  def last_login
28
28
  DateTime.parse data['lastLogin']
29
- rescue
29
+ rescue ArgumentError, TypeError
30
30
  nil
31
31
  end
32
32
 
@@ -1,5 +1,3 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
 
@@ -25,5 +23,5 @@ Gem::Specification.new do |spec|
25
23
  spec.add_development_dependency 'rspec', '~> 3.0'
26
24
  spec.add_development_dependency 'webmock', '~> 2.3'
27
25
  spec.add_development_dependency 'yard', '~> 0.8.7.6'
28
- spec.add_development_dependency 'rubocop', '~> 0.48.1'
26
+ spec.add_development_dependency 'rubocop', '~> 0.50'
29
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocketchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - int512
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-08 00:00:00.000000000 Z
12
+ date: 2017-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -87,14 +87,14 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: 0.48.1
90
+ version: '0.50'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: 0.48.1
97
+ version: '0.50'
98
98
  description: Rocket.Chat REST API v1 for Ruby
99
99
  email:
100
100
  - github@int512.net
@@ -155,8 +155,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.6.12
158
+ rubygems_version: 2.6.13
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Rocket.Chat REST API v1 for Ruby
162
162
  test_files: []
163
+ has_rdoc: