dbf 4.1.3 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +166 -104
- data/Gemfile +1 -0
- data/Gemfile.lock +63 -52
- data/LICENSE +1 -1
- data/README.md +110 -16
- data/bin/dbf +2 -0
- data/docs/CNAME +1 -0
- data/docs/DBF.html +200 -0
- data/docs/DBF/Column.html +947 -0
- data/docs/DBF/Column/LengthError.html +124 -0
- data/docs/DBF/Column/NameError.html +124 -0
- data/docs/DBF/ColumnType.html +115 -0
- data/docs/DBF/ColumnType/Base.html +389 -0
- data/docs/DBF/ColumnType/Boolean.html +238 -0
- data/docs/DBF/ColumnType/Currency.html +238 -0
- data/docs/DBF/ColumnType/Date.html +242 -0
- data/docs/DBF/ColumnType/DateTime.html +246 -0
- data/docs/DBF/ColumnType/Double.html +238 -0
- data/docs/DBF/ColumnType/Float.html +238 -0
- data/docs/DBF/ColumnType/General.html +238 -0
- data/docs/DBF/ColumnType/Memo.html +246 -0
- data/docs/DBF/ColumnType/Nil.html +238 -0
- data/docs/DBF/ColumnType/Number.html +242 -0
- data/docs/DBF/ColumnType/SignedLong.html +238 -0
- data/docs/DBF/ColumnType/String.html +240 -0
- data/docs/DBF/Database.html +126 -0
- data/docs/DBF/Database/Foxpro.html +653 -0
- data/docs/DBF/Database/Table.html +346 -0
- data/docs/DBF/FileNotFoundError.html +124 -0
- data/docs/DBF/Header.html +723 -0
- data/docs/DBF/Memo.html +117 -0
- data/docs/DBF/Memo/Base.html +485 -0
- data/docs/DBF/Memo/Dbase3.html +242 -0
- data/docs/DBF/Memo/Dbase4.html +230 -0
- data/docs/DBF/Memo/Foxpro.html +268 -0
- data/docs/DBF/NoColumnsDefined.html +124 -0
- data/docs/DBF/Record.html +773 -0
- data/docs/DBF/Schema.html +980 -0
- data/docs/DBF/Table.html +1571 -0
- data/docs/_index.html +415 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.README.html +359 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +359 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +675 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/dbf/column.rb +8 -7
- data/lib/dbf/column_type.rb +23 -0
- data/lib/dbf/database/foxpro.rb +7 -2
- data/lib/dbf/header.rb +11 -3
- data/lib/dbf/record.rb +5 -5
- data/lib/dbf/schema.rb +4 -3
- data/lib/dbf/table.rb +34 -11
- data/lib/dbf/version.rb +1 -1
- data/spec/dbf/column_spec.rb +3 -3
- data/spec/dbf/file_formats_spec.rb +54 -0
- data/spec/fixtures/dbase_02.dbf +0 -0
- data/spec/fixtures/dbase_02_summary.txt +23 -0
- data/spec/fixtures/dbase_32.dbf +0 -0
- data/spec/fixtures/dbase_32_summary.txt +11 -0
- data/spec/fixtures/dbase_8c.dbf +0 -0
- metadata +56 -6
- data/docs/supported_encodings.csv +0 -60
- data/docs/supported_types.markdown +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 825e580742ca7cb994908e488763e40ac36f4570b23d8fe75e6ba389ac9de769
|
4
|
+
data.tar.gz: 461dae904d53d1c26558b671d4a0ea2101538e2673bf7b307e39d37470909ce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f4c2824d0eb7a5f822515b8093f51a3e7f8892b0e4987f3b537ce007667e6232e80b4af8f87c449a4be061d39607772a5082e09ea67c73f1a1156dd86889e40
|
7
|
+
data.tar.gz: 711155242a0c16f765b327005157e4097489a348a2653bfbbf5f017304c0534f30abb8282075e2e4c6b63c236a94fb8b426e3303917c8882971a9c0f9068a73e
|
data/CHANGELOG.md
CHANGED
@@ -1,153 +1,215 @@
|
|
1
|
-
#
|
2
|
-
- Raise DBF::NoColumnsDefined error when attempting to read records if no columns are defined
|
1
|
+
# Changelog
|
3
2
|
|
4
|
-
|
5
|
-
- Add required_ruby_version to gemspec
|
3
|
+
## 4.2.0
|
6
4
|
|
7
|
-
|
8
|
-
- Return Time instead of DateTime
|
5
|
+
- Initial support for dBase 7 files
|
9
6
|
|
10
|
-
|
11
|
-
- Drop support for ruby-2.2 and earlier
|
7
|
+
## 4.1.6
|
12
8
|
|
13
|
-
|
14
|
-
- Ensure malformed dates return nil
|
9
|
+
- Add support for file type 32
|
15
10
|
|
16
|
-
|
17
|
-
- Fix incorrect columns list when StringIO and encoding set
|
11
|
+
## 4.1.5
|
18
12
|
|
19
|
-
|
20
|
-
- Use Date.strptime to parse date fields
|
13
|
+
- Better handling for PIPE errors when using command line utility
|
21
14
|
|
22
|
-
|
23
|
-
- Use :binary for binary fields in ActiveRecord schemas
|
15
|
+
## 4.1.4
|
24
16
|
|
25
|
-
|
26
|
-
- Fix uninitialized constant error under Rails 5
|
17
|
+
- Add full support for FoxBase files
|
27
18
|
|
28
|
-
|
29
|
-
- Ignore non-existent records if header record count is incorrect
|
19
|
+
## 4.1.3
|
30
20
|
|
31
|
-
|
32
|
-
- This version has been yanked from rubygems due to errors
|
21
|
+
- Raise DBF::NoColumnsDefined error when attempting to read records if no columns are defined
|
33
22
|
|
34
|
-
|
35
|
-
- Override table name for schema output
|
23
|
+
## 4.1.1
|
36
24
|
|
37
|
-
|
38
|
-
- Adds -v command-line option to print version
|
39
|
-
- Adds -r command-line option to create Sequel migration
|
25
|
+
- Add required_ruby_version to gemspec
|
40
26
|
|
41
|
-
|
42
|
-
- Uninitialized (N)umbers should return nil
|
27
|
+
## 4.1.0
|
43
28
|
|
44
|
-
|
45
|
-
- Performance improvements for large files
|
29
|
+
- Return Time instead of DateTime
|
46
30
|
|
47
|
-
|
48
|
-
- Support FoxPro (G) general field type
|
49
|
-
- Fix ruby warnings
|
31
|
+
## 4.0.0
|
50
32
|
|
51
|
-
|
52
|
-
- Requires Ruby version 2.0 and above
|
53
|
-
- Support the (G) General Foxpro field type
|
33
|
+
- Drop support for ruby-2.2 and earlier
|
54
34
|
|
55
|
-
|
56
|
-
- Support 64-bit currency signed currency values
|
57
|
-
(see https://github.com/infused/dbf/pull/71)
|
35
|
+
## 3.1.3
|
58
36
|
|
59
|
-
|
60
|
-
- Parse (I) values as signed
|
61
|
-
(see https://github.com/infused/dbf/pull/70)
|
37
|
+
- Ensure malformed dates return nil
|
62
38
|
|
63
|
-
|
64
|
-
- Foxpro doubles should always return the full stored precision
|
65
|
-
(see https://github.com/infused/dbf/pull/69)
|
39
|
+
## 3.1.2
|
66
40
|
|
67
|
-
|
68
|
-
- allow 0 length fields, but always return nil as value
|
41
|
+
- Fix incorrect columns list when StringIO and encoding set
|
69
42
|
|
70
|
-
|
71
|
-
- fix dBase IV attributes when memo file is missing
|
43
|
+
## 3.1.1
|
72
44
|
|
73
|
-
|
74
|
-
- fix FoxPro currency fields on some builds of Ruby 1.9.3 and 2.0.0
|
45
|
+
- Use Date.strptime to parse date fields
|
75
46
|
|
76
|
-
|
77
|
-
- fix the dbf binary on some linux systems
|
47
|
+
## 3.1.0
|
78
48
|
|
79
|
-
|
80
|
-
- build_memo returns nil on errors
|
49
|
+
- Use :binary for binary fields in ActiveRecord schemas
|
81
50
|
|
82
|
-
|
83
|
-
- use correct FoxPro memo block size
|
51
|
+
## 3.0.8
|
84
52
|
|
85
|
-
|
86
|
-
- memo fields return nil if memo file is missing
|
53
|
+
- Fix uninitialized constant error under Rails 5
|
87
54
|
|
88
|
-
|
89
|
-
- set encoding if table encoding is nil
|
55
|
+
## 3.0.7
|
90
56
|
|
91
|
-
|
92
|
-
- Allow overriding the character encoding specified in the file
|
57
|
+
- Ignore non-existent records if header record count is incorrect
|
93
58
|
|
94
|
-
|
95
|
-
- Add experimental support for character encodings under Ruby 1.8
|
59
|
+
## 3.0.6
|
96
60
|
|
97
|
-
|
98
|
-
- #44 Require FasterCSV gem on all platforms
|
99
|
-
- Remove rdoc development dependency
|
100
|
-
- #42 Fixes encoding of memos
|
101
|
-
- #43 Improve handling of record attributes
|
61
|
+
- This version has been yanked from rubygems due to errors
|
102
62
|
|
103
|
-
|
104
|
-
- fixes FoxPro currency (Y) fields
|
63
|
+
## 3.0.5
|
105
64
|
|
106
|
-
|
107
|
-
- Replace Memo Type with Memo File boolean in command-line utility summary output
|
65
|
+
- Override table name for schema output
|
108
66
|
|
109
|
-
|
110
|
-
- find_all/find_first should ignore deleted records
|
67
|
+
## 3.0.4
|
111
68
|
|
112
|
-
|
113
|
-
|
114
|
-
standard library (see http://bugs.ruby-lang.org/issues/2121)
|
69
|
+
- Adds -v command-line option to print version
|
70
|
+
- Adds -r command-line option to create Sequel migration
|
115
71
|
|
116
|
-
|
117
|
-
- Fix Table.FOXPRO_VERSIONS breakage on Ruby 1.8
|
72
|
+
## 3.0.3
|
118
73
|
|
119
|
-
|
120
|
-
- allow DBF::Table to work with dbf data in memory
|
121
|
-
- allow DBF::Table#to_csv to write to STDOUT
|
74
|
+
- Uninitialized (N)umbers should return nil
|
122
75
|
|
123
|
-
|
124
|
-
|
76
|
+
## 3.0.2
|
77
|
+
|
78
|
+
- Performance improvements for large files
|
125
79
|
|
126
|
-
|
127
|
-
- add binary data type support to ActiveRecord schema output
|
80
|
+
## 3.0.1
|
128
81
|
|
129
|
-
|
130
|
-
|
82
|
+
- Support FoxPro (G) general field type
|
83
|
+
- Fix ruby warnings
|
131
84
|
|
132
|
-
|
133
|
-
|
85
|
+
## 3.0.0
|
86
|
+
|
87
|
+
- Requires Ruby version 2.0 and above
|
88
|
+
- Support the (G) General Foxpro field type
|
89
|
+
|
90
|
+
## 2.0.13
|
91
|
+
|
92
|
+
- Support 64-bit currency signed currency values
|
93
|
+
(see https://github.com/infused/dbf/pull/71)
|
94
|
+
|
95
|
+
## 2.0.12
|
96
|
+
|
97
|
+
- Parse (I) values as signed
|
98
|
+
(see https://github.com/infused/dbf/pull/70)
|
99
|
+
|
100
|
+
## 2.0.11
|
101
|
+
|
102
|
+
- Foxpro doubles should always return the full stored precision
|
103
|
+
(see https://github.com/infused/dbf/pull/69)
|
104
|
+
|
105
|
+
## 2.0.10
|
106
|
+
|
107
|
+
- allow 0 length fields, but always return nil as value
|
108
|
+
|
109
|
+
## 2.0.9
|
110
|
+
|
111
|
+
- fix dBase IV attributes when memo file is missing
|
112
|
+
|
113
|
+
## 2.0.8
|
114
|
+
|
115
|
+
- fix FoxPro currency fields on some builds of Ruby 1.9.3 and 2.0.0
|
116
|
+
|
117
|
+
## 2.0.7
|
118
|
+
|
119
|
+
- fix the dbf binary on some linux systems
|
120
|
+
|
121
|
+
## 2.0.6
|
122
|
+
|
123
|
+
- build_memo returns nil on errors
|
124
|
+
|
125
|
+
## 2.0.5
|
126
|
+
|
127
|
+
- use correct FoxPro memo block size
|
128
|
+
|
129
|
+
## 2.0.4
|
130
|
+
|
131
|
+
- memo fields return nil if memo file is missing
|
132
|
+
|
133
|
+
## 2.0.3
|
134
|
+
|
135
|
+
- set encoding if table encoding is nil
|
136
|
+
|
137
|
+
## 2.0.2
|
138
|
+
|
139
|
+
- Allow overriding the character encoding specified in the file
|
140
|
+
|
141
|
+
## 2.0.1
|
142
|
+
|
143
|
+
- Add experimental support for character encodings under Ruby 1.8
|
144
|
+
|
145
|
+
## 2.0.0
|
146
|
+
|
147
|
+
- #44 Require FasterCSV gem on all platforms
|
148
|
+
- Remove rdoc development dependency
|
149
|
+
- #42 Fixes encoding of memos
|
150
|
+
- #43 Improve handling of record attributes
|
151
|
+
|
152
|
+
## 1.7.5
|
153
|
+
|
154
|
+
- fixes FoxPro currency (Y) fields
|
155
|
+
|
156
|
+
## 1.7.4
|
157
|
+
|
158
|
+
- Replace Memo Type with Memo File boolean in command-line utility summary output
|
159
|
+
|
160
|
+
## 1.7.3
|
161
|
+
|
162
|
+
- find_all/find_first should ignore deleted records
|
163
|
+
|
164
|
+
## 1.7.2
|
165
|
+
|
166
|
+
- Fix integer division under Ruby 1.8 when requiring mathn
|
167
|
+
standard library (see http://bugs.ruby-lang.org/issues/2121)
|
168
|
+
|
169
|
+
## 1.7.1
|
170
|
+
|
171
|
+
- Fix Table.FOXPRO_VERSIONS breakage on Ruby 1.8
|
172
|
+
|
173
|
+
## 1.7.0
|
174
|
+
|
175
|
+
- allow DBF::Table to work with dbf data in memory
|
176
|
+
- allow DBF::Table#to_csv to write to STDOUT
|
177
|
+
|
178
|
+
## 1.6.7
|
179
|
+
|
180
|
+
- memo columns return nil when no memo file found
|
181
|
+
|
182
|
+
## 1.6.6
|
183
|
+
|
184
|
+
- add binary data type support to ActiveRecord schema output
|
185
|
+
|
186
|
+
## 1.6.5
|
187
|
+
|
188
|
+
- support for visual foxpro double (b) data type
|
189
|
+
|
190
|
+
## 1.6.3
|
191
|
+
|
192
|
+
- Replace invalid chars with 'unicode replacement character' (U+FFFD)
|
134
193
|
|
135
194
|
## 1.6.2
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
195
|
+
|
196
|
+
- add Table#filename method
|
197
|
+
- Rakefile now loads gems with bundler
|
198
|
+
- add Table#supports_encoding?
|
199
|
+
- simplify encodings.yml loader
|
200
|
+
- add rake and rdoc as development dependencies
|
201
|
+
- simplify open_memo file search logic
|
202
|
+
- remove unnecessary requires in spec helper
|
203
|
+
- fix cli summary
|
144
204
|
|
145
205
|
## 1.6.1
|
146
|
-
|
147
|
-
|
206
|
+
|
207
|
+
- fix YAML issue when using MRI version > 1.9.1
|
208
|
+
- remove Table#seek_to_index and Table#current_record private methods
|
148
209
|
|
149
210
|
## 1.6.0
|
150
|
-
|
211
|
+
|
212
|
+
- remove activesupport gem dependency
|
151
213
|
|
152
214
|
## 1.5.0
|
153
215
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dbf (4.1.
|
4
|
+
dbf (4.1.6)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
awesome_print (1.
|
11
|
-
byebug (11.
|
12
|
-
coderay (1.1.
|
13
|
-
diff-lcs (1.
|
9
|
+
ast (2.4.2)
|
10
|
+
awesome_print (1.9.2)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.4.4)
|
14
14
|
e2mmap (0.1.0)
|
15
|
-
ffi (1.
|
16
|
-
formatador (0.
|
17
|
-
guard (2.
|
15
|
+
ffi (1.15.3)
|
16
|
+
formatador (0.3.0)
|
17
|
+
guard (2.18.0)
|
18
18
|
formatador (>= 0.2.4)
|
19
19
|
listen (>= 2.7, < 4.0)
|
20
20
|
lumberjack (>= 1.0.12, < 2.0)
|
21
21
|
nenv (~> 0.1)
|
22
22
|
notiffany (~> 0.0)
|
23
|
-
pry (>= 0.
|
23
|
+
pry (>= 0.13.0)
|
24
24
|
shellany (~> 0.0)
|
25
25
|
thor (>= 0.18.1)
|
26
26
|
guard-compat (1.2.1)
|
@@ -28,58 +28,68 @@ GEM
|
|
28
28
|
guard (~> 2.1)
|
29
29
|
guard-compat (~> 1.1)
|
30
30
|
rspec (>= 2.99.0, < 4.0)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
rb-
|
36
|
-
|
37
|
-
lumberjack (1.
|
38
|
-
method_source (0.
|
31
|
+
io-console (0.5.9)
|
32
|
+
irb (1.3.6)
|
33
|
+
reline (>= 0.2.5)
|
34
|
+
listen (3.6.0)
|
35
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
36
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
37
|
+
lumberjack (1.2.8)
|
38
|
+
method_source (1.0.0)
|
39
39
|
nenv (0.3.0)
|
40
|
-
notiffany (0.1.
|
40
|
+
notiffany (0.1.3)
|
41
41
|
nenv (~> 0.1)
|
42
42
|
shellany (~> 0.0)
|
43
|
-
parallel (1.
|
44
|
-
parser (
|
45
|
-
ast (~> 2.4.
|
46
|
-
pry (0.
|
47
|
-
coderay (~> 1.1
|
48
|
-
method_source (~>
|
43
|
+
parallel (1.20.1)
|
44
|
+
parser (3.0.2.0)
|
45
|
+
ast (~> 2.4.1)
|
46
|
+
pry (0.14.1)
|
47
|
+
coderay (~> 1.1)
|
48
|
+
method_source (~> 1.0)
|
49
49
|
rainbow (3.0.0)
|
50
|
-
rake (
|
51
|
-
rb-fsevent (0.
|
52
|
-
rb-inotify (0.10.
|
50
|
+
rake (13.0.6)
|
51
|
+
rb-fsevent (0.11.0)
|
52
|
+
rb-inotify (0.10.1)
|
53
53
|
ffi (~> 1.0)
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
rspec
|
59
|
-
rspec-
|
60
|
-
|
54
|
+
regexp_parser (2.1.1)
|
55
|
+
reline (0.2.6)
|
56
|
+
io-console (~> 0.5)
|
57
|
+
rexml (3.2.5)
|
58
|
+
rspec (3.10.0)
|
59
|
+
rspec-core (~> 3.10.0)
|
60
|
+
rspec-expectations (~> 3.10.0)
|
61
|
+
rspec-mocks (~> 3.10.0)
|
62
|
+
rspec-core (3.10.1)
|
63
|
+
rspec-support (~> 3.10.0)
|
64
|
+
rspec-expectations (3.10.1)
|
61
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
-
rspec-support (~> 3.
|
63
|
-
rspec-mocks (3.
|
66
|
+
rspec-support (~> 3.10.0)
|
67
|
+
rspec-mocks (3.10.2)
|
64
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
-
rspec-support (~> 3.
|
66
|
-
rspec-support (3.
|
67
|
-
rubocop (
|
68
|
-
jaro_winkler (~> 1.5.1)
|
69
|
+
rspec-support (~> 3.10.0)
|
70
|
+
rspec-support (3.10.2)
|
71
|
+
rubocop (1.18.4)
|
69
72
|
parallel (~> 1.10)
|
70
|
-
parser (>=
|
73
|
+
parser (>= 3.0.0.0)
|
71
74
|
rainbow (>= 2.2.2, < 4.0)
|
75
|
+
regexp_parser (>= 1.8, < 3.0)
|
76
|
+
rexml
|
77
|
+
rubocop-ast (>= 1.8.0, < 2.0)
|
72
78
|
ruby-progressbar (~> 1.7)
|
73
|
-
unicode-display_width (>= 1.4.0, <
|
74
|
-
rubocop-
|
75
|
-
|
76
|
-
rubocop-
|
77
|
-
rubocop (>=
|
78
|
-
|
79
|
-
|
79
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
80
|
+
rubocop-ast (1.9.0)
|
81
|
+
parser (>= 3.0.1.1)
|
82
|
+
rubocop-performance (1.11.4)
|
83
|
+
rubocop (>= 1.7.0, < 2.0)
|
84
|
+
rubocop-ast (>= 0.4.0)
|
85
|
+
rubocop-rspec (2.4.0)
|
86
|
+
rubocop (~> 1.0)
|
87
|
+
rubocop-ast (>= 1.1.0)
|
88
|
+
ruby-progressbar (1.11.0)
|
80
89
|
shellany (0.0.1)
|
81
|
-
thor (
|
82
|
-
unicode-display_width (
|
90
|
+
thor (1.1.0)
|
91
|
+
unicode-display_width (2.0.0)
|
92
|
+
yard (0.9.26)
|
83
93
|
|
84
94
|
PLATFORMS
|
85
95
|
ruby
|
@@ -97,6 +107,7 @@ DEPENDENCIES
|
|
97
107
|
rubocop
|
98
108
|
rubocop-performance
|
99
109
|
rubocop-rspec
|
110
|
+
yard
|
100
111
|
|
101
112
|
BUNDLED WITH
|
102
|
-
2.
|
113
|
+
2.2.15
|