dirty_history 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.5.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dirty_history"
8
- s.version = "0.5.3"
8
+ s.version = "0.5.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gavin Todes"]
12
- s.date = "2012-03-07"
12
+ s.date = "2012-06-01"
13
13
  s.description = "Dirty History is a simple gem that allows you to keep track of changes to specific fields in your Rails models using the ActiveRecord::Dirty module."
14
14
  s.email = "gavin.todes@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -2267,7 +2267,7 @@ Gem::Specification.new do |s|
2267
2267
  s.homepage = "http://github.com/GAV1N/dirty_history"
2268
2268
  s.licenses = ["MIT"]
2269
2269
  s.require_paths = ["lib"]
2270
- s.rubygems_version = "1.8.13"
2270
+ s.rubygems_version = "1.8.21"
2271
2271
  s.summary = "Easily keep track of changes to specific model fields."
2272
2272
 
2273
2273
  if s.respond_to? :specification_version then
@@ -2,16 +2,13 @@ class DirtyHistoryRecord < ActiveRecord::Base
2
2
  belongs_to :creator, :polymorphic => true
3
3
  belongs_to :object, :polymorphic => true
4
4
 
5
- validates_presence_of :old_value, :unless => proc { |record| record.performing_manual_update || record.object.initialize_dirty_history }
6
5
  validates_presence_of :object_type, :object_id, :column_name, :column_type, :new_value
7
6
 
8
7
  scope :created_by, lambda { |creator| where(["dirty_history_records.creator_id = ? AND dirty_history_records.creator_type = ?", creator.id, creator.class.name]) }
9
8
  scope :not_created_by, lambda { |non_creator| where(["dirty_history_records.creator_id <> ? OR dirty_history_records.creator_type <> ?", non_creator.id, non_creator.class.name]) }
10
9
  scope :for_object_type, lambda { |object_type| where(:object_type => object_type.to_s.classify) }
11
10
  scope :for_attribute, lambda { |attribute| where(:column_name => attribute.to_s) }
12
-
13
- attr_accessor :performing_manual_update
14
-
11
+
15
12
  [:new_value, :old_value].each do |attribute|
16
13
  define_method "#{attribute}" do
17
14
  val_to_col_type(attribute)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dirty_history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-07 00:00:00.000000000Z
12
+ date: 2012-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
16
- requirement: &2151446500 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2151446500
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: bundler
27
- requirement: &2151443960 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *2151443960
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: jeweler
38
- requirement: &2151442180 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *2151442180
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rcov
49
- requirement: &2151440260 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,7 +69,12 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *2151440260
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  description: Dirty History is a simple gem that allows you to keep track of changes
59
79
  to specific fields in your Rails models using the ActiveRecord::Dirty module.
60
80
  email: gavin.todes@gmail.com
@@ -2325,7 +2345,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
2325
2345
  version: '0'
2326
2346
  segments:
2327
2347
  - 0
2328
- hash: -2185214978539857918
2348
+ hash: -2655685604412625334
2329
2349
  required_rubygems_version: !ruby/object:Gem::Requirement
2330
2350
  none: false
2331
2351
  requirements:
@@ -2334,7 +2354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2334
2354
  version: '0'
2335
2355
  requirements: []
2336
2356
  rubyforge_project:
2337
- rubygems_version: 1.8.13
2357
+ rubygems_version: 1.8.21
2338
2358
  signing_key:
2339
2359
  specification_version: 3
2340
2360
  summary: Easily keep track of changes to specific model fields.