h2ocube_rails_cache 0.1.2 → 0.1.3

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: 6310c11ac4f3f8f51739aa0093ec9ecddecda9a4
4
- data.tar.gz: 2aef6c3682d61a6817ced4fd54ae9fd95da3609f
3
+ metadata.gz: 22a34735c67c2e1690101d534e1901de67db00d6
4
+ data.tar.gz: 063a33c8227d6d81c7ae490f6eccb23026c5a6f6
5
5
  SHA512:
6
- metadata.gz: e96f45ba648b840dbe501edfe48fc6e37a9e0b64c9129501f5e3b739831fcb059b16d11ee3c1693a8e4c60e8bb547fe159248028679007933f5e585199ae418b
7
- data.tar.gz: 859d678430d4e2151dabfefb8c57df1c40105c3af1df27d37e833a499ee22ca3d6a194321e8129965b946c5a57efc1ecb1b9de57f62382334a83fab676da0325
6
+ metadata.gz: 725e1687aa6c22aa9a332d4f04b2d02927b32dd2c40b4cd9183163d9b376e4993912bfddeaf2818ea51ea1aab88236f7e0ccc6c9c23fcfd3de581fa754176fb3
7
+ data.tar.gz: 1d98bbd324ad2e7cdb62e99a851e6be2fa0e4817fdfb3d77846e3ae72827178821f8ca7223f66e9b9e6950a299ea084459b171cdc56f5a80d8a96eb9e8fc4390
data/README.md CHANGED
@@ -45,6 +45,10 @@ And then execute:
45
45
  rake tmp:sessions:clear # will clear redis session data too
46
46
  rake tmp:cache:clear # will run Rails.clear too
47
47
 
48
+ ## ENV
49
+
50
+ * `ENV['REDIS_URL']` default is `redis://127.0.0.1:6379/0`
51
+
48
52
  ## Contributing
49
53
 
50
54
  1. Fork it
@@ -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.1.2'
7
+ gem.version = '0.1.3'
8
8
  gem.authors = ['Ben']
9
9
  gem.email = ['ben@h2ocube.com']
10
10
  gem.description = 'Just an redis cache.'
@@ -19,5 +19,5 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency 'redis'
21
21
 
22
- %w(rails minitest-rails).each { |g| gem.add_development_dependency g }
22
+ %w[rails minitest-rails].each { |g| gem.add_development_dependency g }
23
23
  end
@@ -3,7 +3,7 @@ require 'active_support/cache/h2ocube_rails_cache'
3
3
  module H2ocubeRailsCache
4
4
  class Railtie < Rails::Railtie
5
5
  config.after_initialize do |app|
6
- Rails.cache = ActiveSupport::Cache.lookup_store :h2ocube_rails_cache, namespace: "#{Rails.application.class.to_s.split("::").first}:#{Rails.env}#{ENV['TEST_ENV_NUMBER']}", expires_in: 60.minutes
6
+ Rails.cache = ActiveSupport::Cache.lookup_store :h2ocube_rails_cache, namespace: "#{Rails.application.class.to_s.split("::").first}:#{Rails.env}#{ENV['TEST_ENV_NUMBER']}", expires_in: 60.minutes, url: ENV['REDIS_URL'] || 'redis://127.0.0.1:6379/0'
7
7
  Rails.cache.logger = Rails.logger
8
8
 
9
9
  ActiveSupport::Notifications.subscribe(/cache_[^.]+.active_support/) do |name, start, finish, id, payload|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h2ocube_rails_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.6.11
112
+ rubygems_version: 2.6.13
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Just an redis cache.