forest_liana 9.20.6 → 9.20.7

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
  SHA256:
3
- metadata.gz: 31b55dea3884f93640870ded7c0f4079cea1792d7842b05c0b3d1c610a463d0b
4
- data.tar.gz: bc7faa9c4f0302159f57d5e1e376d697047fd0a0c2ad1c94f3fb651078a87395
3
+ metadata.gz: ed69fd6aba8fea8a03a02738a6f9ca6e75ae334980e501470dbabe1d58c37497
4
+ data.tar.gz: a6439711199628972e57f782968244c096566919801510d2193e3d16fbe5d800
5
5
  SHA512:
6
- metadata.gz: 2e707a5df3a857e9bbb61c0cefa2d593feae5b724f05b3d18f45df2a0abdcc724d6db0367b514e89d9074c5646b8994d2c2d0330735b9da8e4a3810f5460317d
7
- data.tar.gz: f757f804039e32d4ef70b0b544ca1297933d633ef063ff692fa79c5fc8d7ee5daeee817a859956c7ed4fcfaaab966ef2fc6dd70d47061cbcd1218e059136bcad
6
+ metadata.gz: e6101bb2d0ea3dfe2b3944cdf5d2ca3391ecd26450653517dd30553ffd4075dcb0cb23b6659996303259f6bd931c8054a58986f9337adc5417f94df8f1aac8b2
7
+ data.tar.gz: 3de7e6bc1710e6e8f8e1c8b1857775091e7d5d707d57c9f7f4dd1a993c7fbac111e350a88d4623e90357b8815aaf74a1de6a01710c01a81bd039b465ca19f600
@@ -415,7 +415,7 @@ module ForestLiana
415
415
  case column.type
416
416
  when :boolean
417
417
  type = 'Boolean'
418
- when :datetime
418
+ when :datetime, :timestamptz, :timestamp
419
419
  type = 'Date'
420
420
  when :date
421
421
  type = 'Dateonly'
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "9.20.6"
2
+ VERSION = "9.20.7"
3
3
  end
@@ -1,5 +1,25 @@
1
1
  module ForestLiana
2
2
  describe SchemaAdapter do
3
+ describe '#get_type_for' do
4
+ let(:adapter) { described_class.new(Tree) }
5
+
6
+ def column_of_type(type)
7
+ double('Column', name: 'some_column', type: type, array: false)
8
+ end
9
+
10
+ it 'maps a timestamptz column to the Date type' do
11
+ expect(adapter.send(:get_type_for, column_of_type(:timestamptz))).to eq 'Date'
12
+ end
13
+
14
+ it 'maps a timestamp column to the Date type' do
15
+ expect(adapter.send(:get_type_for, column_of_type(:timestamp))).to eq 'Date'
16
+ end
17
+
18
+ it 'still maps a datetime column to the Date type' do
19
+ expect(adapter.send(:get_type_for, column_of_type(:datetime))).to eq 'Date'
20
+ end
21
+ end
22
+
3
23
  describe 'perform' do
4
24
  context 'with polymorphic association' do
5
25
  it 'should define the association with the referenced models' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.20.6
4
+ version: 9.20.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda