rocketchat 0.2.6 → 0.3.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58be912aa49c26e7bcdeb16dccf49ac37f6ebf10a0cdf3995b5c17b06dd65150
4
- data.tar.gz: 1a4bc850d191c64aec79fd1813de95217fd5c044a1e2e60a53caad1841846bd6
3
+ metadata.gz: c9ddbff6f51e70e6f67a63f5b8bb41536370246bdd33e91d823ba9e96087ae41
4
+ data.tar.gz: 0d1d899df0c5a512ca112d6edb5ff57a94ea29728f1acef769da23d4418a9b2a
5
5
  SHA512:
6
- metadata.gz: 12dd37e92876acb63ecd1340b93ffca32affd98cdd393a91cdfd53f67e011abf41b1c861153ef2aa8fe64315c6cdd61425a67ce4342dbd94e84a321acb6dd57e
7
- data.tar.gz: c966913e698f77264fdf14c631a0cf946244378354edc6dae10c54ccd02e40873e51cc6804a864da633434907adbda9ec045dc9c435395f4500c0b16bba45475
6
+ metadata.gz: 1b74baab88848f994b328ba2464b192c4d9d85fb7d1e29efad213312acb4d3e4560dc6f03032a0393995945737c380395924086f96dbe8820c7d13aac522b7c5
7
+ data.tar.gz: 9a7ddcb97b587b1bc31d79d14032268b3af29ea03fc3236fc65d3efe9a1d27180591146ff2f00b278af7830c853695c8718fd2d67fd922120e47af58b9e07307
@@ -1,5 +1,8 @@
1
1
  name: Test RocketChat Ruby gem
2
2
 
3
+ env:
4
+ CC_TEST_REPORTER_ID: abf0a371ff8851f13b563671914b195bb46f0997f0f93142e666d9acad08e22f
5
+
3
6
  on:
4
7
  push:
5
8
  branches: [main]
@@ -30,5 +33,3 @@ jobs:
30
33
 
31
34
  - name: Test & publish code coverage
32
35
  uses: paambaati/codeclimate-action@v3.0.0
33
- env:
34
- CC_TEST_REPORTER_ID: abf0a371ff8851f13b563671914b195bb46f0997f0f93142e666d9acad08e22f
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-performance
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  ## Unreleased
4
4
  - None
5
5
 
