lawnchair 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.5
1
+ 0.5.6
data/lawnchair.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{lawnchair}
8
- s.version = "0.5.5"
8
+ s.version = "0.5.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Shane Wolf"]
12
- s.date = %q{2010-02-17}
12
+ s.date = %q{2010-03-24}
13
13
  s.description = %q{Fully featured caching mechanism for arbitrary pieces of resource expensive ruby code using Redis while being able to optionally store data in the Ruby process itself for maximum efficiency.}
14
14
  s.email = %q{shanewolf@gmail.com}
15
15
  s.extra_rdoc_files = [
data/lib/lawnchair.rb CHANGED
@@ -6,7 +6,7 @@ require 'storage_engine/in_process'
6
6
  require 'storage_engine/composite'
7
7
 
8
8
  if defined? RAILS_ENV
9
- require 'marshal_extension' if RAILS_ENV == "development"
9
+ require 'marshal_extension' if RAILS_ENV =~ "development"
10
10
  require 'view/helper'
11
11
  end
12
12
 
@@ -31,7 +31,8 @@ module Lawnchair
31
31
  end
32
32
 
33
33
  def computed_key(key)
34
- raise "Missiing key" if key.nil? || key.empty?
34
+ raise "Missing key" if key.nil? || key.empty?
35
+ raise "Key's may not contain whitespace" if key.match(/\s/)
35
36
  prefix = "Lawnchair"
36
37
  "#{prefix}:#{key}"
37
38
  end
@@ -90,6 +90,13 @@ describe "Lawnchair::StorageEngine::Abstract" do
90
90
  it "should prepend keys with Lawnchair:" do
91
91
  abstract_store.computed_key("hooo").should == "Lawnchair:hooo"
92
92
  end
93
+
94
+ it "raises an exception if a key has a space" do
95
+ lambda do
96
+ abstract_store.computed_key("hooo tyyyyy")
97
+ end.should raise_error
98
+ end
99
+
93
100
  it "raises an exception if no key is given" do
94
101
  lambda do
95
102
  abstract_store.computed_key("") { 1 }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lawnchair
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Wolf
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-17 00:00:00 -08:00
12
+ date: 2010-03-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency