Permalink
Browse files

Release of code base

  • Loading branch information...
0 parents commit 0fd8c6035c158080730070cada43d8a7fcb62a82 @baileylo committed Oct 20, 2010
Showing with 11,444 additions and 0 deletions.
  1. +30 −0 Gemfile
  2. +76 −0 Gemfile.lock
  3. +1 −0 README
  4. +7 −0 Rakefile
  5. +17 −0 app/controllers/application_controller.rb
  6. +83 −0 app/controllers/boards_controller.rb
  7. +83 −0 app/controllers/comments_controller.rb
  8. +111 −0 app/controllers/conversations_controller.rb
  9. +41 −0 app/controllers/user_sessions_controller.rb
  10. +83 −0 app/controllers/users_controller.rb
  11. +2 −0 app/helpers/application_helper.rb
  12. +2 −0 app/helpers/boards_helper.rb
  13. +2 −0 app/helpers/comments_helper.rb
  14. +2 −0 app/helpers/conversations_helper.rb
  15. +2 −0 app/helpers/user_sessions_helper.rb
  16. +2 −0 app/helpers/users_helper.rb
  17. +3 −0 app/models/board.rb
  18. +4 −0 app/models/comment.rb
  19. +6 −0 app/models/conversation.rb
  20. +4 −0 app/models/user.rb
  21. +9 −0 app/models/user_session.rb
  22. +25 −0 app/views/boards/_form.html.erb
  23. +6 −0 app/views/boards/edit.html.erb
  24. +25 −0 app/views/boards/index.html.erb
  25. +5 −0 app/views/boards/new.html.erb
  26. +15 −0 app/views/boards/show.html.erb
  27. +33 −0 app/views/comments/_form.html.erb
  28. +6 −0 app/views/comments/edit.html.erb
  29. +29 −0 app/views/comments/index.html.erb
  30. +5 −0 app/views/comments/new.html.erb
  31. +25 −0 app/views/comments/show.html.erb
  32. +31 −0 app/views/conversations/_form.html.erb
  33. +6 −0 app/views/conversations/edit.html.erb
  34. +27 −0 app/views/conversations/index.html.erb
  35. +6 −0 app/views/conversations/new.html.erb
  36. +28 −0 app/views/conversations/show.html.erb
  37. +25 −0 app/views/layouts/application.html.erb
  38. +25 −0 app/views/user_sessions/_form.html.erb
  39. +6 −0 app/views/user_sessions/edit.html.erb
  40. +25 −0 app/views/user_sessions/index.html.erb
  41. +5 −0 app/views/user_sessions/new.html.erb
  42. +15 −0 app/views/user_sessions/show.html.erb
  43. +33 −0 app/views/users/_form.html.erb
  44. +6 −0 app/views/users/edit.html.erb
  45. +25 −0 app/views/users/index.html.erb
  46. +5 −0 app/views/users/new.html.erb
  47. +30 −0 app/views/users/show.html.erb
  48. +4 −0 config.ru
  49. +42 −0 config/application.rb
  50. +13 −0 config/boot.rb
  51. +22 −0 config/database.yml
  52. +5 −0 config/environment.rb
  53. +26 −0 config/environments/development.rb
  54. +49 −0 config/environments/production.rb
  55. +35 −0 config/environments/test.rb
  56. +7 −0 config/initializers/backtrace_silencers.rb
  57. +10 −0 config/initializers/inflections.rb
  58. +5 −0 config/initializers/mime_types.rb
  59. +7 −0 config/initializers/secret_token.rb
  60. +8 −0 config/initializers/session_store.rb
  61. +5 −0 config/locales/en.yml
  62. +10 −0 config/routes.rb
  63. +17 −0 db/migrate/20101006075027_create_users.rb
  64. +12 −0 db/migrate/20101006081231_create_user_sessions.rb
  65. +14 −0 db/migrate/20101007093217_create_boards.rb
  66. +17 −0 db/migrate/20101007093226_create_conversations.rb
  67. +19 −0 db/migrate/20101007093231_create_comments.rb
  68. +56 −0 db/schema.rb
  69. +7 −0 db/seeds.rb
  70. +2 −0 doc/README_FOR_APP
  71. 0 lib/tasks/.gitkeep
  72. +26 −0 public/404.html
  73. +26 −0 public/422.html
  74. +26 −0 public/500.html
  75. 0 public/favicon.ico
  76. BIN public/images/rails.png
  77. +239 −0 public/index.html
  78. +2 −0 public/javascripts/application.js
  79. +965 −0 public/javascripts/controls.js
  80. +974 −0 public/javascripts/dragdrop.js
  81. +1,123 −0 public/javascripts/effects.js
  82. +6,001 −0 public/javascripts/prototype.js
  83. +175 −0 public/javascripts/rails.js
  84. +5 −0 public/robots.txt
  85. 0 public/stylesheets/.gitkeep
  86. +56 −0 public/stylesheets/scaffold.css
  87. +6 −0 script/rails
  88. +9 −0 test/fixtures/boards.yml
  89. +13 −0 test/fixtures/comments.yml
  90. +11 −0 test/fixtures/conversations.yml
  91. +11 −0 test/fixtures/user_sessions.yml
  92. +15 −0 test/fixtures/users.yml
  93. +49 −0 test/functional/boards_controller_test.rb
  94. +49 −0 test/functional/comments_controller_test.rb
  95. +49 −0 test/functional/conversations_controller_test.rb
  96. +49 −0 test/functional/user_sessions_controller_test.rb
  97. +49 −0 test/functional/users_controller_test.rb
  98. +9 −0 test/performance/browsing_test.rb
  99. +13 −0 test/test_helper.rb
  100. +8 −0 test/unit/board_test.rb
  101. +8 −0 test/unit/comment_test.rb
  102. +8 −0 test/unit/conversation_test.rb
  103. +4 −0 test/unit/helpers/boards_helper_test.rb
  104. +4 −0 test/unit/helpers/comments_helper_test.rb
  105. +4 −0 test/unit/helpers/conversations_helper_test.rb
  106. +4 −0 test/unit/helpers/user_sessions_helper_test.rb
  107. +4 −0 test/unit/helpers/users_helper_test.rb
  108. +8 −0 test/unit/user_session_test.rb
  109. +8 −0 test/unit/user_test.rb
  110. 0 vendor/plugins/.gitkeep
