dbf 1.2.5 → 1.2.6
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.
- data/README.markdown +10 -11
- data/Rakefile +1 -1
- data/VERSION.yml +3 -2
- data/dbf.gemspec +11 -9
- data/docs/supported_types.markdown +25 -0
- data/lib/dbf.rb +2 -1
- data/spec/functional/format_03_spec.rb +2 -2
- data/spec/functional/format_30_spec.rb +2 -2
- data/spec/functional/format_31_spec.rb +2 -2
- data/spec/functional/format_83_spec.rb +2 -2
- data/spec/functional/format_8b_spec.rb +2 -2
- data/spec/functional/format_f5_spec.rb +2 -2
- data/spec/unit/column_spec.rb +1 -1
- data/spec/unit/record_spec.rb +1 -1
- data/spec/unit/table_spec.rb +1 -1
- metadata +10 -5
data/README.markdown
CHANGED
@@ -9,13 +9,9 @@ database files
|
|
9
9
|
* Questions: Email <mailto:keithm@infused.org> and put DBF somewhere in the
|
10
10
|
subject line
|
11
11
|
|
12
|
-
##
|
12
|
+
## Compatibility
|
13
13
|
|
14
|
-
|
15
|
-
* ActiveRecord style finder methods
|
16
|
-
* Ability to dump the database schema in the portable ActiveRecord::Schema
|
17
|
-
format
|
18
|
-
* Ruby 1.9.1 compatible
|
14
|
+
DBF is tested to work with Ruby 1.8.6, 1.8.7, 1.9.1 and 1.9.2-head (using ActiveSupport 2.3.5 and 3 beta 3).
|
19
15
|
|
20
16
|
## Installation
|
21
17
|
|
@@ -25,7 +21,6 @@ database files
|
|
25
21
|
|
26
22
|
Load a DBF file:
|
27
23
|
|
28
|
-
require 'rubygems'
|
29
24
|
require 'dbf'
|
30
25
|
|
31
26
|
table = DBF::Table.new("widgets.dbf")
|
@@ -103,10 +98,14 @@ A small command-line utility called dbf is installed along with the gem.
|
|
103
98
|
|
104
99
|
## dBase version support
|
105
100
|
|
106
|
-
|
107
|
-
|
108
|
-
any insight into how
|
109
|
-
a shout.
|
101
|
+
The basic dBase data types are generally supported well. Support for the
|
102
|
+
advanced data types in dbase V and FoxPro are still experimental or not
|
103
|
+
supported. If you have any insight into how any of unsupported data
|
104
|
+
types are implemented, please give me a shout. FoxBase/dBase II files are not
|
105
|
+
supported at this time.
|
106
|
+
|
107
|
+
See [docs/supported_types.markdown](http://github.com/infused/dbf/blob/master/docs/supported_types.markdown) for a full
|
108
|
+
list of supported column types.
|
110
109
|
|
111
110
|
## Limitations
|
112
111
|
|
data/Rakefile
CHANGED
@@ -13,7 +13,7 @@ Jeweler::Tasks.new do |s|
|
|
13
13
|
s.platform = Gem::Platform::RUBY
|
14
14
|
s.authors = ['Keith Morrison']
|
15
15
|
s.email = 'keithm@infused.org'
|
16
|
-
s.add_dependency('activesupport', ['
|
16
|
+
s.add_dependency('activesupport', ['>= 2.3.5'])
|
17
17
|
s.add_dependency('fastercsv', ['>= 1.4.0'])
|
18
18
|
s.homepage = 'http://github.com/infused/dbf'
|
19
19
|
end
|
data/VERSION.yml
CHANGED
data/dbf.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dbf}
|
8
|
-
s.version = "1.2.
|
8
|
+
s.version = "1.2.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Keith Morrison"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-05-17}
|
13
13
|
s.default_executable = %q{dbf}
|
14
14
|
s.description = %q{A small fast library for reading dBase, xBase, Clipper and FoxPro database files.}
|
15
15
|
s.email = %q{keithm@infused.org}
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"VERSION.yml",
|
27
27
|
"bin/dbf",
|
28
28
|
"dbf.gemspec",
|
29
|
+
"docs/supported_types.markdown",
|
29
30
|
"lib/dbf.rb",
|
30
31
|
"lib/dbf/column.rb",
|
31
32
|
"lib/dbf/globals.rb",
|
@@ -57,7 +58,7 @@ Gem::Specification.new do |s|
|
|
57
58
|
s.homepage = %q{http://github.com/infused/dbf}
|
58
59
|
s.rdoc_options = ["--charset=UTF-8"]
|
59
60
|
s.require_paths = ["lib"]
|
60
|
-
s.rubygems_version = %q{1.3.
|
61
|
+
s.rubygems_version = %q{1.3.7}
|
61
62
|
s.summary = %q{Read xBase files}
|
62
63
|
s.test_files = [
|
63
64
|
"spec/functional/dbf_shared.rb",
|
@@ -77,15 +78,16 @@ Gem::Specification.new do |s|
|
|
77
78
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
78
79
|
s.specification_version = 3
|
79
80
|
|
80
|
-
if Gem::Version.new(Gem::
|
81
|
-
s.add_runtime_dependency(%q<activesupport>, ["
|
81
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
82
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
|
82
83
|
s.add_runtime_dependency(%q<fastercsv>, [">= 1.4.0"])
|
83
84
|
else
|
84
|
-
s.add_dependency(%q<activesupport>, ["
|
85
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
85
86
|
s.add_dependency(%q<fastercsv>, [">= 1.4.0"])
|
86
87
|
end
|
87
88
|
else
|
88
|
-
s.add_dependency(%q<activesupport>, ["
|
89
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
89
90
|
s.add_dependency(%q<fastercsv>, [">= 1.4.0"])
|
90
91
|
end
|
91
92
|
end
|
93
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# DBF supported data types
|
2
|
+
|
3
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
4
|
+
| Version | C | N | L | D | M | F | B | G | P | Y | T | I | V | X | @ | O | + |
|
5
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
6
|
+
| 03 | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
7
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
8
|
+
| 04 | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
9
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
10
|
+
| 05 | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - | - |
|
11
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
12
|
+
| 30 | Y | Y | Y | Y | - | Y | N | N | N | N | N | Y | N | N | N | N | - |
|
13
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
14
|
+
| 31 | Y | Y | Y | Y | Y | Y | N | N | N | N | N | Y | N | N | N | N | N |
|
15
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
16
|
+
| 7b | Y | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - |
|
17
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
18
|
+
| 83 | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | - | - | - | - |
|
19
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
20
|
+
| 8e | Y | Y | Y | Y | Y | - | - | - | - | - | - | - | - | N | - | - | - |
|
21
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
22
|
+
| f5 | Y | Y | Y | Y | Y | Y | N | N | N | N | N | Y | N | N | N | N | N |
|
23
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
24
|
+
| fb | Y | Y | Y | Y | - | Y | N | N | N | N | N | Y | N | N | N | N | N |
|
25
|
+
+---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
data/lib/dbf.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__)
|
2
|
-
require File.dirname(__FILE__)
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "../spec_helper"))
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "dbf_shared"))
|
3
3
|
|
4
4
|
describe DBF, "of type 03 (dBase III without memo file)" do
|
5
5
|
before do
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__)
|
2
|
-
require File.dirname(__FILE__)
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "../spec_helper"))
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "dbf_shared"))
|
3
3
|
|
4
4
|
describe DBF, "of type 30 (Visual FoxPro)" do
|
5
5
|
before do
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__)
|
2
|
-
require File.dirname(__FILE__)
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "../spec_helper"))
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "dbf_shared"))
|
3
3
|
|
4
4
|
describe DBF, "of type 31 (Visual FoxPro with AutoIncrement field)" do
|
5
5
|
before do
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__)
|
2
|
-
require File.dirname(__FILE__)
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "../spec_helper"))
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "dbf_shared"))
|
3
3
|
|
4
4
|
describe DBF, "of type 83 (dBase III with memo file)" do
|
5
5
|
before do
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__)
|
2
|
-
require File.dirname(__FILE__)
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "../spec_helper"))
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "dbf_shared"))
|
3
3
|
|
4
4
|
describe DBF, "of type 8b (dBase IV with memo file)" do
|
5
5
|
before do
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__)
|
2
|
-
require File.dirname(__FILE__)
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "../spec_helper"))
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "dbf_shared"))
|
3
3
|
|
4
4
|
describe DBF, "of type f5 (FoxPro with memo file)" do
|
5
5
|
before do
|
data/spec/unit/column_spec.rb
CHANGED
data/spec/unit/record_spec.rb
CHANGED
data/spec/unit/table_spec.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 1.2.
|
8
|
+
- 6
|
9
|
+
version: 1.2.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Keith Morrison
|
@@ -14,15 +14,16 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-17 00:00:00 -07:00
|
18
18
|
default_executable: dbf
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activesupport
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
24
25
|
requirements:
|
25
|
-
- - "
|
26
|
+
- - ">="
|
26
27
|
- !ruby/object:Gem::Version
|
27
28
|
segments:
|
28
29
|
- 2
|
@@ -35,6 +36,7 @@ dependencies:
|
|
35
36
|
name: fastercsv
|
36
37
|
prerelease: false
|
37
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
38
40
|
requirements:
|
39
41
|
- - ">="
|
40
42
|
- !ruby/object:Gem::Version
|
@@ -62,6 +64,7 @@ files:
|
|
62
64
|
- VERSION.yml
|
63
65
|
- bin/dbf
|
64
66
|
- dbf.gemspec
|
67
|
+
- docs/supported_types.markdown
|
65
68
|
- lib/dbf.rb
|
66
69
|
- lib/dbf/column.rb
|
67
70
|
- lib/dbf/globals.rb
|
@@ -99,6 +102,7 @@ rdoc_options:
|
|
99
102
|
require_paths:
|
100
103
|
- lib
|
101
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
102
106
|
requirements:
|
103
107
|
- - ">="
|
104
108
|
- !ruby/object:Gem::Version
|
@@ -106,6 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
110
|
- 0
|
107
111
|
version: "0"
|
108
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
109
114
|
requirements:
|
110
115
|
- - ">="
|
111
116
|
- !ruby/object:Gem::Version
|
@@ -115,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
120
|
requirements: []
|
116
121
|
|
117
122
|
rubyforge_project:
|
118
|
-
rubygems_version: 1.3.
|
123
|
+
rubygems_version: 1.3.7
|
119
124
|
signing_key:
|
120
125
|
specification_version: 3
|
121
126
|
summary: Read xBase files
|