dbf 5.1.1 → 5.2.0
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/CHANGELOG.md +4 -0
- data/README.md +4 -2
- data/dbf.gemspec +6 -9
- data/lib/dbf/column.rb +17 -15
- data/lib/dbf/column_builder.rb +31 -0
- data/lib/dbf/column_type.rb +58 -14
- data/lib/dbf/database/foxpro.rb +19 -32
- data/lib/dbf/file_handler.rb +36 -0
- data/lib/dbf/find.rb +54 -0
- data/lib/dbf/header.rb +5 -8
- data/lib/dbf/memo/base.rb +2 -0
- data/lib/dbf/memo/dbase3.rb +2 -2
- data/lib/dbf/memo/dbase4.rb +2 -2
- data/lib/dbf/memo/foxpro.rb +14 -7
- data/lib/dbf/record.rb +60 -34
- data/lib/dbf/record_context.rb +5 -0
- data/lib/dbf/record_iterator.rb +35 -0
- data/lib/dbf/schema.rb +21 -21
- data/lib/dbf/table.rb +42 -178
- data/lib/dbf/version.rb +1 -1
- data/lib/dbf/version_config.rb +79 -0
- data/lib/dbf.rb +6 -0
- metadata +15 -64
- data/spec/dbf/column_spec.rb +0 -287
- data/spec/dbf/database/foxpro_spec.rb +0 -53
- data/spec/dbf/encoding_spec.rb +0 -49
- data/spec/dbf/file_formats_spec.rb +0 -221
- data/spec/dbf/record_spec.rb +0 -116
- data/spec/dbf/table_spec.rb +0 -377
- data/spec/fixtures/cp1251.dbf +0 -0
- data/spec/fixtures/cp1251_summary.txt +0 -12
- data/spec/fixtures/dbase_02.dbf +0 -0
- data/spec/fixtures/dbase_02_summary.txt +0 -23
- data/spec/fixtures/dbase_03.dbf +0 -0
- data/spec/fixtures/dbase_03_cyrillic.dbf +0 -0
- data/spec/fixtures/dbase_03_cyrillic_summary.txt +0 -11
- data/spec/fixtures/dbase_03_summary.txt +0 -40
- data/spec/fixtures/dbase_30.dbf +0 -0
- data/spec/fixtures/dbase_30.fpt +0 -0
- data/spec/fixtures/dbase_30_summary.txt +0 -154
- data/spec/fixtures/dbase_31.dbf +0 -0
- data/spec/fixtures/dbase_31_summary.txt +0 -20
- data/spec/fixtures/dbase_32.dbf +0 -0
- data/spec/fixtures/dbase_32_summary.txt +0 -11
- data/spec/fixtures/dbase_83.dbf +0 -0
- data/spec/fixtures/dbase_83.dbt +0 -0
- data/spec/fixtures/dbase_83_missing_memo.dbf +0 -0
- data/spec/fixtures/dbase_83_missing_memo_record_0.yml +0 -16
- data/spec/fixtures/dbase_83_record_0.yml +0 -16
- data/spec/fixtures/dbase_83_record_9.yml +0 -23
- data/spec/fixtures/dbase_83_schema_ar.txt +0 -19
- data/spec/fixtures/dbase_83_schema_sq.txt +0 -21
- data/spec/fixtures/dbase_83_schema_sq_lim.txt +0 -21
- data/spec/fixtures/dbase_83_summary.txt +0 -24
- data/spec/fixtures/dbase_8b.dbf +0 -0
- data/spec/fixtures/dbase_8b.dbt +0 -0
- data/spec/fixtures/dbase_8b_summary.txt +0 -15
- data/spec/fixtures/dbase_8c.dbf +0 -0
- data/spec/fixtures/dbase_f5.dbf +0 -0
- data/spec/fixtures/dbase_f5.fpt +0 -0
- data/spec/fixtures/dbase_f5_summary.txt +0 -68
- data/spec/fixtures/foxprodb/FOXPRO-DB-TEST.DBC +0 -0
- data/spec/fixtures/foxprodb/FOXPRO-DB-TEST.DCT +0 -0
- data/spec/fixtures/foxprodb/FOXPRO-DB-TEST.DCX +0 -0
- data/spec/fixtures/foxprodb/calls.CDX +0 -0
- data/spec/fixtures/foxprodb/calls.FPT +0 -0
- data/spec/fixtures/foxprodb/calls.dbf +0 -0
- data/spec/fixtures/foxprodb/contacts.CDX +0 -0
- data/spec/fixtures/foxprodb/contacts.FPT +0 -0
- data/spec/fixtures/foxprodb/contacts.dbf +0 -0
- data/spec/fixtures/foxprodb/setup.CDX +0 -0
- data/spec/fixtures/foxprodb/setup.dbf +0 -0
- data/spec/fixtures/foxprodb/types.CDX +0 -0
- data/spec/fixtures/foxprodb/types.dbf +0 -0
- data/spec/fixtures/polygon.dbf +0 -0
- data/spec/spec_helper.rb +0 -35
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
- 87
|
|
3
|
-
- 2
|
|
4
|
-
- 0
|
|
5
|
-
- 0
|
|
6
|
-
- 87
|
|
7
|
-
- '1'
|
|
8
|
-
- Assorted Petits Fours
|
|
9
|
-
- graphics/00000001/t_1.jpg
|
|
10
|
-
- graphics/00000001/1.jpg
|
|
11
|
-
- 0.0
|
|
12
|
-
- 0.0
|
|
13
|
-
- "Our Original assortment...a little taste of heaven for everyone. Let us\r\nselect a special assortment of our chocolate and pastel favorites for you.\r\nEach petit four is its own special hand decorated creation. Multi-layers of\r\nmoist cake with combinations of specialty fillings create memorable cake\r\nconfections. Varietes include; Luscious Lemon, Strawberry Hearts, White\r\nChocolate, Mocha Bean, Roasted Almond, Triple Chocolate, Chocolate Hazelnut,\r\nGrand Orange, Plum Squares, Milk chocolate squares, and Raspberry Blanc."
|
|
14
|
-
- 5.51
|
|
15
|
-
- true
|
|
16
|
-
- true
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
- 34
|
|
3
|
-
- 1
|
|
4
|
-
- 0
|
|
5
|
-
- 0
|
|
6
|
-
- 34
|
|
7
|
-
- AB01
|
|
8
|
-
- Apricot Brandy Fruitcake
|
|
9
|
-
- graphics/00000001/t_AB01.jpg
|
|
10
|
-
- graphics/00000001/AB01.jpg
|
|
11
|
-
- 37.95
|
|
12
|
-
- 37.95
|
|
13
|
-
- "Once tasted you will understand why we won The\r\nBoston Herald's Fruitcake Taste-off.
|
|
14
|
-
Judges liked its generous size,\r\nluscious appearance, moist texture and fruit
|
|
15
|
-
to cake ratio ... commented one\r\njudge \"It's a lip Smacker!\" Our signature fruitcake
|
|
16
|
-
is baked with carefully\r\nselected ingredients that will be savored until the last
|
|
17
|
-
moist crumb is\r\ndevoured each golden slice is brimming with Australian glaced
|
|
18
|
-
apricots,\r\ntoasted pecans, candied orange peel, and currants, folded gently into
|
|
19
|
-
a\r\nbrandy butter batter and slowly baked to perfection and then generously\r\nimbibed
|
|
20
|
-
with \"Holiday Spirits\". Presented in a gift tin. (3lbs. 4oz)"
|
|
21
|
-
- 0.0
|
|
22
|
-
- false
|
|
23
|
-
- true
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
ActiveRecord::Schema.define do
|
|
2
|
-
create_table "dbase_83" do |t|
|
|
3
|
-
t.column "id", :integer
|
|
4
|
-
t.column "catcount", :integer
|
|
5
|
-
t.column "agrpcount", :integer
|
|
6
|
-
t.column "pgrpcount", :integer
|
|
7
|
-
t.column "order", :integer
|
|
8
|
-
t.column "code", :string, :limit => 50
|
|
9
|
-
t.column "name", :string, :limit => 100
|
|
10
|
-
t.column "thumbnail", :string, :limit => 254
|
|
11
|
-
t.column "image", :string, :limit => 254
|
|
12
|
-
t.column "price", :float
|
|
13
|
-
t.column "cost", :float
|
|
14
|
-
t.column "desc", :text
|
|
15
|
-
t.column "weight", :float
|
|
16
|
-
t.column "taxable", :boolean
|
|
17
|
-
t.column "active", :boolean
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Sequel.migration do
|
|
2
|
-
change do
|
|
3
|
-
create_table(:dbase_83) do
|
|
4
|
-
column :id, :integer
|
|
5
|
-
column :catcount, :integer
|
|
6
|
-
column :agrpcount, :integer
|
|
7
|
-
column :pgrpcount, :integer
|
|
8
|
-
column :order, :integer
|
|
9
|
-
column :code, :varchar, :size => 50
|
|
10
|
-
column :name, :varchar, :size => 100
|
|
11
|
-
column :thumbnail, :varchar, :size => 254
|
|
12
|
-
column :image, :varchar, :size => 254
|
|
13
|
-
column :price, :float
|
|
14
|
-
column :cost, :float
|
|
15
|
-
column :desc, :text
|
|
16
|
-
column :weight, :float
|
|
17
|
-
column :taxable, :boolean
|
|
18
|
-
column :active, :boolean
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Sequel.migration do
|
|
2
|
-
change do
|
|
3
|
-
create_table(:dbase_83) do
|
|
4
|
-
column :id, :integer
|
|
5
|
-
column :catcount, :integer
|
|
6
|
-
column :agrpcount, :integer
|
|
7
|
-
column :pgrpcount, :integer
|
|
8
|
-
column :order, :integer
|
|
9
|
-
column :code, :varchar, :size => 50
|
|
10
|
-
column :name, :varchar, :size => 100
|
|
11
|
-
column :thumbnail, :varchar, :size => 254
|
|
12
|
-
column :image, :varchar, :size => 254
|
|
13
|
-
column :price, :float
|
|
14
|
-
column :cost, :float
|
|
15
|
-
column :desc, :text
|
|
16
|
-
column :weight, :float
|
|
17
|
-
column :taxable, :boolean
|
|
18
|
-
column :active, :boolean
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Database: dbase_83.dbf
|
|
3
|
-
Type: (83) dBase III with memo file
|
|
4
|
-
Memo File: true
|
|
5
|
-
Records: 67
|
|
6
|
-
|
|
7
|
-
Fields:
|
|
8
|
-
Name Type Length Decimal
|
|
9
|
-
------------------------------------------------------------------------------
|
|
10
|
-
ID N 19 0
|
|
11
|
-
CATCOUNT N 19 0
|
|
12
|
-
AGRPCOUNT N 19 0
|
|
13
|
-
PGRPCOUNT N 19 0
|
|
14
|
-
ORDER N 19 0
|
|
15
|
-
CODE C 50 0
|
|
16
|
-
NAME C 100 0
|
|
17
|
-
THUMBNAIL C 254 0
|
|
18
|
-
IMAGE C 254 0
|
|
19
|
-
PRICE N 13 2
|
|
20
|
-
COST N 13 2
|
|
21
|
-
DESC M 10 0
|
|
22
|
-
WEIGHT N 13 2
|
|
23
|
-
TAXABLE L 1 0
|
|
24
|
-
ACTIVE L 1 0
|
data/spec/fixtures/dbase_8b.dbf
DELETED
|
Binary file
|
data/spec/fixtures/dbase_8b.dbt
DELETED
|
Binary file
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Database: dbase_8b.dbf
|
|
3
|
-
Type: (8b) dBase IV with memo file
|
|
4
|
-
Memo File: true
|
|
5
|
-
Records: 10
|
|
6
|
-
|
|
7
|
-
Fields:
|
|
8
|
-
Name Type Length Decimal
|
|
9
|
-
------------------------------------------------------------------------------
|
|
10
|
-
CHARACTER C 100 0
|
|
11
|
-
NUMERICAL N 20 2
|
|
12
|
-
DATE D 8 0
|
|
13
|
-
LOGICAL L 1 0
|
|
14
|
-
FLOAT F 20 18
|
|
15
|
-
MEMO M 10 0
|
data/spec/fixtures/dbase_8c.dbf
DELETED
|
Binary file
|
data/spec/fixtures/dbase_f5.dbf
DELETED
|
Binary file
|
data/spec/fixtures/dbase_f5.fpt
DELETED
|
Binary file
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Database: dbase_f5.dbf
|
|
3
|
-
Type: (f5) FoxPro with memo file
|
|
4
|
-
Memo File: true
|
|
5
|
-
Records: 975
|
|
6
|
-
|
|
7
|
-
Fields:
|
|
8
|
-
Name Type Length Decimal
|
|
9
|
-
------------------------------------------------------------------------------
|
|
10
|
-
NF N 5 0
|
|
11
|
-
SEXE C 1 0
|
|
12
|
-
NOM C 20 0
|
|
13
|
-
COG1 C 15 0
|
|
14
|
-
COG2 C 15 0
|
|
15
|
-
TELEFON C 9 0
|
|
16
|
-
RENOM C 15 0
|
|
17
|
-
NFP N 5 0
|
|
18
|
-
NFM N 5 0
|
|
19
|
-
ARXN C 10 0
|
|
20
|
-
DATN D 8 0
|
|
21
|
-
LLON C 15 0
|
|
22
|
-
MUNN C 15 0
|
|
23
|
-
COMN C 15 0
|
|
24
|
-
PROV C 15 0
|
|
25
|
-
PAIN C 15 0
|
|
26
|
-
OFIC C 15 0
|
|
27
|
-
ARXB C 10 0
|
|
28
|
-
DATB D 8 0
|
|
29
|
-
LLOB C 15 0
|
|
30
|
-
MUNB C 15 0
|
|
31
|
-
COMB C 15 0
|
|
32
|
-
PAIB C 15 0
|
|
33
|
-
DRIB C 30 0
|
|
34
|
-
INAB C 30 0
|
|
35
|
-
OFTB C 10 0
|
|
36
|
-
OFNB C 20 0
|
|
37
|
-
AXC1 C 10 0
|
|
38
|
-
DTC1 D 8 0
|
|
39
|
-
LLC1 C 15 0
|
|
40
|
-
NFC1 N 5 0
|
|
41
|
-
TCA1 C 10 0
|
|
42
|
-
OTC1 C 10 0
|
|
43
|
-
ONC1 C 20 0
|
|
44
|
-
AXC2 C 10 0
|
|
45
|
-
DTC2 D 8 0
|
|
46
|
-
LLC2 C 15 0
|
|
47
|
-
NFC2 N 5 0
|
|
48
|
-
TCA2 C 10 0
|
|
49
|
-
OTC2 C 10 0
|
|
50
|
-
ONC2 C 20 0
|
|
51
|
-
AXC3 C 10 0
|
|
52
|
-
DTC3 D 8 0
|
|
53
|
-
LLC3 C 15 0
|
|
54
|
-
NFC3 N 5 0
|
|
55
|
-
TCA3 C 10 0
|
|
56
|
-
OTC3 C 10 0
|
|
57
|
-
ONC3 C 20 0
|
|
58
|
-
ARXD C 10 0
|
|
59
|
-
DATD D 8 0
|
|
60
|
-
LLOD C 15 0
|
|
61
|
-
OFTD C 10 0
|
|
62
|
-
OFND C 20 0
|
|
63
|
-
OBS1 C 70 0
|
|
64
|
-
OBS2 C 70 0
|
|
65
|
-
OBS3 C 70 0
|
|
66
|
-
OBS4 C 70 0
|
|
67
|
-
OBSE M 10 0
|
|
68
|
-
GHD C 15 0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/spec/fixtures/polygon.dbf
DELETED
|
Binary file
|
data/spec/spec_helper.rb
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
begin
|
|
4
|
-
require 'simplecov'
|
|
5
|
-
SimpleCov.start
|
|
6
|
-
rescue LoadError
|
|
7
|
-
# ignore
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
require 'dbf'
|
|
11
|
-
require 'yaml'
|
|
12
|
-
require 'rspec'
|
|
13
|
-
require 'fileutils'
|
|
14
|
-
|
|
15
|
-
RSpec.configure do |config|
|
|
16
|
-
config.disable_monkey_patching!
|
|
17
|
-
config.warnings = true
|
|
18
|
-
config.order = :random
|
|
19
|
-
|
|
20
|
-
config.expect_with :rspec do |expectations|
|
|
21
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
config.mock_with :rspec do |mocks|
|
|
25
|
-
mocks.verify_partial_doubles = true
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def fixture_path
|
|
30
|
-
@fixture_path ||= File.join(File.dirname(__FILE__), 'fixtures')
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def fixture(filename)
|
|
34
|
-
File.join(fixture_path, filename)
|
|
35
|
-
end
|