mysql_isolated_server 0.3.1 → 0.3.2

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: 04b18f3244482e0ba20e8638a12d3d4065d7d77d
4
- data.tar.gz: 02453945a6deb88eb1575bf5273c0d6d49e1ee87
3
+ metadata.gz: d8b7662ca8f87b1988b019b96f8402e3ad6f72b0
4
+ data.tar.gz: 3b93b99749cdd0ad7a06dbbd6d654fa42eb5adfb
5
5
  SHA512:
6
- metadata.gz: 938e7c78957606c0dd45b0536f02cd33d877b7bc2aff57fd087d63d1a43bebe496b0a6d22a5d8d8d7e842311d3f58abd25dce8c80cfd4ba95ea3da74ec3da24c
7
- data.tar.gz: 5518af761a5705de4020e4f3cc6493cc7d64e81b4c19aab946e1eb313a84dffef116aa52d1bf914002194203559e793266485d333c403153cab99ec637a5595a
6
+ metadata.gz: ff18d5c9930b3f7e6e3053f0b02f5b0bf300e726b6c598d74a9060433f551a05a5dc24676acad052c3528e03ddc19a61f16add134bf9c531dc1e1d5972d578c4
7
+ data.tar.gz: 0adce2429a5ccb7be43829188301069c2f99ec59d3f03d12d2e4e323c973cf677a80e0ff01bb3c83ccc4cc24cf07cedd8a7058785e9b2531100969e2eeb9c84b
data/Gemfile CHANGED
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "bump"
4
+ gem "mysql2"
4
5
  # Specify your gem's dependencies in mysql_isolated_server.gemspec
5
6
  gemspec
@@ -4,7 +4,6 @@ $LOAD_PATH << File.dirname(__FILE__) + "/../lib"
4
4
  require 'mysql_isolated_server'
5
5
  require 'getoptlong'
6
6
 
7
- $stderr.puts ENV.inspect
8
7
  opts = GetoptLong.new(
9
8
  [ '--log-bin', GetoptLong::REQUIRED_ARGUMENT ],
10
9
  [ '--pid', GetoptLong::REQUIRED_ARGUMENT ]
@@ -15,8 +15,9 @@ class MysqlIsolatedServer
15
15
  end
16
16
 
17
17
  rs = stmt.execute_query(sql)
18
+
19
+ rows = []
18
20
  while (rs.next)
19
- rows = []
20
21
  meta_data = rs.get_meta_data
21
22
  num_cols = meta_data.get_column_count
22
23
 
@@ -25,7 +26,7 @@ class MysqlIsolatedServer
25
26
  col_name = meta_data.get_column_label(col)
26
27
  col_value = rs.get_object(col) # of meta_data.get_column_type(col)
27
28
 
28
- row[col_name] = col_value if col_value # skip if nil
29
+ row[col_name] = col_value
29
30
  end
30
31
 
31
32
  rows << row
@@ -1,3 +1,3 @@
1
1
  class MysqlIsolatedServer
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -204,6 +204,9 @@ class MysqlIsolatedServer
204
204
  @pid = middle_pid
205
205
  end
206
206
 
207
+ def mysql_shell
208
+ system("mysql -uroot --port #{@port} mysql --host 127.0.0.1")
209
+ end
207
210
  def cleanup!
208
211
  system("rm -Rf #{base}")
209
212
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["ben@zendesk.com"]
11
11
  gem.description = %q{A small library that allows you to easily spin up new local mysql servers for testing purposes.}
12
12
  gem.summary = %q{A small library that allows you to easily spin up new local mysql servers for testing purposes.}
13
- gem.homepage = ""
13
+ gem.homepage = "http://github.com/osheroff/mysql_isolated_server"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_isolated_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Osheroff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-16 00:00:00.000000000 Z
11
+ date: 2014-06-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A small library that allows you to easily spin up new local mysql servers
14
14
  for testing purposes.
@@ -33,7 +33,7 @@ files:
33
33
  - lib/tables/user.MYI
34
34
  - lib/tables/user.frm
35
35
  - mysql_isolated_server.gemspec
36
- homepage: ''
36
+ homepage: http://github.com/osheroff/mysql_isolated_server
37
37
  licenses: []
38
38
  metadata: {}
39
39
  post_install_message: