libroute 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/libroute +23 -8
- data/lib/libroute/librouteexec.rb +2 -1
- data/lib/libroute/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bafb0113b18998549c1efe458b3f5b735de3b3c4
|
4
|
+
data.tar.gz: a55703d7e20895ca2d267dee8db8a301eabbc009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae98d328b4b782f7fdd3e4eabe42d891f98b7bfe47c20e16d69abf4d1c5a905f9e6b5e3f4016ecbae8a98a3746d671e34b0e91d2cc566c94d1a19a00ced560ab
|
7
|
+
data.tar.gz: d8e1ab31186919ad737c0e2b568bb8f8747438740d28333dca1966338fc0f5177248485424a62f7905e4ba468a3172122fd337e62b395a13cee97c648a10c262
|
data/exe/libroute
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'libroute'
|
4
|
-
|
4
|
+
require 'bson'
|
5
5
|
|
6
6
|
options = Libroute.parse(ARGV)
|
7
7
|
|
@@ -11,22 +11,37 @@ require 'libroute'
|
|
11
11
|
end
|
12
12
|
|
13
13
|
if !options.build.empty?
|
14
|
-
puts "Building #{options.library} library...
|
14
|
+
puts "Building #{options.library} library..."
|
15
15
|
Libroute.build(options)
|
16
16
|
exit 0
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
# Populate params
|
20
20
|
paramshash = Hash.new
|
21
|
-
params.
|
22
|
-
|
23
|
-
|
21
|
+
if !options.params.empty?
|
22
|
+
params = options.params.split(",")
|
23
|
+
params.each do |p|
|
24
|
+
key,val = p.split("=",2)
|
25
|
+
paramshash[key]=val
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# Populate stdin
|
30
|
+
if !$stdin.tty?
|
31
|
+
data = $stdin.read
|
32
|
+
if !data.nil?
|
33
|
+
paramshash['stdin'] = BSON::Binary.new(data)
|
34
|
+
end
|
24
35
|
end
|
25
36
|
|
26
37
|
result = Libroute.exec(options.library, paramshash)
|
27
38
|
if !result['stdout'].nil?
|
28
|
-
|
29
|
-
|
39
|
+
if result['stdout'].is_a?(String)
|
40
|
+
puts result['stdout']
|
41
|
+
else
|
42
|
+
bb = result['stdout'].data
|
43
|
+
puts bb.to_s
|
44
|
+
end
|
30
45
|
else
|
31
46
|
result.each do |k,v|
|
32
47
|
if v.length < 100
|
data/lib/libroute/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libroute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Lisk (XS Research Ltd)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|