tdlib-ruby 0.9.0 → 0.9.1
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 +4 -4
- data/ChangeLog.md +6 -1
- data/lib/tdlib/client.rb +4 -4
- data/lib/tdlib/version.rb +1 -1
- data/spec/integration/tdlib_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9a09d6aacb86936097c8e639dea0ac3930cd4f8
|
4
|
+
data.tar.gz: f5b25381a3aee0a60d45042115d943ac20b9242b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef289a28405f4267953819f2f626ece72ad5abf18b77ec989b5756197fd0e3715c44a00d4476c8603597d352ac9b0dc21302ebbffce8083e24ce78736a501865
|
7
|
+
data.tar.gz: 7efb461c9258ce835a36f611c274155825d6492d93d7d6cff7d9a25399656091dc0bf2e1aaf3b4bc2f52363fd96f8f1dffd2be1a8a0ec82b876451b3578564f5
|
data/ChangeLog.md
CHANGED
data/lib/tdlib/client.rb
CHANGED
@@ -66,7 +66,7 @@ class TD::Client
|
|
66
66
|
@td_client = td_client
|
67
67
|
@update_manager = update_manager
|
68
68
|
@config = TD.config.client.to_h.merge(extra_config)
|
69
|
-
@
|
69
|
+
@ready_condition = Celluloid::Condition.new
|
70
70
|
authorize
|
71
71
|
@update_manager.run
|
72
72
|
end
|
@@ -128,8 +128,7 @@ class TD::Client
|
|
128
128
|
end
|
129
129
|
|
130
130
|
def on_ready(timeout: TIMEOUT, &_)
|
131
|
-
@ready.wait(timeout)
|
132
|
-
yield self
|
131
|
+
yield self if @ready || @ready_condition.wait(timeout)
|
133
132
|
rescue Celluloid::ConditionError
|
134
133
|
raise TD::TimeoutError
|
135
134
|
end
|
@@ -164,7 +163,8 @@ class TD::Client
|
|
164
163
|
broadcast(encryption_key_query)
|
165
164
|
else
|
166
165
|
@update_manager.remove_handler(handler)
|
167
|
-
@ready
|
166
|
+
@ready = true
|
167
|
+
@ready_condition.signal(true)
|
168
168
|
end
|
169
169
|
end
|
170
170
|
@update_manager.add_handler(handler)
|
data/lib/tdlib/version.rb
CHANGED
@@ -43,7 +43,7 @@ describe TD::Client do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
describe '#broadcast_and_receive' do
|
46
|
-
subject { client.on_ready { client.broadcast_and_receive(payload
|
46
|
+
subject { client.on_ready { client.broadcast_and_receive(payload) } }
|
47
47
|
|
48
48
|
it { is_expected.to include('@type', 'entities') }
|
49
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdlib-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Southbridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|