fulmar 1.8.4 → 1.8.5

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
  SHA1:
3
- metadata.gz: dc4cc373aea2ffc80bfcbfbe4d075ed0108e9517
4
- data.tar.gz: dea8526955ab7a526e1d63ab8554149f15c6eacb
3
+ metadata.gz: 1cfe568cca222bdb6219e38d6baae83190d53875
4
+ data.tar.gz: 4f3c471f4b47dbbf502a41591cc1a9d9a8b960aa
5
5
  SHA512:
6
- metadata.gz: 2b0b1e454ce75b5896b4f360bf79847fa1745c45a9e64b2310232f452a75f9b02d5f5f1ae6bf185b5f90f4e6b788f1edbc0db01b166b4b2ec8e8b7aa30e72c3e
7
- data.tar.gz: e1023d96a106b7d6cc0aa072f9f31537d8a564da52c3d7b10d0907cd503be928cc94638bb7a28503403a116b72cfe87978982d484a90aace767d399c3ba050c1
6
+ metadata.gz: 9164acd81b792d4f219c4bb3409a44b0ce6dadc040f2063cb2ff6eed6918d2289502bceb9b2913197637378eab39d1b2b7808e0f4fdf5c69512083bf7804ff78
7
+ data.tar.gz: f39fbecf617814bb558413ed16948688dbb09125d92ba4c3c46b6a7a2fb04168aa6669d9ccb1f41bfbb1a6bdf1b08a0d4fc92d06a4d84b74921c2896625869b0
@@ -40,11 +40,12 @@ module Fulmar
40
40
  end
41
41
 
42
42
  # Wait max 3 seconds for the tunnel to establish
43
- 4.times do |i|
43
+ 6.times do |i|
44
44
  break if try_connect(options, i)
45
45
  end
46
46
 
47
47
  @connected = true
48
+ query("USE #{@config[:maria][:database]}")
48
49
  end
49
50
 
50
51
  def disconnect
@@ -63,7 +64,7 @@ module Fulmar
63
64
 
64
65
  # shortcut for DatabaseService.client.query
65
66
  def query(*arguments)
66
- @client.query(arguments)
67
+ @client.query(*arguments)
67
68
  end
68
69
 
69
70
  def create(name)
@@ -123,8 +124,8 @@ module Fulmar
123
124
  def try_connect(options, i)
124
125
  @client = Mysql2::Client.new options
125
126
  rescue Mysql2::Error => e
126
- sleep 1 if i < 3
127
- raise e.message if i == 3
127
+ sleep 1 if i < 5
128
+ raise e.message if i == 5
128
129
  end
129
130
 
130
131
  # Return mysql command line options to ignore specific tables
@@ -10,14 +10,14 @@ module Fulmar
10
10
  def initialize(host, port, remote_host = 'localhost')
11
11
  @host = host
12
12
  @remote_port = port
13
- @remote_host = remote_host
13
+ @remote_host = remote_host.nil? ? 'localhost' : remote_host
14
14
  @local_port = 0
15
15
  @tunnel_pid = 0
16
16
  end
17
17
 
18
18
  def open
19
19
  @local_port = free_port
20
- @tunnel_pid = Process.spawn "ssh #{@host} -L #{@local_port}:#{@remote_host}:#{@remote_port} -N"
20
+ @tunnel_pid = Process.spawn "ssh #{@host} -q -L #{@local_port}:#{@remote_host}:#{@remote_port} -N"
21
21
  sleep 1
22
22
  end
23
23
 
@@ -1,4 +1,4 @@
1
1
  # Provides a global version number
2
2
  module Fulmar
3
- VERSION = '1.8.4'
3
+ VERSION = '1.8.5'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulmar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Siegl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-20 00:00:00.000000000 Z
12
+ date: 2015-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler