cent 2.1.0 → 2.2.0

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
  SHA256:
3
- metadata.gz: d177048be5a5c912db6ce130d832d292be71ccefc9098acb787bf5e47a861a6f
4
- data.tar.gz: 995f51e9fd398a341e0397e8da0b958a84dcbce31ed2d0f05913edb0b97925b9
3
+ metadata.gz: b533a1550e369ce3cafb34965c09d01a66691249d58424306f1dddae06feb170
4
+ data.tar.gz: 861d3619f6110bdea4892bd8c09be01e22466d6f951007a5a2d05e2d0ffb092f
5
5
  SHA512:
6
- metadata.gz: 302bd8e03bbb3d6636385a8a59138dd491c2e586270c93cd3ed777fa90e3b6605502c6d6f6b829f398a735e30d2030e92043d7f69ec17c5bfbcf5f1e30bbba65
7
- data.tar.gz: 3f0e19146b8175a3851048222b0bd490998a2aefb079e9a7d4c74c19125657b72e4103ecd3b15bea5fd83177b28596637141f4a3ddb7796927ddbd601fd81544
6
+ metadata.gz: d827bcc6f421a1f9ab5a70f3cb17025bd2986247112888dfc3d53af494f88930deb8caca2556ceda27696d5da9979867d2bea32a3f598597dccc96c0d3b8d812
7
+ data.tar.gz: a7064d71efc537467ac5337182abe168e1d67a5e77365dac9a35d391f5d32a1e0094ca1176fed6940683f56643d073225a0ba5a6258cab6bb9578543d118437c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 2.2.0
2
+ =====
3
+
4
+ * Fix `ArgumentError: wrong number of arguments` when creating `ResponseError` in Ruby 3, [#21](https://github.com/centrifugal/rubycent/pull/21)
5
+
1
6
  2.1.0
2
7
  =====
3
8
 
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Centrifugal
3
+ Copyright (c) 2023 Centrifugal Labs LTD
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
- # Cent
2
1
  [![Code Climate](https://codeclimate.com/github/centrifugal/centrifuge-ruby/badges/gpa.svg)](https://codeclimate.com/github/centrifugal/centrifuge-ruby)
3
2
  ![Build Status](https://github.com/centrifugal/rubycent/actions/workflows/main.yml/badge.svg)
4
3
 
5
- [Centrifugo HTTP API v2](https://centrifugal.github.io/centrifugo/server/http_api/) client in Ruby.
4
+ [Centrifugo HTTP API](https://centrifugal.dev/docs/server/server_api) client in Ruby.
6
5
 
7
6
  ## Installation
8
7
 
@@ -100,7 +99,7 @@ end
100
99
 
101
100
  Send data to the channel.
102
101
 
103
- [https://centrifugal.github.io/centrifugo/server/http_api/#publish](https://centrifugal.github.io/centrifugo/server/http_api/#publish)
102
+ [publish](https://centrifugal.dev/docs/server/server_api#publish)
104
103
 
105
104
  ```ruby
106
105
  client.publish(channel: 'chat', data: 'hello') # => {}
@@ -110,7 +109,7 @@ client.publish(channel: 'chat', data: 'hello') # => {}
110
109
 
111
110
  Sends data to multiple channels.
112
111
 
113
- [https://centrifugal.github.io/centrifugo/server/http_api/#broadcast](https://centrifugal.github.io/centrifugo/server/http_api/#broadcast)
112
+ [broadcast](https://centrifugal.dev/docs/server/server_api#broadcast)
114
113
 
115
114
  ```ruby
116
115
  client.broadcast(channels: ["clients", "staff"], data: 'hello') # => {}
@@ -120,7 +119,7 @@ client.broadcast(channels: ["clients", "staff"], data: 'hello') # => {}
120
119
 
121
120
  Unsubscribe user from channel. Receives to arguments: channel and user (user ID you want to unsubscribe)
122
121
 
123
- [https://centrifugal.github.io/centrifugo/server/http_api/#unsubscribe](https://centrifugal.github.io/centrifugo/server/http_api/#unsubscribe)
122
+ [unsubscribe](https://centrifugal.dev/docs/server/server_api#unsubscribe)
124
123
 
125
124
  ```ruby
126
125
  client.unsubscribe(channel: 'chat', user: '1') # => {}
@@ -130,7 +129,7 @@ client.unsubscribe(channel: 'chat', user: '1') # => {}
130
129
 
131
130
  Allows to disconnect user by it's ID. Receives user ID as an argument.
132
131
 
133
- [https://centrifugal.github.io/centrifugo/server/http_api/#disconnect](https://centrifugal.github.io/centrifugo/server/http_api/#disconnect)
132
+ [disconnect](https://centrifugal.dev/docs/server/server_api#disconnect)
134
133
 
135
134
  ```ruby
136
135
  # Disconnect user with `id = 1`
@@ -142,7 +141,7 @@ client.disconnect(user: '1') # => {}
142
141
 
143
142
  Get channel presence information(all clients currently subscribed on this channel).
144
143
 
145
- [https://centrifugal.github.io/centrifugo/server/http_api/#presence](https://centrifugal.github.io/centrifugo/server/http_api/#presence)
144
+ [presence](https://centrifugal.dev/docs/server/server_api#presence)
146
145
 
147
146
  ```ruby
148
147
  client.presence(channel: 'chat')
@@ -167,7 +166,7 @@ client.presence(channel: 'chat')
167
166
 
168
167
  Get short channel presence information.
169
168
 
170
- [https://centrifugal.github.io/centrifugo/server/http_api/#presence_stats](https://centrifugal.github.io/centrifugo/server/http_api/#precence_stats)
169
+ [presence_stats](https://centrifugal.dev/docs/server/server_api#presence_stats)
171
170
 
172
171
  ```ruby
173
172
  client.presence_stats(channel: 'chat')
@@ -184,7 +183,7 @@ client.presence_stats(channel: 'chat')
184
183
 
185
184
  Get channel history information (list of last messages published into channel).
186
185
 
187
- [https://centrifugal.github.io/centrifugo/server/http_api/#history](https://centrifugal.github.io/centrifugo/server/http_api/#hisotry)
186
+ [history](https://centrifugal.dev/docs/server/server_api#history)
188
187
 
189
188
  ```ruby
190
189
  client.history(channel: 'chat')
@@ -211,7 +210,7 @@ client.history(channel: 'chat')
211
210
 
212
211
  Get list of active(with one or more subscribers) channels.
213
212
 
214
- [https://centrifugal.github.io/centrifugo/server/http_api/#channels](https://centrifugal.github.io/centrifugo/server/http_api/#channels)
213
+ [channels](https://centrifugal.dev/docs/server/server_api#channels)
215
214
 
216
215
  ```ruby
217
216
  client.channels
@@ -229,7 +228,7 @@ client.channels
229
228
 
230
229
  Get running Centrifugo nodes information.
231
230
 
232
- [https://centrifugal.github.io/centrifugo/server/http_api/#info](https://centrifugal.github.io/centrifugo/server/http_api/#info)
231
+ [info](https://centrifugal.dev/docs/server/server_api#info)
233
232
 
234
233
  ```ruby
235
234
  client.info
data/lib/cent/http.rb CHANGED
@@ -39,7 +39,7 @@ module Cent
39
39
  def post(body: nil)
40
40
  response = connection.post(nil, body)
41
41
 
42
- raise ResponseError, response.body['error'].transform_keys(&:to_sym) if response.body.key?('error')
42
+ raise ResponseError.new(**response.body['error'].transform_keys(&:to_sym)) if response.body.key?('error')
43
43
 
44
44
  response.body
45
45
  end
data/lib/cent/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cent
4
- VERSION = '2.1.0'
4
+ VERSION = '2.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cent
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Prikhodko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-06 00:00:00.000000000 Z
11
+ date: 2023-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday