bin/ro in ro_commands-0.0.3 vs bin/ro in ro_commands-0.0.4
- old
+ new
@@ -1,32 +1,3 @@
-require "active_support"
-module RoCommands
- $LOAD_PATH.unshift File.expand_path("../..", __FILE__)
- require "config/rorc"
+#! /usr/bin/env ruby
+require File.expand_path('../../lib/ro_commands_bin', __FILE__)
- arg = ARGV.shift
-
- if arg
- require 'ro_commands/base'
- require "ro_commands/#{arg}"
- RoCommands.const_get(arg.camelize).start
-
- elsif arg.nil?
- lib = File.expand_path("../../lib", __FILE__)
- args = Dir["#{lib}/ro_commands/*"].map do |file|
- if file[/\.rb$/]
- File.basename(file.gsub /\.rb$/, '')
- end
- end
-
- def self.is_helper?(str)
- str.match(%r{version})
- end
-
- puts "Usage:"
- args.compact.each do |arg|
- unless is_helper?(arg)
- puts " ro #{arg}"
- end
- end
- end
-end