dbf 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ee4b82cf7f1cef9fc3fda8ec2651196c46eb6b9e5b9221e3d84d15cebda03cb
4
- data.tar.gz: 74b0725db2d2efd26d2e26cf826a51864a2fd3ee091e9b643b0173b03b2a7e0e
3
+ metadata.gz: 9b6cdaff3283aa216120ba94a5301ccdb2bdcac4d48549a2c10677684e1b01a4
4
+ data.tar.gz: e95965ac3b2415ce00db81f5e066e0dc5761cce1d35345f152b4c349d387f51e
5
5
  SHA512:
6
- metadata.gz: 62297d64ee650a5e4fba4e721074bd8449ca86b673f6030dc7dff7225350e91000cd3d51367992433d329b49293d884a22a9c0b714bfa7ba7c4d09c4c7695955
7
- data.tar.gz: 27bf26edfe46b44a10e1e6cf126b7c6fdafaaf0def6ff6d9f481e376719071ca72a13cfb6df027439c8345e6686ff516e76c50759b255010395c39161605851a
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.0.1)
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.2)
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
- 2.0.0
99
+ 1.17.3
@@ -1,36 +1,21 @@
1
1
  # DBF supported data types
2
2
 
3
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
4
- | Version | Description | C | N | L | D | M | F | B | G | P | Y | T | I | V | X | @ | O | + |
5
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
6
- | 02 | FoxBase | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
7
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
8
- | 03 | dBase III without memo file | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
9
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
10
- | 04 | dBase IV without memo file | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
11
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
12
- | 05 | dBase V without memo file | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
13
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
14
- | 07 | Visual Objects 1.x | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
15
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
16
- | 30 | Visual FoxPro | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | N | Y | N | N | N | N | - |
17
- +---------+-----------------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
18
- | 31 | Visual FoxPro with AutoIncrement | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | N | Y | N | N | N | N | N |
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
 
@@ -54,7 +54,7 @@ module DBF
54
54
 
55
55
  class Boolean < Base
56
56
  def type_cast(value)
57
- value.strip.match? /^(y|t)$/i
57
+ value.strip.match?(/^(y|t)$/i)
58
58
  end
59
59
  end
60
60
 
data/lib/dbf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DBF
2
- VERSION = '4.1.1'.freeze
2
+ VERSION = '4.1.2'.freeze
3
3
  end
@@ -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 -135
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 -13.5
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 -135.0
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 -174.0
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 -7900
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 -1776.41
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 -333_609.0
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
@@ -4,8 +4,6 @@ begin
4
4
  rescue LoadError
5
5
  end
6
6
 
7
- Encoding.default_external = 'UTF-8'
8
-
9
7
  require 'dbf'
10
8
  require 'yaml'
11
9
  require 'rspec'
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.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-01-26 00:00:00.000000000 Z
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.