hornet-connector-ruby 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hornet-connector-ruby.gemspec +1 -1
- data/lib/hornet.rb +8 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{hornet-connector-ruby}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Robin Komiwes}, %q{Benjamin Tierny}, %q{Tristan Bourgois}, %q{Maxime Brazeilles}]
|
data/lib/hornet.rb
CHANGED
@@ -8,7 +8,7 @@ module Hornet
|
|
8
8
|
"hornet:events:disconnect"
|
9
9
|
]
|
10
10
|
|
11
|
-
def token_TTL( token_TTL )
|
11
|
+
def token_TTL( token_TTL = nil )
|
12
12
|
@token_TTL ||= token_TTL
|
13
13
|
|
14
14
|
@token_TTL || 120
|
@@ -32,7 +32,13 @@ module Hornet
|
|
32
32
|
|
33
33
|
token = (token_id.to_s + generate_token_suffix).to_i.alphadecimal
|
34
34
|
|
35
|
-
|
35
|
+
key = "hornet:token:" + token
|
36
|
+
|
37
|
+
redis.set key, channel
|
38
|
+
|
39
|
+
puts "tokenTTL: " + token_TTL.to_s
|
40
|
+
|
41
|
+
redis.expire key, token_TTL
|
36
42
|
|
37
43
|
return token;
|
38
44
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hornet-connector-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robin Komiwes
|