dohmysql 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/doh/mysql/load_sql.rb +5 -4
  2. metadata +2 -2
@@ -6,8 +6,6 @@ def self.mysql_arg(value, option_specifier)
6
6
  if value.to_s.strip.empty? then '' else " -#{option_specifier}#{value}" end
7
7
  end
8
8
 
9
- # NOTE: this doesn't work on jruby, but keeping it around in case it's determined to be significantly faster than the more portable version in place now
10
- # in which case, we can use the popen version on the rubys that it works with and the other one as needed
11
9
  def self.load_sql_using_one_popen(dbconfig, filenames)
12
10
  dohlog.debug("loading sql file: " + filenames.first) if filenames.size == 1
13
11
 
@@ -31,7 +29,11 @@ end
31
29
 
32
30
  # pass through so we can change implemenation easily
33
31
  def self.load_sql(dbconfig, filenames)
34
- DohDb.load_sql_using_each_backtick(dbconfig, filenames)
32
+ if RUBY_ENGINE == "jruby"
33
+ DohDb.load_sql_using_each_backtick(dbconfig, filenames)
34
+ else
35
+ DohDb.load_sql_using_one_popen(dbconfig, filenames)
36
+ end
35
37
  end
36
38
 
37
39
  # trying Open3 now for better error handling; unknown as of yet if this works under JRuby
@@ -50,4 +52,3 @@ def self.load_sql_using_each_open3(dbconfig, filenames)
50
52
  end
51
53
 
52
54
  end
53
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohmysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-03 00:00:00.000000000 Z
13
+ date: 2012-05-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dohroot