Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding episode 148

  • Loading branch information...
commit e35b47df7928bdee76bcc293a1ca0345fc8c16f8 1 parent 37c4e24
@ryanb authored
View
10 episode-148/README
@@ -0,0 +1,10 @@
+Railscasts Episode #148: App Templates in Rails 2.3
+
+http://railscasts.com/episodes/148
+
+Commands
+
+ sudo gem install rails --source http://gems.rubyonrails.org
+ rails -v
+ rails store -m base_template.rb
+ rails store -m auth_template.rb
View
13 episode-148/auth_template.rb
@@ -0,0 +1,13 @@
+load_template "/Users/rbates/code/base_template.rb"
+
+name = ask("What do you want a user to be called?")
+generate :nifty_authentication, name
+rake "db:migrate"
+
+git :add => ".", :commit => "-m 'adding authentication'"
+
+generate :controller, "welcome index"
+route "map.root :controller => 'welcome'"
+git :rm => "public/index.html"
+
+git :add => ".", :commit => "-m 'adding welcome controller'"
View
28 episode-148/base_template.rb
@@ -0,0 +1,28 @@
+run "echo TODO > README"
+
+generate :nifty_layout
+
+gem 'RedCloth', :lib => 'redcloth'
+gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
+rake "gems:install"
+
+if yes?("Do you want to use RSpec?")
+ plugin "rspec", :git => "git://github.com/dchelimsky/rspec.git"
+ plugin "rspec-rails", :git => "git://github.com/dchelimsky/rspec-rails.git"
+ generate :rspec
+end
+
+git :init
+
+file ".gitignore", <<-END
+.DS_Store
+log/*.log
+tmp/**/*
+config/database.yml
+db/*.sqlite3
+END
+
+run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
+run "cp config/database.yml config/example_database.yml"
+
+git :add => ".", :commit => "-m 'initial commit'"
Please sign in to comment.
Something went wrong with that request. Please try again.