redness 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19b1d4771f2956fcfbf4f29198bb8b6839341e60
4
- data.tar.gz: af36bbca938916d52d595c5108f5cb39662425de
3
+ metadata.gz: 3862e8e860fee075ba25f5de2434a99af1b6072c
4
+ data.tar.gz: d3322385369795e8a577cff257f15c446a13110d
5
5
  SHA512:
6
- metadata.gz: f67aa3bc2eddfcc3bd4606e9b0dc55ba415e4c643fee14623e6d52be428bdd7749e0c4ab9d80371b336e80880a95212cd17e757500b7ac57bb3c049a6452ebd6
7
- data.tar.gz: dc9e165f93f9f60ebe66d0292a2a1b2ef8c03a3a66ef9c7e80ff218b6a3080d8e72242df8c594d140f957368fcb7917db0b9376710f959d26ea1401729fb746a
6
+ metadata.gz: 415af254a7f8b6fa44cd55b09875519ae4b207513b53fc17623c0dbfaca25a125e84dcba197b9f1e069414902ec921176af48562ae3391d414ec5bceda3e020a
7
+ data.tar.gz: b094a27bf2d162d017d799e8dfc2e89cadb534b29ab1f7f8ef869e680e219c14ac4e68d993398a865b08679151385dc4b2e5cf7fa4d86d6babdd85eebde3b2a0
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  /Gemfile.lock
2
2
  *.gem
3
+ *.sw[o,p]
3
4
  tmp/*
@@ -10,6 +10,10 @@ class RedCappedList
10
10
  RedList.get(key)
11
11
  end
12
12
 
13
+ def get_strings
14
+ RedList.get_strings(key)
15
+ end
16
+
13
17
  def add(value)
14
18
  RedList.add(key, value)
15
19
  RedList.trim_to(key, cap)
@@ -1,4 +1,4 @@
1
1
  module Redness
2
- VERSION="0.2.2"
2
+ VERSION="0.2.3"
3
3
  MAJOR, MINOR, TINY = VERSION.split(".")
4
4
  end
data/lib/redness.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "json" unless defined?(JSON)
2
2
  require "redis" unless defined?(Redis)
3
+ require "active_support"
3
4
  require "active_support/core_ext" unless defined?(ActiveSupport)
4
5
 
5
6
  require "precisionable"
data/redness.gemspec CHANGED
@@ -10,9 +10,10 @@ Gem::Specification.new do |s|
10
10
  "Bryan Woods",
11
11
  "Kenneth Lay",
12
12
  "Marco Carag",
13
- "Conner Peirce"
13
+ "Conner Peirce",
14
+ "George Ogata"
14
15
  ]
15
- s.email = "dev@howaboutwe.com"
16
+ s.email = "bryanwoods4e@gmail.com"
16
17
  s.summary = "Helpful Ruby classes for improved Redis data structures"
17
18
  s.description = "Helpful Ruby classes for improved Redis data structures"
18
19
  s.homepage = "http://github.com/howaboutwe/redness"
@@ -16,6 +16,20 @@ describe RedCappedList do
16
16
  end
17
17
  end
18
18
 
19
+ describe "#get_strings" do
20
+ it "returns the string values of the list at the key" do
21
+ r = RedCappedList.new("somekey", 2)
22
+
23
+ r.get_strings.should == []
24
+
25
+ r.add("foo")
26
+ r.add("bar")
27
+ r.add("baz")
28
+
29
+ r.get_strings.should == ["baz", "bar"]
30
+ end
31
+ end
32
+
19
33
  describe "#add" do
20
34
  it "adds to the list at the key" do
21
35
  r = RedCappedList.new("somekey", 1000)
@@ -3,6 +3,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
 
4
4
  require 'rspec'
5
5
  require 'redis'
6
+ require 'active_support'
6
7
  require 'active_support/core_ext'
7
8
  require 'timecop'
8
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Baldur Gudbjornsson
@@ -10,10 +10,11 @@ authors:
10
10
  - Kenneth Lay
11
11
  - Marco Carag
12
12
  - Conner Peirce
13
+ - George Ogata
13
14
  autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
- date: 2013-10-21 00:00:00.000000000 Z
17
+ date: 2015-12-21 00:00:00.000000000 Z
17
18
  dependencies:
18
19
  - !ruby/object:Gem::Dependency
19
20
  name: json
@@ -100,7 +101,7 @@ dependencies:
100
101
  - !ruby/object:Gem::Version
101
102
  version: '0'
102
103
  description: Helpful Ruby classes for improved Redis data structures
103
- email: dev@howaboutwe.com
104
+ email: bryanwoods4e@gmail.com
104
105
  executables: []
105
106
  extensions: []
106
107
  extra_rdoc_files: []
@@ -157,9 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
158
  version: '0'
158
159
  requirements: []
159
160
  rubyforge_project:
160
- rubygems_version: 2.1.9
161
+ rubygems_version: 2.0.14
161
162
  signing_key:
162
163
  specification_version: 4
163
164
  summary: Helpful Ruby classes for improved Redis data structures
164
165
  test_files: []
165
- has_rdoc: