rocketchat 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +34 -0
- data/CHANGELOG.md +4 -0
- data/lib/rocket_chat/gem_version.rb +1 -1
- data/lib/rocket_chat/messages/channel.rb +3 -1
- data/lib/rocket_chat/messages/group.rb +3 -1
- data/lib/rocket_chat/messages/room_support.rb +10 -0
- data/rocketchat.gemspec +13 -6
- metadata +25 -17
- data/.travis.yml +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7907a530b955caeebf01a3e7761eb2b88722d3cebccd409b9c85468db0a4bd6
|
4
|
+
data.tar.gz: 5d368fbed83d9a6777aeccfbe02382295fc1024c53e1bd987cea266cfc0de1ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea355bd46d9c4beb48170431f2e27386faeb3748db31be3764cdda4cb158f10a57f22b4d2de668ee9e33930d56c8bb6175ebb4a8bf7e0346992a00ba3ddf34e
|
7
|
+
data.tar.gz: 5bb2267586fe3995ba4d645747a7b71d2ac72d93ea7064dceedc0eddcc2c775698991f0f963394ebd8304e7ab76d0624271a603c425989659390627a5cede2fc
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Test RocketChat Ruby gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [main]
|
6
|
+
pull_request:
|
7
|
+
branches: [main]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['2.6', '2.7', '3.0', '3.1']
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby-version }}
|
23
|
+
bundler-cache: true
|
24
|
+
|
25
|
+
- name: Lint code - Rubocop
|
26
|
+
run: bundle exec rubocop
|
27
|
+
|
28
|
+
- name: Run tests
|
29
|
+
run: bundle exec rspec
|
30
|
+
|
31
|
+
- name: Test & publish code coverage
|
32
|
+
uses: paambaati/codeclimate-action@v3.0.0
|
33
|
+
env:
|
34
|
+
CC_TEST_REPORTER_ID: abf0a371ff8851f13b563671914b195bb46f0997f0f93142e666d9acad08e22f
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
## Unreleased
|
4
4
|
- None
|
5
5
|
|
6
|
+
## [0.1.22](releases/tag/v0.1.22) - 2022-07-21
|
7
|
+
### Fixed
|
8
|
+
- [#38] Fix room (channel/group) online API queries (use `query` instead of `roomId`) ([@abrom][])
|
9
|
+
|
6
10
|
## [0.1.21](releases/tag/v0.1.21) - 2021-08-30
|
7
11
|
### Added
|
8
12
|
- [#36] Improve support for various REST APIs ([@abrom][])
|
@@ -46,13 +46,15 @@ module RocketChat
|
|
46
46
|
#
|
47
47
|
# channels.online REST API
|
48
48
|
# @param [String] room_id Rocket.Chat room id
|
49
|
+
# @param [String] name Rocket.Chat room name
|
49
50
|
# @return [Users[]]
|
51
|
+
# @note Must provide either `room_id` or `name` parameter. `room_id` will take precedence if providing both
|
50
52
|
# @raise [HTTPError, StatusError]
|
51
53
|
#
|
52
54
|
def online(room_id: nil, name: nil)
|
53
55
|
response = session.request_json(
|
54
56
|
'/api/v1/channels.online',
|
55
|
-
body:
|
57
|
+
body: { query: room_query_params(room_id, name) }
|
56
58
|
)
|
57
59
|
|
58
60
|
response['online'].map { |hash| RocketChat::User.new hash } if response['success']
|
@@ -77,13 +77,15 @@ module RocketChat
|
|
77
77
|
#
|
78
78
|
# groups.online REST API
|
79
79
|
# @param [String] room_id Rocket.Chat room id
|
80
|
+
# @param [String] name Rocket.Chat room name
|
80
81
|
# @return [Users[]]
|
82
|
+
# @note Must provide either `room_id` or `name` parameter. `room_id` will take precedence if providing both
|
81
83
|
# @raise [HTTPError, StatusError]
|
82
84
|
#
|
83
85
|
def online(room_id: nil, name: nil)
|
84
86
|
response = session.request_json(
|
85
87
|
'/api/v1/groups.online',
|
86
|
-
body:
|
88
|
+
body: { query: room_query_params(room_id, name) }
|
87
89
|
)
|
88
90
|
|
89
91
|
response['online'].map { |hash| RocketChat::User.new hash } if response['success']
|
data/rocketchat.gemspec
CHANGED
@@ -15,7 +15,14 @@ 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 = ['>= 2.5.0', '< 3.
|
18
|
+
spec.required_ruby_version = ['>= 2.5.0', '< 3.2.0']
|
19
|
+
|
20
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
21
|
+
# delete this section to allow pushing this gem to any host.
|
22
|
+
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless spec.respond_to?(:metadata)
|
23
|
+
|
24
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
25
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
19
26
|
|
20
27
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|docs)/}) }
|
21
28
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -24,11 +31,11 @@ Gem::Specification.new do |spec|
|
|
24
31
|
spec.add_development_dependency 'bundler', ['>= 1.11', '< 3.0']
|
25
32
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
26
33
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
28
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.
|
29
|
-
spec.add_development_dependency 'rubocop-rake', '~> 0.
|
30
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 2.
|
31
|
-
spec.add_development_dependency 'simplecov', '~> 0.16'
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 1.28'
|
35
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.13'
|
36
|
+
spec.add_development_dependency 'rubocop-rake', '~> 0.6'
|
37
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
|
38
|
+
spec.add_development_dependency 'simplecov', '~> 0.16', '< 0.18'
|
32
39
|
spec.add_development_dependency 'webmock', '~> 3.12'
|
33
40
|
spec.add_development_dependency 'yard', '~> 0.9.11'
|
34
41
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocketchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- int512
|
8
8
|
- abrom
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-07-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -65,56 +65,56 @@ dependencies:
|
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.28'
|
69
69
|
type: :development
|
70
70
|
prerelease: false
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.28'
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: rubocop-performance
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.13'
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.13'
|
90
90
|
- !ruby/object:Gem::Dependency
|
91
91
|
name: rubocop-rake
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
96
|
+
version: '0.6'
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
103
|
+
version: '0.6'
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: rubocop-rspec
|
106
106
|
requirement: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '2.
|
110
|
+
version: '2.10'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '2.
|
117
|
+
version: '2.10'
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: simplecov
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +122,9 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0.16'
|
125
|
+
- - "<"
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0.18'
|
125
128
|
type: :development
|
126
129
|
prerelease: false
|
127
130
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -129,6 +132,9 @@ dependencies:
|
|
129
132
|
- - "~>"
|
130
133
|
- !ruby/object:Gem::Version
|
131
134
|
version: '0.16'
|
135
|
+
- - "<"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0.18'
|
132
138
|
- !ruby/object:Gem::Dependency
|
133
139
|
name: webmock
|
134
140
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,9 +172,9 @@ executables:
|
|
166
172
|
extensions: []
|
167
173
|
extra_rdoc_files: []
|
168
174
|
files:
|
175
|
+
- ".github/workflows/test.yml"
|
169
176
|
- ".gitignore"
|
170
177
|
- ".rubocop.yml"
|
171
|
-
- ".travis.yml"
|
172
178
|
- CHANGELOG.md
|
173
179
|
- Gemfile
|
174
180
|
- LICENSE
|
@@ -203,8 +209,10 @@ files:
|
|
203
209
|
homepage: https://github.com/abrom/rocketchat-ruby
|
204
210
|
licenses:
|
205
211
|
- MIT
|
206
|
-
metadata:
|
207
|
-
|
212
|
+
metadata:
|
213
|
+
allowed_push_host: https://rubygems.org
|
214
|
+
rubygems_mfa_required: 'true'
|
215
|
+
post_install_message:
|
208
216
|
rdoc_options: []
|
209
217
|
require_paths:
|
210
218
|
- lib
|
@@ -215,15 +223,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
223
|
version: 2.5.0
|
216
224
|
- - "<"
|
217
225
|
- !ruby/object:Gem::Version
|
218
|
-
version: 3.
|
226
|
+
version: 3.2.0
|
219
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
228
|
requirements:
|
221
229
|
- - ">="
|
222
230
|
- !ruby/object:Gem::Version
|
223
231
|
version: '0'
|
224
232
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
226
|
-
signing_key:
|
233
|
+
rubygems_version: 3.2.33
|
234
|
+
signing_key:
|
227
235
|
specification_version: 4
|
228
236
|
summary: Rocket.Chat REST API v1 for Ruby
|
229
237
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
env:
|
2
|
-
global:
|
3
|
-
- CC_TEST_REPORTER_ID=abf0a371ff8851f13b563671914b195bb46f0997f0f93142e666d9acad08e22f
|
4
|
-
|
5
|
-
language: ruby
|
6
|
-
|
7
|
-
rvm:
|
8
|
-
- 2.5
|
9
|
-
- 2.6
|
10
|
-
- 2.7
|
11
|
-
- 3.0
|
12
|
-
|
13
|
-
before_install:
|
14
|
-
- gem update bundler
|
15
|
-
|
16
|
-
install:
|
17
|
-
- bundle install --jobs=3 --retry=3
|
18
|
-
- gem install rubocop
|
19
|
-
|
20
|
-
before_script:
|
21
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
22
|
-
- chmod +x ./cc-test-reporter
|
23
|
-
- ./cc-test-reporter before-build
|
24
|
-
|
25
|
-
script:
|
26
|
-
- bundle exec rubocop
|
27
|
-
- bundle exec rake
|
28
|
-
|
29
|
-
after_script:
|
30
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|