ellen-redis 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f4bf8ec90a1d2d6af4231688e49b2c27012b600
4
- data.tar.gz: 3f6aed1e0833cb70dc57f8462bb1f5e081ff7402
3
+ metadata.gz: 6ed69006182ba29d441b262a9b7c9aa0cc605fab
4
+ data.tar.gz: 20538d095e8cd3eedfef7bcedcaf1299d084ee95
5
5
  SHA512:
6
- metadata.gz: 03275c5e89dcaf93ec0b61773821c5f9c474277afb15c634115c32e08dd7e310e4a4cd49ed982153720540548d171145a1c14eb0a09e02cc1305089b09ba80ee
7
- data.tar.gz: 2b99469cc849ea16c0cdc03af653284bf385792205394c0c094fb12ba79b775c3fbe0e146ba736cec7e791b2ba358eeb4cf25e4ca384f522d61b980057843f9c
6
+ metadata.gz: 8a2865c08f090caffbd01eb9ddde68fa5da1850bb9f2eca208a10499bad087d34e40c02d247bdcea79c19646d6ab4b8dff8f89092f4b8a528587165fa52d0a34
7
+ data.tar.gz: edd764b61aa6323c7eeaf3fc2475592374e48a0dbd0bd08017561c8df379b01b5d9ac82ad8260c8f9ff3345375317297452091f65b1ccb8ccf84c8f5fa852d8c
@@ -1,3 +1,6 @@
1
+ ## 0.0.3
2
+ * Change stored memory format from JSON to Marshal
3
+
1
4
  ## 0.0.2
2
5
  * Fix data import :bug:
3
6
 
data/README.md CHANGED
@@ -1,8 +1,17 @@
1
1
  # Ellen::Redis
2
- Store Ellen's memory in Redis.
2
+ Store [Ellen](https://github.com/r7kamura/ellen/)'s memory in Redis.
3
+
4
+ ## Usage
5
+ ```ruby
6
+ # Gemfile
7
+ gem "ellen-redis"
8
+ ```
3
9
 
4
10
  ## ENV
5
11
  ```
6
12
  REDIS_URL - Redis URL (e.g. redis://foo:bar@example.com:6379/)
7
13
  REDIS_SAVE_INTERVAL - Interval sec to push data to Redis (default: 5)
8
14
  ```
15
+
16
+ ## Screenshot
17
+ ![](https://raw.githubusercontent.com/r7kamura/ellen-redis/master/images/screenshot.png)
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_dependency "ellen", "0.1.1"
19
+ spec.add_dependency "ellen", ">= 0.1.1"
20
20
  spec.add_dependency "redis"
21
21
  spec.add_dependency "redis-namespace"
22
22
  spec.add_development_dependency "bundler", "~> 1.6"
Binary file
@@ -1,4 +1,3 @@
1
- require "json"
2
1
  require "redis"
3
2
  require "redis/namespace"
4
3
 
@@ -27,13 +26,14 @@ module Ellen
27
26
  private
28
27
 
29
28
  def push
30
- client.set(KEY, data.to_json)
29
+ client.set(KEY, Marshal.dump(data))
31
30
  end
32
31
 
33
32
  def pull
34
- if data = client.get(KEY)
35
- JSON.parse(data)
33
+ if str = client.get(KEY)
34
+ Marshal.load(str)
36
35
  end
36
+ rescue TypeError
37
37
  end
38
38
 
39
39
  def sync
@@ -62,10 +62,6 @@ module Ellen
62
62
  def interval
63
63
  (ENV["REDIS_SAVE_INTERVAL"] || 5).to_i
64
64
  end
65
-
66
- def encoded_value
67
- data.to_json
68
- end
69
65
  end
70
66
  end
71
67
  end
@@ -1,5 +1,5 @@
1
1
  module Ellen
2
2
  module Redis
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ellen-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ellen
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.1.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.1.1
27
27
  - !ruby/object:Gem::Dependency
@@ -94,6 +94,7 @@ files:
94
94
  - README.md
95
95
  - Rakefile
96
96
  - ellen-redis.gemspec
97
+ - images/screenshot.png
97
98
  - lib/ellen/brains/redis.rb
98
99
  - lib/ellen/redis.rb
99
100
  - lib/ellen/redis/version.rb