openvidu-ruby-client 0.3.0 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92a0236b9a03c43f0e291d64f90afe17c0b7df22
4
- data.tar.gz: 349f451e07e134e94e1fa51b496ef4058595e67f
3
+ metadata.gz: 5f5a0eb2dc94b5816ee311555d3739ba1fc64a9a
4
+ data.tar.gz: 7071c1d9e02b6f3ac9d80d12376fd628d9c8e6fc
5
5
  SHA512:
6
- metadata.gz: 547c143edba3b07a2bc0bad6fa41b7dd0ddd8663f9f25b37f9ec7992652377547da6284164ea06ad55de2eb74d68188d9e4ff53525ebbab025b3676326b83cbc
7
- data.tar.gz: 5bcbfcb21c66f75c8b11df8c9a44992bbb8087a64d1e37ac52998baf4052d29754564346833202a16a8bf51db0d517c2a7667452a04ee76e83b6654922125602
6
+ metadata.gz: a226c1b45b92dbd419e771f108a02b802af82500453b6bcaf7e84d21b013f1a9a960824a7b4251331d9bf857105e14753082ba690a596490808bfe8d8c0f48e3
7
+ data.tar.gz: 02ca643fad82e6b2c809fe2122dd708273e13813f548144d4426bf2a0acf26b3b1b9db709d0590d656d0f45188d1b7c315b2b7888f2730b4b4f34ed64517b894
data/README.md CHANGED
@@ -32,7 +32,7 @@ Set the following environment variables in your Ruby application:
32
32
  To start a OpenVidu session:
33
33
 
34
34
  ```ruby
35
- server = 'https://127.0.0.1:4443?token=MY_SECRET'
35
+ server = 'https://127.0.0.1:4443?token=MY_SECRET&timeout=5'
36
36
 
37
37
  OpenVidu::Session.new(server,
38
38
  customSessionId: 'your-custom-session-id',
@@ -30,6 +30,7 @@ module OpenVidu
30
30
  'Content-Type' => 'application/json'
31
31
  },
32
32
  verify: server.verify_peer?,
33
+ timeout: server.timeout,
33
34
  body: params.to_json
34
35
  }
35
36
  end
@@ -8,6 +8,8 @@ module OpenVidu
8
8
 
9
9
  InvalidURI = Class.new(StandardError)
10
10
 
11
+ DEFAULT_TIMEOUT = 10 # seconds
12
+
11
13
  def_delegators :@uri, :host, :port, :scheme, :query_values, :to_s
12
14
 
13
15
  # `uri` should take the form of scheme://some-openvidu-host-or-ip:port?token=<your-secret-here>
@@ -31,6 +33,14 @@ module OpenVidu
31
33
  true
32
34
  end
33
35
 
36
+ def timeout
37
+ if query_values['timeout'].to_i > 0
38
+ query_values['timeout'].to_i
39
+ else
40
+ DEFAULT_TIMEOUT
41
+ end
42
+ end
43
+
34
44
  def ==(other)
35
45
  other.to_s == self.to_s
36
46
  end
@@ -1,3 +1,3 @@
1
1
  module OpenVidu
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvidu-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Saxon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-02 00:00:00.000000000 Z
11
+ date: 2020-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug