CachedSupermodel 0.1.2.3 → 0.1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rubygems'
4
4
  require 'hoe'
5
5
  require './lib/cached_supermodel.rb'
6
6
 
7
- Hoe.new('CachedSupermodel', '0.1.2.3') do |p|
7
+ Hoe.new('CachedSupermodel', '0.1.2.4') do |p|
8
8
  p.summary = 'A library that automatically caches all ActiveRecord::Base instances in memcache using the AdoccaMemcache gem.'
9
9
  p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
10
10
  p.author = 'adocca Entertainment AB'
@@ -1,7 +1,7 @@
1
1
 
2
2
  $: << File.dirname(__FILE__)
3
3
 
4
- require_gem 'rails'
4
+ gem 'rails'
5
5
 
6
6
  require 'cs_active_record'
7
7
  require 'cs_associations'
@@ -1,4 +1,5 @@
1
1
  require 'timeout'
2
+ require 'active_record'
2
3
 
3
4
  #
4
5
  # Some monkeypatches upon ActiveRecord::Base
@@ -85,12 +85,11 @@ ActiveRecord::Associations::ClassMethods.class_eval do
85
85
  if association.nil? || force_reload
86
86
  association = association_proxy_class.new(self, reflection)
87
87
  retval = association.reload
88
- unless retval.nil?
89
- instance_variable_set("@#{reflection.name}", association)
90
- else
88
+ unless retval
91
89
  instance_variable_set("@#{reflection.name}", nil)
92
90
  return nil
93
91
  end
92
+ instance_variable_set("@#{reflection.name}", association)
94
93
  end
95
94
  association
96
95
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: CachedSupermodel
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.2.3
7
- date: 2007-02-14 00:00:00 +01:00
6
+ version: 0.1.2.4
7
+ date: 2007-03-14 00:00:00 +01:00
8
8
  summary: A library that automatically caches all ActiveRecord::Base instances in memcache using the AdoccaMemcache gem.
9
9
  require_paths:
10
10
  - lib
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
+ post_install_message:
28
29
  authors:
29
30
  - adocca Entertainment AB
30
31
  files:
@@ -51,20 +52,20 @@ requirements: []
51
52
 
52
53
  dependencies:
53
54
  - !ruby/object:Gem::Dependency
54
- name: hoe
55
+ name: AdoccaMemcache
55
56
  version_requirement:
56
57
  version_requirements: !ruby/object:Gem::Version::Requirement
57
58
  requirements:
58
59
  - - ">="
59
60
  - !ruby/object:Gem::Version
60
- version: 1.1.4
61
+ version: 0.1.0
61
62
  version:
62
63
  - !ruby/object:Gem::Dependency
63
- name: AdoccaMemcache
64
+ name: hoe
64
65
  version_requirement:
65
66
  version_requirements: !ruby/object:Gem::Version::Requirement
66
67
  requirements:
67
68
  - - ">="
68
69
  - !ruby/object:Gem::Version
69
- version: 0.1.0
70
+ version: 1.2.0
70
71
  version: