td 0.10.90 → 0.10.91

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.
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ == 2013-10-04 version 0.10.91
2
+
3
+ * Fix import command doesn't work on Windows
4
+
5
+
1
6
  == 2013-10-02 version 0.10.90
2
7
 
3
8
  * Fix table:import permission error with sub user
@@ -5,7 +5,6 @@ module Command
5
5
  BASE_PATH = File.expand_path('../../..', File.dirname(__FILE__))
6
6
 
7
7
  JAVA_COMMAND = "java"
8
- JAVA_COMMAND_CHECK = "#{JAVA_COMMAND} -version >/dev/null 2>&1"
9
8
  JAVA_MAIN_CLASS = "com.treasure_data.bulk_import.BulkImportMain"
10
9
  JVM_OPTS = ["-Xmx1024m"] # TODO
11
10
 
@@ -97,7 +96,13 @@ module Command
97
96
 
98
97
  private
99
98
  def check_java
100
- system(JAVA_COMMAND_CHECK)
99
+ if RbConfig::CONFIG["target_os"].downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/ # windows
100
+ cmd = "#{JAVA_COMMAND} -version > NUL 2>&1"
101
+ else # others
102
+ cmd = "#{JAVA_COMMAND} -version > /dev/null 2>&1"
103
+ end
104
+
105
+ system(cmd)
101
106
 
102
107
  unless $?.success?
103
108
  $stderr.puts "Java is not installed. 'td import' command requires Java (version 1.6 or later)."
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
2
 
3
- VERSION = '0.10.90'
3
+ VERSION = '0.10.91'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.90
4
+ version: 0.10.91
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-02 00:00:00.000000000 Z
12
+ date: 2013-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack
@@ -294,7 +294,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
294
294
  version: '0'
295
295
  segments:
296
296
  - 0
297
- hash: 637439873993359334
297
+ hash: 3403017301161628743
298
298
  required_rubygems_version: !ruby/object:Gem::Requirement
299
299
  none: false
300
300
  requirements:
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  version: '0'
304
304
  segments:
305
305
  - 0
306
- hash: 637439873993359334
306
+ hash: 3403017301161628743
307
307
  requirements: []
308
308
  rubyforge_project:
309
309
  rubygems_version: 1.8.23