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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 227ff043766a6030bde1ae6f9d5e58a771abb807
4
- data.tar.gz: 5639c0e12d4fd9f00756f9d94d8bddd03da50fc0
3
+ metadata.gz: d0a0edda6ed50e2983eb44bd27cdfd5806ab187f
4
+ data.tar.gz: 7a95abcb8b2dddc297fcd00ce37305c1d2dbbd4f
5
5
  SHA512:
6
- metadata.gz: ea940479cac3610e982e9ec7f00cb5a2dafe9cb710e0784109aef31aebce7537c8ee241be5c94fcfe4296324a29f1749278eaee6a7859359682c837464f61645
7
- data.tar.gz: 48548892a85814d45aeed26f383aa5262eacd944701a13a38048888ea8d7baac69eb19e5a898ff08dfd1cf84293179f04482415bb6401c115a5efaf68f0c5d80
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
@@ -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.7.8"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_bitemporal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph HALTER