bixby-client 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/VERSION +1 -1
- data/bixby-client.gemspec +3 -3
- data/lib/bixby-client/app/commands/run.rb +12 -2
- data/lib/bixby-client/app/file_finder.rb +6 -1
- data/lib/bixby-client/script.rb +1 -0
- 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: 0ef77cb00e1743828677004f98f71640ba27f0e9
|
4
|
+
data.tar.gz: 1910aac0d3ed3e678b2aa76a5424b326ebd869b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bb22df36bc74a9a7b9acdd559b2007e8d7d17f9ab98acfbd346c3751051094b328f42ae51b10b6713498c1613daf466b04674ee39da1990cfe909d201f9deb8
|
7
|
+
data.tar.gz: 0a30e6c7ffc99df233c1fba1c88e9e3d681ef332e972d5eb1203a72f5ec9723146920eeea8f2ca8a3439c8ec682d37c79720307fc8c6cd996e664bab005eff28
|
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/bixby-client.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bixby-client 0.4.
|
5
|
+
# stub: bixby-client 0.4.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bixby-client"
|
9
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Chetan Sarva"]
|
13
|
-
s.date = "2013-11-
|
13
|
+
s.date = "2013-11-21"
|
14
14
|
s.description = "Bixby Client"
|
15
15
|
s.email = "chetan@pixelcop.net"
|
16
16
|
s.executables = ["bixby"]
|
@@ -15,21 +15,31 @@ module Bixby
|
|
15
15
|
str = argv.shift
|
16
16
|
scripts = FileFinder.new(Bixby.repo).find_script(str)
|
17
17
|
|
18
|
-
if scripts.
|
18
|
+
if scripts.nil? then
|
19
|
+
$stderr.puts "Error: missing input"
|
20
|
+
$stderr.puts "usage: #{$0} run <script> [args ...]"
|
21
|
+
return exit 1
|
22
|
+
|
23
|
+
elsif scripts.kind_of?(Array)
|
24
|
+
|
19
25
|
if scripts.size > 1 then
|
20
26
|
$stderr.puts "Found #{scripts.size} scripts matching '#{str}'. Please be more explicit"
|
21
27
|
scripts.each do |s|
|
22
28
|
puts " * #{s}"
|
23
29
|
end
|
24
30
|
return 1
|
31
|
+
|
25
32
|
elsif scripts.empty? then
|
26
33
|
$stderr.puts "No scripts matched '#{str}'. Try again"
|
27
34
|
return 1
|
28
35
|
end
|
36
|
+
|
37
|
+
# only one match
|
38
|
+
scripts = scripts.shift
|
29
39
|
end
|
30
40
|
|
31
41
|
setup_env()
|
32
|
-
exec(scripts
|
42
|
+
exec(scripts, *argv)
|
33
43
|
end
|
34
44
|
|
35
45
|
# Setup the ENV for exec
|
@@ -9,8 +9,13 @@ module Bixby
|
|
9
9
|
@root = root
|
10
10
|
end
|
11
11
|
|
12
|
+
# Look for a script matchign the given [partial] filename
|
13
|
+
#
|
14
|
+
# @param [String] script
|
15
|
+
#
|
16
|
+
# @return [Array<String>] matches
|
12
17
|
def find_script(script)
|
13
|
-
|
18
|
+
return nil if script.nil? or script.empty?
|
14
19
|
return script if File.exists? script
|
15
20
|
|
16
21
|
# try relative path
|
data/lib/bixby-client/script.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bixby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chetan Sarva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bixby-common
|