cache_key_for 0.1.0 → 0.1.1

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: 65f947c28df0505768d59510c841a2b2cc1cbdad
4
- data.tar.gz: 439a17b86ab90a3a348b7fd24888db67e2db7621
3
+ metadata.gz: fbcb149bca59e95a5a19e83a54c909ed3f4cd710
4
+ data.tar.gz: 8e4be33d6dfe2d03f96ae48b750e74e2b4a82625
5
5
  SHA512:
6
- metadata.gz: ca839ffbe1cf763cc448a76d13171f409f363f5e218db2f00f949bebd6a507bdda4dfbd3bf22e53d93dba133b040fc81d8764f78c86b1fafd78264f0544e5135
7
- data.tar.gz: a40ce417551f596834f39e7b2e7fc86242af434a3c7e4a715137174a8079c6e69aecb97d56a7722c4c960deef83345a7a7afe39b148eaefaf3a565c00457e220
6
+ metadata.gz: 1c13742c65e6b4aa0dbbdb1c5f378e26105b3f3f3a01b03c70af2e97985f593bf08d86b8351fc88e510604851a889a395acd53dd47053227703e0519189e2514
7
+ data.tar.gz: eb8a4cc4e1993454a55966bcd9aa2d7f0d46064a1ae3f0631778ed1f062ef996ed4c21c1fcd4ad5c442087a8a067e448c401b9d4c39c6f66845e723d9a62b517
data/.gitignore CHANGED
@@ -5,5 +5,4 @@ spec/dummy/db/*.sqlite3
5
5
  spec/dummy/log/*.log
6
6
  spec/dummy/tmp/
7
7
  .sass-cache/*
8
- gemfiles/*.lock
9
8
  *.gem
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cache_key_for (0.1.0)
4
+ cache_key_for (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -27,21 +27,21 @@ Features:
27
27
  * one key instead of many, but also unobtrusive (example in haml):
28
28
 
29
29
  ```haml
30
- - cache [cache_key_for(@articles, 'articles'), @some_active_model_object, 'box-type-view'] do
31
- (...)
30
+ - cache [cache_key_for(@articles, 'articles'), @some_active_model_object, 'box-type-view'] do
31
+ (...)
32
32
  ```
33
33
  * core concept of Russian Doll Caching is touching: `belongs_to :some_model, touch: true`, but if you do not use `touch`, you can still cache safely like this (example in haml):
34
34
 
35
35
  ```haml
36
- - cache [cache_key_for(@articles, 'articles'), @some_model_instance] do
37
- (...)
36
+ - cache [cache_key_for(@articles, 'articles'), @some_model_instance] do
37
+ (...)
38
38
  ```
39
39
 
40
40
  Example (haml):
41
41
 
42
42
  ```haml
43
- - cache cache_key_for(@service.datacenters, 'datacenters', current_company.cache_key, Time.now.utc.to_date.to_s) do
44
- (...)
43
+ - cache cache_key_for(@service.datacenters, 'datacenters', current_company.cache_key, Time.now.utc.to_date.to_s) do
44
+ (...)
45
45
  ```
46
46
 
47
47
  Rails will generate cache at:
@@ -59,7 +59,8 @@ Features:
59
59
  Example (haml):
60
60
 
61
61
  ```haml
62
- - cache cache_key_for_view(__FILE__, @service.datacenters, 'datacenters', current_company.cache_key, Time.now.utc.to_date.to_s) do
62
+ - cache cache_key_for_view(__FILE__, @service.datacenters, 'datacenters', current_company.cache_key, Time.now.utc.to_date.to_s) do
63
+ (...)
63
64
  ```
64
65
 
65
66
  Rails will generate cache at:
@@ -73,3 +74,12 @@ app_name:views/en/datacenters/5bd92bd352e7726d02175752913014711f5d412e/companies
73
74
 
74
75
  ./bin/setup
75
76
  bundle exec rake
77
+
78
+ ## Testing new versions
79
+
80
+ rm gemfiles/*.lock
81
+ bundle exec appraisal install
82
+
83
+ ## TODO
84
+
85
+ - add coveralls
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "flutie"
4
+ require "cache_key_for"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -1,5 +1,5 @@
1
1
  require 'cache_key_for/version'
2
2
 
3
- module Flutie
3
+ module CacheKeyFor
4
4
  require 'cache_key_for/railtie' if defined?(Rails)
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module CacheKeyFor
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_key_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Kalita
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-16 00:00:00.000000000 Z
11
+ date: 2016-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal