beezwax 0.5.1 → 0.5.2

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/Rakefile CHANGED
@@ -5,8 +5,8 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "beezwax"
8
- gem.summary = %Q{BTRAPI wrapper.}
9
- gem.description = %Q{Access BTR db files through a ruby API.}
8
+ gem.summary = %Q{Btrieve API wrapper.}
9
+ gem.description = %Q{Access Btrieve database files through a ruby API.}
10
10
  gem.email = "plardin@gmail.com"
11
11
  gem.homepage = "http://github.com/plardin/beezwax"
12
12
  gem.authors = ["Patrick Lardin"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beezwax}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Patrick Lardin"]
12
- s.date = %q{2010-10-05}
13
- s.description = %q{Access BTR db files through a ruby API.}
12
+ s.date = %q{2010-10-07}
13
+ s.description = %q{Access Btrieve database files through a ruby API.}
14
14
  s.email = %q{plardin@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
48
48
  s.rdoc_options = ["--charset=UTF-8"]
49
49
  s.require_paths = ["lib"]
50
50
  s.rubygems_version = %q{1.3.7}
51
- s.summary = %q{BTRAPI wrapper.}
51
+ s.summary = %q{Btrieve API wrapper.}
52
52
  s.test_files = [
53
53
  "test/test_beezwax.rb",
54
54
  "test/helper.rb"
@@ -73,8 +73,7 @@ class BtrieveTable
73
73
  end
74
74
  end
75
75
 
76
- def find_in_range(index_num, key, range)
77
- result_set = []
76
+ def find_in_range(index_num, key, range, &block)
78
77
  index = @schema[:indices][index_num]
79
78
  columns = @schema[:columns]
80
79
  index_values = index.inject([]){|vals,akey|vals << (akey == key ? range.first : nil); vals}
@@ -90,12 +89,11 @@ class BtrieveTable
90
89
  batch do
91
90
  btr_op(@session, GET_GREATER_THAN_OR_EQUAL, @pos_buffer, btr_record.data_buffer, key_buffer, index_num, [OK, EOF])
92
91
  while(range.include?(btr_record[key]))
93
- result_set << btr_record
92
+ yield btr_record
94
93
  btr_record = BtrieveRecord.new(self)
95
94
  btr_op(@session, GET_NEXT, @pos_buffer, btr_record.data_buffer, key_buffer, index_num, [OK, EOF])
96
95
  end
97
96
  end
98
- result_set
99
97
  end
100
98
 
101
99
  def close
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beezwax
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Lardin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-05 00:00:00 -07:00
18
+ date: 2010-10-07 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: 0.6.3
35
35
  type: :development
36
36
  version_requirements: *id001
37
- description: Access BTR db files through a ruby API.
37
+ description: Access Btrieve database files through a ruby API.
38
38
  email: plardin@gmail.com
39
39
  executables: []
40
40
 
@@ -103,7 +103,7 @@ rubyforge_project:
103
103
  rubygems_version: 1.3.7
104
104
  signing_key:
105
105
  specification_version: 3
106
- summary: BTRAPI wrapper.
106
+ summary: Btrieve API wrapper.
107
107
  test_files:
108
108
  - test/test_beezwax.rb
109
109
  - test/helper.rb