tiny_tds 0.9.5.beta.8 → 0.9.5.beta.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/defncopy +1 -4
- data/bin/tsql +1 -4
- data/lib/tiny_tds/bin.rb +24 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ebb84f30b5cbf5d6ceac3f3bbb5804a56a4b40d
|
4
|
+
data.tar.gz: 8c01d7757a794cc320eb94a421bbcc293d15d583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ec05f153a1b5f4a64b3113dfafbc7f8a445a91da1f3ebe5f2244e6839245de783878a2e480b5316fc8b23e1eec62a9fb12801098ba2d7e9f0c913425e98839c
|
7
|
+
data.tar.gz: 64eddfff3082ad2917deca6ed98f3ecc1e562ba0e70c44c8c13c204a2c2b00122939cd21d2941c8ed2823980666cf272339b39529ee1488f52a4b04b0e8a6165
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.5.beta.
|
1
|
+
0.9.5.beta.9
|
data/bin/defncopy
CHANGED
data/bin/tsql
CHANGED
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 =
|
15
|
-
@exefile =
|
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|
|