babascript 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/bin/baba +11 -0
- data/lib/babascript/version.rb +1 -1
- 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: 7dd87afb4cf770b6f702679cc5421e3b709d82a9
|
4
|
+
data.tar.gz: 6d4202bd1400272d37811da54b38638fa33dbe80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 103a60b1799186016cccb006c01a42656ea33343f81eabcf58b3b4f1b6ce6a0ebcda766ee17b8798809227547fc5951916af28c98ae57e8bb22d67a81ec0c3fd
|
7
|
+
data.tar.gz: 9fa95cf3685919dd3ea07cd0872891f90afd76960f2135ac92fc62a65a7bd9884f444a68b4b1e56e6dc986e39e4234e1cce6b7ab639f82203a10aab2c3368977
|
data/History.txt
CHANGED
data/bin/baba
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
2
3
|
require 'rubygems'
|
3
4
|
require 'args_parser'
|
4
5
|
$:.unshift File.expand_path '../lib', File.dirname(__FILE__)
|
@@ -6,12 +7,22 @@ require 'babascript'
|
|
6
7
|
|
7
8
|
args = ArgsParser.parse ARGV do
|
8
9
|
arg :e, "one line of script"
|
10
|
+
arg :version, "show version", :alias => :v
|
9
11
|
arg :help, "show help", :alias => :h
|
10
12
|
end
|
11
13
|
|
14
|
+
binname = File.basename(__FILE__)
|
12
15
|
if args.has_option? :help
|
13
16
|
STDERR.puts "BabaScript v#{BabaScript::VERSION}"
|
14
17
|
STDERR.puts args.help
|
18
|
+
STDERR.puts "e.g:"
|
19
|
+
STDERR.puts " % #{binname} filename.bb"
|
20
|
+
STDERR.puts " % #{binname} -e 'アイス買ってきてよ'"
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
|
24
|
+
if args.has_option? :version
|
25
|
+
STDERR.puts "BabaScript v#{BabaScript::VERSION} - ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
|
15
26
|
exit 1
|
16
27
|
end
|
17
28
|
|
data/lib/babascript/version.rb
CHANGED