Skip to content

Commit

Permalink
created executable in bin dir and updated gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesmith authored and Garry Shutler committed Jan 24, 2012
1 parent a3e5714 commit 94942a6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 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
4 changes: 4 additions & 0 deletions bozo.gemspec
Expand Up @@ -14,11 +14,15 @@ 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) }
s.require_paths = ["lib"]

s.add_runtime_dependency "gli"
s.add_runtime_dependency "rainbow"

s.has_rdoc = true
s.rdoc_options << '--title' << 'gitplate' << '--main' << 'README.rdoc' << '-ri'
end

0 comments on commit 94942a6

Please sign in to comment.