stream-chat-ruby 2.22.0 → 2.23.0

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.
@@ -4,24 +4,23 @@
4
4
  module StreamChat
5
5
  class StreamAPIException < StandardError
6
6
  extend T::Sig
7
- T::Configuration.default_checked_level = :never
8
7
  # For now we disable runtime type checks.
9
8
  # We will enable it with a major bump in the future,
10
9
  # but for now, let's just run a static type check.
11
10
 
12
- sig { returns(Integer) }
11
+ T::Sig::WithoutRuntime.sig { returns(Integer) }
13
12
  attr_reader :error_code
14
13
 
15
- sig { returns(String) }
14
+ T::Sig::WithoutRuntime.sig { returns(String) }
16
15
  attr_reader :error_message
17
16
 
18
- sig { returns(T::Boolean) }
17
+ T::Sig::WithoutRuntime.sig { returns(T::Boolean) }
19
18
  attr_reader :json_response
20
19
 
21
- sig { returns(Faraday::Response) }
20
+ T::Sig::WithoutRuntime.sig { returns(Faraday::Response) }
22
21
  attr_reader :response
23
22
 
24
- sig { params(response: Faraday::Response).void }
23
+ T::Sig::WithoutRuntime.sig { params(response: Faraday::Response).void }
25
24
  def initialize(response)
26
25
  super()
27
26
  @response = response
@@ -35,7 +34,7 @@ module StreamChat
35
34
  end
36
35
  end
37
36
 
38
- sig { returns(String) }
37
+ T::Sig::WithoutRuntime.sig { returns(String) }
39
38
  def message
40
39
  if @json_response
41
40
  "StreamChat error code #{@error_code}: #{@error_message}"
@@ -44,7 +43,7 @@ module StreamChat
44
43
  end
45
44
  end
46
45
 
47
- sig { returns(String) }
46
+ T::Sig::WithoutRuntime.sig { returns(String) }
48
47
  def to_s
49
48
  message
50
49
  end
@@ -4,21 +4,20 @@
4
4
  module StreamChat
5
5
  class StreamRateLimits
6
6
  extend T::Sig
7
- T::Configuration.default_checked_level = :never
8
7
  # For now we disable runtime type checks.
9
8
  # We will enable it with a major bump in the future,
10
9
  # but for now, let's just run a static type check.
11
10
 
12
- sig { returns(Integer) }
11
+ T::Sig::WithoutRuntime.sig { returns(Integer) }
13
12
  attr_reader :limit
14
13
 
15
- sig { returns(Integer) }
14
+ T::Sig::WithoutRuntime.sig { returns(Integer) }
16
15
  attr_reader :remaining
17
16
 
18
- sig { returns(Time) }
17
+ T::Sig::WithoutRuntime.sig { returns(Time) }
19
18
  attr_reader :reset
20
19
 
21
- sig { params(limit: String, remaining: String, reset: String).void }
20
+ T::Sig::WithoutRuntime.sig { params(limit: String, remaining: String, reset: String).void }
22
21
  def initialize(limit, remaining, reset)
23
22
  @limit = T.let(limit.to_i, Integer)
24
23
  @remaining = T.let(remaining.to_i, Integer)
@@ -7,21 +7,20 @@ require 'stream-chat/types'
7
7
  module StreamChat
8
8
  class StreamResponse < Hash
9
9
  extend T::Sig
10
- T::Configuration.default_checked_level = :never
11
10
  # For now we disable runtime type checks.
12
11
  # We will enable it with a major bump in the future,
13
12
  # but for now, let's just run a static type check.
14
13
 
15
- sig { returns(StreamRateLimits) }
14
+ T::Sig::WithoutRuntime.sig { returns(StreamRateLimits) }
16
15
  attr_reader :rate_limit
17
16
 
18
- sig { returns(Integer) }
17
+ T::Sig::WithoutRuntime.sig { returns(Integer) }
19
18
  attr_reader :status_code
20
19
 
21
- sig { returns(StringKeyHash) }
20
+ T::Sig::WithoutRuntime.sig { returns(StringKeyHash) }
22
21
  attr_reader :headers
23
22
 
24
- sig { params(hash: T::Hash[T.untyped, T.untyped], response: Faraday::Response).void }
23
+ T::Sig::WithoutRuntime.sig { params(hash: T::Hash[T.untyped, T.untyped], response: Faraday::Response).void }
25
24
  def initialize(hash, response)
26
25
  super(nil)
27
26
  merge!(hash)
@@ -3,7 +3,6 @@
3
3
 
4
4
  module StreamChat
5
5
  extend T::Sig
6
- T::Configuration.default_checked_level = :never
7
6
  # For now we disable runtime type checks.
8
7
  # We will enable it with a major bump in the future,
9
8
  # but for now, let's just run a static type check.
@@ -5,12 +5,11 @@ require 'stream-chat/types'
5
5
 
6
6
  module StreamChat
7
7
  extend T::Sig
8
- T::Configuration.default_checked_level = :never
9
8
  # For now we disable runtime type checks.
10
9
  # We will enable it with a major bump in the future,
11
10
  # but for now, let's just run a static type check.
12
11
 
13
- sig { params(sort: T.nilable(T::Hash[String, Integer])).returns(SortArray) }
12
+ T::Sig::WithoutRuntime.sig { params(sort: T.nilable(T::Hash[String, Integer])).returns(SortArray) }
14
13
  def self.get_sort_fields(sort)
15
14
  sort_fields = T.let([], SortArray)
16
15
  sort&.each do |k, v|
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module StreamChat
5
- VERSION = '2.22.0'
5
+ VERSION = '2.23.0'
6
6
  end
data/stream-chat.gemspec CHANGED
@@ -35,4 +35,5 @@ Gem::Specification.new do |gem|
35
35
  gem.add_development_dependency 'rake'
36
36
  gem.add_development_dependency 'rspec'
37
37
  gem.add_development_dependency 'simplecov'
38
+ gem.add_development_dependency 'simplecov-console'
38
39
  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: 2.22.0
4
+ version: 2.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - getstream.io
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-11 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov-console
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  description: Ruby client for Stream Chat.
140
154
  email: support@getstream.io
141
155
  executables: []