dbf 1.1.2 → 1.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.
- data/VERSION.yml +2 -2
- data/dbf.gemspec +2 -2
- data/lib/dbf/table.rb +6 -0
- data/spec/unit/record_spec.rb +7 -7
- data/spec/unit/table_spec.rb +13 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
data/dbf.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dbf}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.0"
|
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-02-13}
|
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}
|
data/lib/dbf/table.rb
CHANGED
data/spec/unit/record_spec.rb
CHANGED
@@ -85,13 +85,13 @@ describe DBF::Record do
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
88
|
+
describe '#to_a' do
|
89
|
+
it 'should return an ordered array of attribute values' do
|
90
|
+
table = DBF::Table.new "#{DB_PATH}/dbase_8b.dbf"
|
91
|
+
record = table.record(9)
|
92
|
+
record.to_a.should == ["Ten records stored in this database", 10.0, nil, false, "0.100000000000000000", nil]
|
93
|
+
end
|
94
|
+
end
|
95
95
|
|
96
96
|
describe '#==' do
|
97
97
|
before do
|
data/spec/unit/table_spec.rb
CHANGED
@@ -88,6 +88,19 @@ describe DBF::Table do
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
describe '#to_a' do
|
92
|
+
before do
|
93
|
+
@table = DBF::Table.new "#{DB_PATH}/dbase_83.dbf"
|
94
|
+
|
95
|
+
@records = []
|
96
|
+
@table.each {|record| @records << record}
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'should return an array of records' do
|
100
|
+
@table.to_a.should == @records
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
91
104
|
describe '#to_csv' do
|
92
105
|
before do
|
93
106
|
@table = DBF::Table.new "#{DB_PATH}/dbase_83.dbf"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Morrison
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-13 00:00:00 -08:00
|
13
13
|
default_executable: dbf
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|