stream-chat-ruby 1.1.0 → 1.1.1

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: 0a7fe7381fe903fe6c875649624173564234d61a561c42852b2e00d39af597fb
4
- data.tar.gz: cdfb06d0a7f43b3e49423148abf29a654d31de8f1f7246218fe1c69740813d15
3
+ metadata.gz: d2d9ca6f8fb47bba23a0091fd3727a43cc9f72838418e10d565ef29c219dc722
4
+ data.tar.gz: 6ce0d0079a0ea1c303c97b1c12e3e3b67d4be82c1368ffae46e34478608694fd
5
5
  SHA512:
6
- metadata.gz: ef7720d01eca5f1b3a66198cfdf23834d4e81100a780992dc0737343d32d23b39d50b8019811da02796f568fe08e542ec602c3b51eeaa55d6d2efd3502d024d8
7
- data.tar.gz: 9e64bef129d028ab0d9757794662b3106bec83b1a6730e2a1941e767a97ab455d3fd2e0939c6ed635445e8400f2d54a67ba620dd521025e1e2916efd33800a76
6
+ metadata.gz: 5c6a88306903dc45bf0ab0c3cbdd5fb1e6dc04846229b0297301e84676fccdff88f1d5761f52fcac35ee2a56c0ac73a5bc652bb9602219ad06a035d9c70611cd
7
+ data.tar.gz: ec592e809858d6e5b865822c91fe333fe9cafc22e7e909af0d2a7832aeb4462db8dc90f9078fcd173a121a08bdd8fcd5a0528de93bc4dfdb2f51a830ca4e01dc
@@ -1,4 +1,5 @@
1
- ## next release
1
+ ## March 30th, 2020 - 1.1.1
2
+ - Fixed few minor issues
2
3
 
3
4
  ## Oct 27th, 2019 - 1.1.0
4
5
 
data/README.md CHANGED
@@ -60,9 +60,9 @@ client.create_token('bob-1')
60
60
 
61
61
  ```ruby
62
62
  client.update_user({
63
- 'id' => 'bob-1',
64
- 'role' => 'admin',
65
- 'name' => 'Robert Tables'
63
+ :id => 'bob-1',
64
+ :role => 'admin',
65
+ :name => 'Robert Tables'
66
66
  })
67
67
 
68
68
  # batch update is also supported
@@ -92,7 +92,9 @@ module StreamChat
92
92
  def update_users(users)
93
93
  payload = {}
94
94
  users.each do |user|
95
- payload[user[:id]] = user
95
+ id = user[:id] || user["id"]
96
+ raise ArgumentError "user must have an id" unless id
97
+ payload[id] = user
96
98
  end
97
99
  post('users', data: {'users': payload})
98
100
  end
@@ -9,10 +9,8 @@ module StreamChat
9
9
  begin
10
10
  parsed_response = JSON.parse(response.body)
11
11
  @json_response = true
12
- @error_code = parsed_response.fetch("data", {})
13
- .fetch("code", "unknown")
14
- @error_message = parsed_response.fetch("data", {})
15
- .fetch("message", "unknown")
12
+ @error_code = parsed_response.fetch("code", "unknown")
13
+ @error_message = parsed_response.fetch("message", "unknown")
16
14
  rescue JSON::ParserError
17
15
  @json_response = false
18
16
  end
@@ -1,5 +1,5 @@
1
1
  # lib/version.rb
2
2
 
3
3
  module StreamChat
4
- VERSION = "1.1.0".freeze
4
+ VERSION = "1.1.1".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream-chat-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mircea Cosbuc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-27 00:00:00.000000000 Z
11
+ date: 2020-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.0.6
121
+ rubygems_version: 3.1.2
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: The low level client for serverside calls for Stream Chat.