master_cache 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/.travis.yml +8 -0
- data/Gemfile +4 -0
- data/Guardfile +13 -0
- data/LICENSE.txt +22 -0
- data/README.md +80 -0
- data/Rakefile +1 -0
- data/lib/generators/master_cache/config_generator.rb +14 -0
- data/lib/generators/master_cache/templates/master_cache_config.rb +5 -0
- data/lib/master_cache.rb +10 -0
- data/lib/master_cache/config.rb +41 -0
- data/lib/master_cache/model_extension.rb +36 -0
- data/lib/master_cache/version.rb +3 -0
- data/master_cache.gemspec +31 -0
- data/spec/master_cache/config_spec.rb +46 -0
- data/spec/master_cache/model_extension_spec.rb +94 -0
- data/spec/spec_helper.rb +17 -0
- metadata +216 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'rspec', :cli => '--color --format s', :all_on_start => false, :all_after_pass => false do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec/" }
|
8
|
+
end
|
9
|
+
|
10
|
+
guard 'bundler' do
|
11
|
+
watch('Gemfile')
|
12
|
+
watch(/^.+\.gemspec/)
|
13
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 DianthuDia
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# MasterCache
|
2
|
+
|
3
|
+
[![Build Status](https://secure.travis-ci.org/DianthuDia/master_cache.png)](http://travis-ci.org/DianthuDia/master_cache) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/DianthuDia/master_cache)
|
4
|
+
|
5
|
+
A master record cache plugin
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
gem 'master_cache'
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install master_cache
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
### Basics
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
class CreateAllTables < ActiveRecord::Migration
|
27
|
+
def self.up
|
28
|
+
create_table(:employee_types) {|t| t.string :name; t.integer :position}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class EmployeeType
|
33
|
+
master_cache # :const_name => :name, :order_name => :position, :all_name => 'INSTANCES'
|
34
|
+
end
|
35
|
+
|
36
|
+
EmployeeType.create :name => 'STAFF', :position => 1
|
37
|
+
EmployeeType.create :name => 'EMPLOYEE', :position => 2
|
38
|
+
```
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
EmployeeType::STAFF.id # => 1
|
42
|
+
EmployeeType::EMPLOYEE.id # => 2
|
43
|
+
|
44
|
+
EmployeeType.find(1).staff? # => true
|
45
|
+
EmployeeType.find(2).staff? # => false
|
46
|
+
|
47
|
+
EmployeeType::INSTANCES # => [EmployeeType::STAFF, EmployeeType::EMPLOYEE]
|
48
|
+
```
|
49
|
+
|
50
|
+
### General configuration options
|
51
|
+
|
52
|
+
You can configure the following default values by overriding these values using `MasterCache.configure` method.
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
all_name # 'INSTANCES' by default
|
56
|
+
const_name # :name by default
|
57
|
+
order_name # :position by default
|
58
|
+
```
|
59
|
+
|
60
|
+
There's a handy generator that generates the default configuration file into config/initializers directory.
|
61
|
+
Run the following generator command, then edit the generated file.
|
62
|
+
|
63
|
+
`$ rails g master_cache:config`
|
64
|
+
|
65
|
+
## Supported versions
|
66
|
+
|
67
|
+
* Ruby 1.8.7, 1.9.3
|
68
|
+
* ActiveRecord 3.x
|
69
|
+
|
70
|
+
## Contributing
|
71
|
+
|
72
|
+
1. Fork it
|
73
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
74
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
75
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
76
|
+
5. Create new Pull Request
|
77
|
+
|
78
|
+
## License
|
79
|
+
|
80
|
+
MIT License. Copyright 2012 DianthuDia.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module MasterCache::Generators
|
2
|
+
class ConfigGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
4
|
+
|
5
|
+
desc <<DESC
|
6
|
+
Description:
|
7
|
+
Copies master_cache configuration file to your application's initializer directory.
|
8
|
+
DESC
|
9
|
+
|
10
|
+
def copy_config_file
|
11
|
+
template 'master_cache_config.rb', 'config/initializers/master_cache_config.rb'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/master_cache.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'active_support/configurable'
|
2
|
+
|
3
|
+
module MasterCache
|
4
|
+
# Configures global settings for MasterCache
|
5
|
+
# MasterCache.configure do |config|
|
6
|
+
# config.all_name = :instances
|
7
|
+
# end
|
8
|
+
def self.configure(&block)
|
9
|
+
yield @config ||= MasterCache::Configuration.new
|
10
|
+
end
|
11
|
+
|
12
|
+
# Global settings for MasterCache
|
13
|
+
def self.config
|
14
|
+
@config
|
15
|
+
end
|
16
|
+
|
17
|
+
# need a Class for 3.0
|
18
|
+
class Configuration #:nodoc:
|
19
|
+
include ActiveSupport::Configurable
|
20
|
+
config_accessor :all_name
|
21
|
+
config_accessor :const_name
|
22
|
+
config_accessor :order_name
|
23
|
+
|
24
|
+
def param_name
|
25
|
+
config.param_name.respond_to?(:call) ? config.param_name.call : config.param_name
|
26
|
+
end
|
27
|
+
|
28
|
+
# define param_name writer (copied from AS::Configurable)
|
29
|
+
writer, line = 'def param_name=(value); config.param_name = value; end', __LINE__
|
30
|
+
singleton_class.class_eval writer, __FILE__, line
|
31
|
+
class_eval writer, __FILE__, line
|
32
|
+
end
|
33
|
+
|
34
|
+
# default
|
35
|
+
configure do |config|
|
36
|
+
config.all_name = 'INSTANCES'
|
37
|
+
config.const_name = :name
|
38
|
+
config.order_name = :position
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module MasterCache::ModelExtension
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
module ClassMethods
|
5
|
+
# MasterModel should be called (optional arguments):
|
6
|
+
#
|
7
|
+
# master_cache(:const_name => :name, :order_name => :position, :all_name => 'INSTANCES')
|
8
|
+
#
|
9
|
+
# const_name: const name
|
10
|
+
# order_name: 'order' name
|
11
|
+
# all_name: cached all instance name
|
12
|
+
def master_cache(options = {})
|
13
|
+
MasterCache.config.tap do |c|
|
14
|
+
options.reverse_merge! :const_name => c.const_name, :order_name => c.order_name, :all_name => c.all_name
|
15
|
+
end
|
16
|
+
|
17
|
+
return if const_defined?(options[:all_name]) && const_get(options[:all_name]).present?
|
18
|
+
|
19
|
+
# default order
|
20
|
+
default_scope order: options[:order_name]
|
21
|
+
|
22
|
+
# Constantize all instances
|
23
|
+
_all = all rescue [] # return [] this before migration
|
24
|
+
const_set options[:all_name], _all
|
25
|
+
|
26
|
+
# Constantize each instance
|
27
|
+
_all.each do |instance|
|
28
|
+
const_name = instance.send(options[:const_name]).to_s.upcase
|
29
|
+
next if const_name.empty? || const_defined?(const_name)
|
30
|
+
|
31
|
+
const_set const_name, instance
|
32
|
+
send :define_method, "#{const_name.downcase}?" do; self === instance end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'master_cache/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "master_cache"
|
8
|
+
gem.version = MasterCache::VERSION
|
9
|
+
gem.authors = ["DianthuDia"]
|
10
|
+
gem.email = ["dianthudia@y7mail.com"]
|
11
|
+
gem.description = "A master record cache plugin"
|
12
|
+
gem.summary = "master_cache provides 'master record' cache and easy access these"
|
13
|
+
gem.homepage = "https://github.com/DianthuDia/master_cache"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
|
20
|
+
gem.add_dependency 'activerecord', '>= 3.0.0'
|
21
|
+
|
22
|
+
gem.add_development_dependency 'rake'
|
23
|
+
gem.add_development_dependency 'rspec'
|
24
|
+
gem.add_development_dependency 'sqlite3'
|
25
|
+
gem.add_development_dependency 'database_cleaner'
|
26
|
+
gem.add_development_dependency 'guard'
|
27
|
+
gem.add_development_dependency 'rb-fsevent' if RUBY_PLATFORM.include? 'darwin'
|
28
|
+
gem.add_development_dependency 'rb-inotify' if RUBY_PLATFORM.include? 'linux'
|
29
|
+
gem.add_development_dependency 'guard-bundler'
|
30
|
+
gem.add_development_dependency 'guard-rspec'
|
31
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MasterCache::Configuration do
|
4
|
+
shared_examples_for 'a configure object' do
|
5
|
+
context 'by default' do
|
6
|
+
it { should eq default }
|
7
|
+
end
|
8
|
+
|
9
|
+
context 'configured via config block' do
|
10
|
+
before do
|
11
|
+
MasterCache.configure {|c| c.send "#{config_name}=", other}
|
12
|
+
end
|
13
|
+
|
14
|
+
it { should eq other }
|
15
|
+
|
16
|
+
after do
|
17
|
+
MasterCache.configure {|c| c.send "#{config_name}=", default}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#all_name' do
|
23
|
+
subject { MasterCache.config.all_name }
|
24
|
+
let(:config_name) { :all_name }
|
25
|
+
let(:default) { 'INSTANCES' }
|
26
|
+
let(:other) { 'ALL_DATA' }
|
27
|
+
it_behaves_like 'a configure object'
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '#const_name' do
|
31
|
+
subject { MasterCache.config.const_name }
|
32
|
+
let(:config_name) { :const_name }
|
33
|
+
let(:default) { :name }
|
34
|
+
let(:other) { :master_name }
|
35
|
+
it_behaves_like 'a configure object'
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '#order_name' do
|
39
|
+
subject { MasterCache.config.order_name }
|
40
|
+
let(:config_name) { :order_name }
|
41
|
+
let(:default) { :position }
|
42
|
+
let(:other) { :sort_order }
|
43
|
+
it_behaves_like 'a configure object'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
# migrations
|
4
|
+
class CreateAllTables < ActiveRecord::Migration
|
5
|
+
def self.up
|
6
|
+
create_table(:test_types) {|t| t.string :name; t.integer :position; t.string :master_name; t.integer :sort_order}
|
7
|
+
end
|
8
|
+
end
|
9
|
+
ActiveRecord::Migration.verbose = false
|
10
|
+
CreateAllTables.up
|
11
|
+
|
12
|
+
describe MasterCache::ModelExtension do
|
13
|
+
before { class TestType < ActiveRecord::Base; end }
|
14
|
+
# after { TestType.delete_all }
|
15
|
+
after { Object.send :remove_const, :TestType }
|
16
|
+
|
17
|
+
describe '.master_cache' do
|
18
|
+
context 'called' do
|
19
|
+
before { class TestType < ActiveRecord::Base; master_cache end }
|
20
|
+
before { class TestUser < ActiveRecord::Base; end }
|
21
|
+
after { Object.send :remove_const, :TestUser }
|
22
|
+
|
23
|
+
it { TestType.should be_const_defined 'INSTANCES' }
|
24
|
+
it { TestUser.should_not be_const_defined 'INSTANCES' }
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'no call' do
|
28
|
+
it { TestType.should_not be_const_defined 'INSTANCES' }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "'all_name' option" do
|
33
|
+
context 'no set' do
|
34
|
+
before { class TestType < ActiveRecord::Base; master_cache end }
|
35
|
+
it { TestType.should be_const_defined 'INSTANCES' }
|
36
|
+
end
|
37
|
+
|
38
|
+
context "set 'ALL_DATA'" do
|
39
|
+
before { class TestType < ActiveRecord::Base; master_cache :all_name => 'ALL_DATA' end }
|
40
|
+
it { TestType.should be_const_defined 'ALL_DATA' }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe "'const_name' option" do
|
45
|
+
context 'no set' do
|
46
|
+
before { TestType.create :name => 'APPLE'}
|
47
|
+
before { class TestType < ActiveRecord::Base; master_cache end }
|
48
|
+
it { TestType.should be_const_defined 'APPLE' }
|
49
|
+
it { TestType.should be_method_defined 'apple?' }
|
50
|
+
end
|
51
|
+
|
52
|
+
context 'set :master_name' do
|
53
|
+
context "a record don't have :master_name" do
|
54
|
+
before { TestType.create :name => 'APPLE'}
|
55
|
+
before { class TestType < ActiveRecord::Base; master_cache :const_name => :master_name end }
|
56
|
+
it { TestType.should_not be_const_defined 'APPLE' }
|
57
|
+
it { TestType.should_not be_method_defined 'apple?' }
|
58
|
+
end
|
59
|
+
|
60
|
+
context "a record have :master_name" do
|
61
|
+
before { TestType.create :master_name => 'APPLE'}
|
62
|
+
before { class TestType < ActiveRecord::Base; master_cache :const_name => :master_name end }
|
63
|
+
it { TestType.should be_const_defined 'APPLE' }
|
64
|
+
it { TestType.should be_method_defined 'apple?' }
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe "'order_name' option" do
|
70
|
+
context 'no set' do
|
71
|
+
before { 3.downto(1){|i| TestType.create :position => i} }
|
72
|
+
before { class TestType < ActiveRecord::Base; master_cache end }
|
73
|
+
it { TestType.all.first.position.should be 1}
|
74
|
+
end
|
75
|
+
|
76
|
+
context 'set :sort_order' do
|
77
|
+
context "a record don't have :sort_order" do
|
78
|
+
before { 3.downto(1){|i| TestType.create :position => i} }
|
79
|
+
before { class TestType < ActiveRecord::Base; master_cache :order_name => :sort_order end }
|
80
|
+
subject { TestType.all.first }
|
81
|
+
its(:position) { should_not be 1}
|
82
|
+
its(:sort_order) { should_not be 1}
|
83
|
+
end
|
84
|
+
|
85
|
+
context "a record have :sort_order" do
|
86
|
+
before { 3.downto(1){|i| TestType.create :sort_order => i} }
|
87
|
+
before { class TestType < ActiveRecord::Base; master_cache :order_name => :sort_order end }
|
88
|
+
subject { TestType.all.first }
|
89
|
+
its(:position) { should_not be 1}
|
90
|
+
its(:sort_order) { should be 1}
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'rubygems'
|
3
|
+
require 'master_cache'
|
4
|
+
|
5
|
+
# connection
|
6
|
+
ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
|
7
|
+
ActiveRecord::Base.establish_connection('test')
|
8
|
+
|
9
|
+
require 'database_cleaner'
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.before(:suite) do
|
12
|
+
DatabaseCleaner.strategy = :transaction
|
13
|
+
DatabaseCleaner.clean_with :truncation
|
14
|
+
end
|
15
|
+
config.before(:each){ DatabaseCleaner.start }
|
16
|
+
config.after(:each){ DatabaseCleaner.clean }
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,216 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: master_cache
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- DianthuDia
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-10-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activerecord
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.0.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.0.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: sqlite3
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: database_cleaner
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: guard
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rb-fsevent
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: guard-bundler
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: guard-rspec
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
description: A master record cache plugin
|
159
|
+
email:
|
160
|
+
- dianthudia@y7mail.com
|
161
|
+
executables: []
|
162
|
+
extensions: []
|
163
|
+
extra_rdoc_files: []
|
164
|
+
files:
|
165
|
+
- .gitignore
|
166
|
+
- .rspec
|
167
|
+
- .travis.yml
|
168
|
+
- Gemfile
|
169
|
+
- Guardfile
|
170
|
+
- LICENSE.txt
|
171
|
+
- README.md
|
172
|
+
- Rakefile
|
173
|
+
- lib/generators/master_cache/config_generator.rb
|
174
|
+
- lib/generators/master_cache/templates/master_cache_config.rb
|
175
|
+
- lib/master_cache.rb
|
176
|
+
- lib/master_cache/config.rb
|
177
|
+
- lib/master_cache/model_extension.rb
|
178
|
+
- lib/master_cache/version.rb
|
179
|
+
- master_cache.gemspec
|
180
|
+
- spec/master_cache/config_spec.rb
|
181
|
+
- spec/master_cache/model_extension_spec.rb
|
182
|
+
- spec/spec_helper.rb
|
183
|
+
homepage: https://github.com/DianthuDia/master_cache
|
184
|
+
licenses: []
|
185
|
+
post_install_message:
|
186
|
+
rdoc_options: []
|
187
|
+
require_paths:
|
188
|
+
- lib
|
189
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
190
|
+
none: false
|
191
|
+
requirements:
|
192
|
+
- - ! '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
segments:
|
196
|
+
- 0
|
197
|
+
hash: 2184575510681391349
|
198
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
|
+
none: false
|
200
|
+
requirements:
|
201
|
+
- - ! '>='
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '0'
|
204
|
+
segments:
|
205
|
+
- 0
|
206
|
+
hash: 2184575510681391349
|
207
|
+
requirements: []
|
208
|
+
rubyforge_project:
|
209
|
+
rubygems_version: 1.8.24
|
210
|
+
signing_key:
|
211
|
+
specification_version: 3
|
212
|
+
summary: master_cache provides 'master record' cache and easy access these
|
213
|
+
test_files:
|
214
|
+
- spec/master_cache/config_spec.rb
|
215
|
+
- spec/master_cache/model_extension_spec.rb
|
216
|
+
- spec/spec_helper.rb
|