tiny_tds 0.9.5.beta.8-x64-mingw32 → 0.9.5.beta.9-x64-mingw32

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: d5e660cacd15cdd0d037e59ceb93cc6e3f3c7d01
4
- data.tar.gz: 8554887835e09f19c4746535605586d382510bfd
3
+ metadata.gz: 91dcddcf54dfa48b2696bce80add3e7853f7e1a7
4
+ data.tar.gz: 94c29f91fe6d5fedc8f4adb3ddc48cf73e71f2b6
5
5
  SHA512:
6
- metadata.gz: 2aafd27e2d9772283a4b05f61261261e0d17b29f6a800f6a9c889e3129de6f35995b0d4db6634e472cdbbfa145751055fd4a8703a06df9bf0e3be4c96ff27c06
7
- data.tar.gz: 472f8cd06c78244487e399dbb121252684ae6e521f703817a4be4a9706c4819717821dfc079fbfaa6b8270a158f67f898dc6772930e22f16f8101434b01d86cc
6
+ metadata.gz: 67ec08f75ba48bc34bb32540194d30cdbdfe3513b09578b0a031615c1a7a7cbbeb1327f3256f410c0c57d95037aef3c67669c40e58ed5649bc74772ea31e424c
7
+ data.tar.gz: 1d4685e4cde26be395175403bce5c141ec424ff8ed92f847b82e0879965c683817672c213af3b0dc3c37d1192f2ec1cb7e24a8df4b9fda8a53777f2aa957c7d6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5.beta.8
1
+ 0.9.5.beta.9
data/bin/defncopy CHANGED
@@ -1,6 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  require_relative '../lib/tiny_tds/bin'
4
-
5
- bin = TinyTds::Bin.new 'defncopy'
6
- Kernel.system bin.path, *ARGV
3
+ TinyTds::Bin.exe 'defncopy', *ARGV
data/bin/tsql CHANGED
@@ -1,6 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  require_relative '../lib/tiny_tds/bin'
4
-
5
- bin = TinyTds::Bin.new 'tsql'
6
- Kernel.system bin.path, *ARGV
3
+ TinyTds::Bin.exe 'tsql', *ARGV
data/exe/defncopy.exe CHANGED
Binary file
data/exe/tsql.exe CHANGED
Binary file
data/lib/tiny_tds/bin.rb CHANGED
@@ -9,11 +9,20 @@ module TinyTds
9
9
 
10
10
  attr_reader :name
11
11
 
12
+ class << self
13
+
14
+ def exe(name, *args)
15
+ bin = new(name)
16
+ puts bin.info
17
+ Kernel.system bin.path, *args if bin.path
18
+ end
19
+
20
+ end
21
+
12
22
  def initialize(name, options = {})
13
23
  @name = name
14
- @binstub = File.join ROOT, 'bin', @name
15
- @exefile = File.join ROOT, 'exe', @name
16
- puts info unless options[:silent]
24
+ @binstub = find_bin
25
+ @exefile = find_exe
17
26
  end
18
27
 
19
28
  def path
@@ -28,6 +37,18 @@ module TinyTds
28
37
 
29
38
  private
30
39
 
40
+ def find_bin
41
+ File.join ROOT, 'bin', @name
42
+ end
43
+
44
+ def find_exe
45
+ EXTS.each do |ext|
46
+ f = File.join ROOT, 'exe', "#{@name}#{ext}"
47
+ return f if File.exists?(f)
48
+ end
49
+ nil
50
+ end
51
+
31
52
  def which
32
53
  PATHS.each do |path|
33
54
  EXTS.each do |ext|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5.beta.8
4
+ version: 0.9.5.beta.9
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Ken Collins