simple_events_redis 0.0.6 → 1.0.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 +8 -8
- data/README.md +10 -3
- data/lib/events.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZWUxODlmZDcxYjA4YjYxMGMyYmU2MDYwYTdlNjczNTNlMTE3MjNhMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmVmODM5YzFkODlhNmEwODFkN2RmMGQxZmMzMjE5MzNjZjY2OGU0OA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODFjYTZlZTdiYzAyOWU2N2ZjNGE4YmI4MWVkNmVlZWY4NzI3ZjgxNzVlNjA3
|
10
|
+
ZGQwMTVmNWQ4MzE3ZTZkNjNmNzBlN2ZjNThmODlkZmZhYmZjNGY3ZmNlMmYy
|
11
|
+
MWEzMjYxNzY2YjYyNmJmNWIzZDY4YThhNmI5ZDljYTVhYjY5MmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWM5OGM4NzYwNGI1Y2Y1YjhkOWVjZWRlZWM1YzU4YmYzZWVjMDRmMDNlMjlk
|
14
|
+
ZTdlMzIxODkzMDAyYzE2NjEyNjQxMTUzMzkyNzVjNDkxODU1MzI2YjI0OGM2
|
15
|
+
M2QzYTI2YjgyZmE0MjQ0Mzc1YWQ1ZTJmMjJmZTQxM2EzZGExM2M=
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Useful for debugging and tracking different events in application.
|
|
8
8
|
|
9
9
|
## Overview
|
10
10
|
Data is stored in Redis in lists with names:
|
11
|
-
|
11
|
+
SITE_NAME : lists : list_name : day - Redis list
|
12
12
|
|
13
13
|
for example,
|
14
14
|
|
@@ -30,12 +30,19 @@ Setup:
|
|
30
30
|
|
31
31
|
initializer:
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
require 'events'
|
34
|
+
|
35
|
+
$Mylog = SimpleEventsRedis::Events
|
36
|
+
|
37
|
+
$Mylog.this_site_name='sitename'
|
38
|
+
$Mylog.set_config({:EXPIRE_DAYS => 7})
|
35
39
|
|
36
40
|
|
37
41
|
|
38
42
|
## Add new item to list
|
39
43
|
|
44
|
+
$Mylog.add('debug', {:msg=>'hello. something happened'})
|
45
|
+
|
46
|
+
|
40
47
|
|
41
48
|
|
data/lib/events.rb
CHANGED
@@ -3,19 +3,19 @@
|
|
3
3
|
require 'redis'
|
4
4
|
|
5
5
|
class Events
|
6
|
+
@@redis = nil
|
7
|
+
|
6
8
|
# static data
|
7
9
|
|
8
10
|
@@SITE_NAME = '' # default site
|
9
11
|
|
10
12
|
# config
|
11
|
-
@@config = {:EXPIRE_DAYS=>
|
12
|
-
|
13
|
+
@@config = {:EXPIRE_DAYS=>3}
|
13
14
|
|
14
15
|
|
15
|
-
@@redis = nil
|
16
|
-
|
17
16
|
def self.this_site_name
|
18
17
|
return @@SITE_NAME
|
18
|
+
#return (Rails.application.config.SITE_NAME rescue '')
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.this_site_name=(v)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_events_redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ! 'Max Ivak '
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ''
|
14
14
|
email:
|