🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

kuromi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kuromi

bundlerRubygems
Version
0.0.1
Version published
Maintainers
1
Created
Source

Kuromi

Build Status Code Climate

Kuromi is a command runner and a pretty DSL around your command line. It's basically a nice friendly way to interact with Open3#popen3 from the standard library

Installation

Add this line to your application's Gemfile:

gem 'kuromi', github: 'onthebeach/kuromi'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kuromi

Usage

Commands are built using Runners. and can be built up in chains until they are finally executed with #run.

output = Kuromi::Runner.for('hostname').run

You will end up with a Kuromi::Output object that you can use.

output.code # => 0, the exit code of the process
output.stdout # => Optional information from STDOUT
output.stderr # => Optional information from STDERR

like most OnTheBeach projects, Kuromi is allergic to nil so where applicable (currently stdout and stderr do this) you will either get Some[value] or None. For the implementation of Optional Values see the Optional gem here

You can pass extra arguments and build up command line chains with Kuromi using #command, #with and #and. For example

Kuromi::Runner.for('git').
  command('rebase').
  with('--interactive').
  and('origin/master').
  run

TODO

  • Kuromi is synchronous - it will block while your command is being executed.

Contributing

Pull requests are welcome. Please ensure they're tested or we may reject them.

Run the tests as follows

bundle exec rake

or with coverage

COVERAGE=true bundle exec rake

FAQs

Package last updated on 12 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts