Permalink
Browse files

Added an example binary for running sinatra.

  • Loading branch information...
1 parent 78017cf commit 53cdbda4283161c65373ce2e40ac3dedd5b154af @technicalpickles committed Nov 20, 2009
Showing with 9 additions and 0 deletions.
  1. +3 −0 lib/jeweler/generator.rb
  2. +6 −0 lib/jeweler/templates/sinatra/bin
View
@@ -173,6 +173,9 @@ def create_files
if use_sinatra
output_template_in_target File.join('sinatra', 'config.ru'), 'config.ru'
+ mkdir_in_target 'bin'
+ output_template_in_target File.join('sinatra', 'bin'), File.join('bin', project_name)
+ FileUtils.chmod 0755, File.join(target_dir, 'bin', project_name)
end
mkdir_in_target lib_dir
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
+require '<%= lib_filename %>'
+
+Sinatra::Application.run!

0 comments on commit 53cdbda

Please sign in to comment.