ask_stack 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ask_stack.gemspec +1 -1
- data/bin/ask_stack +14 -1
- metadata +1 -1
data/ask_stack.gemspec
CHANGED
data/bin/ask_stack
CHANGED
@@ -1,10 +1,23 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'ask_stack'
|
3
3
|
|
4
|
+
|
5
|
+
if `which java` == ''
|
6
|
+
abort "ask_stack require Java. Please install Java."
|
7
|
+
end
|
8
|
+
|
4
9
|
if ARGV.first == '-s'
|
5
10
|
jarfile = File.join(File.dirname(__FILE__), '..', 'vendor/selenium-server-standalone-2.0b3.jar')
|
6
11
|
exec("java -jar #{jarfile}")
|
7
12
|
exit
|
8
13
|
end
|
9
14
|
|
10
|
-
|
15
|
+
if STDIN.tty?
|
16
|
+
abort "Usage: ask_stack < question.txt\n\nPlease see README https://github.com/danchoi/ask_stack"
|
17
|
+
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
AskStack.run
|
21
|
+
rescue Errno::ECONNREFUSED
|
22
|
+
abort "Selenium stand-alone server appears not to be running.\nRun with ask_stack -s in another window."
|
23
|
+
end
|