Permalink
Browse files

Big Bang

  • Loading branch information...
1 parent 6b3049a commit e0e0a1a151a30ec58f67619fe8923a5065979a51 @hugodias committed Oct 10, 2013
Showing with 1,051 additions and 1,192 deletions.
  1. +37 −26 Gemfile
  2. +0 −1 Procfile
  3. +23 −67 README.md
  4. +0 −1 Rakefile
  5. 0 app/assets/{stylesheets/.gitkeep → images/.keep}
  6. BIN app/assets/images/glyphicons-halflings-white.png
  7. BIN app/assets/images/glyphicons-halflings.png
  8. BIN app/assets/images/rails.png
  9. +16 −2 app/assets/javascripts/application.js
  10. +0 −6 app/assets/javascripts/bootstrap.min.js
  11. +0 −4 app/assets/javascripts/jquery.min.js
  12. +0 −373 app/assets/javascripts/jquery_ujs.js
  13. +0 −4 app/assets/javascripts/modernizr-2.5.3.min.js
  14. BIN app/assets/stylesheets/.DS_Store
  15. +1 −0 app/assets/stylesheets/application.css.scss
  16. +0 −9 app/assets/stylesheets/bootstrap.min.css
  17. +0 −5 app/assets/stylesheets/style.sass
  18. +7 −0 app/controllers/admins_controller.rb
  19. +8 −24 app/controllers/application_controller.rb
  20. 0 app/{mailers/.gitkeep → controllers/concerns/.keep}
  21. +11 −0 app/controllers/home_controller.rb
  22. +0 −37 app/controllers/sessions_controller.rb
  23. +0 −85 app/controllers/users_controller.rb
  24. 0 app/helpers/application_helper.rb
  25. +10 −0 app/helpers/layout_helper.rb
  26. +0 −2 app/helpers/sessions_helper.rb
  27. +0 −2 app/helpers/users_helper.rb
  28. 0 app/{models/.gitkeep → mailers/.keep}
  29. 0 lib/assets/.gitkeep → app/models/.keep
  30. +6 −0 app/models/admin.rb
  31. 0 lib/tasks/.gitkeep → app/models/concerns/.keep
  32. +3 −51 app/models/user.rb
  33. +3 −0 app/views/admins/index.html.erb
  34. +1 −0 app/views/admins/manage.html.erb
  35. +74 −0 app/views/home/index.html.erb
  36. +1 −0 app/views/home/secret.html.erb
  37. +5 −0 app/views/home/token.html.erb
  38. +104 −93 app/views/layouts/application.html.erb
  39. +0 −12 app/views/sessions/_form.html.haml
  40. +0 −6 app/views/sessions/new.html.haml
  41. +0 −20 app/views/users/_form.html.haml
  42. +0 −3 app/views/users/edit.html.haml
  43. +0 −17 app/views/users/home.html.haml
  44. +0 −18 app/views/users/index.html.haml
  45. +0 −5 app/views/users/new.html.haml
  46. +0 −3 app/views/users/show.html.haml
  47. +0 −7 app/views/users/welcome.html.haml
  48. +1 −1 config.ru
  49. +3 −42 config/application.rb
  50. +0 −2 config/boot.rb
  51. +11 −16 config/database.yml
  52. +2 −2 config/environment.rb
  53. +13 −15 config/environments/development.rb
  54. +40 −29 config/environments/production.rb
  55. +13 −16 config/environments/test.rb
  56. +209 −0 config/initializers/devise.rb
  57. +4 −0 config/initializers/filter_parameter_logging.rb
  58. +6 −5 config/initializers/inflections.rb
  59. +1 −2 config/initializers/preferences.rb
  60. +8 −2 config/initializers/secret_token.rb
  61. +1 −6 config/initializers/session_store.rb
  62. +6 −6 config/initializers/wrap_parameters.rb
  63. +58 −0 config/locales/devise.en.yml
  64. +20 −2 config/locales/en.yml
  65. +6 −61 config/routes.rb
  66. +0 −23 config/unicorn.rb
  67. +0 −16 db/migrate/20110124034948_create_users.rb
  68. +56 −0 db/migrate/20130710201257_devise_create_users.rb
  69. +56 −0 db/migrate/20130710202404_devise_create_admins.rb
  70. +2 −7 db/seeds.rb
  71. +0 −2 doc/README_FOR_APP
  72. 0 log/.gitkeep → lib/assets/.keep
  73. 0 test/fixtures/.gitkeep → lib/tasks/.keep
  74. +25 −0 lib/tasks/setup.rake
  75. 0 test/functional/.gitkeep → log/.keep
  76. +43 −11 public/404.html
  77. +43 −11 public/422.html
  78. +43 −11 public/500.html
  79. +1 −1 public/robots.txt
  80. +0 −6 script/rails
  81. 0 test/{integration/.gitkeep → controllers/.keep}
  82. +22 −0 test/controllers/admin_controller_test.rb
  83. +21 −0 test/controllers/home_controller_test.rb
  84. 0 test/{unit/.gitkeep → fixtures/.keep}
  85. +2 −0 test/fixtures/admins.yml
  86. +3 −0 test/fixtures/users.yml
  87. 0 vendor/assets/javascripts/.gitkeep → test/helpers/.keep
  88. 0 vendor/assets/stylesheets/.gitkeep → test/integration/.keep
  89. 0 vendor/plugins/.gitkeep → test/mailers/.keep
  90. 0 test/models/.keep
  91. +7 −0 test/models/admin_test.rb
  92. +7 −0 test/models/user_test.rb
  93. +0 −12 test/performance/browsing_test.rb
  94. +8 −2 test/test_helper.rb
  95. 0 vendor/assets/javascripts/.keep
  96. 0 vendor/assets/stylesheets/.keep
