tiny_tds 0.9.5.beta.8-x86-mingw32 → 0.9.5.beta.9-x86-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: 9c4c7a5bd30b8342ffd8dd793c4a6830097e7856
4
- data.tar.gz: d433d45763d5bac215c77e9bb9f79bc75f019848
3
+ metadata.gz: 9a22de6daccbb32e849ded1598a9b0bea8a2f374
4
+ data.tar.gz: e2888e203d3b156484c5e990b5745146de943336
5
5
  SHA512:
6
- metadata.gz: 89c5581c3699b5ec34edc6d27219ce84a4b17228a925e558c02bb088299671cee4d5f9655ddf87f5058b0366e27fa46167e00cf178b011d28b3bc7e085054059
7
- data.tar.gz: 28477ba0dc32725e9fe066314bf650e5890d1e0af5dfcdff67e81323aa0ce0eaa07622e91a2d17e3c3cd27a316485076fcc8fd1264919bccde795afc51729ae8
6
+ metadata.gz: 579d4e13948ecfff15be28f34a37e97d59f84f24302e3b0f1de24706a604399b270593b10e9aabab26861cca25d2c027b1cd64da24dc07c4a07ee774a6c9cb62
7
+ data.tar.gz: 0da76ec7ef20ea7874c8b3e94ffd05d4f72727f3f26bef4d605e0f96f444b9ec8c98b4245cddb39878b18bcba109a0ae2baeb1c0bcd23bcc71db5d3d8ab5fc87
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5.beta.8
1
+ 0.9.5.beta.9
@@ -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
Binary file
Binary file
@@ -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: x86-mingw32
6
6
  authors:
7
7
  - Ken Collins