lib/thesilverspoon.rb~ in thesilverspoon-0.0.16 vs lib/thesilverspoon.rb~ in thesilverspoon-0.0.17

- old
+ new

@@ -226,12 +226,19 @@ Rails::Generators.invoke('gritter:locale') Rails::Generators.invoke('devise:install') Rails::Generators.invoke('devise', ["user"]) Rails::Generators.invoke('devise:views') Rails::Generators.invoke('cancan:ability') + Rails::Generators.invoke('rails_admin:install') + Rails::Generators.invoke('migration',["add_role_to_user",["admin:boolean"]]) end +def create_new_user + s="\nUser.create!(:email=>'admin@tss.com',:password=>'secret',:password_confirmation=>'secret',:admin=>true)" + append_to_file "db/seeds.rb",s + end + def create_appplication_helper remove_file "app/helpers/application_helper.rb" template 'application_helper.rb', "app/helpers/application_helper.rb" end @@ -307,13 +314,13 @@ end def insert_devise_code inject_into_file "config/application.rb", 'require "devise"', :after=>"require File.expand_path('../boot', __FILE__)\n" inject_into_file "config/application.rb", "require 'bootstrap-sass'\n", :after=>"require File.expand_path('../boot', __FILE__)\n" - inject_into_file "config/application.rb", "require 'gritter'\n", :after=>"require File.expand_path('../boot', __FILE__)\n" - inject_into_file "app/assets/stylesheets/application.css", '*=require_directory', :before=>"*/" - + inject_into_file "config/application.rb", "require 'gritter'\n", :after=>"require 'rails/all'\n" +inject_into_file "config/application.rb", "require 'bootstrapped'\n", :after=>"require 'rails/all'\n" + inject_into_file "app/assets/stylesheets/application.css", '*=require_directory', :before=>"*/" append_to_file "app/assets/javascripts/application.js", '//= require bootstrap' inject_into_file "app/controllers/application_controller.rb", "before_filter :authenticate_user!\n", :after=>" protect_from_forgery\n" end