6
+ ## [0.3.1](releases/tag/v0.3.1) - 2025-03-13
7
+ ### Fixed
8
+ - [#51] Fix deprecation in User#info fetching of user room ([@abrom][])
9
+
10
+ ## [0.2.7](releases/tag/v0.2.7) - 2025-02-07
11
+ ### Fixed
12
+ - [#50] Fix bug in group/channel online API where ID usage broken ([@abrom][])
13
+
6
14
  ## [0.2.6](releases/tag/v0.2.6) - 2025-01-14
7
15
  ### Added
8
16
  - [#49] Add Ruby 3.4 support ([@abrom][])
@@ -63,7 +71,7 @@
63
71
  ### Deprecation
64
72
  - Drop Ruby 2.1 from build matrix ([@abrom][])
65
73
 
66
- ## [0.1.16](releases/tag/v0.1.16) - 2018-10-3
74
+ ## [0.1.16](releases/tag/v0.1.16) - 2018-10-03
67
75
  ### Deprecation
68
76
  - Drop Ruby 2.0 from build matrix ([@abrom][])
69
77
 
@@ -75,11 +83,11 @@
75
83
  ### Fixed
76
84
  - Updated yard to resolve potential security vulnerability ([@abrom][])
77
85
 
78
- ## [0.1.14](releases/tag/v0.1.14) - 2017-10-9
86
+ ## [0.1.14](releases/tag/v0.1.14) - 2017-10-09
79
87
  ### Added
80
88
  - [#19] Room/channel kick function ([@hardik127][])
81
89
 
82
- ## [0.1.13](releases/tag/v0.1.13) - 2017-10-9
90
+ ## [0.1.13](releases/tag/v0.1.13) - 2017-10-09
83
91
  ### Added
84
92
  - Support for channel/group addAll endpoint ([@abrom][])
85
93
 
@@ -115,12 +123,12 @@
115
123
  ### Added
116
124
  - [#8] Various channel/group (room) API support ([@reist][],[@danischreiber][])
117
125
 
118
- ## [0.1.5](releases/tag/v0.1.5) - 2017-07-9
126
+ ## [0.1.5](releases/tag/v0.1.5) - 2017-07-09
119
127
  ### Added
120
128
  - [#6] User createToken and resetAvatar endpoints ([@reist][])
121
129
  - [#7] Support for debugging server calls ([@reist][])
122
130
 
123
- ## [0.1.4](releases/tag/v0.1.4) - 2017-07-9
131
+ ## [0.1.4](releases/tag/v0.1.4) - 2017-07-09
124
132
  ### Fixed
125
133
  - Fixed a missing dependency issue with `uri` ([@abrom][])
126
134
 
@@ -128,7 +136,7 @@
128
136
  ### Added
129
137
  - [#3] Initial support for 'Room' endpoints ([@reist][])
130
138
 
131
- ## [0.1.1](releases/tag/v0.1.1) - 2017-05-1
139
+ ## [0.1.1](releases/tag/v0.1.1) - 2017-05-01
132
140
  ### Added
133
141
  - Support for settings get/set endpoints ([@abrom][])
134
142
 
data/Gemfile CHANGED
@@ -12,6 +12,6 @@ gem 'rubocop', '~> 1.70'
12
12
  gem 'rubocop-performance', '~> 1.23'
13
13
  gem 'rubocop-rake', '~> 0.6'
14
14
  gem 'rubocop-rspec', '~> 3.3'
15
- gem 'simplecov', '~> 0.16', '< 0.18'
15
+ gem 'simplecov', '~> 0.22'
16
16
  gem 'webmock', '~> 3.24'
17
17
  gem 'yard', '~> 0.9.11'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RocketChat
4
- VERSION = '0.2.6'
4
+ VERSION = '0.3.1'
5
5
  end
@@ -54,7 +54,7 @@ module RocketChat
54
54
  def online(room_id: nil, name: nil)
55
55
  response = session.request_json(
56
56
  '/api/v1/channels.online',
57
- body: { query: room_query_params(room_id, name) }
57
+ body: room_query_params(room_id, name)
58
58
  )
59
59
 
60
60
  response['online'].map { |hash| RocketChat::User.new hash } if response['success']
@@ -48,10 +48,10 @@ module RocketChat
48
48
  # @return [Room[]]
49
49
  # @raise [HTTPError, StatusError]
50
50
  #
51
- def list(offset: nil, count: nil, sort: nil, fields: nil, query: nil)
51
+ def list(offset: nil, count: nil, sort: nil, fields: nil)
52
52
  response = session.request_json(
53
53
  '/api/v1/groups.list',
54
- body: build_list_body(offset, count, sort, fields, query)
54
+ body: build_list_body(offset, count, sort, fields)
55
55
  )
56
56
 
57
57
  response['groups'].map { |hash| RocketChat::Room.new hash } if response['success']
@@ -85,7 +85,7 @@ module RocketChat
85
85
  def online(room_id: nil, name: nil)
86
86
  response = session.request_json(
87
87
  '/api/v1/groups.online',
88
- body: { query: room_query_params(room_id, name) }
88
+ body: room_query_params(room_id, name)
89
89
  )
90
90
 
91
91
  response['online'].map { |hash| RocketChat::User.new hash } if response['success']
@@ -341,8 +341,9 @@ module RocketChat
341
341
  end
342
342
 
343
343
  def validate_attribute(attribute)
344
- raise ArgumentError, "Unsettable attribute: #{attribute || 'nil'}" unless \
345
- self.class.settable_attributes.include?(attribute)
344
+ return if self.class.settable_attributes.include?(attribute)
345
+
346
+ raise ArgumentError, "Unsettable attribute: #{attribute || 'nil'}"
346
347
  end
347
348
 
348
349
  def file_upload_array(**params)
@@ -20,10 +20,10 @@ module RocketChat
20
20
  if id
21
21
  { _id: id }
22
22
  elsif name
23
- { name: name }
23
+ { query: { name: name }.to_json }
24
24
  else
25
25
  {}
26
- end.to_json
26
+ end
27
27
  end
28
28
  end
29
29
  end
@@ -122,8 +122,7 @@ module RocketChat
122
122
  def info(user_id: nil, username: nil, include_rooms: false)
123
123
  response = session.request_json(
124
124
  '/api/v1/users.info',
125
- body: user_params(user_id, username)
126
- .merge(include_rooms ? { fields: { userRooms: 1 }.to_json } : {}),
125
+ body: user_params(user_id, username).merge(include_rooms ? { includeUserRooms: true } : {}),
127
126
  upstreamed_errors: ['error-invalid-user']
128
127
  )
129
128
 
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.2.6
4
+ version: 0.3.1
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: 2025-01-13 00:00:00.000000000 Z
12
+ date: 2025-03-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Rocket.Chat REST API v1 for Ruby
15
15
  email: