redis_syslog 0.0.1 → 0.0.2

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: 924172dfbfc65f5e6bd0c4f4e7ff69cfb9fe7145
4
- data.tar.gz: 5d4da4acccbb0f167f0bedf72bb60bec3bd44623
3
+ metadata.gz: 2b412edcf43c1d2b439f46717d4c5af955225202
4
+ data.tar.gz: feff4048fc2c079a933cd3c42e588f57c8b7365e
5
5
  SHA512:
6
- metadata.gz: f95f0d7319a35bffc89c8845601645ed775cab9602af4bd9293168d977e9db3f0d0e7eb9e7270734376a0400831990c76ba37a7c3561caa338f73f0098c19a5a
7
- data.tar.gz: 32096759a83f81ee940a79b4925d34a9a38ae32c1086faaf2568ba4ab8d7e23698754761377fb5a6117eb8e3a7d8adbc2219f8b0e64d80892d2cdbb8a1a57bee
6
+ metadata.gz: 2a0c832ecc5d42bb1b3630a836e0b87df7d16b1018cbb1dd0855c317418f1cec4f982d3e763d7c609b11de5930a194489992a4a11c0e004f871371f22862f545
7
+ data.tar.gz: 9473eedef0f8ee10ecb0971a7024bf9c5a19b06ccbb6f400e8db7c4d56808101df35b5bd327474509f759bcc5c31f228f1c3fe80103bfeb7b80fdb1bdc3b6e99
data/README.md CHANGED
@@ -7,6 +7,7 @@ Let's get you started real quick.
7
7
 
8
8
  1. Include the gem in your Gemfile
9
9
  ```ruby
10
+ source "https://rubygems.org"
10
11
  gem 'redis_syslog'
11
12
  ```
12
13
 
@@ -1,3 +1,3 @@
1
1
  module RedisSyslog
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/redis_syslog.rb CHANGED
@@ -25,11 +25,11 @@ class RedisSyslog::RedisSyslog
25
25
  raise "n cannot be 0" unless n > 0
26
26
  #Return the last N entries of this log
27
27
  results = @redis.zrevrange _key, 0, n-1, :with_scores => true
28
- results = results.map{|e| {:time => Time.at(e[1]), :message => e[0]} }
28
+ results = results.map{|e| {:time => Time.at(e[1]), :message => e[0][8..-1]} }
29
29
  end
30
30
 
31
31
  def write message
32
- @redis.zadd _key, Time.now.to_i, message
32
+ @redis.zadd _key, Time.now.to_i, "#{[*('A'..'Z')].sample(8).join}#{message}"
33
33
  end
34
34
  end
35
35
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_syslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seo Townsend