Skip to content

Instantly share code, notes, and snippets.

@weirdpercent
Created June 20, 2014 18:30
Show Gist options
  • Save weirdpercent/8be87bdbbcda24bb4a60 to your computer and use it in GitHub Desktop.
Save weirdpercent/8be87bdbbcda24bb4a60 to your computer and use it in GitHub Desktop.
GLI commands
root_path = File.join(File.dirname(__FILE__), "../")
$LOAD_PATH.unshift(root_path)
require 'lib/peas'
@api = API.new
include GLI::App
reset # Used when this file is repetitively loaded by rspec
program_desc 'CLI client for Peas'
version Peas::VERSION
# Load all the commands
Dir["#{root_path}/lib/peas/commands/**/*.rb"].each { |f| load f }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment