h2ocube_rails_cache 0.0.8 → 0.0.9

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: 2348a9736459123e522839e417ab16b2e68651b9
4
- data.tar.gz: e321a73a80995cd9d90cae7342ddce29915c6a56
3
+ metadata.gz: 2731a7dce9f62d11312415d58be8ea9a3cf8222b
4
+ data.tar.gz: 6dc223280dc7d0e37b312459641105825cde2fe9
5
5
  SHA512:
6
- metadata.gz: 0cb15088fee644512bbdcfde93acb5ebcde226bec3e77577d116a5f0be992d7825f1e9e108849f0f8271fed9e38a587ca5d80384b158c4c888a8d14e1bb0f87e
7
- data.tar.gz: a4f720931709e2c815da75d399588e29b65aacb9440498133064d1b9d85faec81058add8bd94fc28a0a4375494758d473cf929147702bbda29ffe05e3b44e501
6
+ metadata.gz: beceb3d7ed1b330ae518f4cebddea7b4d000a742677ff84e2c6165a786c8ffb911b3fe786f62df64232edae8174c8bb9b6d7c177c85184269fe796b670b8281f
7
+ data.tar.gz: 1c19a97d1175b585308ec00a9a87f6e65523a54f11bd4d711e3a36dc41fcb5bd98770c81bb58411edbef63709ec85bb18b0dd2b47cd2b0605810159c9589dc65
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'h2ocube_rails_cache'
7
- gem.version = '0.0.8'
7
+ gem.version = '0.0.9'
8
8
  gem.authors = ['Ben']
9
9
  gem.email = ['ben@h2ocube.com']
10
10
  gem.description = 'Just an redis cache.'
@@ -13,7 +13,7 @@ module ActionDispatch
13
13
  end
14
14
 
15
15
  def self.clear
16
- r = Redis::Namespace.new(Rails.application.class.to_s.split("::").first << ':Session', redis: Redis::Store.new)
16
+ r = Redis::Namespace.new("#{Rails.application.class.to_s.split("::").first}:#{Rails.env}:Session", redis: Redis::Store.new)
17
17
  r.keys('*').each{ |k| r.del k }
18
18
  true
19
19
  end
@@ -7,7 +7,7 @@ module ActiveSupport
7
7
  def initialize(options = nil, &blk)
8
8
  options ||= {}
9
9
  super(options)
10
- @data = Redis::Namespace.new(Rails.application.class.to_s.split("::").first << ':Cache', redis: Redis::Store.new)
10
+ @data = Redis::Namespace.new("#{Rails.application.class.to_s.split("::").first}:#{Rails.env}:Cache", redis: Redis::Store.new)
11
11
  end
12
12
 
13
13
  def keys key = '*'
@@ -14,7 +14,7 @@ module Rack
14
14
  super
15
15
 
16
16
  @mutex = Mutex.new
17
- @pool = Redis::Namespace.new(Rails.application.class.to_s.split("::").first << ':Session', redis: Redis::Store.new)
17
+ @pool = Redis::Namespace.new("#{Rails.application.class.to_s.split("::").first}:#{Rails.env}:Session", redis: Redis::Store.new)
18
18
  end
19
19
 
20
20
  def generate_sid
data/lib/tasks/tmp.rake CHANGED
@@ -1,6 +1,5 @@
1
1
  namespace :tmp do
2
2
  namespace :sessions do
3
- # desc "Clears all files in tmp/sessions"
4
3
  task :clear => :environment do
5
4
  FileUtils.rm(Dir['tmp/sessions/[^.]*'])
6
5
  Rails.application.config.session_store.clear
@@ -8,7 +7,6 @@ namespace :tmp do
8
7
  end
9
8
 
10
9
  namespace :cache do
11
- # desc "Clears all files and directories in tmp/cache"
12
10
  task :clear => :environment do
13
11
  FileUtils.rm_rf(Dir['tmp/cache/[^.]*'])
14
12
  Rails.cache.clear
data/test/cache_test.rb CHANGED
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  describe 'h2ocube_rails_cache' do
4
4
  before do
5
5
  @redis = Redis.new
6
- @cache_key = Rails.application.class.to_s.split("::").first << ':Cache'
6
+ @cache_key = "#{Rails.application.class.to_s.split("::").first}:#{Rails.env}:Cache"
7
7
  @cache = Redis::Namespace.new(@cache_key)
8
8
  Rails.cache.clear
9
9
  end
@@ -5,3 +5,4 @@
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
7
  Dummy::Application.config.secret_token = 'ca3f29ce2033cebff511999f2fce3f4777dda12be7b8ad71e3f82bead7b95c26cd995ece00052674ee35dfd7892b7c78d0faaaffc9274fcf1b9bb49805ff0a2e'
8
+ Dummy::Application.config.secret_key_base = 'ca3f29ce2033cebff511999f2fce3f4777dda12be7b8ad71e3f82bead7b95c26cd995ece00052674ee35dfd7892b7c78d0faaaffc9274fcf1b9bb49805ff0a2e' if Dummy::Application.config.respond_to?(:secret_key_base)
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h2ocube_rails_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-04 00:00:00.000000000 Z
11
+ date: 2014-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-namespace
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Just an redis cache.
@@ -59,8 +59,8 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
63
- - .travis.yml
62
+ - ".gitignore"
63
+ - ".travis.yml"
64
64
  - Gemfile
65
65
  - LICENSE.txt
66
66
  - README.md
@@ -101,17 +101,17 @@ require_paths:
101
101
  - lib
102
102
  required_ruby_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - '>='
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.0.5
114
+ rubygems_version: 2.2.1
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Just an redis cache.