サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
今年の「#文学」
tagaholic.me
While working on a sinatra app recently, I noticed that sinatra has no rails equivalent to rails console. So here’s tux, dressing your sinatra app in a console. Install and Try On $ gem install tux In the directory of your sinatra app, try on tux: $ tux # If app's rack config file isn't config.ru, specify it with -c $ tux -c app.ru # ruby options like -I and -r are available to tux $ tux -h Usage:
In my last post, I demonstrated how Hirb can render puurty tables with automated views. In this post, I’ll show Hirb’s new tree view using its console methods and these three examples- class inheritance trees, nested class trees and Rails’ ActiveRecord trees. First, let’s view a basic tree with Hirb. bash> irb -rubygems -rhirb # Import a view() method we'll use. irb>> extend Hirb::Console => main
Introducing lightning, a commandline framework that could revolutionize how fast you are on the commandline. Lightning lets you easily define and generate shell functions which autocomplete and interpret paths (files and directories) by their basenames. With these functions you don’t have to ever type the full path to any file for any command again. Overview Intro Install Lightning Bolts Everythin
In previous posts, Boson was introduced as a command framework, usable from the commandline and irb. In this post, we’ll focus on how Boson enhances irb by treating methods like shell commands. Preface If you’re an avid irb user like me, your ~/.irbrc is littered with methods. These methods are sometimes favorite tweaks to Ruby’s core libraries and sometimes interfaces to gems. But regardless of w
Introducing Boson, a command/task framework that could change how you collect and execute your ruby code. Sure, there’s rake, thor and a dozen other gems. But how many will let you create a universe of ruby commands you can run from the commandline and irb? Spinning On Feel free to follow Boson on the Hub and to install it: $ gem install boson boson-more $ echo "require 'boson/more'" >> ~/.bosonrc
Irb is one of the most commonly used standard ruby libraries, yet most don’t seem to know much about it. I’ve lost count of the number of blog posts that explain some irb “tricks” or “secret” config options. This is the first in a series that aims to make irb less magical and more accessible. First off, I’m assuming you know your way around irb some. If you don’t then I recommend reading the pragm
It’s got the very basics of a repl: take a user’s input, eval it and print the result. Being as basic as it is, there’s no autocompletion, persistent readline history, etc. But who says that needs to be much larger to get those features?: 1 %w{readline rubygems bond}.each {|e| require e } 2 Bond.start 3 history_file = File.join(ENV["HOME"], '.mini_irb_history') 4 IO.readlines(history_file).each {|
A mini view framework for console/irb that's easy to use, even while under its influence. Console goodies include a no-wrap table, auto-pager, tree and menu. Install gem install hirb Description Hirb provides a mini view framework for console applications and uses it to improve irb’s default inspect output. Given an object or array of objects, hirb renders a view based on the object’s class and/or
In my last post we discussed irb’s commands. This post goes further into irb’s innards, exploring all of its configuration options. Gettin Ready For starters, I refer you to the pickaxe which has an excellent section on configuring irb. Also, this post assumes ruby 1.8.6 and irb 0.9.5, though it should apply to 1.9ers. Yes, I know I should get on the 1.9 train. This post will cover every irb confi
Irb is a great place for interacting with Ruby. Unfortunately, even with the colorful help of wirble, it’s not so great for visualizing the output of those interactions. Hirb aims to change that. Hirb provides a mini view framework for console applications, designed with irb in mind. Given the output of a console application, it applies a view if there is one to apply, based on the output’s class.
このページを最初にブックマークしてみませんか?
『Tagaholic - Home』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く