qor_cache 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'qor_dsl', :path => '../qor_dsl'
4
- gem 'qor_test', :path => '../qor_test'
5
-
3
+ gem 'qor_dsl'
4
+ gem 'qor_test'
6
5
  gem 'factory_girl_rails'
6
+
7
7
  gemspec
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Qor Cache
2
2
  =========
3
3
 
4
+ [![Build Status](https://secure.travis-ci.org/qor/qor_cache.png?branch=master)][travis]
5
+ [![Code Climate](https://codeclimate.com/badge.png)][codeclimate]
6
+ [travis]: http://travis-ci.org/qor/qor_cache
7
+ [codeclimate]: https://codeclimate.com/github/qor/qor_cache
8
+
4
9
  ## Usage
5
10
 
6
11
  # config/qor/cache.rb
data/lib/qor_cache.rb CHANGED
@@ -55,7 +55,7 @@ module Qor
55
55
  def self.#{method}(*args)
56
56
  _cache_key = Digest::MD5.hexdigest([
57
57
  :#{method},
58
- #{node.data}.map {|x| qor_cache_key(x) },
58
+ #{node.data.inspect}.map {|x| qor_cache_key(x) },
59
59
  cache_key,
60
60
  args.map(&:inspect).join("-")
61
61
  ].map(&:to_s).join("-"))
@@ -9,8 +9,10 @@ module Qor
9
9
  end
10
10
 
11
11
  initializer "qor_cache_init_cache_method", :after => "insert_active_record_methods_for_qor_cache" do
12
- Qor::Cache::Base.init_cache_methods
13
- Qor::Cache::Base.init_cache_class_methods
12
+ ActiveSupport.on_load(:after_initialize) do
13
+ Qor::Cache::Base.init_cache_methods
14
+ Qor::Cache::Base.init_cache_class_methods
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -1,5 +1,5 @@
1
1
  module Qor
2
2
  module Cache
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
data/test/test_helper.rb CHANGED
@@ -12,6 +12,8 @@ Rails.backtrace_cleaner.remove_silencers!
12
12
  # Load support files
13
13
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
14
14
 
15
+ ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
16
+
15
17
  # Load fixtures from the engine
16
18
  if ActiveSupport::TestCase.method_defined?(:fixture_path=)
17
19
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qor_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2012-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: qor_test
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  requirements: []
165
165
  rubyforge_project:
166
- rubygems_version: 1.8.23
166
+ rubygems_version: 1.8.24
167
167
  signing_key:
168
168
  specification_version: 3
169
169
  summary: Qor Cache