Permalink
Browse files

Changed app.rb -> #{app_name}.rb

Updated Sinatra git URL to the new Canonical branch
  • Loading branch information...
1 parent fbf4d5a commit bc052d3f3c86b14e18b405754171c958e09e3a9e @quirkey quirkey committed Feb 10, 2009
@@ -3,6 +3,8 @@ class SinatraAppGenerator < RubiGen::Base
DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
Config::CONFIG['ruby_install_name'])
+ SINATRA_GIT_URL = 'git://github.com/sinatra/sinatra.git'
+
default_options :author => nil
attr_accessor :app_name, :vendor, :tiny, :git, :git_init, :test_framework, :view_framework, :install_scripts, :cap, :actions
@@ -26,7 +28,7 @@ def manifest
end
m.template 'config.ru.erb', 'config.ru'
- m.template 'app.rb.erb' , 'app.rb'
+ m.template 'app.rb.erb' , "#{app_name}.rb"
m.template 'Rakefile.erb' , 'Rakefile'
unless tiny
@@ -42,9 +44,9 @@ def manifest
if vendor
m.directory 'vendor'
if git_init || File.exists?(File.join(@destination_root, '.git'))
- command = "cd #{@destination_root} && #{git} submodule add git://github.com/bmizerany/sinatra.git vendor/sinatra"
+ command = "cd #{@destination_root} && #{git} submodule add #{SINATRA_GIT_URL} vendor/sinatra"
else
- command = "cd #{@destination_root} && #{git} clone git://github.com/bmizerany/sinatra.git vendor/sinatra"
+ command = "cd #{@destination_root} && #{git} clone #{SINATRA_GIT_URL} vendor/sinatra"
end
`#{command}`
end
@@ -1,7 +1,7 @@
# To use with thin
# thin start -p PORT -R config.ru
-require File.join(File.dirname(__FILE__), 'app.rb')
+require File.join(File.dirname(__FILE__), '<%= app_name %>.rb')
disable :run
set :env, :production

0 comments on commit bc052d3

Please sign in to comment.