Project

tryrb

0.0
No commit activity in last 3 years
No release in over 3 years
Try ruby code in a temporary file created.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0

Runtime

~> 0.18.1
 Project Readme

The Tryrb Gem

Gem Version Dependency Status Build Status Coverage Status Code Climate Bitdeli Badge

Try ruby in a fascinating way

Create and execute a temp file by one command.

Installation

$ gem install tryrb

Why creating this?

Maybe you often try ruby scripts like this:

$ cd ~/tmp
$ vim foooooooo.rb
$ ruby foooooooo.rb

You have to change working directory, figure out a name, finally try to find the right file to run.It's bothering! 💢

But this gem provide an easy way to do this. 💛

Usage

The simplest and fastest way:
$ tryrb c/create
# Editing ruby code
$ tryrb e/exec

A file named, for exmaple, 201401010909.rb will be created and executed.

More options:

Create a temp file

Specify a name

$ tryrb c/create foo

A file named, for exmaple, 201401010909_foo.rb will be created.

Execute a ruby script

Last one file in your temp dir

$ tryrb e/exec

The last one file containing foo

$ tryrb e/exec foo

Nth from the bottom file

$ tryrb e/exec -l n

Nth from the bottom file containing name foo

$ tryrb e/exec -l n foo

Open a ruby script to edit

(It's same with exec usage)

$ tryrb o/open

Config

tryrb config

A configure file ~/.tryrbrc will be created.

Alias

c is alias of create, e is alias of exec and o is alias of open.

Get help

$ tryrb help COMMAND

Contributing

Welcome contributing by forking, sending pull requests or opening issues.

Copyright

Copyright (c) 2014 Tony Han. See LICENSE for details.