RubyGems Navigation menu

tobias-script_finder 0.0.2

script_finder provides a script (called 's') that searches in and up from the current dir for a folder (default: script/) containing an executable file uniquely identified by the a prefix given as the first argument. It then calls that executable, passing the rest of the arguments to the called executable. If the given prefix is ambiguous, the script suggests unique prefixes. Examples (in a rails app): ~/rails_app/app/views$ s c --> calling '/Users/tobias/rails_app/script/console' Loading development environment (Rails 2.1.0) RowsLogger plugin enables mysql >> exit ~/rails_app/app/views$ s r 'some ruby' 's r' was too ambiguous. Try: 's ru' for 'script/runner' 's re' for 'script/remote' ~/rails_app/app/views$ s ru 'some ruby' --> calling '/Users/tobias/rails_app/script/runner some ruby' ... The gem is not rails specific - out of the box it will work with any project that has a 'script/' directory. If you want to make your own version of the 's' script that looks for executables in a different dir (I would save this one as 'c'): #!/usr/bin/env ruby require 'script_finder' # looks for executables in a commands/ dir instead of script/. ScriptFinder.find_and_execute(ARGV, 'commands')

Gemfile:
=

installieren:
=

Versionen:

  1. 0.2.0 August 10, 2014 (6 KB)
  2. 0.0.3 August 10, 2014 (7,5 KB)
  3. 0.0.2 August 10, 2014 (7,5 KB)

Development Abhängigkeiten (2):

hoe >= 1.8.0
newgem >= 1.2.3

Autoren:

  • Tobias Crawley

SHA 256-Prüfsumme:

=

Downloads insgesamt 8.209

Für diese Version 2.373

Version veröffentlicht:

Lizenzen:

k.A.

Erforderliche Ruby-Version: >= 0

Links: