lib/padrino-gen/generators/app.rb in padrino-gen-0.9.14 vs lib/padrino-gen/generators/app.rb in padrino-gen-0.9.15
- old
+ new
@@ -28,10 +28,11 @@
# Copies over the Padrino base admin application
def create_app
self.destination_root = options[:root]
@app_name = name.gsub(/\W/, "_").underscore.camelize
if in_app_root?
+ self.behavior = :revoke if options[:destroy]
app_skeleton(name, options[:tiny])
empty_directory destination_root("public/#{name}")
append_file destination_root("config/apps.rb"), "\nPadrino.mount(\"#{@app_name}\").to(\"/#{name.underscore}\")"
return if self.behavior == :revoke
@@ -43,10 +44,10 @@
You can configure a different path by editing 'config/apps.rb'
=================================================================
TEXT
else
- say "You are not at the root of a Padrino application! (config/boot.rb not found)" and exit unless in_app_root?
+ say "You are not at the root of a Padrino application! (config/boot.rb not found)"
end
end
end # App
end # Generators
end # Padrino
\ No newline at end of file