sequel_bitemporal 0.7.8 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sequel/plugins/bitemporal.rb +1 -0
- data/sequel_bitemporal.gemspec +1 -1
- data/spec/bitemporal_date_spec.rb +16 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0a0edda6ed50e2983eb44bd27cdfd5806ab187f
|
4
|
+
data.tar.gz: 7a95abcb8b2dddc297fcd00ce37305c1d2dbbd4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5d2e9b84e34898fe9860c8c98fc573361003454e82db3031c557e9404020d7632e523a1d289b55f86a6de90e883c40c0242062ff120d79f78f0e33a77720760
|
7
|
+
data.tar.gz: 2ad4054e1329a72e7031d3fe1d2bdea3d52b548d39088a6484f821a6f00aff599aa7e6ccc328f9b7c90131d45b7e3ce4630322618c4e2cf619cd991e808193c3
|
@@ -61,6 +61,7 @@ module Sequel
|
|
61
61
|
@propagate_per_column = opts.fetch(:propagate_per_column, false)
|
62
62
|
@version_uses_string_nilifier = version.plugins.map(&:to_s).include? "Sequel::Plugins::StringNilifier"
|
63
63
|
@excluded_columns = Sequel::Plugins::Bitemporal.bitemporal_excluded_columns
|
64
|
+
@excluded_columns += columns
|
64
65
|
@excluded_columns += Array opts[:excluded_columns] if opts[:excluded_columns]
|
65
66
|
@use_ranges = if opts[:ranges]
|
66
67
|
db = self.db
|
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.
|
6
|
+
s.version = "0.8.0"
|
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"
|
@@ -552,6 +552,22 @@ describe "Sequel::Plugins::Bitemporal" do
|
|
552
552
|
expect{ master.name }.to raise_error NoMethodError
|
553
553
|
master.price.should == 98
|
554
554
|
end
|
555
|
+
it "avoids delegation of columns which are both in master and version" do
|
556
|
+
closure = @version_class
|
557
|
+
DB.create_table! :rooms_with_name do
|
558
|
+
primary_key :id
|
559
|
+
String :name
|
560
|
+
end
|
561
|
+
without_delegation_class = Class.new Sequel::Model do
|
562
|
+
set_dataset :rooms_with_name
|
563
|
+
plugin :bitemporal, version_class: closure
|
564
|
+
end
|
565
|
+
master = without_delegation_class.new name: "Master Hotel"
|
566
|
+
master.attributes = {name: "Single Standard", price: 98}
|
567
|
+
master.name.should == "Master Hotel"
|
568
|
+
master.price.should == 98
|
569
|
+
DB.drop_table :rooms_with_name
|
570
|
+
end
|
555
571
|
it "get current_version association name from class name" do
|
556
572
|
class MyNameVersion < Sequel::Model
|
557
573
|
set_dataset :room_versions
|