active_metadata 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,8 @@ module ActiveMetadata::Persistence::History
9
9
  def save_history
10
10
  return if ActiveMetadata.skip_history?
11
11
  self.changes.each do |key, value|
12
+ # Do not go on in case if new and old values are nil
13
+ return if value.compact.empty?
12
14
  next if ActiveMetadata::CONFIG['history_skip_fields'].include?(key)
13
15
  ActiveMetadata::History.create! :value => value[1],:model_class => metadata_class, :model_id => metadata_id,:label => key.to_s, :created_by => current_user_id
14
16
  invalidate_history_cache_for key.to_s
@@ -26,11 +28,11 @@ module ActiveMetadata::Persistence::History
26
28
 
27
29
  def invalidate_history_cache_for field
28
30
  Rails.cache.delete history_cache_key(field)
29
- end
31
+ end
30
32
 
31
33
  def fetch_histories_for field, order
32
34
  ActiveMetadata::History.all(:conditions => {:model_class => metadata_class, :model_id => metadata_id,:label => field}, :order => order)
33
- end
35
+ end
34
36
 
35
37
 
36
38
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveMetadata
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,27 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-17 00:00:00.000000000 Z
13
+ date: 2013-01-10 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &2162999420 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - ~>
20
+ - - =
21
21
  - !ruby/object:Gem::Version
22
- version: 3.2.0
22
+ version: 3.2.10
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ~>
29
- - !ruby/object:Gem::Version
30
- version: 3.2.0
25
+ version_requirements: *2162999420
31
26
  - !ruby/object:Gem::Dependency
32
27
  name: sqlite3
33
- requirement: !ruby/object:Gem::Requirement
28
+ requirement: &2162998840 !ruby/object:Gem::Requirement
34
29
  none: false
35
30
  requirements:
36
31
  - - ! '>='
@@ -38,15 +33,10 @@ dependencies:
38
33
  version: '0'
39
34
  type: :development
40
35
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
36
+ version_requirements: *2162998840
47
37
  - !ruby/object:Gem::Dependency
48
38
  name: rspec-rails
49
- requirement: !ruby/object:Gem::Requirement
39
+ requirement: &2162998280 !ruby/object:Gem::Requirement
50
40
  none: false
51
41
  requirements:
52
42
  - - ! '>='
@@ -54,15 +44,10 @@ dependencies:
54
44
  version: '0'
55
45
  type: :development
56
46
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
47
+ version_requirements: *2162998280
63
48
  - !ruby/object:Gem::Dependency
64
49
  name: sqlite3
65
- requirement: !ruby/object:Gem::Requirement
50
+ requirement: &2162997720 !ruby/object:Gem::Requirement
66
51
  none: false
67
52
  requirements:
68
53
  - - ! '>='
@@ -70,15 +55,10 @@ dependencies:
70
55
  version: '0'
71
56
  type: :development
72
57
  prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
78
- version: '0'
58
+ version_requirements: *2162997720
79
59
  - !ruby/object:Gem::Dependency
80
60
  name: cucumber-rails
81
- requirement: !ruby/object:Gem::Requirement
61
+ requirement: &2162997060 !ruby/object:Gem::Requirement
82
62
  none: false
83
63
  requirements:
84
64
  - - ! '>='
@@ -86,15 +66,10 @@ dependencies:
86
66
  version: '0'
87
67
  type: :development
88
68
  prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
69
+ version_requirements: *2162997060
95
70
  - !ruby/object:Gem::Dependency
96
71
  name: ci_reporter
97
- requirement: !ruby/object:Gem::Requirement
72
+ requirement: &2162996320 !ruby/object:Gem::Requirement
98
73
  none: false
99
74
  requirements:
100
75
  - - ! '>='
@@ -102,15 +77,10 @@ dependencies:
102
77
  version: '0'
103
78
  type: :development
104
79
  prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
80
+ version_requirements: *2162996320
111
81
  - !ruby/object:Gem::Dependency
112
82
  name: paperclip
113
- requirement: !ruby/object:Gem::Requirement
83
+ requirement: &2162995520 !ruby/object:Gem::Requirement
114
84
  none: false
115
85
  requirements:
116
86
  - - ! '>='
@@ -118,15 +88,10 @@ dependencies:
118
88
  version: '0'
119
89
  type: :runtime
120
90
  prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
126
- version: '0'
91
+ version_requirements: *2162995520
127
92
  - !ruby/object:Gem::Dependency
128
93
  name: mime-types
129
- requirement: !ruby/object:Gem::Requirement
94
+ requirement: &2162994320 !ruby/object:Gem::Requirement
130
95
  none: false
131
96
  requirements:
132
97
  - - ! '>='
@@ -134,12 +99,7 @@ dependencies:
134
99
  version: '0'
135
100
  type: :runtime
136
101
  prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: '0'
102
+ version_requirements: *2162994320
143
103
  description: First implementation will write metadata on mongodb
144
104
  email:
145
105
  - acampolonghi@gmail.com
@@ -277,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
237
  version: '0'
278
238
  segments:
279
239
  - 0
280
- hash: 3648050187381051900
240
+ hash: -1573769057447502802
281
241
  required_rubygems_version: !ruby/object:Gem::Requirement
282
242
  none: false
283
243
  requirements:
@@ -286,10 +246,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
246
  version: '0'
287
247
  segments:
288
248
  - 0
289
- hash: 3648050187381051900
249
+ hash: -1573769057447502802
290
250
  requirements: []
291
251
  rubyforge_project: active_metadata
292
- rubygems_version: 1.8.24
252
+ rubygems_version: 1.8.11
293
253
  signing_key:
294
254
  specification_version: 3
295
255
  summary: Add metadata to fields in an active record model