sequel_bitemporal 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sequel/plugins/bitemporal.rb +11 -14
- data/sequel_bitemporal.gemspec +1 -1
- metadata +1 -1
@@ -333,20 +333,17 @@ module Sequel
|
|
333
333
|
end
|
334
334
|
|
335
335
|
def attributes_hold_changes?(attributes)
|
336
|
-
if new? || !current_version
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
else
|
348
|
-
current_version.send(key)!=new_value
|
349
|
-
end
|
336
|
+
return true if new? || !current_version
|
337
|
+
attributes.detect do |key, new_value|
|
338
|
+
case key
|
339
|
+
when :master_id, :created_at, :expired_at
|
340
|
+
false
|
341
|
+
when :valid_from
|
342
|
+
new_value && new_value<current_version.valid_from
|
343
|
+
when :valid_to
|
344
|
+
new_value || new_value!=current_version.valid_to
|
345
|
+
else
|
346
|
+
current_version.send(key)!=new_value
|
350
347
|
end
|
351
348
|
end
|
352
349
|
end
|
data/sequel_bitemporal.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "sequel_bitemporal"
|
6
|
-
s.version = "0.5.
|
6
|
+
s.version = "0.5.3"
|
7
7
|
s.authors = ["Joseph HALTER", "Jonathan TRON"]
|
8
8
|
s.email = ["joseph.halter@thetalentbox.com", "jonathan.tron@thetalentbox.com"]
|
9
9
|
s.homepage = "https://github.com/TalentBox/sequel_bitemporal"
|