tally_counter 0.1.1 → 0.1.2
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.
- data/README.md +15 -0
- data/lib/tally_counter.rb +1 -1
- data/lib/tally_counter/version.rb +1 -1
- metadata +5 -5
data/README.md
CHANGED
@@ -56,6 +56,21 @@ headers['X-Tally-Counter-Skip'] = 'true'
|
|
56
56
|
Note the mere presence of the header and not its value is enough
|
57
57
|
to cause a count skip.
|
58
58
|
|
59
|
+
## Redis connections
|
60
|
+
|
61
|
+
Its advisable to inject your own Redis connection as well as use
|
62
|
+
[hiredis-rb](https://github.com/pietern/hiredis-rb) for making connections
|
63
|
+
to Redis. hiredis is faster than the redis-rb driver as it wraps the
|
64
|
+
C client. Quickstart to get redis to connect with hiredis:
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
require "redis"
|
68
|
+
require "redis/connection/hiredis"
|
69
|
+
require "tally_counter"
|
70
|
+
```
|
71
|
+
|
72
|
+
Redis connections you (or TallyCounter) create will now use the faster client.
|
73
|
+
|
59
74
|
## Keys and Scoring
|
60
75
|
|
61
76
|
The system uses Redis sorted sets for tracking application hits.
|
data/lib/tally_counter.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tally_counter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-06-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152443500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152443500
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rack-test
|
27
|
-
requirement: &
|
27
|
+
requirement: &2152443060 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2152443060
|
36
36
|
description: Tally web application hits with Rack & Redis sorted sets
|
37
37
|
email:
|
38
38
|
- xternal1+github@gmail.com
|