cached_values 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.0
1
+ 1.8.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cached_values}
8
- s.version = "1.8.0"
8
+ s.version = "1.8.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jack Danger Canty"]
12
- s.date = %q{2011-04-18}
12
+ s.date = %q{2011-05-27}
13
13
  s.description = %q{Speedup your ActiveRecord by storing and updating the results of SQL or Ruby expressions into record attributes}
14
14
  s.email = %q{rubygems@6brand.com}
15
15
  s.extra_rdoc_files = [
@@ -40,12 +40,6 @@ Gem::Specification.new do |s|
40
40
  s.require_paths = ["lib"]
41
41
  s.rubygems_version = %q{1.4.2}
42
42
  s.summary = %q{Memoize and persist calculations into ActiveRecord attributes}
43
- s.test_files = [
44
- "test/cached_values_test.rb",
45
- "test/leprechaun.rb",
46
- "test/schema.rb",
47
- "test/test_helper.rb"
48
- ]
49
43
 
50
44
  if s.respond_to? :specification_version then
51
45
  s.specification_version = 3
data/lib/cached_value.rb CHANGED
@@ -32,6 +32,10 @@ module ActiveRecord
32
32
  @target
33
33
  end
34
34
 
35
+ def to_yaml
36
+ target.is_a?(String) ? target : target.to_yaml
37
+ end
38
+
35
39
  def find_target(skip_cache = false)
36
40
  target = find_target_from_cache unless skip_cache
37
41
  unless target
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cached_values
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 8
9
- - 0
10
- version: 1.8.0
9
+ - 1
10
+ version: 1.8.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jack Danger Canty
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-18 00:00:00 -07:00
18
+ date: 2011-05-27 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -122,8 +122,5 @@ rubygems_version: 1.4.2
122
122
  signing_key:
123
123
  specification_version: 3
124
124
  summary: Memoize and persist calculations into ActiveRecord attributes
125
- test_files:
126
- - test/cached_values_test.rb
127
- - test/leprechaun.rb
128
- - test/schema.rb
129
- - test/test_helper.rb
125
+ test_files: []
126
+