diff --git a/bin/bozo b/bin/bozo new file mode 100644 index 0000000..bb4e589 --- /dev/null +++ b/bin/bozo @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby +root_directory = File.expand_path(File.dirname(__FILE__)) +ENV['BOZO_ROOT_DIR'] = root_directory +$:.push root_directory + +# Take a copy of the arguments as rubygems or bundler modifies them +args = ARGV.dup + +# Special argument to ease initial build +if args[0] == '--install' + system 'gem install --no-rdoc --no-ri bundler --pre' + system 'bundle install --path build/bundler' + args = args[1..-1] # discard special argument +end + +require "bundler/setup" +require "rainbow" +require "bozo" + +# Invoke the command +result = GLI.run(args) + +exit result \ No newline at end of file diff --git a/bozo.gemspec b/bozo.gemspec index 21daa69..26d478e 100644 --- a/bozo.gemspec +++ b/bozo.gemspec @@ -14,6 +14,7 @@ Gem::Specification.new do |s| s.rubyforge_project = "bozo" + s.bindir =ƒs 'bin' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } @@ -21,4 +22,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency "gli" s.add_runtime_dependency "rainbow" + + s.has_rdoc = true + s.rdoc_options << '--title' << 'gitplate' << '--main' << 'README.rdoc' << '-ri' end