rocketchat 0.2.1 → 0.2.2

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: 23d1c8a93431402bbb37c5c6ec923e77c05aa3aeccab7a0e0cd598c14cabd495
4
- data.tar.gz: b4c605b263d57257cc3285449988ee7bec9272fb24af6ef70c1a759810c65562
3
+ metadata.gz: 4a6c0288c4420a286b0444dc84749e572fa40806874616673a360a509dfa90f8
4
+ data.tar.gz: e6d74695c8e75fa49c51f4de0e6db86476b965351a9a7231d9f57b5a59d70bd1
5
5
  SHA512:
6
- metadata.gz: 2516550605f1ef594a60c13604400f863c36fe7da3f0fd06167c415cd3428f6181d8ff615835c57e3fb41282ac3b8e46b6abcd5a01436bd04068a6bff3566261
7
- data.tar.gz: a897b18924cbd3631e2d071badeb0bfb91ea09e9ef7c2e4a6b17b8f322d45200ddea061026edaad6581d0e4343d0c9a961458160551d29f816937b536b6f5d8c
6
+ metadata.gz: bbecd274cd60768eb7fcc19a95cd9652d474405bb80047aa16e51a700b2468b1057cdfe907ab093471e4227a6870924b05c89cb41a2be8742c7a5ddb4e6a6248
7
+ data.tar.gz: f6e927d6dca42397da5ea9517033e9549f9ebc238e1f994aee63ef5f33644d497330a4dfd74426f3564f71223af257a79678ac346bce5dc4610d5e95423977ba
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ['2.6', '2.7', '3.0', '3.1']
14
+ ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -41,6 +41,9 @@ Metrics/MethodLength:
41
41
  RSpec/ExampleLength:
42
42
  Max: 10
43
43
 
44
+ RSpec/IndexedLet:
45
+ Max: 2
46
+
44
47
  RSpec/MultipleExpectations:
45
48
  Max: 5
46
49
 
data/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  ## Unreleased
4
4
  - None
5
5
 
6
+ ## [0.2.2](releases/tag/v0.2.2) - 2023-04-21
7
+ ### Added
8
+ - [#43] Add Ruby 3.2 support ([@MrRTI][])
9
+ - [#44] Add support for thread messages ([@MrRTI][])
10
+
11
+ ### Fixed
12
+ - [#45] Fixed some rubocop lints ([@abrom][])
13
+
14
+
6
15
  ## [0.2.1](releases/tag/v0.2.1) - 2022-12-19
7
16
  ### Fixed
8
17
  - [#41] URL-encode param values in GET query strings ([@nmagedman][])
@@ -131,3 +140,4 @@
131
140
  [@christianmoretti]: https://github.com/christianmoretti
132
141
  [@alinavancea]: https://github.com/alinavancea
133
142
  [@nmagedman]: https://github.com/nmagedman
143
+ [@MrRTI]: https://github.com/MrRTi
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RocketChat
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
@@ -20,6 +20,11 @@ module RocketChat
20
20
  data['_id']
21
21
  end
22
22
 
23
+ # Message thread id
24
+ def tmid
25
+ data['tmid']
26
+ end
27
+
23
28
  # Timestamp
24
29
  def timestamp
25
30
  Time.parse data['ts']
@@ -67,7 +72,8 @@ module RocketChat
67
72
  object_id: object_id,
68
73
  id: id,
69
74
  room_id: room_id,
70
- message: message
75
+ message: message,
76
+ tmid: tmid
71
77
  )
72
78
  end
73
79
  end
@@ -55,7 +55,7 @@ module RocketChat
55
55
  # @param [String] room_id Rocket.Chat room id
56
56
  # @param [String] name Rocket.Chat room name (coming soon)
57
57
  # @param [String] channel Rocket.Chat channel name
58
- # @param [Hash] params Optional params (text, alias, emoji, avatar & attachments)
58
+ # @param [Hash] params Optional params (text, alias, emoji, tmid, avatar & attachments)
59
59
  # @return [RocketChat::Message]
60
60
  # @raise [HTTPError, StatusError]
61
61
  #
@@ -65,7 +65,7 @@ module RocketChat
65
65
  method: :post,
66
66
  body: room_params(room_id, name)
67
67
  .merge(channel: channel)
68
- .merge(Util.slice_hash(params, :text, :alias, :emoji, :avatar, :attachments))
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
@@ -32,7 +32,7 @@ module RocketChat
32
32
  # @return Hash filtered by keys
33
33
  #
34
34
  def slice_hash(hash, *keys)
35
- return {} if keys.length.zero?
35
+ return {} if keys.empty?
36
36
 
37
37
  new_hash = {}
38
38
  hash.each do |key, value|
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 = ['>= 2.5.0', '< 3.2.0']
18
+ spec.required_ruby_version = ['>= 2.5.0', '< 3.3.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.1
4
+ version: 0.2.2
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: 2022-12-19 00:00:00.000000000 Z
12
+ date: 2023-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -223,14 +223,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
223
223
  version: 2.5.0
224
224
  - - "<"
225
225
  - !ruby/object:Gem::Version
226
- version: 3.2.0
226
+ version: 3.3.0
227
227
  required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - ">="
230
230
  - !ruby/object:Gem::Version
231
231
  version: '0'
232
232
  requirements: []
233
- rubygems_version: 3.3.7
233
+ rubygems_version: 3.4.1
234
234
  signing_key:
235
235
  specification_version: 4
236
236
  summary: Rocket.Chat REST API v1 for Ruby