Skip to content
Browse files

Moving some files to templates, finish the gemspec

  • Loading branch information...
1 parent 60d7f4c commit a3bf83c219953daf84625026a5ab71062e7ea279 @larrywright committed
Showing with 5 additions and 39 deletions.
  1. +5 −3 Mako.gemspec
  2. +0 −30 templates/app.rb.erb
  3. +0 −6 templates/config.ru.erb
View
8 Mako.gemspec
@@ -4,16 +4,18 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'Mako/version'
Gem::Specification.new do |gem|
- gem.name = "Mako"
+ gem.name = "mako"
gem.version = Mako::VERSION
gem.authors = ["Larry Wright"]
gem.email = ["larrywright@gmail.com"]
gem.description = "Mako gives you a head start on building small web apps"
gem.summary = %q{An application generator that creates a base Sinatra webapp}
- gem.homepage = ""
-
+ gem.homepage = "http://github.com/larrywright/mako"
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
+
+ gem.add_dependency "thor"
+ gem.add_development_dependency "rspec"
end
View
30 templates/app.rb.erb
@@ -1,30 +0,0 @@
-require 'bundler'
-Bundler.require
-require 'sinatra/base'
-
-MongoMapper.database = "<%= name.downcase %>_#{settings.environment}"
-
-Dir["models/*.rb"].each do |model|
- require_relative model
-end
-
-class <%= name %> < Sinatra::Base
- set :public_folder, File.dirname(__FILE__) + '/public'
- require "sinatra/reloader"
-
- before do
- end
-
- get '/' do
- haml :index
- end
-
- not_found do
- haml :"static/404"
- end
-
- error do
- haml :"static/error"
- end
-
-end
View
6 templates/config.ru.erb
@@ -1,6 +0,0 @@
-$LOAD_PATH << '.'
-require '<%= name.downcase %>'
-
-set :environment, ENV['RACK_ENV'].to_sym
-
-run <%= name %>

0 comments on commit a3bf83c

Please sign in to comment.
Something went wrong with that request. Please try again.