rocketchat 0.2.7 → 0.4.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: 6381a9d0b83538738b9f7f30c513f091120658bdb96659ceac197ceb546a1871
4
- data.tar.gz: fd3238eeeedba95878904ff800b2dd8650c06810c0463973437d6b0170360fd2
3
+ metadata.gz: fe29d26834d9ccf44734030bc740626b5a113221bdfd7d79d54ed3dcefc63cca
4
+ data.tar.gz: 43bf57b703dbc41fad0e22f9c04a3e45fcb770c22df0ff58e36704765e6337d6
5
5
  SHA512:
6
- metadata.gz: ef06653df66b2fa246206ad4f7bfa1a44047f2d180f05fd58dd1355b7ec6e46948ad42e31a50466b5ee4f076a5fe387b0174988152252aa5e078236d2abc3c92
7
- data.tar.gz: 716836121e65f927a02b0466023deecb2df798a440985a8b0155f2ee6ad45e9d04905e804eabcfc4b9f704465cec7dcc4806bc3de1c2fa9b9a632fe5f2515829
6
+ metadata.gz: b663a156c528de0be19ef5767c0e20c74883616caac4d08c102f18205ee7813bcc3fc4058eaeb420e2b073e85a1479c98d7ce4f42e0202d71106869f3eb9c1e0
7
+ data.tar.gz: 51bd6b5daf166754b9366adb97c5487b176594097d61a2239d324fb4fc7da5be2985148a4505b25bca83e5450db94e2562dfa6bf29344aea0e4a3dfc29f0fd92
@@ -14,7 +14,7 @@ jobs:
14
14
  runs-on: ubuntu-latest
15
15
  strategy:
16
16
  matrix:
17
- ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
17
+ ruby-version: ['3.2', '3.3', '3.4', '4.0']
18
18
 
19
19
  steps:
20
20
  - uses: actions/checkout@v4
@@ -30,6 +30,3 @@ jobs:
30
30
 
31
31
  - name: Run tests
32
32
  run: bundle exec rspec
33
-
34
- - name: Test & publish code coverage
35
- uses: paambaati/codeclimate-action@v3.0.0
data/.rubocop.yml CHANGED
@@ -1,11 +1,11 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-performance
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
5
5
 
6
6
  AllCops:
7
7
  NewCops: enable
8
- TargetRubyVersion: 3.0
8
+ TargetRubyVersion: 3.2
9
9
 
10
10
  Layout/EmptyLinesAroundAttributeAccessor:
11
11
  Enabled: true
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  ## Unreleased
4
4
  - None
5
5
 
6
+ ## [0.4.1](releases/tag/v0.4.1) - 2026-04-16
7
+ ### Added
8
+ - [#52] Add Ruby 4.0 support ([@abrom][])
9
+
10
+ ## [0.3.1](releases/tag/v0.3.1) - 2025-03-13
11
+ ### Fixed
12
+ - [#51] Fix deprecation in User#info fetching of user room ([@abrom][])
13
+
6
14
  ## [0.2.7](releases/tag/v0.2.7) - 2025-02-07
7
15
  ### Fixed
8
16
  - [#50] Fix bug in group/channel online API where ID usage broken ([@abrom][])
data/Gemfile CHANGED
@@ -5,13 +5,11 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in rocketchat.gemspec
6
6
  gemspec
7
7
 
8
- gem 'bundler', ['>= 1.11', '< 3.0']
9
8
  gem 'rake', '>= 12.3.3'
10
9
  gem 'rspec', '~> 3.0'
11
10
  gem 'rubocop', '~> 1.70'
12
11
  gem 'rubocop-performance', '~> 1.23'
13
12
  gem 'rubocop-rake', '~> 0.6'
14
13
  gem 'rubocop-rspec', '~> 3.3'
15
- gem 'simplecov', '~> 0.22'
16
14
  gem 'webmock', '~> 3.24'
17
15
  gem 'yard', '~> 0.9.11'
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
1
  [![Travis Build Status](http://img.shields.io/travis/abrom/rocketchat-ruby.svg?style=flat)](https://travis-ci.org/abrom/rocketchat-ruby)
2
- [![Maintainability](https://api.codeclimate.com/v1/badges/9de85764122a44a14c22/maintainability)](https://codeclimate.com/github/abrom/rocketchat-ruby/maintainability)
3
- [![Test Coverage](https://api.codeclimate.com/v1/badges/9de85764122a44a14c22/test_coverage)](https://codeclimate.com/github/abrom/rocketchat-ruby/test_coverage)
4
2
  [![Gem Version](http://img.shields.io/gem/v/rocketchat.svg?style=flat)](#)
5
3
 
6
4
  # Rocket.Chat REST API for Ruby
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RocketChat
4
- VERSION = '0.2.7'
4
+ VERSION = '0.4.1'
5
5
  end
@@ -64,8 +64,8 @@ module RocketChat
64
64
  '/api/v1/chat.postMessage',
65
65
  method: :post,
66
66
  body: room_params(room_id, name)
67
- .merge(channel: channel)
68
- .merge(Util.slice_hash(params, :text, :alias, :tmid, :emoji, :avatar, :attachments))
67
+ .merge(channel: channel)
68
+ .merge(Util.slice_hash(params, :text, :alias, :tmid, :emoji, :avatar, :attachments))
69
69
  )
70
70
  RocketChat::Message.new response['message'] if response['success']
71
71
  end
@@ -20,7 +20,7 @@ module RocketChat
20
20
  self.class.api_path('addLeader'),
21
21
  method: :post,
22
22
  body: room_params(room_id, name)
23
- .merge(user_params(user_id, username))
23
+ .merge(user_params(user_id, username))
24
24
  )['success']
25
25
  end
26
26
 
@@ -36,7 +36,7 @@ module RocketChat
36
36
  self.class.api_path('removeLeader'),
37
37
  method: :post,
38
38
  body: room_params(room_id, name)
39
- .merge(user_params(user_id, username))
39
+ .merge(user_params(user_id, username))
40
40
  )['success']
41
41
  end
42
42
 
@@ -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']
@@ -79,7 +79,7 @@ module RocketChat
79
79
  self.class.api_path('addAll'),
80
80
  method: :post,
81
81
  body: room_params(room_id, name)
82
- .merge(activeUsersOnly: active_users_only)
82
+ .merge(activeUsersOnly: active_users_only)
83
83
  )['success']
84
84
  end
85
85
 
@@ -97,7 +97,7 @@ module RocketChat
97
97
  self.class.api_path('addOwner'),
98
98
  method: :post,
99
99
  body: room_params(room_id, name)
100
- .merge(user_params(user_id, username))
100
+ .merge(user_params(user_id, username))
101
101
  )['success']
102
102
  end
103
103
 
@@ -115,7 +115,7 @@ module RocketChat
115
115
  self.class.api_path('removeOwner'),
116
116
  method: :post,
117
117
  body: room_params(room_id, name)
118
- .merge(user_params(user_id, username))
118
+ .merge(user_params(user_id, username))
119
119
  )['success']
120
120
  end
121
121
 
@@ -133,7 +133,7 @@ module RocketChat
133
133
  self.class.api_path('addModerator'),
134
134
  method: :post,
135
135
  body: room_params(room_id, name)
136
- .merge(user_params(user_id, username))
136
+ .merge(user_params(user_id, username))
137
137
  )['success']
138
138
  end
139
139
 
@@ -151,7 +151,7 @@ module RocketChat
151
151
  self.class.api_path('removeModerator'),
152
152
  method: :post,
153
153
  body: room_params(room_id, name)
154
- .merge(user_params(user_id, username))
154
+ .merge(user_params(user_id, username))
155
155
  )['success']
156
156
  end
157
157
 
@@ -186,7 +186,7 @@ module RocketChat
186
186
  self.class.api_path('invite'),
187
187
  method: :post,
188
188
  body: room_params(room_id, name)
189
- .merge(user_params(user_id, username))
189
+ .merge(user_params(user_id, username))
190
190
  )['success']
191
191
  end
192
192
 
@@ -204,7 +204,7 @@ module RocketChat
204
204
  self.class.api_path('kick'),
205
205
  method: :post,
206
206
  body: room_params(room_id, name)
207
- .merge(user_params(user_id, username))
207
+ .merge(user_params(user_id, username))
208
208
  )['success']
209
209
  end
210
210
 
@@ -283,7 +283,7 @@ module RocketChat
283
283
  self.class.api_path(Util.camelize("set_#{attribute}")),
284
284
  method: :post,
285
285
  body: room_params(room_id, name)
286
- .merge(Util.camelize(attribute) => value)
286
+ .merge(Util.camelize(attribute) => value)
287
287
  )['success']
288
288
  end
289
289
 
@@ -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
 
data/rocketchat.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.description = 'Rocket.Chat REST API v1 for Ruby'
16
16
  spec.homepage = 'https://github.com/abrom/rocketchat-ruby'
17
17
  spec.license = 'MIT'
18
- spec.required_ruby_version = ['>= 3.0.0', '< 3.5.0']
18
+ spec.required_ruby_version = ['>= 3.2.0', '< 4.1.0']
19
19
 
20
20
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
21
21
  # delete this section to allow pushing this gem to any host.
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.7
4
+ version: 0.4.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-02-07 00:00:00.000000000 Z
12
+ date: 2026-04-16 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Rocket.Chat REST API v1 for Ruby
15
15
  email:
@@ -68,17 +68,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: 3.0.0
71
+ version: 3.2.0
72
72
  - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: 3.5.0
74
+ version: 4.1.0
75
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubygems_version: 3.3.7
81
+ rubygems_version: 3.4.1
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Rocket.Chat REST API v1 for Ruby