taps 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/taps/data_stream.rb +4 -0
- metadata +4 -5
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ begin
|
|
14
14
|
s.add_dependency 'sinatra', '~> 1.0.0'
|
15
15
|
s.add_dependency 'rest-client', '~> 1.4.0'
|
16
16
|
s.add_dependency 'sequel', '~> 3.13.0'
|
17
|
-
s.add_dependency 'sqlite3-ruby', '~> 1.2
|
17
|
+
s.add_dependency 'sqlite3-ruby', '~> 1.2'
|
18
18
|
s.add_dependency 'rack', '>= 1.0.1'
|
19
19
|
|
20
20
|
s.rubyforge_project = "taps"
|
data/VERSION.yml
CHANGED
data/lib/taps/data_stream.rb
CHANGED
@@ -9,6 +9,8 @@ module Taps
|
|
9
9
|
class DataStream
|
10
10
|
class CorruptedData < Exception; end
|
11
11
|
|
12
|
+
DEFAULT_CHUNKSIZE = 1000
|
13
|
+
|
12
14
|
attr_reader :db, :state
|
13
15
|
|
14
16
|
def initialize(db, state)
|
@@ -19,6 +21,7 @@ class DataStream
|
|
19
21
|
:num_chunksize => 0,
|
20
22
|
:total_chunksize => 0,
|
21
23
|
}.merge(state)
|
24
|
+
@state[:chunksize] ||= DEFAULT_CHUNKSIZE
|
22
25
|
@complete = false
|
23
26
|
end
|
24
27
|
|
@@ -223,6 +226,7 @@ class DataStreamKeyed < DataStream
|
|
223
226
|
def initialize(db, state)
|
224
227
|
super(db, state)
|
225
228
|
@state = { :primary_key => order_by(state[:table_name]).first, :filter => 0 }.merge(state)
|
229
|
+
@state[:chunksize] ||= DEFAULT_CHUNKSIZE
|
226
230
|
@buffer = []
|
227
231
|
end
|
228
232
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 11
|
9
|
+
version: 0.3.11
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ricardo Chimal, Jr.
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-16 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -90,8 +90,7 @@ dependencies:
|
|
90
90
|
segments:
|
91
91
|
- 1
|
92
92
|
- 2
|
93
|
-
|
94
|
-
version: 1.2.0
|
93
|
+
version: "1.2"
|
95
94
|
type: :runtime
|
96
95
|
version_requirements: *id005
|
97
96
|
- !ruby/object:Gem::Dependency
|