Permalink
Browse files

Rails backbone

Initial setup with full user support.
  • Loading branch information...
Luis-Miguel Rodriguez Rojas
Luis-Miguel Rodriguez Rojas committed Oct 30, 2015
1 parent a1c1473 commit 3e2858e88c9adc11ffb255e2aa14edd4c65b3388
Showing with 2,542 additions and 0 deletions.
  1. +64 −0 Gemfile
  2. +203 −0 Gemfile.lock
  3. +1 −0 Procfile
  4. +28 −0 README.rdoc
  5. +6 −0 Rakefile
  6. 0 app/assets/images/.keep
  7. BIN app/assets/images/MiGA.png
  8. +17 −0 app/assets/javascripts/application.js
  9. +3 −0 app/assets/javascripts/password_resets.coffee
  10. +3 −0 app/assets/javascripts/sessions.coffee
  11. +3 −0 app/assets/javascripts/static_pages.coffee
  12. +3 −0 app/assets/javascripts/users.coffee
  13. +15 −0 app/assets/stylesheets/application.css
  14. +206 −0 app/assets/stylesheets/custom.css.scss
  15. +3 −0 app/assets/stylesheets/password_resets.scss
  16. +3 −0 app/assets/stylesheets/sessions.scss
  17. +3 −0 app/assets/stylesheets/static_pages.scss
  18. +3 −0 app/assets/stylesheets/users.scss
  19. +15 −0 app/controllers/account_activations_controller.rb
  20. +8 −0 app/controllers/application_controller.rb
  21. 0 app/controllers/concerns/.keep
  22. +66 −0 app/controllers/password_resets_controller.rb
  23. +30 −0 app/controllers/sessions_controller.rb
  24. +13 −0 app/controllers/static_pages_controller.rb
  25. +77 −0 app/controllers/users_controller.rb
  26. +5 −0 app/helpers/application_helper.rb
  27. +2 −0 app/helpers/password_resets_helper.rb
  28. +61 −0 app/helpers/sessions_helper.rb
  29. +2 −0 app/helpers/static_pages_helper.rb
  30. +10 −0 app/helpers/users_helper.rb
  31. 0 app/mailers/.keep
  32. +4 −0 app/mailers/application_mailer.rb
  33. +22 −0 app/mailers/user_mailer.rb
  34. 0 app/models/.keep
  35. 0 app/models/concerns/.keep
  36. +83 −0 app/models/user.rb
  37. +16 −0 app/views/layouts/_footer.html.erb
  38. +25 −0 app/views/layouts/_header.html.erb
  39. +4 −0 app/views/layouts/_shim.html.erb
  40. +21 −0 app/views/layouts/application.html.erb
  41. +5 −0 app/views/layouts/mailer.html.erb
  42. +1 −0 app/views/layouts/mailer.text.erb
  43. +20 −0 app/views/password_resets/edit.html.erb
  44. +13 −0 app/views/password_resets/new.html.erb
  45. +24 −0 app/views/sessions/new.html.erb
  46. +12 −0 app/views/shared/_error_messages.html.erb
  47. +5 −0 app/views/static_pages/about.html.erb
  48. +8 −0 app/views/static_pages/contact.html.erb
  49. +7 −0 app/views/static_pages/help.html.erb
  50. +14 −0 app/views/static_pages/home.html.erb
  51. +10 −0 app/views/user_mailer/account_activation.html.erb
  52. +6 −0 app/views/user_mailer/account_activation.text.erb
  53. +13 −0 app/views/user_mailer/password_reset.html.erb
  54. +8 −0 app/views/user_mailer/password_reset.text.erb
  55. +8 −0 app/views/users/_user.html.erb
  56. +29 −0 app/views/users/edit.html.erb
  57. +11 −0 app/views/users/index.html.erb
  58. +23 −0 app/views/users/new.html.erb
  59. +11 −0 app/views/users/show.html.erb
  60. +3 −0 bin/bundle
  61. +8 −0 bin/rails
  62. +8 −0 bin/rake
  63. +29 −0 bin/setup
  64. +15 −0 bin/spring
  65. +4 −0 config.ru
  66. +26 −0 config/application.rb
  67. +3 −0 config/boot.rb
  68. +25 −0 config/database.yml
  69. +5 −0 config/environment.rb
  70. +44 −0 config/environments/development.rb
  71. +85 −0 config/environments/production.rb
  72. +43 −0 config/environments/test.rb
  73. +11 −0 config/initializers/assets.rb
  74. +7 −0 config/initializers/backtrace_silencers.rb
  75. +3 −0 config/initializers/cookies_serializer.rb
  76. +4 −0 config/initializers/filter_parameter_logging.rb
  77. +16 −0 config/initializers/inflections.rb
  78. +4 −0 config/initializers/mime_types.rb
  79. +3 −0 config/initializers/session_store.rb
  80. +14 −0 config/initializers/wrap_parameters.rb
  81. +23 −0 config/locales/en.yml
  82. +16 −0 config/puma.rb
  83. +76 −0 config/routes.rb
  84. +22 −0 config/secrets.yml
  85. +10 −0 db/migrate/20151003004733_create_users.rb
  86. +5 −0 db/migrate/20151003010745_add_index_to_users_email.rb
  87. +5 −0 db/migrate/20151003071551_add_password_digest_to_users.rb
  88. +5 −0 db/migrate/20151006213920_add_remember_digest_to_users.rb
  89. +5 −0 db/migrate/20151023190000_add_admin_to_users.rb
  90. +7 −0 db/migrate/20151023192039_add_activation_to_users.rb
  91. +6 −0 db/migrate/20151030190946_add_reset_to_users.rb
  92. +33 −0 db/schema.rb
  93. +28 −0 db/seeds.rb
  94. 0 lib/assets/.keep
  95. 0 lib/tasks/.keep
  96. 0 log/.keep
  97. +67 −0 public/404.html
  98. +67 −0 public/422.html
  99. +66 −0 public/500.html
  100. 0 public/favicon.ico
  101. +5 −0 public/robots.txt
  102. 0 test/controllers/.keep
  103. +9 −0 test/controllers/sessions_controller_test.rb
  104. +23 −0 test/controllers/static_pages_controller_test.rb
  105. +60 −0 test/controllers/users_controller_test.rb
  106. 0 test/fixtures/.keep
  107. +39 −0 test/fixtures/users.yml
  108. 0 test/helpers/.keep
  109. +18 −0 test/helpers/sessions_helper_test.rb
  110. 0 test/integration/.keep
  111. +54 −0 test/integration/password_resets_test.rb
  112. +12 −0 test/integration/site_layout_test.rb
  113. +32 −0 test/integration/users_edit_test.rb
  114. +32 −0 test/integration/users_index_test.rb
  115. +42 −0 test/integration/users_login_test.rb
  116. +44 −0 test/integration/users_signup_test.rb
  117. 0 test/mailers/.keep
  118. +18 −0 test/mailers/previews/user_mailer_preview.rb
  119. +27 −0 test/mailers/user_mailer_test.rb
  120. 0 test/models/.keep
  121. +37 −0 test/models/user_test.rb
  122. +33 −0 test/test_helper.rb
  123. 0 vendor/assets/javascripts/.keep
  124. 0 vendor/assets/stylesheets/.keep
