Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed -v task for bin (require file was off)

Trying to fix - options
  • Loading branch information...
commit a8f391b264e294573c158c792bc8e410591cd15f 1 parent 004312e
@quirkey quirkey authored
View
2  app_generators/sinatra_app/sinatra_app_generator.rb
@@ -18,7 +18,7 @@ def initialize(runtime_args, runtime_options = {})
def manifest
record do |m|
# Ensure appropriate folder(s) exists
- m.directory ''
+ m.directory ''
if git_init
`cd #{@destination_root} && #{git} init`
View
2  bin/sinatra-gen
@@ -4,7 +4,7 @@ require 'rubygems'
require 'rubigen'
if %w(-v --version).include? ARGV.first
- require 'sinatra-gen'
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'sinatra-gen')
puts "#{File.basename($0)} #{SinatraGen::VERSION}"
exit(0)
end
View
7 test/test_sinatra_app_generator.rb
@@ -48,6 +48,13 @@ def test_generate_app_with_tiny_option
assert_generated_file 'Rakefile'
end
+ def test_generate_app_with_t_option
+ run_generator('sinatra_app', [APP_ROOT, '-t'], sources)
+ assert_generated_file 'config.ru'
+ assert_generated_file 'app.rb'
+ assert_generated_file 'Rakefile'
+ end
+
def test_generate_app_with_init_option
run_generator('sinatra_app', [APP_ROOT, '-i'], sources)
assert_basic_paths_and_files
Please sign in to comment.
Something went wrong with that request. Please try again.