Sha256: 8bad3325eecd36428ee7ec4d95606248b97d33fa5112902d0444532ed42819c1

Contents?: true

Size: 528 Bytes

Versions: 3

Compression:

Stored size: 528 Bytes

Contents

#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
require 'smilies/client'

if ARGV.empty?
  puts 'smile: usage: smile <command line>'
  puts 'smile: command line cannot be blank'
  exit(-1)
end

command = ARGV.join(' ')

client = Smilies::Client.new

client.yellow("Running: #{command}")
output= nil
IO.popen("#{command} 2>&1") do |io|
  output = io.read
end
exitstatus = $?.exitstatus
if exitstatus == 0
  client.green("Passed: #{command}", output)
else
  client.red("Failed: #{command}", output)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
armin-joellenbeck-smilies-0.0.1 bin/smile
armin-joellenbeck-smilies-0.0.2 bin/smile
armin-joellenbeck-smilies-0.0.3 bin/smile