dbf 4.1.1 → 4.1.2
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/Gemfile.lock +3 -3
- data/docs/supported_types.markdown +16 -31
- data/lib/dbf/column_type.rb +1 -1
- data/lib/dbf/version.rb +1 -1
- data/spec/dbf/column_spec.rb +7 -7
- data/spec/spec_helper.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b6cdaff3283aa216120ba94a5301ccdb2bdcac4d48549a2c10677684e1b01a4
|
4
|
+
data.tar.gz: e95965ac3b2415ce00db81f5e066e0dc5761cce1d35345f152b4c349d387f51e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dce2c6e83afa30f01e209175cf0b4391e24dd06e5738be754fbce53d4812c01b2357da125e00ab233703f7b8fbbcbddcabf4e0a9778d25884cc801b4850bd0f1
|
7
|
+
data.tar.gz: 2ff59e987e773d92abc46b11130c2403c013eb3c0309be0a4bb995b85e61b8b61afc066140e055fdc6bb345107ad10940194569bebd886a838cfaca7441f1fe3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dbf (4.
|
4
|
+
dbf (4.1.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
rspec-mocks (~> 3.8.0)
|
58
58
|
rspec-core (3.8.0)
|
59
59
|
rspec-support (~> 3.8.0)
|
60
|
-
rspec-expectations (3.8.
|
60
|
+
rspec-expectations (3.8.1)
|
61
61
|
diff-lcs (>= 1.2.0, < 2.0)
|
62
62
|
rspec-support (~> 3.8.0)
|
63
63
|
rspec-mocks (3.8.0)
|
@@ -96,4 +96,4 @@ DEPENDENCIES
|
|
96
96
|
rubocop-rspec
|
97
97
|
|
98
98
|
BUNDLED WITH
|
99
|
-
|
99
|
+
1.17.3
|
@@ -1,36 +1,21 @@
|
|
1
1
|
# DBF supported data types
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
20
|
-
| 7b | dBase IV with memo file | Y | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - |
|
21
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
22
|
-
| 83 | dBase III with memo file | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - |
|
23
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
24
|
-
| 87 | Visual Objects 1.x with memo file | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - |
|
25
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
26
|
-
| 8b | dBase IV with memo file | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | N | - | - | - |
|
27
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
28
|
-
| 8e | dBase IV with SQL table | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | N | - | - | - |
|
29
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
30
|
-
| f5 | FoxPro with memo file | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | N | Y | N | N | N | N | N |
|
31
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
32
|
-
| fb | FoxPro without memo file | Y | Y | Y | Y | - | Y | Y | Y | N | Y | N | Y | N | N | N | N | N |
|
33
|
-
+---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
3
|
+
| Version | Description | C | N | L | D | M | F | B | G | P | Y | T | I | V | X | @ | O | + |
|
4
|
+
|---------|-----------------------------------|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
5
|
+
| 02 | FoxBase | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
6
|
+
| 03 | dBase III without memo file | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
7
|
+
| 04 | dBase IV without memo file | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
8
|
+
| 05 | dBase V without memo file | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
9
|
+
| 07 | Visual Objects 1.x | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
10
|
+
| 30 | Visual FoxPro | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | N | Y | N | N | N | N | - |
|
11
|
+
| 31 | Visual FoxPro with AutoIncrement | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | N | Y | N | N | N | N | N |
|
12
|
+
| 7b | dBase IV with memo file | Y | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - |
|
13
|
+
| 83 | dBase III with memo file | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - |
|
14
|
+
| 87 | Visual Objects 1.x with memo file | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - |
|
15
|
+
| 8b | dBase IV with memo file | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | N | - | - | - |
|
16
|
+
| 8e | dBase IV with SQL table | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | N | - | - | - |
|
17
|
+
| f5 | FoxPro with memo file | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | N | Y | N | N | N | N | N |
|
18
|
+
| fb | FoxPro without memo file | Y | Y | Y | Y | - | Y | Y | Y | N | Y | N | Y | N | N | N | N | N |
|
34
19
|
|
35
20
|
Data type descriptions
|
36
21
|
|
data/lib/dbf/column_type.rb
CHANGED
data/lib/dbf/version.rb
CHANGED
data/spec/dbf/column_spec.rb
CHANGED
@@ -69,7 +69,7 @@ RSpec.describe DBF::Column do
|
|
69
69
|
it 'supports negative Integer' do
|
70
70
|
value = '-135'
|
71
71
|
column = DBF::Column.new table, 'ColumnName', 'N', 3, 0
|
72
|
-
expect(column.type_cast(value)).to eq
|
72
|
+
expect(column.type_cast(value)).to eq(-135)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -83,7 +83,7 @@ RSpec.describe DBF::Column do
|
|
83
83
|
it 'casts negative value to Float' do
|
84
84
|
value = '-13.5'
|
85
85
|
column = DBF::Column.new table, 'ColumnName', 'N', 2, 1
|
86
|
-
expect(column.type_cast(value)).to eq
|
86
|
+
expect(column.type_cast(value)).to eq(-13.5)
|
87
87
|
end
|
88
88
|
end
|
89
89
|
end
|
@@ -105,7 +105,7 @@ RSpec.describe DBF::Column do
|
|
105
105
|
it 'casts negative value to Float' do
|
106
106
|
value = '-135'
|
107
107
|
column = DBF::Column.new table, 'ColumnName', 'F', 3, 0
|
108
|
-
expect(column.type_cast(value)).to eq
|
108
|
+
expect(column.type_cast(value)).to eq(-135.0)
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
@@ -126,7 +126,7 @@ RSpec.describe DBF::Column do
|
|
126
126
|
it 'supports negative binary' do
|
127
127
|
column = DBF::Column.new table, 'ColumnName', 'B', 1, 2
|
128
128
|
expect(column.type_cast("\x00\x00\x00\x00\x00\xC0\x65\xC0")).to be_a(Float)
|
129
|
-
expect(column.type_cast("\x00\x00\x00\x00\x00\xC0\x65\xC0")).to eq
|
129
|
+
expect(column.type_cast("\x00\x00\x00\x00\x00\xC0\x65\xC0")).to eq(-174.0)
|
130
130
|
end
|
131
131
|
end
|
132
132
|
end
|
@@ -148,7 +148,7 @@ RSpec.describe DBF::Column do
|
|
148
148
|
it 'supports negative Integer' do
|
149
149
|
value = "\x24\xE1\xFF\xFF"
|
150
150
|
column = DBF::Column.new table, 'ColumnName', 'I', 3, 0
|
151
|
-
expect(column.type_cast(value)).to eq
|
151
|
+
expect(column.type_cast(value)).to eq(-7900)
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
@@ -269,11 +269,11 @@ RSpec.describe DBF::Column do
|
|
269
269
|
end
|
270
270
|
|
271
271
|
it 'supports negative currency' do
|
272
|
-
expect(column.type_cast("\xFC\xF0\xF0\xFE\xFF\xFF\xFF\xFF")).to eq
|
272
|
+
expect(column.type_cast("\xFC\xF0\xF0\xFE\xFF\xFF\xFF\xFF")).to eq(-1776.41)
|
273
273
|
end
|
274
274
|
|
275
275
|
it 'supports 64bit negative currency' do
|
276
|
-
expect(column.type_cast("pN'9\xFF\xFF\xFF\xFF")).to eq
|
276
|
+
expect(column.type_cast("pN'9\xFF\xFF\xFF\xFF")).to eq(-333_609.0)
|
277
277
|
end
|
278
278
|
|
279
279
|
context 'and 0 length' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A small fast library for reading dBase, xBase, Clipper and FoxPro database
|
14
14
|
files.
|