Skip to content

Build Awesome Command-Line Applications in Ruby Control Your Computer, Simplify Your Life

Best in textbook rentals since 2012!

ISBN-10: 1934356913

ISBN-13: 9781934356913

Edition: 2012

Authors: David B. Copeland

List price: $35.00
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

As Ruby pro David Copeland explains, writing a command-line application that is self-documenting, robust, adaptable and forever useful is easier than you might think. Ruby is particularly suited to this task, since it combines high-level abstractions with "close to the metal" system interaction wrapped up in a concise, readable syntax. Moreover, Ruby has the support of a rich ecosystem of open-source tools and libraries.Ten insightful chapters each explain and demonstrate a command-line best practice. You'll see how to use these tools to elevate the lowliest automation script to a maintainable, polished application.You'll learn how to use free, open source parsers to create user-friendly…    
Customers also bought

Book details

List price: $35.00
Copyright year: 2012
Publisher: Pragmatic Programmers, LLC, The
Publication date: 3/22/2012
Binding: Paperback
Pages: 225
Size: 7.50" wide x 9.00" long x 0.68" tall
Weight: 0.968
Language: English

David Bryant Copeland is a veteran professional software developer who spends most of his time on the command line. He speaks frequently at national and regional Ruby conferences and built many command-line and web applications, using the command-line to productive effect.

Introduction
Have a Clear and Concise Purpose
Problem 1: Backing Up Data
Problem 2: Managing Tasks
What Makes an Awesome Command-Line App
Moving On
Be Easy to Use
Understanding the Command Line: Options, Arguments, and Commands
Building an Easy-to-Use Command-Line Interface
Building an Easy-to-Use Command-Suite Interface
Moving On
Be Helpful
Documenting a Command-Line Interface
Documenting a Command Suite
Including a Man Page
Writing Good Help Text and Documentation
Moving On
Play Well with Others
Using Exit Codes to Report Success or Failure
Using the Standard Output and Error Streams Appropriately
Formatting Output for Use as Input to Another Program
Trapping Signals Sent from Other Apps
Moving On
Delight Casual Users
Choosing Names for Options and Commands
Choosing Default Values for Flags and Arguments
Deciding Default Behavior
Moving On
Make Configuration Easy
Why External Configuration?
Reading External Configuration from Files
Using Configuration Files with Command Suites
Design Considerations When Using Configuration
Moving On
Distribute Painlessly
Distributing with RubyGems
Distributing Without RubyGems
Collaborating with Other Developers
Moving On
Test, Test, Test
Testing User Behavior with Acceptance Tests
Testing in Isolation with Unit Tests
A Word About Test-Driven Development
Moving On
Be Easy to Maintain
Dividing Code into Multiple Files
Designing Code for Maintainability
Moving On
Add Color, Formatting, and Interactivity
Adding Color Using ANSI Escape Sequences
Formatting Output with Tables
Providing Interactive User Input with readline
Moving On
Common Command-Line Gems and Libraries
Alternatives for Simple Command-Line Apps
Alternatives for Command Suites
Other Relevant Libraries
Bibliography
Index