redis-activesupport 3.2.3 → 3.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c39cf240b52d54b8274614a38ac685b9f5d18f64
4
+ data.tar.gz: 0a474486846baf018439c5bb07fd31098fecbe71
5
+ SHA512:
6
+ metadata.gz: 9d09811a1e9bf8e03b2c4c281aa9e54d0c9363a734814419cb79af1b2a0c0abbfeab0f635f6e412e1b3cc6ccf4325c51c3cb8c226122edf92b2f1a189489b4b6
7
+ data.tar.gz: 9859d95f3ba1aee5f4b2e2e376c887874a3ec6df900cbe81a374c70d63f5caad2645271ceab72d25ea3b3dfae3f4bd2bcad33835f07fafbed7063c513f4b5253
data/.gitignore CHANGED
@@ -1,5 +1,3 @@
1
- *.gem
2
- .bundle
3
1
  Gemfile.lock
4
- pkg/*
5
- tmp/*
2
+ *.gem
3
+ tmp/
data/.travis.yml ADDED
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ script: 'bundle exec rake'
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - ruby-head
7
+ - rbx-19mode
8
+ - jruby-19mode
9
+ - jruby-head
10
+
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: jruby-head
14
+ - rvm: ruby-head
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- gem 'redis-store', '~> 1.1.0', :path => File.expand_path('../../redis-store', __FILE__)
4
+ if ::File.directory?(gem_path = '../redis-store')
5
+ gem 'redis-store', '~> 1.1.0', path: gem_path
6
+ end
7
+
5
8
  gem 'i18n'
6
- gem 'SystemTimer', :platform => :mri_18
data/README.md CHANGED
@@ -1,52 +1,39 @@
1
1
  # Redis stores for ActiveSupport
2
2
 
3
- __`redis-activesupport`__ provides a full set of stores (*Cache*) for __ActiveSupport__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
3
+ __`redis-activesupport`__ provides a cache for __ActiveSupport__. See the main [redis-store readme](https://github.com/redis-store/redis-store) for general guidelines.
4
4
 
5
- ## Redis Installation
5
+ ## Installation
6
6
 
7
- ### Option 1: Homebrew
8
-
9
- MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
10
-
11
- brew install redis
12
-
13
- ### Option 2: From Source
14
-
15
- Download and install Redis from [http://redis.io](http://redis.io/)
16
-
17
- wget http://redis.googlecode.com/files/redis-2.4.5.tar.gz
18
- tar -zxf redis-2.4.5.tar.gz
19
- mv redis-2.4.5 redis
20
- cd redis
21
- make
7
+ ```ruby
8
+ # Gemfile
9
+ gem 'redis-activesupport'
10
+ ```
22
11
 
23
12
  ## Usage
24
13
 
25
- # Gemfile
26
- gem 'redis-activesupport'
27
-
28
- ### Cache Store: Ruby on Rails
14
+ If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/redis-store/redis-rails) instead. For standalone usage:
29
15
 
30
- # config/environments/production.rb
31
- config.cache_store = :redis_store # { ... optional configuration ... }
32
-
33
- ### Cache Store: Standalone
34
-
35
- ActiveSupport::Cache.lookup_store :redis_store # { ... optional configuration ... }
36
-
37
- #### Configuration
38
-
39
- For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
16
+ ```ruby
17
+ ActiveSupport::Cache.lookup_store :redis_store # { ... optional configuration ... }
18
+ ```
40
19
 
41
20
  ## Running tests
42
21
 
43
- git clone git://github.com/jodosha/redis-store.git
44
- cd redis-store/redis-activesupport
45
- gem install bundler --pre # required version: 1.1.rc
46
- bundle exec rake
22
+ ```shell
23
+ gem install bundler
24
+ git clone git://github.com/redis-store/redis-activesupport.git
25
+ cd redis-activesupport
26
+ git checkout -t origin/3.2.x
27
+ bundle install
28
+ bundle exec rake
29
+ ```
47
30
 
48
31
  If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
49
32
 
33
+ ## Status
34
+
35
+ [![Gem Version](https://badge.fury.io/rb/redis-activesupport.png)](http://badge.fury.io/rb/redis-activesupport) [![Build Status](https://secure.travis-ci.org/redis-store/redis-activesupport.png?branch=3.2.x)](http://travis-ci.org/jodosha/redis-activesupport?branch=3.2.x) [![Code Climate](https://codeclimate.com/github/jodosha/redis-store.png)](https://codeclimate.com/github/redis-store/redis-activesupport)
36
+
50
37
  ## Copyright
51
38
 
52
- (c) 2009 - 2011 Luca Guidi - [http://lucaguidi.com](http://lucaguidi.com), released under the MIT license
39
+ 2009 - 2013 Luca Guidi - [http://lucaguidi.com](http://lucaguidi.com), released under the MIT license
data/Rakefile CHANGED
@@ -1,8 +1,4 @@
1
- require 'bundler'
2
- Bundler.setup
1
+ require 'bundler/setup'
3
2
  require 'rake'
4
3
  require 'bundler/gem_tasks'
5
-
6
- load 'tasks/redis.tasks.rb'
7
- task :default => 'redis:test:suite'
8
-
4
+ require 'redis-store/testing/tasks'
@@ -24,7 +24,7 @@ module ActiveSupport
24
24
  # RedisStore.new "localhost:6379/0", "localhost:6380/0"
25
25
  # # => instantiate a cluster
26
26
  def initialize(*addresses)
27
- @data = ::Redis::Factory.create(addresses)
27
+ @data = ::Redis::Store::Factory.create(addresses)
28
28
  super(addresses.extract_options!)
29
29
  end
30
30
 
@@ -46,7 +46,7 @@ module ActiveSupport
46
46
  matcher = key_matcher(matcher, options)
47
47
  begin
48
48
  !(keys = @data.keys(matcher)).empty? && @data.del(*keys)
49
- rescue Errno::ECONNREFUSED => e
49
+ rescue Errno::ECONNREFUSED
50
50
  false
51
51
  end
52
52
  end
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  module ActiveSupport
3
- VERSION = '3.2.3'
3
+ VERSION = '3.2.4'
4
4
  end
5
5
  end
@@ -1,30 +1,31 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "redis/activesupport/version"
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'redis/activesupport/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "redis-activesupport"
6
+ s.name = 'redis-activesupport'
7
7
  s.version = Redis::ActiveSupport::VERSION
8
- s.authors = ["Luca Guidi", "Matt Horan"]
9
- s.email = ["me@lucaguidi.com"]
10
- s.homepage = "http://jodosha.github.com/redis-store"
11
- s.summary = %q{Redis store for ActiveSupport::Cache}
12
- s.description = %q{Redis store for ActiveSupport::Cache}
8
+ s.authors = ['Luca Guidi']
9
+ s.email = ['me@lucaguidi.com']
10
+ s.homepage = 'http://redis-store.org/redis-activesupport'
11
+ s.summary = %q{Redis store for ActiveSupport}
12
+ s.description = %q{Redis store for ActiveSupport}
13
+ s.license = 'MIT'
13
14
 
14
- s.rubyforge_project = "redis-activesupport"
15
+ s.rubyforge_project = 'redis-activesupport'
15
16
 
16
17
  s.files = `git ls-files`.split("\n")
17
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
- s.require_paths = ["lib"]
20
+ s.require_paths = ['lib']
20
21
 
21
22
  s.add_runtime_dependency 'redis-store', '~> 1.1.0'
22
- s.add_runtime_dependency 'activesupport', '~> 3.2.3'
23
+ s.add_runtime_dependency 'activesupport', '~> 3.2.0'
23
24
 
24
- s.add_development_dependency 'rake', '~> 0.9.2.2'
25
- s.add_development_dependency 'bundler', '~> 1.1.rc'
26
- s.add_development_dependency 'mocha', '~> 0.10.0'
27
- s.add_development_dependency 'minitest', '~> 2.8.0'
28
- s.add_development_dependency 'purdytest', '~> 1.0.0'
25
+ s.add_development_dependency 'rake', '~> 10'
26
+ s.add_development_dependency 'bundler', '~> 1.3'
27
+ s.add_development_dependency 'mocha', '~> 0.14.0'
28
+ s.add_development_dependency 'minitest', '~> 4.2'
29
+ s.add_development_dependency 'redis-store-testing'
29
30
  end
30
31
 
@@ -43,21 +43,11 @@ describe ActiveSupport::Cache::RedisStore do
43
43
  end
44
44
  end
45
45
 
46
- if RUBY_VERSION.match /1\.9/
47
- it "reads raw data" do
48
- with_store_management do |store|
49
- result = store.read("rabbit", :raw => true)
50
- result.must_include("ActiveSupport::Cache::Entry")
51
- result.must_include("\x0FOpenStruct{\x06:\tnameI\"\nbunny\x06:\x06EF")
52
- end
53
- end
54
- else
55
- it "reads raw data" do
56
- with_store_management do |store|
57
- result = store.read("rabbit", :raw => true)
58
- result.must_include("ActiveSupport::Cache::Entry")
59
- result.must_include("\017OpenStruct{\006:\tname\"\nbunny")
60
- end
46
+ it "reads raw data" do
47
+ with_store_management do |store|
48
+ result = store.read("rabbit", :raw => true)
49
+ result.must_include("ActiveSupport::Cache::Entry")
50
+ result.must_match("bunny")
61
51
  end
62
52
  end
63
53
 
@@ -165,8 +155,8 @@ describe ActiveSupport::Cache::RedisStore do
165
155
  it "reads multiple keys" do
166
156
  @store.write "irish whisky", "Jameson"
167
157
  result = @store.read_multi "rabbit", "irish whisky"
168
- result['rabbit'].value.must_equal(@rabbit)
169
- result['irish whisky'].value.must_equal("Jameson")
158
+ result['rabbit'].raw_value.must_match(@rabbit.name)
159
+ result['irish whisky'].raw_value.must_match("Jameson")
170
160
  end
171
161
 
172
162
  it "reads multiple keys and returns only the matched ones" do
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  describe Redis::ActiveSupport::VERSION do
4
- it "must be equal to 3.2.3" do
5
- Redis::ActiveSupport::VERSION.must_equal '3.2.3'
4
+ it 'returns current version' do
5
+ Redis::ActiveSupport::VERSION.must_equal '3.2.4'
6
6
  end
7
7
  end
data/test/test_helper.rb CHANGED
@@ -1,8 +1,6 @@
1
- Bundler.setup
2
- gem 'minitest'
3
- require 'minitest/spec'
1
+ require 'bundler/setup'
4
2
  require 'minitest/autorun'
5
- require 'mocha'
3
+ require 'mocha/setup'
6
4
  require 'active_support'
7
5
  require 'active_support/cache/redis_store'
8
6
 
metadata CHANGED
@@ -1,95 +1,114 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
5
- prerelease:
4
+ version: 3.2.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Luca Guidi
9
- - Matt Horan
10
8
  autorequire:
11
9
  bindir: bin
12
10
  cert_chain: []
13
- date: 2012-04-02 00:00:00.000000000 Z
11
+ date: 2013-08-29 00:00:00.000000000 Z
14
12
  dependencies:
15
13
  - !ruby/object:Gem::Dependency
16
14
  name: redis-store
17
- requirement: &70168723143700 !ruby/object:Gem::Requirement
18
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
19
16
  requirements:
20
17
  - - ~>
21
18
  - !ruby/object:Gem::Version
22
19
  version: 1.1.0
23
20
  type: :runtime
24
21
  prerelease: false
25
- version_requirements: *70168723143700
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.1.0
26
27
  - !ruby/object:Gem::Dependency
27
28
  name: activesupport
28
- requirement: &70168723143180 !ruby/object:Gem::Requirement
29
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.3
33
+ version: 3.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70168723143180
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 3.2.0
37
41
  - !ruby/object:Gem::Dependency
38
42
  name: rake
39
- requirement: &70168723142680 !ruby/object:Gem::Requirement
40
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
41
44
  requirements:
42
45
  - - ~>
43
46
  - !ruby/object:Gem::Version
44
- version: 0.9.2.2
47
+ version: '10'
45
48
  type: :development
46
49
  prerelease: false
47
- version_requirements: *70168723142680
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '10'
48
55
  - !ruby/object:Gem::Dependency
49
56
  name: bundler
50
- requirement: &70168723142180 !ruby/object:Gem::Requirement
51
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
52
58
  requirements:
53
59
  - - ~>
54
60
  - !ruby/object:Gem::Version
55
- version: 1.1.rc
61
+ version: '1.3'
56
62
  type: :development
57
63
  prerelease: false
58
- version_requirements: *70168723142180
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
59
69
  - !ruby/object:Gem::Dependency
60
70
  name: mocha
61
- requirement: &70168723141700 !ruby/object:Gem::Requirement
62
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
63
72
  requirements:
64
73
  - - ~>
65
74
  - !ruby/object:Gem::Version
66
- version: 0.10.0
75
+ version: 0.14.0
67
76
  type: :development
68
77
  prerelease: false
69
- version_requirements: *70168723141700
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 0.14.0
70
83
  - !ruby/object:Gem::Dependency
71
84
  name: minitest
72
- requirement: &70168723141180 !ruby/object:Gem::Requirement
73
- none: false
85
+ requirement: !ruby/object:Gem::Requirement
74
86
  requirements:
75
87
  - - ~>
76
88
  - !ruby/object:Gem::Version
77
- version: 2.8.0
89
+ version: '4.2'
78
90
  type: :development
79
91
  prerelease: false
80
- version_requirements: *70168723141180
81
- - !ruby/object:Gem::Dependency
82
- name: purdytest
83
- requirement: &70168723140620 !ruby/object:Gem::Requirement
84
- none: false
92
+ version_requirements: !ruby/object:Gem::Requirement
85
93
  requirements:
86
94
  - - ~>
87
95
  - !ruby/object:Gem::Version
88
- version: 1.0.0
96
+ version: '4.2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: redis-store-testing
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
89
104
  type: :development
90
105
  prerelease: false
91
- version_requirements: *70168723140620
92
- description: Redis store for ActiveSupport::Cache
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Redis store for ActiveSupport
93
112
  email:
94
113
  - me@lucaguidi.com
95
114
  executables: []
@@ -97,6 +116,7 @@ extensions: []
97
116
  extra_rdoc_files: []
98
117
  files:
99
118
  - .gitignore
119
+ - .travis.yml
100
120
  - Gemfile
101
121
  - MIT-LICENSE
102
122
  - README.md
@@ -108,30 +128,30 @@ files:
108
128
  - test/active_support/cache/redis_store_test.rb
109
129
  - test/redis/activesupport/version_test.rb
110
130
  - test/test_helper.rb
111
- homepage: http://jodosha.github.com/redis-store
112
- licenses: []
131
+ homepage: http://redis-store.org/redis-activesupport
132
+ licenses:
133
+ - MIT
134
+ metadata: {}
113
135
  post_install_message:
114
136
  rdoc_options: []
115
137
  require_paths:
116
138
  - lib
117
139
  required_ruby_version: !ruby/object:Gem::Requirement
118
- none: false
119
140
  requirements:
120
- - - ! '>='
141
+ - - '>='
121
142
  - !ruby/object:Gem::Version
122
143
  version: '0'
123
144
  required_rubygems_version: !ruby/object:Gem::Requirement
124
- none: false
125
145
  requirements:
126
- - - ! '>='
146
+ - - '>='
127
147
  - !ruby/object:Gem::Version
128
148
  version: '0'
129
149
  requirements: []
130
150
  rubyforge_project: redis-activesupport
131
- rubygems_version: 1.8.15
151
+ rubygems_version: 2.0.3
132
152
  signing_key:
133
- specification_version: 3
134
- summary: Redis store for ActiveSupport::Cache
153
+ specification_version: 4
154
+ summary: Redis store for ActiveSupport
135
155
  test_files:
136
156
  - test/active_support/cache/redis_store_test.rb
137
157
  - test/redis/activesupport/version_test.rb