Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added an example binary for running sinatra.

  • Loading branch information...
commit 53cdbda4283161c65373ce2e40ac3dedd5b154af 1 parent 78017cf
@technicalpickles authored
Showing with 9 additions and 0 deletions.
  1. +3 −0  lib/jeweler/generator.rb
  2. +6 −0 lib/jeweler/templates/sinatra/bin
View
3  lib/jeweler/generator.rb
@@ -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
View
6 lib/jeweler/templates/sinatra/bin
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
+require '<%= lib_filename %>'
+
+Sinatra::Application.run!
Please sign in to comment.
Something went wrong with that request. Please try again.