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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e09aa0fa3c28c9962d54f95b27234397d4d71c6
4
- data.tar.gz: df3ce05b94c6cff1aba435f90439db49b59aadc1
3
+ metadata.gz: 7dd87afb4cf770b6f702679cc5421e3b709d82a9
4
+ data.tar.gz: 6d4202bd1400272d37811da54b38638fa33dbe80
5
5
  SHA512:
6
- metadata.gz: bfc5a5695e7429523c5b61222559746c56984bf90ea080fa593d62e898934c8ca2c94c73959d201456300740bb7661ee28dcbb0cbe3acd7cdb663ee74477d13f
7
- data.tar.gz: 766e27b56753d3202323a4f6554b53d47e4c46e4abc454c2a2af79dca7bcd92b7a175c1fbd6ac30a8cde20c3fceec3994add53068fee3f09f90386b13fa8bdf9
6
+ metadata.gz: 103a60b1799186016cccb006c01a42656ea33343f81eabcf58b3b4f1b6ce6a0ebcda766ee17b8798809227547fc5951916af28c98ae57e8bb22d67a81ec0c3fd
7
+ data.tar.gz: 9fa95cf3685919dd3ea07cd0872891f90afd76960f2135ac92fc62a65a7bd9884f444a68b4b1e56e6dc986e39e4234e1cce6b7ab639f82203a10aab2c3368977
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.1.1 2013-06-22
2
+
3
+ * --version option
4
+ * command example in --help
5
+
1
6
  === 0.1.0 2013-06-22
2
7
 
3
8
  * put Callback ID
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
 
@@ -1,3 +1,3 @@
1
1
  module BabaScript
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babascript
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto