taps 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ or when you want to push a local database to a taps server
18
18
 
19
19
  == Known Issues
20
20
 
21
- * Blob Data does not transfer properly.
21
+ * Blob data may not transfer properly, I suspect that SQLite3 is modifying some native ruby objects.
22
22
  * Foreign Keys get lost in the schema transfer
23
23
  * Large tables (>1 million rows with a large number of columns) get slower as the offset gets larger. This is due to it being inefficient having large offset values in queries.
24
24
 
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 2
4
+ :patch: 3
@@ -1,7 +1,7 @@
1
1
  require 'thor'
2
2
  require File.dirname(__FILE__) + '/config'
3
3
 
4
- Taps::Config.taps_database_url = 'sqlite://taps.db'
4
+ Taps::Config.taps_database_url = ENV['TAPS_DATABASE_URL'] || 'sqlite://taps.db'
5
5
 
6
6
  module Taps
7
7
  class Cli < Thor
@@ -45,6 +45,10 @@ class ClientSession
45
45
  server[uri]
46
46
  end
47
47
 
48
+ def set_session(uri)
49
+ @session_resource = server[uri]
50
+ end
51
+
48
52
  def close_session
49
53
  @session_resource.delete(:taps_version => Taps::VERSION) if @session_resource
50
54
  end
@@ -168,7 +172,13 @@ class ClientSession
168
172
  end
169
173
  raise CorruptedData unless Taps::Utils.valid_data?(response.to_s, response.headers[:taps_checksum])
170
174
 
171
- rows = Marshal.load(Taps::Utils.gunzip(response.to_s))
175
+ begin
176
+ rows = Marshal.load(Taps::Utils.gunzip(response.to_s))
177
+ rescue Object => e
178
+ puts "Error encountered loading data, wrote the data chunk to dump.#{Process.pid}.gz"
179
+ File.open("dump.#{Process.pid}.gz", "w") { |f| f.write(response.to_s) }
180
+ raise
181
+ end
172
182
  [chunksize, rows]
173
183
  end
174
184
 
@@ -1,8 +1,9 @@
1
1
  require 'sequel'
2
+ require 'sqlite3'
2
3
 
3
4
  module Taps
4
5
 
5
- VERSION = '0.2.2'
6
+ VERSION = '0.2.3'
6
7
 
7
8
  class Config
8
9
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Chimal, Jr.
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-02-11 00:00:00 -08:00
13
+ date: 2009-02-13 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -89,12 +89,12 @@ files:
89
89
  - spec/server_spec.rb
90
90
  - spec/utils_spec.rb
91
91
  - lib/taps/db_session.rb
92
- - lib/taps/utils.rb
93
92
  - lib/taps/schema.rb
93
+ - lib/taps/progress_bar.rb
94
94
  - lib/taps/cli.rb
95
- - lib/taps/client_session.rb
95
+ - lib/taps/utils.rb
96
96
  - lib/taps/server.rb
97
- - lib/taps/progress_bar.rb
97
+ - lib/taps/client_session.rb
98
98
  - lib/taps/config.rb
99
99
  - README.rdoc
100
100
  - LICENSE