30 Gemfile
@@ -0,0 +1,30 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.0.0'
+gem 'authlogic'
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+gem 'sqlite3-ruby', :require => 'sqlite3'
+
+# Use unicorn as the web server
+# gem 'unicorn'
+
+# Deploy with Capistrano
+# gem 'capistrano'
+
+# To use debugger
+# gem 'ruby-debug'
+
+# Bundle the extra gems:
+# gem 'bj'
+# gem 'nokogiri'
+# gem 'sqlite3-ruby', :require => 'sqlite3'
+# gem 'aws-s3', :require => 'aws/s3'
+
+# Bundle gems for the local environment. Make sure to
+# put test-only gems in this group so their generators
+# and rake tasks are available in development mode:
+# group :development, :test do
+# gem 'webrat'
+# end
@@ -0,0 +1,76 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.0)
+ actionpack (= 3.0.0)
+ mail (~> 2.2.5)
+ actionpack (3.0.0)
+ activemodel (= 3.0.0)
+ activesupport (= 3.0.0)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.4.1)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.12)
+ rack-test (~> 0.5.4)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.0)
+ activesupport (= 3.0.0)
+ builder (~> 2.1.2)
+ i18n (~> 0.4.1)
+ activerecord (3.0.0)
+ activemodel (= 3.0.0)
+ activesupport (= 3.0.0)
+ arel (~> 1.0.0)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.0)
+ activemodel (= 3.0.0)
+ activesupport (= 3.0.0)
+ activesupport (3.0.0)
+ arel (1.0.1)
+ activesupport (~> 3.0.0)
+ authlogic (2.1.6)
+ activesupport
+ builder (2.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.4.1)
+ mail (2.2.6.1)
+ activesupport (>= 2.3.6)
+ mime-types
+ treetop (>= 1.4.5)
+ mime-types (1.16)
+ polyglot (0.3.1)
+ rack (1.2.1)
+ rack-mount (0.6.13)
+ rack (>= 1.0.0)
+ rack-test (0.5.6)
+ rack (>= 1.0)
+ rails (3.0.0)
+ actionmailer (= 3.0.0)
+ actionpack (= 3.0.0)
+ activerecord (= 3.0.0)
+ activeresource (= 3.0.0)
+ activesupport (= 3.0.0)
+ bundler (~> 1.0.0)
+ railties (= 3.0.0)
+ railties (3.0.0)
+ actionpack (= 3.0.0)
+ activesupport (= 3.0.0)
+ rake (>= 0.8.4)
+ thor (~> 0.14.0)
+ rake (0.8.7)
+ sqlite3-ruby (1.3.1)
+ thor (0.14.3)
+ treetop (1.4.8)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.23)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ authlogic
+ rails (= 3.0.0)
+ sqlite3-ruby
1 README
@@ -0,0 +1 @@
+This project is an example of a very basic implementation of Authlogic on rails3. View the projects website for a step by step tutorial.
@@ -0,0 +1,7 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+require 'rake'
+
+LoginApp::Application.load_tasks
@@ -0,0 +1,17 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+
+ helper_method :current_user
+
+ private
+
+ def current_user_session
+ return @current_user if defined?(@current_user_sesssion)
+ @current_user_session = UserSession.find
+ end
+
+ def current_user
+ return @current_user if defined?(@current_user)
+ @current_user = current_user_session && current_user_session.record
+ end
+end
@@ -0,0 +1,83 @@
+class BoardsController < ApplicationController
+ # GET /boards
+ # GET /boards.xml
+ def index
+ @boards = Board.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @boards }
+ end
+ end
+
+ # GET /boards/1
+ # GET /boards/1.xml
+ def show
+ @board = Board.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @board }
+ end
+ end
+
+ # GET /boards/new
+ # GET /boards/new.xml
+ def new
+ @board = Board.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @board }
+ end
+ end
+
+ # GET /boards/1/edit
+ def edit
+ @board = Board.find(params[:id])
+ end
+
+ # POST /boards
+ # POST /boards.xml
+ def create
+ @board = Board.new(params[:board])
+
+ respond_to do |format|
+ if @board.save
+ format.html { redirect_to(@board, :notice => 'Board was successfully created.') }
+ format.xml { render :xml => @board, :status => :created, :location => @board }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @board.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /boards/1
+ # PUT /boards/1.xml
+ def update
+ @board = Board.find(params[:id])
+
+ respond_to do |format|
+ if @board.update_attributes(params[:board])
+ format.html { redirect_to(@board, :notice => 'Board was successfully updated.') }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @board.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /boards/1
+ # DELETE /boards/1.xml
+ def destroy
+ @board = Board.find(params[:id])
+ @board.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(boards_url) }
+ format.xml { head :ok }
+ end
+ end
+end
@@ -0,0 +1,83 @@
+class CommentsController < ApplicationController
+ # GET /comments
+ # GET /comments.xml
+ def index
+ @comments = Comment.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.xml { render :xml => @comments }
+ end
+ end
+
+ # GET /comments/1
+ # GET /comments/1.xml
+ def show
+ @comment = Comment.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @comment }
+ end
+ end
+
+ # GET /comments/new
+ # GET /comments/new.xml
+ def new
+ @comment = Comment.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @comment }
+ end
+ end
+
+ # GET /comments/1/edit
+ def edit
+ @comment = Comment.find(params[:id])
+ end
+
+ # POST /comments
+ # POST /comments.xml
+ def create
+ @comment = Comment.new(params[:comment])
+
+ respond_to do |format|
+ if @comment.save
+ format.html { redirect_to(@comment, :notice => 'Comment was successfully created.') }
+ format.xml { render :xml => @comment, :status => :created, :location => @comment }
+ else
+ format.html { render :action => "new" }
+ format.xml { render :xml => @comment.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /comments/1
+ # PUT /comments/1.xml
+ def update
+ @comment = Comment.find(params[:id])
+
+ respond_to do |format|
+ if @comment.update_attributes(params[:comment])
+ format.html { redirect_to(@comment, :notice => 'Comment was successfully updated.') }
+ format.xml { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.xml { render :xml => @comment.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /comments/1
+ # DELETE /comments/1.xml
+ def destroy
+ @comment = Comment.find(params[:id])
+ @comment.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(comments_url) }
+ format.xml { head :ok }
+ end
+ end
+end
Oops, something went wrong.

0 comments on commit 0fd8c60

Please sign in to comment.