sequel_bitemporal 0.8.2 → 0.8.3
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 +3 -1
- data/sequel_bitemporal.gemspec +1 -1
- data/spec/bitemporal_date_spec.rb +12 -0
- metadata +2 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8cee3a928e6040c66f2b5c628ca7f37bcf4451f2
|
|
4
|
+
data.tar.gz: bfaa006ec3fb917fc0552157a7a761514431f4ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ade148671ec5c5e3d6dde67c423583b2e9d7903d97f6876f841300ada4ce32cb231ffa50de7156bb27f5e46975e62f834c382e0f552ba172728980ed8179e305
|
|
7
|
+
data.tar.gz: ad5093d86f437e43c11eeb96da9a417e8c9d76c828a6f24a964828726979214e6e53c53b5c8309e971b3842eef00d9dc8ec5af3c18e1d937bc4edc08c4c60312
|
|
@@ -53,7 +53,9 @@ module Sequel
|
|
|
53
53
|
|
|
54
54
|
master.instance_eval do
|
|
55
55
|
@version_class = version
|
|
56
|
-
base_alias =
|
|
56
|
+
base_alias = opts.fetch :base_alias do
|
|
57
|
+
name ? underscore(demodulize(name)) : table_name
|
|
58
|
+
end
|
|
57
59
|
@versions_alias = "#{base_alias}_versions".to_sym
|
|
58
60
|
@current_version_alias = "#{base_alias}_current_version".to_sym
|
|
59
61
|
@audit_class = opts[:audit_class]
|
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.8.
|
|
6
|
+
s.version = "0.8.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"
|
|
@@ -844,4 +844,16 @@ describe "Sequel::Plugins::Bitemporal", "with audit, specifying how to get the a
|
|
|
844
844
|
)
|
|
845
845
|
master.update_attributes name: "King size", price: 98
|
|
846
846
|
end
|
|
847
|
+
it "can redefine base_alias manually" do
|
|
848
|
+
closure = @version_class
|
|
849
|
+
redefined_base_alias = Class.new Sequel::Model do
|
|
850
|
+
set_dataset :rooms
|
|
851
|
+
plugin :bitemporal, version_class: closure, base_alias: :anything
|
|
852
|
+
end
|
|
853
|
+
expect do
|
|
854
|
+
redefined_base_alias.eager_graph(
|
|
855
|
+
:current_version
|
|
856
|
+
).where("anything_current_version.id IS NOT NULL").first
|
|
857
|
+
end.not_to raise_error
|
|
858
|
+
end
|
|
847
859
|
end
|
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.8.
|
|
4
|
+
version: 0.8.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joseph HALTER
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: sequel
|
|
@@ -133,4 +133,3 @@ test_files:
|
|
|
133
133
|
- spec/spec_helper.rb
|
|
134
134
|
- spec/support/bitemporal_matchers.rb
|
|
135
135
|
- spec/support/db.rb
|
|
136
|
-
has_rdoc:
|