Skip to content

Commit

Permalink
Merge branch 'release/0.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
phoet committed Oct 28, 2010
2 parents 8f98643 + 4f00a6e commit 23c2248
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 12 deletions.
1 change: 1 addition & 0 deletions .document
@@ -1,2 +1,3 @@
lib/*.rb
README.rdoc
CHANGELOG
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,5 @@
html
pkg
*.gem
.DS_Store
.DS_Store
.bundle
2 changes: 1 addition & 1 deletion .rvmrc
@@ -1,2 +1,2 @@
rvm 1.9.1@rails_redis_cache
rvm 1.9.1@rails_redis_cache --create
rvm wrapper 1.9.1@rails_redis_cache textmate
7 changes: 7 additions & 0 deletions CHANGELOG
@@ -1,3 +1,10 @@
0.0.4

* less restrictive dependencies with '~>'
* use bundler for dependency management
* switching development to 'develop' branch
* add real git tags for releases

0.0.3

* provide fix for edge-case when redis did not store the time-key properly
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source :gemcutter

# dependencies in rails_redis_cache.gemspec
gemspec
20 changes: 20 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,20 @@
PATH
remote: .
specs:
rails_redis_cache (0.0.4)
activesupport (~> 3.0.0)
redis (~> 2.0.0)

GEM
remote: http://rubygems.org/
specs:
activesupport (3.0.1)
redis (2.0.12)

PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 3.0.0)
rails_redis_cache!
redis (~> 2.0.0)
8 changes: 4 additions & 4 deletions lib/rails_redis_cache.rb
Expand Up @@ -4,7 +4,7 @@
require 'time'

module ActiveSupport
module Cache
module Cache

# RailsRedisCache is Rails 3 cache store implementation using the key value store Redis.
#
Expand Down Expand Up @@ -57,12 +57,12 @@ def increment(name, amount = 1, options = nil)
end

def decrement(name, amount = 1, options = nil)
write(name, -1 * amount + read(name, options).to_i, options)
increment(name, amount * -1, options)
end

def cleanup(options = nil)
p value_keys = @redis.keys("#{VALUE_PREF}_*")
p time_keys = @redis.keys("#{TIME_PREF}_*")
value_keys = @redis.keys("#{VALUE_PREF}_*")
time_keys = @redis.keys("#{TIME_PREF}_*")
@redis.del *(value_keys + time_keys)
end

Expand Down
13 changes: 7 additions & 6 deletions rails_redis_cache.gemspec
Expand Up @@ -2,21 +2,22 @@

spec = Gem::Specification.new do |s|
s.name = 'rails_redis_cache'
s.version = '0.0.3'
s.version = '0.0.4'

s.author = 'Peter Schröder'
s.description = 'Rails cache store implementation using Redis.'
s.description = 'Rails 3 cache store implementation using Redis.'
s.email = 'phoetmail@googlemail.com'
s.homepage = 'http://github.com/phoet/rails_redis_cache'
s.summary = 'Rails cache store implementation using Redis.'
s.rubyforge_project = 'http://github.com/phoet/rails_redis_cache'
s.summary = 'Rails 3 cache store implementation using Redis. See http://github.com/phoet/rails_redis_cache for more information.'

s.has_rdoc = true
s.rdoc_options = ['-a', '--inline-source', '--charset=UTF-8']

s.files = Dir.glob('lib/*.rb') + %w(README.rdoc)
s.files = Dir.glob('lib/*.rb') + %w(README.rdoc CHANGELOG)
s.test_files = Dir.glob('test/test_*.rb')

s.add_dependency('activesupport', '~> 3.0.0.beta')
s.add_dependency('redis', '~> 2.0.5')
s.add_dependency('activesupport', '~> 3.0.0')
s.add_dependency('redis', '~> 2.0.0')
end

0 comments on commit 23c2248

Please sign in to comment.