stat-count-client 0.0.4 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -19
- data/lib/stat-count-client/logger_factory.rb +1 -1
- data/lib/stat-count-client/thrift_client.rb +14 -14
- data/lib/stat-count-client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fea52e63b39ef2f5de0c722f040d4a90ba7fd8bd
|
4
|
+
data.tar.gz: c46f18e6296b5d4375010cc92e40dc85628af16f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1714bb40f1f2cdbbbd9548bd03e9c10fcc5b74ffe88ec8c91176f42cc116a35b146a98cb61b32da2b522f67623e03d9f06b6e10ca5abc783a87c5750021ff536
|
7
|
+
data.tar.gz: e727dddb6b4b74ec72c93dd088e1bb8b2350ed461cd5ac006f5f8b838bb397470d53c9b7518384041c0ff83669938fa9719c19620a51a767c969aeec53ecb5f6
|
data/Gemfile.lock
CHANGED
@@ -1,33 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stat-count-client (0.0.
|
5
|
-
|
4
|
+
stat-count-client (0.0.4)
|
5
|
+
hessian2
|
6
6
|
thrift-client
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
remote: http://192.168.3.220:9292/
|
11
11
|
specs:
|
12
|
-
addressable (2.3.5)
|
13
12
|
bigdecimal (1.2.1)
|
14
|
-
|
15
|
-
em-http-request (1.1.0)
|
16
|
-
addressable (>= 2.3.4)
|
17
|
-
cookiejar
|
18
|
-
em-socksify (>= 0.3)
|
19
|
-
eventmachine (>= 1.0.3)
|
20
|
-
http_parser.rb (>= 0.6.0.beta.2)
|
21
|
-
em-socksify (0.3.0)
|
22
|
-
eventmachine (>= 1.0.0.beta.4)
|
23
|
-
em-synchrony (1.0.3)
|
24
|
-
eventmachine (>= 1.0.0.beta.1)
|
25
|
-
em_hessian2 (2.0.1)
|
13
|
+
hessian2 (2.0.0)
|
26
14
|
bigdecimal
|
27
|
-
em-http-request
|
28
|
-
em-synchrony
|
29
|
-
eventmachine (1.0.3)
|
30
|
-
http_parser.rb (0.6.0.beta.2)
|
31
15
|
thrift (0.9.1)
|
32
16
|
thrift-client (0.0.6)
|
33
17
|
thrift (~> 0.9.0)
|
@@ -42,17 +42,17 @@ module Stat
|
|
42
42
|
|
43
43
|
def incr(name, id, count=1, date=nil)
|
44
44
|
if(date.nil?)
|
45
|
-
count_result_hash = @client.incrBy(name,id, count)
|
45
|
+
count_result_hash = @client.incrBy(name,id.to_s, count)
|
46
46
|
else
|
47
|
-
@client.incrByWithDate(name, id, count, date)
|
47
|
+
@client.incrByWithDate(name, id.to_s, count, date)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
def decr(name, id, count=1, date=nil)
|
52
52
|
if(date.nil?)
|
53
|
-
@client.decrBy(name, id, count)
|
53
|
+
@client.decrBy(name, id.to_s, count)
|
54
54
|
else
|
55
|
-
@client.decrByWithDate(name, id, count, date)
|
55
|
+
@client.decrByWithDate(name, id.to_s, count, date)
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -82,26 +82,26 @@ module Stat
|
|
82
82
|
|
83
83
|
def set(name,id, value, date=nil)
|
84
84
|
if(date.nil?)
|
85
|
-
@client.setValue(name, id, value)
|
85
|
+
@client.setValue(name, id.to_s, value)
|
86
86
|
else
|
87
|
-
@client.setWithDate(name,id, value,date)
|
87
|
+
@client.setWithDate(name,id.to_s, value,date)
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
91
|
def reset(name, id, limit=1)
|
92
|
-
@client.resetByLimit(name, id, limit)
|
92
|
+
@client.resetByLimit(name, id.to_s, limit)
|
93
93
|
end
|
94
94
|
|
95
95
|
def get(name, id, limit=1)
|
96
|
-
@client.getByLimit(name, id, limit)
|
96
|
+
@client.getByLimit(name, id.to_s, limit)
|
97
97
|
end
|
98
98
|
|
99
99
|
def getByNames(name, id, limit=1)
|
100
|
-
@client.getByNamesAndLimit(name, id, limit)
|
100
|
+
@client.getByNamesAndLimit(name, id.to_s, limit)
|
101
101
|
end
|
102
102
|
|
103
103
|
def getByIds(name, ids, limit=1)
|
104
|
-
@client.getByIdsAndLimit(name, ids, limit)
|
104
|
+
@client.getByIdsAndLimit(name, ids.map {|id| id.to_s}, limit)
|
105
105
|
end
|
106
106
|
|
107
107
|
def getByQuery(query)
|
@@ -157,7 +157,7 @@ module Stat
|
|
157
157
|
count_unit_list = value
|
158
158
|
thrift_unit_list = count_unit_list.map do |count_unit|
|
159
159
|
thrift_count_unit = DateCountUnit.new
|
160
|
-
thrift_count_unit.id = count_unit.id
|
160
|
+
thrift_count_unit.id = count_unit.id.to_s
|
161
161
|
thrift_count_unit.count = count_unit.count
|
162
162
|
thrift_count_unit.timeMills = count_unit.date.to_f*1000
|
163
163
|
thrift_count_unit
|
@@ -180,7 +180,7 @@ module Stat
|
|
180
180
|
count_unit_list = value
|
181
181
|
thrift_unit_list = count_unit_list.map do |count_unit|
|
182
182
|
thrift_count_unit = CountUnit.new
|
183
|
-
thrift_count_unit.id = count_unit.id
|
183
|
+
thrift_count_unit.id = count_unit.id.to_s
|
184
184
|
thrift_count_unit.count = count_unit.count
|
185
185
|
thrift_count_unit
|
186
186
|
end
|
@@ -202,7 +202,7 @@ module Stat
|
|
202
202
|
query_unit_list = value
|
203
203
|
thrift_unit_list = query_unit_list.collect do |query_unit|
|
204
204
|
thrift_query_unit = QueryDateUnit.new
|
205
|
-
thrift_query_unit.id = query_unit.id
|
205
|
+
thrift_query_unit.id = query_unit.id.to_s
|
206
206
|
thrift_count_unit.limit = query_unit.limit
|
207
207
|
fromDate = query_unit.fromDate
|
208
208
|
toDate = query_unit.toDate
|
@@ -240,7 +240,7 @@ module Stat
|
|
240
240
|
query_unit_list = value
|
241
241
|
thrift_unit_list = query_unit_list.map do |query_unit|
|
242
242
|
thrift_query_unit = QueryUnit.new
|
243
|
-
thrift_query_unit.id = query_unit.id
|
243
|
+
thrift_query_unit.id = query_unit.id.to_s
|
244
244
|
thrift_query_unit.limit = query_unit.limit
|
245
245
|
thrift_query_unit
|
246
246
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stat-count-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gavin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: hessian2
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '>='
|