View
63 Gemfile
@@ -1,43 +1,54 @@
source 'https://rubygems.org'
ruby "2.0.0"
-gem 'rails', '4.0.0'
-gem 'journey', :git => 'git://github.com/rails/journey.git'
-gem 'arel'
-gem 'activerecord-deprecated_finders', :git => 'git://github.com/rails/activerecord-deprecated_finders.git'
+# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
+gem 'rails', '4.0.0'
+# Use Devise for user authentication
+gem 'devise', :git => 'git://github.com/plataformatec/devise.git', :ref => '49aebde'
-# ORM
-gem "pg", :group => :production
+# Use sqlite3 as the database for Active Record
+gem 'sqlite3'
-group :development, :test do
- gem "sqlite3"
-end
+# Use SCSS for stylesheets
+gem 'sass-rails', '~> 4.0.0'
-gem 'json'
+# Use Uglifier as compressor for JavaScript assets
+gem 'uglifier', '>= 1.3.0'
-# For using protected attributes
-gem 'protected_attributes'
+# Use CoffeeScript for .js.coffee assets and views
+gem 'coffee-rails', '~> 4.0.0'
-# Server
-gem 'unicorn'
+# See https://github.com/sstephenson/execjs#readme for more supported runtimes
+# gem 'therubyracer', platforms: :ruby
-# Template Engine
-gem 'haml-rails'
+# Use jquery as the JavaScript library
+gem 'jquery-rails'
-gem "bcrypt-ruby", :require => "bcrypt"
+# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
+gem 'turbolinks'
-# Gems used only for assets and not required
-# in production environments by default.
-group :assets do
- gem 'sprockets-rails'
- gem 'sass-rails', :git => 'git://github.com/rails/sass-rails.git'
- gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git'
+# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
+gem 'jbuilder', '~> 1.2'
- # gem 'therubyracer', platforms: :ruby
+# Twitter Bootstrap 3
+gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
+ :github => 'anjlab/bootstrap-rails'
- gem 'uglifier', '1.0.3'
+group :doc do
+ # bundle exec rake doc:rails generates the API under doc/api.
+ gem 'sdoc', require: false
end
-gem 'jquery-rails'
+# Use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Use Capistrano for deployment
+# gem 'capistrano', group: :development
+
+# Use debugger
+# gem 'debugger', group: [:development, :test]
View
@@ -1 +0,0 @@
-web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
View
@@ -1,82 +1,38 @@
-[![Build Status](https://api.travis-ci.org/hugodias/railStrap.png)](https://travis-ci.org/hugodias/railStrap)
-# RailStrap v0.3.1
+# Devise Example for Rails 4.0.0
-[Demo](http://railstrap03.herokuapp.com/)
+Example App using devise. http://github.com/plataformatec/devise
-RailStrap is a Front-end / Back-end template using HTML5 Boilerplate, Twitter Bootstrap 3, Ruby on Rails (4.0.0) and Ruby 2.0.0 with a powerful authentication system for building ruby on rails websites in seconds.
+## Installation
-## Quick start
+Install bundler if you haven't yet:
-Clone the git repo - `git clone https://github.com/hugodias/railStrap.git` - or [download it](https://github.com/hugodias/railStrap/zipball/master)
+```
+gem install bundler
+```
-Go to your railStrap folder and run install
-<pre>
-sh install.sh
-</pre>
+Install the gems:
-Then run your server
-<pre>
-rails s
-</pre>
+```
+bundle install
+```
-Check at [http://localhost:3000](http://localhost:3000)
+This will install Rails 4.0.0, sqlite3 gem and Devise.
-You can try loggin in with `administrator@railstrap.com / 123123`
+Rake devise setup task:
-## Features
+```
+rake devise:setup
+```
-##### [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/)
+This will:
-##### [Twitter Bootstrap 3](http://twitter.github.com/bootstrap/index.html)
+* drop any existing database
+* create a new database
+* migrate the database
+* create a default user and admin
-##### [HAML Template Engine](http://haml.info/)
-
-##### [Ruby on Rails 4.0.0](http://rubyonrails.org/)
-* Security Authentication system
-* Remember me
-* Users CRUD
-
-
-### Databases support
-
-* SQLite (Default)
-* Postgresdb [https://github.com/hugodias/railStrap/tree/postgresdb](https://github.com/hugodias/railStrap/tree/postgresdb)
-
-
-### Best pratices
----
-Change the cookie secret token at
-`config/initializers/secret_token.rb`
-<pre>
-# Be sure to restart your server when you modify this file.
-
-# Your secret key for verifying the integrity of signed cookies.
-# If you change this key, all old signed cookies will become invalid!
-# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
-RailStrap::Application.config.secret_token = 'YOUR-NEW-TOKEN-HERE'
-</pre>
-
-Thanks [pringles](http://news.ycombinator.com/user?id=pringles) for the tip
-
-
-#### Todo
----
-
-* Include supports for redis and mongodb
-* Create a feature to remind the user password
-* Significantly reduce the amount of files from the repository, to be an extension of application and not the entire application.
+Run the server and use the credentials provided by the rake task to sign in and test the application.
## License
-### Major components:
-
-* jQuery: MIT/GPL license
-* Modernizr: MIT/BSD license
-* Normalize.css: Public Domain
-* Twitter bootstrap: [Apache License, Version 2.0 (the "License")](http://www.apache.org/licenses/LICENSE-2.0)
-* Ruby on Rails: MIT license
-
-### Everything else:
-
-The Unlicense (aka: public domain)
+MIT License. Copyright 2010-2013 Plataforma Tecnologia. http://blog.plataformatec.com.br
View
@@ -1,4 +1,3 @@
-#!/usr/bin/env rake
# 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.
File renamed without changes.
Deleted file not rendered
Deleted file not rendered
View
Deleted file not rendered
View
@@ -1,2 +1,16 @@
-// Place your application-specific JavaScript functions and classes here
-// This file is automatically included by javascript_include_tag :defaults
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// compiled file.
+//
+// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
+// about supported directives.
+//
+//= require jquery
+//= require jquery_ujs
+//= require turbolinks
+//= require twitter/bootstrap

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit e0e0a1a

Please sign in to comment.