drb_sqlite 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebe9203fcca16ddb6f226b30e1d1d6bbd6c6305e26467e8c838b177f637e0f27
4
- data.tar.gz: 132e7b696e7222a602a104de52c481f25b20d5f6e6cb358b7d31639229d78897
3
+ metadata.gz: 1719657b8dfca0eecd264c3694d3a682fc1186820dd82b37dc0b85a5ad391f89
4
+ data.tar.gz: c774c26a1efbcdf192988db1f996085cecc3dcb393ac8b0aa500b59ece6997a6
5
5
  SHA512:
6
- metadata.gz: 91c703b14a5d669549c7b508f4e7036986d2c6489514105b0c3855b47bee511695b6b9ae5576cab6a8ce63bb100d7709346cfe3d335cbb2d1d8800074e80503f
7
- data.tar.gz: '09aea584e229475e7d0e9a426af80cda28263965639ac72f3fe986ab334438c05483a123ca1108b49e89da29f707966eb6e151a35c95f39267d16e20bb35376b'
6
+ metadata.gz: 837a90c35eac1fa35f3d60e36b738423a94173eaaf3cf7142790386ed852929c1e0f49f357bedc6fbe123aeb1ea9cc3bd9c552d6b95d88f06bbb8bb33b45ff53
7
+ data.tar.gz: 921e96da513953af47f28d2a4c7269f27805e108bdb374bad9af169d99ba4da5405b1ea4d8b3b0ead011dc62df77685c8947b46ad394fb556ccef5cf4ebb713b
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/drb_sqlite.rb CHANGED
@@ -3,20 +3,26 @@
3
3
  # file: drb_sqlite.rb
4
4
 
5
5
  require 'drb'
6
+ require 'c32'
7
+
6
8
 
7
9
  class SQLiteServerError < Exception
8
10
  end
9
11
 
10
12
  class DRbSQLite
13
+ using ColouredText
11
14
 
12
- def initialize(raw_dbfile=nil, host: nil, port: '57000')
13
-
14
- @port = port
15
+ def initialize(raw_dbfile=nil, host: nil, port: '57000', debug: false)
16
+
17
+
18
+ @host, @port, @debug = host, port, debug
19
+
20
+ puts 'inside DRbSQLite'.info if @debug
15
21
 
16
22
  DRb.start_service
17
23
 
18
24
  if raw_dbfile then
19
- load(raw_dbfile)
25
+ load_db(raw_dbfile)
20
26
  else
21
27
  @server = DRbObject.new nil, "druby://#{host}:#{port}"
22
28
  end
@@ -38,17 +44,26 @@ class DRbSQLite
38
44
  @server.exists? dbfile
39
45
  end
40
46
 
41
- def load(raw_dbfile)
47
+ def load_db(raw_dbfile)
48
+
49
+ puts 'DRbSQLite | inside load_db'.info if @debug
42
50
 
43
51
  if raw_dbfile =~ /^sqlite:\/\// then
44
52
  host, @dbfile = raw_dbfile\
45
53
  .match(/(?<=^sqlite:\/\/)([^\/]+)\/(.*)/).captures
54
+
55
+ if @debug then
56
+ puts ('host: ' + host.inspect).debug
57
+ puts ('@dbfile: ' + @dbfile.inspect).debug
58
+ end
59
+
46
60
  @server = DRbObject.new nil, "druby://#{host}:#{@port}"
47
61
  else
48
62
  @dbfile = raw_dbfile
63
+ @server = DRbObject.new nil, "druby://#{@host}:#{@port}"
49
64
  end
50
65
 
51
- @server.load(@dbfile)
66
+ @server.load_db(@dbfile)
52
67
  end
53
68
 
54
69
  def query(*args, &blk)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drb_sqlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,8 +35,28 @@ cert_chain:
35
35
  mybZGWCZ9IMBI6L8ParyIfuosSf+xiEislKiCmSUKJVoIlCQJjjyQ3xCnaA4xMlO
36
36
  sMq03hOXxpYXAteF2Kmy2wiZ
37
37
  -----END CERTIFICATE-----
38
- date: 2018-09-02 00:00:00.000000000 Z
39
- dependencies: []
38
+ date: 2019-02-17 00:00:00.000000000 Z
39
+ dependencies:
40
+ - !ruby/object:Gem::Dependency
41
+ name: c32
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.1'
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.1.2
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '0.1'
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 0.1.2
40
60
  description:
41
61
  email: james@jamesrobertson.eu
42
62
  executables: []
@@ -63,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
83
  - !ruby/object:Gem::Version
64
84
  version: '0'
65
85
  requirements: []
66
- rubyforge_project:
67
- rubygems_version: 2.7.6
86
+ rubygems_version: 3.0.1
68
87
  signing_key:
69
88
  specification_version: 4
70
89
  summary: Connects to a remote SQLite database (sqlite_server2018 gem).
metadata.gz.sig CHANGED
Binary file