64 Gemfile
@@ -0,0 +1,64 @@
source 'https://rubygems.org'


# Use MiGA base code to communicate with the projects
gem 'miga-base', '~> 0.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.4'
# Make it safe
gem 'bcrypt', '3.1.7'
# Mock-up users
gem 'faker', '1.4.2'
# Paginaaaaaaaaaaation
gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'
# Style-it-up!
gem 'bootstrap-sass', '~> 3.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end

group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'puma', '2.11.1'
end

@@ -0,0 +1,203 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
autoprefixer-rails (6.0.3)
execjs
json
bcrypt (3.1.7)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.5.1)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.3.0)
bootstrap-will_paginate (0.0.10)
will_paginate
builder (3.2.2)
byebug (6.0.2)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
daemons (1.2.3)
debug_inspector (0.0.2)
domain_name (0.5.24)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
execjs (2.6.0)
faker (1.4.2)
i18n (~> 0.5)
globalid (0.3.6)
activesupport (>= 4.1.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
jbuilder (2.3.2)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
miga-base (0.2.0.0)
daemons (~> 1.2)
json (~> 1.8)
rest-client (~> 1.7)
sqlite3 (~> 1.3)
mime-types (2.6.2)
mini_portile (0.6.2)
minitest (5.8.1)
multi_json (1.11.2)
netrc (0.10.3)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
pg (0.17.1)
puma (2.11.1)
rack (>= 1.1, < 2.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.4)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.0)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
sass (3.4.18)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
spring (1.4.0)
sprockets (3.3.5)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
will_paginate (3.0.7)

PLATFORMS
ruby

DEPENDENCIES
bcrypt (= 3.1.7)
bootstrap-sass (~> 3.2)
bootstrap-will_paginate (= 0.0.10)
byebug
coffee-rails (~> 4.1.0)
faker (= 1.4.2)
jbuilder (~> 2.0)
jquery-rails
miga-base (~> 0.2)
pg (= 0.17.1)
puma (= 2.11.1)
rails (= 4.2.4)
rails_12factor (= 0.0.2)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)
will_paginate (= 3.0.7)

BUNDLED WITH
1.10.6
@@ -0,0 +1 @@
web: bundle exec puma -C config/puma.rb
@@ -0,0 +1,28 @@
== README

This README would normally document whatever steps are necessary to get the
application up and running.

Things you may want to cover:

* Ruby version

* System dependencies

* Configuration

* Database creation

* Database initialization

* How to run the test suite

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...


Please feel free to use a different markup language if you do not plan to run
<tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
# 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__)

Rails.application.load_tasks
No changes.
Binary file not shown.
@@ -0,0 +1,17 @@
// 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 any plugin's vendor/assets/javascripts directory 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/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
//= require_tree .
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
@@ -0,0 +1,15 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/
Oops, something went wrong.

0 comments on commit 3e2858e

Please sign in to comment.