Permalink
Browse files

Add a default Sass stylesheet and automigrate the database

  • Loading branch information...
1 parent d7627f1 commit b1985d2084e2b1c4ee8698d19dd0300b41deb7d6 @wycats wycats committed May 5, 2010
Showing with 21 additions and 1 deletion.
  1. +6 −0 lib/beard/app_builder.rb
  2. +7 −0 lib/generators/beard/install/install_generator.rb
  3. +8 −1 spec/build_spec.rb
View
@@ -84,6 +84,12 @@ def javascripts
create_file "public/javascripts/jquery.js", RAILS_JS
end
+ def stylesheets
+ empty_directory "public/stylesheets"
+ empty_directory "public/stylesheets/sass"
+ create_file "public/stylesheets/sass/application.sass"
+ end
+
def leftovers
run_command("rails g beard:install")
end
@@ -1,5 +1,7 @@
require "generators/beard/generator"
+STDOUT.sync = true
+
module Beard
class InstallGenerator < Rails::Generators::Base
extend Beard::Generator
@@ -47,5 +49,10 @@ def copy_devise_views
say_status :copying, "Devise views for customization", :white
with_padding { invoke "devise_views" }
end
+
+ def setup_db
+ say_status :setup, "database"
+ system "rake db:automigrate"
+ end
end
end
View
@@ -85,6 +85,8 @@
directory "db" do
file "seeds.rb"
+ file "development.sqlite3"
+ file "test.sqlite3"
end
directory "lib"
@@ -97,7 +99,12 @@
end
end
- directory "stylesheets"
+ directory "stylesheets" do
+ directory "sass" do
+ file "application.sass"
+ end
+ end
+
directory "images" do
no_file "rails.png"
end

0 comments on commit b1985d2

Please sign in to comment.