raygun 0.0.34 → 0.9.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGES.md +7 -1
  4. data/README.md +7 -11
  5. data/bin/raygun +4 -181
  6. data/cleanup.sh +1 -6
  7. data/lib/raygun/raygun.rb +238 -0
  8. data/lib/raygun/version.rb +1 -1
  9. metadata +6 -223
  10. data/TODO.md +0 -16
  11. data/rails_32/.env +0 -8
  12. data/rails_32/.gitignore +0 -19
  13. data/rails_32/.rspec +0 -1
  14. data/rails_32/.ruby-gemset +0 -1
  15. data/rails_32/.ruby-version +0 -1
  16. data/rails_32/Gemfile +0 -54
  17. data/rails_32/Guardfile +0 -32
  18. data/rails_32/Procfile +0 -2
  19. data/rails_32/README.md +0 -69
  20. data/rails_32/Rakefile +0 -15
  21. data/rails_32/app/assets/javascripts/application.js +0 -16
  22. data/rails_32/app/assets/javascripts/users.js.coffee +0 -3
  23. data/rails_32/app/assets/stylesheets/_footer.less +0 -30
  24. data/rails_32/app/assets/stylesheets/_navbar.less +0 -5
  25. data/rails_32/app/assets/stylesheets/application.css.less +0 -3
  26. data/rails_32/app/controllers/application_controller.rb +0 -15
  27. data/rails_32/app/controllers/pages_controller.rb +0 -8
  28. data/rails_32/app/controllers/password_resets_controller.rb +0 -36
  29. data/rails_32/app/controllers/registrations_controller.rb +0 -29
  30. data/rails_32/app/controllers/user_sessions_controller.rb +0 -26
  31. data/rails_32/app/controllers/users_controller.rb +0 -41
  32. data/rails_32/app/helpers/application_helper.rb +0 -11
  33. data/rails_32/app/helpers/users_helper.rb +0 -2
  34. data/rails_32/app/mailers/.gitkeep +0 -0
  35. data/rails_32/app/mailers/user_mailer.rb +0 -19
  36. data/rails_32/app/models/.gitkeep +0 -0
  37. data/rails_32/app/models/ability.rb +0 -40
  38. data/rails_32/app/models/user.rb +0 -21
  39. data/rails_32/app/models/user_session.rb +0 -6
  40. data/rails_32/app/views/layouts/application.html.slim +0 -36
  41. data/rails_32/app/views/pages/root.html.slim +0 -9
  42. data/rails_32/app/views/password_resets/edit.html.slim +0 -15
  43. data/rails_32/app/views/password_resets/new.html.slim +0 -11
  44. data/rails_32/app/views/registrations/new.html.slim +0 -13
  45. data/rails_32/app/views/user_mailer/activation_needed_email.html.erb +0 -17
  46. data/rails_32/app/views/user_mailer/activation_needed_email.text.erb +0 -9
  47. data/rails_32/app/views/user_mailer/activation_success_email.html.erb +0 -17
  48. data/rails_32/app/views/user_mailer/activation_success_email.text.erb +0 -9
  49. data/rails_32/app/views/user_mailer/reset_password_email.html.erb +0 -16
  50. data/rails_32/app/views/user_mailer/reset_password_email.text.erb +0 -8
  51. data/rails_32/app/views/user_sessions/new.html.slim +0 -13
  52. data/rails_32/app/views/users/_form.html.slim +0 -12
  53. data/rails_32/app/views/users/edit.html.slim +0 -5
  54. data/rails_32/app/views/users/index.html.slim +0 -26
  55. data/rails_32/app/views/users/new.html.slim +0 -4
  56. data/rails_32/app/views/users/show.html.slim +0 -17
  57. data/rails_32/config/application.rb +0 -77
  58. data/rails_32/config/boot.rb +0 -6
  59. data/rails_32/config/database.yml +0 -13
  60. data/rails_32/config/environment.rb +0 -5
  61. data/rails_32/config/environments/acceptance.rb +0 -69
  62. data/rails_32/config/environments/development.rb +0 -39
  63. data/rails_32/config/environments/production.rb +0 -69
  64. data/rails_32/config/environments/test.rb +0 -42
  65. data/rails_32/config/initializers/backtrace_silencers.rb +0 -7
  66. data/rails_32/config/initializers/inflections.rb +0 -15
  67. data/rails_32/config/initializers/mailcatcher.rb +0 -15
  68. data/rails_32/config/initializers/mime_types.rb +0 -5
  69. data/rails_32/config/initializers/secret_token.rb +0 -7
  70. data/rails_32/config/initializers/session_store.rb +0 -8
  71. data/rails_32/config/initializers/simple_form.rb +0 -142
  72. data/rails_32/config/initializers/simple_form_bootstrap.rb +0 -45
  73. data/rails_32/config/initializers/sorcery.rb +0 -398
  74. data/rails_32/config/initializers/wrap_parameters.rb +0 -14
  75. data/rails_32/config/locales/en.yml +0 -5
  76. data/rails_32/config/locales/simple_form.en.yml +0 -26
  77. data/rails_32/config/routes.rb +0 -21
  78. data/rails_32/config/unicorn.rb +0 -27
  79. data/rails_32/config.ru +0 -21
  80. data/rails_32/db/migrate/20121128215324_sorcery_core.rb +0 -19
  81. data/rails_32/db/migrate/20121128215325_sorcery_brute_force_protection.rb +0 -13
  82. data/rails_32/db/migrate/20121128215326_sorcery_activity_logging.rb +0 -17
  83. data/rails_32/db/migrate/20121128215327_sorcery_user_activation.rb +0 -17
  84. data/rails_32/db/migrate/20121128215328_sorcery_remember_me.rb +0 -15
  85. data/rails_32/db/migrate/20121128215329_sorcery_reset_password.rb +0 -17
  86. data/rails_32/db/migrate/20121128215330_sorcery_external.rb +0 -14
  87. data/rails_32/db/migrate/20121128215337_add_admin_to_users.rb +0 -5
  88. data/rails_32/db/sample_data.rb +0 -24
  89. data/rails_32/db/schema.rb +0 -54
  90. data/rails_32/db/seeds.rb +0 -7
  91. data/rails_32/lib/assets/.gitkeep +0 -0
  92. data/rails_32/lib/tasks/.gitkeep +0 -0
  93. data/rails_32/lib/tasks/cane.rake +0 -30
  94. data/rails_32/lib/tasks/coverage.rake +0 -10
  95. data/rails_32/lib/tasks/db.rake +0 -7
  96. data/rails_32/lib/tasks/spec.rake +0 -35
  97. data/rails_32/lib/templates/rails/scaffold_controller/controller.rb +0 -45
  98. data/rails_32/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
  99. data/rails_32/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
  100. data/rails_32/lib/templates/rspec/scaffold/index_spec.rb +0 -26
  101. data/rails_32/lib/templates/rspec/scaffold/new_spec.rb +0 -18
  102. data/rails_32/lib/templates/rspec/scaffold/show_spec.rb +0 -16
  103. data/rails_32/lib/templates/slim/scaffold/_form.html.slim +0 -13
  104. data/rails_32/lib/templates/slim/scaffold/edit.html.slim +0 -5
  105. data/rails_32/lib/templates/slim/scaffold/index.html.slim +0 -28
  106. data/rails_32/lib/templates/slim/scaffold/new.html.slim +0 -4
  107. data/rails_32/lib/templates/slim/scaffold/show.html.slim +0 -17
  108. data/rails_32/log/.gitkeep +0 -0
  109. data/rails_32/public/404.html +0 -26
  110. data/rails_32/public/422.html +0 -26
  111. data/rails_32/public/500.html +0 -25
  112. data/rails_32/public/favicon.ico +0 -0
  113. data/rails_32/public/robots.txt +0 -5
  114. data/rails_32/script/rails +0 -6
  115. data/rails_32/spec/controllers/user_sessions_controller_spec.rb +0 -42
  116. data/rails_32/spec/controllers/users_controller_spec.rb +0 -150
  117. data/rails_32/spec/factories/users.rb +0 -14
  118. data/rails_32/spec/features/activation_spec.rb +0 -18
  119. data/rails_32/spec/features/password_reset_spec.rb +0 -41
  120. data/rails_32/spec/features/registration_spec.rb +0 -39
  121. data/rails_32/spec/features/sign_in_spec.rb +0 -30
  122. data/rails_32/spec/javascripts/example_spec.js.coffee +0 -20
  123. data/rails_32/spec/javascripts/spec.css +0 -3
  124. data/rails_32/spec/javascripts/spec.js.coffee +0 -2
  125. data/rails_32/spec/mailers/user_mailer_spec.rb +0 -48
  126. data/rails_32/spec/models/ability_spec.rb +0 -38
  127. data/rails_32/spec/models/user_spec.rb +0 -36
  128. data/rails_32/spec/spec_helper.rb +0 -64
  129. data/rails_32/spec/support/accept_values.rb +0 -55
  130. data/rails_32/spec/support/database_cleaner.rb +0 -24
  131. data/rails_32/spec/support/factory_girl.rb +0 -3
  132. data/rails_32/spec/support/sorcery.rb +0 -3
  133. data/rails_32/spec/support/user_sessions_feature_helper.rb +0 -21
  134. data/rails_32/spec/views/users/edit.html.slim_spec.rb +0 -16
  135. data/rails_32/spec/views/users/index.html.slim_spec.rb +0 -16
  136. data/rails_32/spec/views/users/new.html.slim_spec.rb +0 -16
  137. data/rails_32/spec/views/users/show.html.slim_spec.rb +0 -13
  138. data/rails_32/vendor/assets/javascripts/.gitkeep +0 -0
  139. data/rails_32/vendor/assets/stylesheets/.gitkeep +0 -0
  140. data/rails_32/vendor/plugins/.gitkeep +0 -0
  141. data/rails_40/.env +0 -8
  142. data/rails_40/.gitignore +0 -16
  143. data/rails_40/.rspec +0 -1
  144. data/rails_40/.ruby-gemset +0 -1
  145. data/rails_40/.ruby-version +0 -1
  146. data/rails_40/Gemfile +0 -53
  147. data/rails_40/Guardfile +0 -34
  148. data/rails_40/Procfile +0 -2
  149. data/rails_40/README.md +0 -90
  150. data/rails_40/Rakefile +0 -15
  151. data/rails_40/app/assets/javascripts/application.js +0 -17
  152. data/rails_40/app/assets/stylesheets/_footer.less +0 -30
  153. data/rails_40/app/assets/stylesheets/_navbar.less +0 -3
  154. data/rails_40/app/assets/stylesheets/application.css.less +0 -3
  155. data/rails_40/app/controllers/application_controller.rb +0 -5
  156. data/rails_40/app/controllers/concerns/.keep +0 -0
  157. data/rails_40/app/controllers/pages_controller.rb +0 -6
  158. data/rails_40/app/helpers/application_helper.rb +0 -11
  159. data/rails_40/app/mailers/.keep +0 -0
  160. data/rails_40/app/models/.keep +0 -0
  161. data/rails_40/app/models/concerns/.keep +0 -0
  162. data/rails_40/app/views/layouts/application.html.slim +0 -39
  163. data/rails_40/app/views/pages/root.html.slim +0 -13
  164. data/rails_40/bin/bundle +0 -3
  165. data/rails_40/bin/deploy.sh +0 -47
  166. data/rails_40/bin/rails +0 -4
  167. data/rails_40/bin/rake +0 -4
  168. data/rails_40/circle.yml +0 -16
  169. data/rails_40/config/application.rb +0 -36
  170. data/rails_40/config/boot.rb +0 -4
  171. data/rails_40/config/database.yml +0 -15
  172. data/rails_40/config/environment.rb +0 -5
  173. data/rails_40/config/environments/acceptance.rb +0 -8
  174. data/rails_40/config/environments/development.rb +0 -31
  175. data/rails_40/config/environments/production.rb +0 -82
  176. data/rails_40/config/environments/test.rb +0 -38
  177. data/rails_40/config/initializers/backtrace_silencers.rb +0 -7
  178. data/rails_40/config/initializers/filter_parameter_logging.rb +0 -4
  179. data/rails_40/config/initializers/inflections.rb +0 -16
  180. data/rails_40/config/initializers/mailcatcher.rb +0 -15
  181. data/rails_40/config/initializers/mime_types.rb +0 -5
  182. data/rails_40/config/initializers/secret_token.rb +0 -12
  183. data/rails_40/config/initializers/session_store.rb +0 -3
  184. data/rails_40/config/initializers/simple_form.rb +0 -142
  185. data/rails_40/config/initializers/simple_form_bootstrap.rb +0 -45
  186. data/rails_40/config/initializers/wrap_parameters.rb +0 -14
  187. data/rails_40/config/locales/en.yml +0 -23
  188. data/rails_40/config/locales/simple_form.en.yml +0 -26
  189. data/rails_40/config/routes.rb +0 -5
  190. data/rails_40/config/unicorn.rb +0 -27
  191. data/rails_40/config.ru +0 -18
  192. data/rails_40/db/sample_data.rb +0 -11
  193. data/rails_40/db/schema.rb +0 -19
  194. data/rails_40/db/seeds.rb +0 -7
  195. data/rails_40/lib/assets/.keep +0 -0
  196. data/rails_40/lib/tasks/.keep +0 -0
  197. data/rails_40/lib/tasks/coverage.rake +0 -10
  198. data/rails_40/lib/tasks/db.rake +0 -7
  199. data/rails_40/lib/tasks/spec.rake +0 -60
  200. data/rails_40/lib/templates/rails/scaffold_controller/controller.rb +0 -61
  201. data/rails_40/lib/templates/rspec/controller/controller_spec.rb +0 -16
  202. data/rails_40/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
  203. data/rails_40/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
  204. data/rails_40/lib/templates/rspec/scaffold/index_spec.rb +0 -26
  205. data/rails_40/lib/templates/rspec/scaffold/new_spec.rb +0 -19
  206. data/rails_40/lib/templates/rspec/scaffold/show_spec.rb +0 -16
  207. data/rails_40/lib/templates/slim/scaffold/_form.html.slim +0 -13
  208. data/rails_40/lib/templates/slim/scaffold/edit.html.slim +0 -5
  209. data/rails_40/lib/templates/slim/scaffold/index.html.slim +0 -29
  210. data/rails_40/lib/templates/slim/scaffold/new.html.slim +0 -4
  211. data/rails_40/lib/templates/slim/scaffold/show.html.slim +0 -17
  212. data/rails_40/log/.keep +0 -0
  213. data/rails_40/public/404.html +0 -58
  214. data/rails_40/public/422.html +0 -58
  215. data/rails_40/public/500.html +0 -57
  216. data/rails_40/public/favicon.ico +0 -0
  217. data/rails_40/public/robots.txt +0 -5
  218. data/rails_40/spec/controllers/pages_controller_spec.rb +0 -12
  219. data/rails_40/spec/features/pages_spec.rb +0 -18
  220. data/rails_40/spec/javascripts/example_spec.js.coffee +0 -20
  221. data/rails_40/spec/javascripts/spec.css +0 -3
  222. data/rails_40/spec/javascripts/spec.js.coffee +0 -2
  223. data/rails_40/spec/spec_helper.rb +0 -79
  224. data/rails_40/spec/support/database_cleaner.rb +0 -24
  225. data/rails_40/spec/support/factory_girl.rb +0 -3
  226. data/rails_40/vendor/assets/javascripts/.keep +0 -0
  227. data/rails_40/vendor/assets/stylesheets/.keep +0 -0
@@ -1,26 +0,0 @@
1
- class UserSessionsController < ApplicationController
2
-
3
- skip_before_filter :require_login, except: [:destroy]
4
- skip_authorization_check
5
-
6
- def new
7
- @user_session = UserSession.new
8
- end
9
-
10
- def create
11
- @user_session = UserSession.new(params[:user_session])
12
-
13
- if @user = login(@user_session.email, @user_session.password, @user_session.remember_me)
14
- redirect_back_or_to :users, notice: "Successfully signed in."
15
- else
16
- flash.now[:alert] = "Sign in failed."
17
- render action: 'new'
18
- end
19
- end
20
-
21
- def destroy
22
- logout
23
- redirect_to :sign_in, notice: "Signed out!"
24
- end
25
-
26
- end
@@ -1,41 +0,0 @@
1
- class UsersController < ApplicationController
2
-
3
- before_filter :require_login
4
-
5
- load_and_authorize_resource
6
-
7
- def index
8
- end
9
-
10
- def show
11
- end
12
-
13
- def new
14
- end
15
-
16
- def edit
17
- end
18
-
19
- def create
20
- @user = User.new(params[:user])
21
-
22
- if @user.save
23
- redirect_to @user, notice: "User was successfully created."
24
- else
25
- render action: 'new'
26
- end
27
- end
28
-
29
- def update
30
- if @user.update_attributes(params[:user])
31
- redirect_to @user, notice: "User was successfully updated."
32
- else
33
- render action: 'edit'
34
- end
35
- end
36
-
37
- def destroy
38
- @user.destroy
39
- redirect_to users_url
40
- end
41
- end
@@ -1,11 +0,0 @@
1
- module ApplicationHelper
2
-
3
- def alert_class(alert_type)
4
- alert_type = {
5
- alert: 'error',
6
- notice: 'info'
7
- }.fetch(alert_type, alert_type.to_s)
8
- "alert-#{alert_type}"
9
- end
10
-
11
- end
@@ -1,2 +0,0 @@
1
- module UsersHelper
2
- end
File without changes
@@ -1,19 +0,0 @@
1
- class UserMailer < ActionMailer::Base
2
-
3
- default from: 'notifications@example.com'
4
-
5
- def activation_needed_email(user)
6
- @user = user
7
- mail to: user.email, subject: "Welcome to My Awesome Site!"
8
- end
9
-
10
- def activation_success_email(user)
11
- @user = user
12
- mail to: user.email, subject: "Your account has been activated!"
13
- end
14
-
15
- def reset_password_email(user)
16
- @user = user
17
- mail to: user.email, subject: "Password reset requested"
18
- end
19
- end
File without changes
@@ -1,40 +0,0 @@
1
- class Ability
2
- include CanCan::Ability
3
-
4
- def initialize(user)
5
- user ||= User.new # guest user (not logged in)
6
-
7
- if user.admin?
8
- can :manage, :all
9
- else
10
- can [:read, :update], User, id: user.id
11
- end
12
-
13
- # No one can destroy themselves.
14
- cannot :destroy, User, id: user.id
15
-
16
-
17
- # Define abilities for the passed in user here. For example:
18
- #
19
- # user ||= User.new # guest user (not logged in)
20
- # if user.admin?
21
- # can :manage, :all
22
- # else
23
- # can :read, :all
24
- # end
25
- #
26
- # The first argument to `can` is the action you are giving the user permission to do.
27
- # If you pass :manage it will apply to every action. Other common actions here are
28
- # :read, :create, :update and :destroy.
29
- #
30
- # The second argument is the resource the user can perform the action on. If you pass
31
- # :all it will apply to every resource. Otherwise pass a Ruby class of the resource.
32
- #
33
- # The third argument is an optional hash of conditions to further filter the objects.
34
- # For example, here the user can only update published articles.
35
- #
36
- # can :update, Article, :published => true
37
- #
38
- # See the wiki for details: https://github.com/ryanb/cancan/wiki/Defining-Abilities
39
- end
40
- end
@@ -1,21 +0,0 @@
1
- class User < ActiveRecord::Base
2
-
3
- attr_accessible :name, :email, :password
4
-
5
- authenticates_with_sorcery!
6
-
7
- validates :name,
8
- presence: true,
9
- length: { maximum: 30 }
10
-
11
- validates :email,
12
- presence: true,
13
- email: true,
14
- uniqueness: true
15
-
16
- validates :password,
17
- presence: true,
18
- length: { minimum: 6 },
19
- if: :password
20
-
21
- end
@@ -1,6 +0,0 @@
1
- class UserSession
2
- include ActiveAttr::BasicModel
3
- include ActiveAttr::MassAssignment
4
-
5
- attr_accessor :email, :password, :remember_me
6
- end
@@ -1,36 +0,0 @@
1
- doctype 5
2
- html
3
- head
4
- title App Prototype
5
- = stylesheet_link_tag 'application', media: 'all'
6
- = javascript_include_tag 'application'
7
- = csrf_meta_tag
8
-
9
- body id=(controller.controller_name) class=(controller.action_name)
10
- .wrapper
11
- .container
12
- header.navbar.navbar-fixed-top
13
- nav.navbar-inner
14
- .container
15
- .brand App Prototype
16
- ul.nav.pull-right
17
- - if current_user
18
- li.dropdown
19
- a.dropdown-toggle href='#' data-toggle='dropdown'
20
- = current_user.email
21
- b.caret
22
- ul.dropdown-menu
23
- li= link_to 'Sign Out', sign_out_path
24
- - else
25
- li= link_to 'Sign In', sign_in_path
26
-
27
- - flash.each do |name, msg|
28
- = content_tag :div, raw(msg), class: "alert #{alert_class(name)}"
29
-
30
- = yield
31
-
32
- .push
33
-
34
- footer
35
- .container
36
- p &copy; 2013 All rights reserved.
@@ -1,9 +0,0 @@
1
- .hero-unit
2
- h1 Hello, world!
3
-
4
- p Welcome to your newly generated rails application...
5
- p Meander around the code to see what's been done for you. Many small, and a few not-so-small, customizations have been made.
6
- p Custom generator templates create views that are bootstrap compatible and specs that are factory-aware and follow best practices.
7
- p This application also includes authentication and an example of authorization (sign in as user@example.com / password).
8
-
9
- p: a.btn.btn-primary.btn-large href=sign_in_path Sign In
@@ -1,15 +0,0 @@
1
- .page-header
2
- h1 Reset Your Password
3
-
4
- = simple_form_for(@user, url: reset_password_path(@user)) do |f|
5
- = f.error_notification
6
-
7
- .form-inputs
8
- = f.input :email, disabled: true
9
- = f.input :password, label: 'New Password', required: true, autofocus: true
10
- = hidden_field_tag :token, @token
11
-
12
- .form-actions
13
- = f.button :submit, 'Reset Password', class: 'btn btn-primary'
14
- '
15
- = link_to 'Cancel', sign_in_path, class: 'btn'
@@ -1,11 +0,0 @@
1
- .page-header
2
- h1 Password Reset
3
-
4
- = form_tag(forgotten_password_path, method: :post) do
5
- .control-group
6
- = label_tag :email, nil, class: 'control-label'
7
- .controls
8
- = text_field_tag :email, nil, placeholder: 'joe@example.com'
9
-
10
- .form-actions
11
- = submit_tag 'Reset My Password', class: 'btn btn-primary'
@@ -1,13 +0,0 @@
1
- .page-header
2
- h1 Sign up for an Account
3
-
4
- = simple_form_for(@user, url: sign_up_path) do |f|
5
- = f.error_notification
6
-
7
- .form-inputs
8
- = f.input :name, autofocus: true
9
- = f.input :email
10
- = f.input :password
11
-
12
- .form-actions
13
- = f.button :submit, 'Sign Up', class: 'btn btn-primary'
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
5
- </head>
6
- <body>
7
- <h1>Welcome to App Prototype, <%= @user.email %></h1>
8
- <p>
9
- You have successfully signed up to app-prototype.herokuapp.com,
10
- your username is: <%= @user.email %>.<br/>
11
- </p>
12
- <p>
13
- To login to the site, just follow this link: <%= link_to activation_url(@user.activation_token), activation_url(@user.activation_token) %>.
14
- </p>
15
- <p>Thanks for joining and have a great day!</p>
16
- </body>
17
- </html>
@@ -1,9 +0,0 @@
1
- Welcome to App Prototype, <%= @user.email %>!
2
- ===============================================
3
-
4
- You have successfully signed up to app-prototype.herokuapp.com,
5
- your username is: <%= @user.email %>.
6
-
7
- To login to the site, just follow this link: <%= activation_url(@user.activation_token) %>
8
-
9
- Thanks for joining and have a great day!
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
5
- </head>
6
- <body>
7
- <h1>Congratulations, <%= @user.email %>!</h1>
8
- <p>
9
- You have successfully activated your App Prototype account,
10
- your username is: <%= @user.email %>.<br/>
11
- </p>
12
- <p>
13
- <%= link_to "Sign In Now", sign_in_url %>.
14
- </p>
15
- <p>Thanks for joining and have a great day!</p>
16
- </body>
17
- </html>
@@ -1,9 +0,0 @@
1
- Congratulations, <%= @user.email %>!
2
- ===============================================
3
-
4
- You have successfully activated your App Prototype account,
5
- your username is: <%= @user.email %>.
6
-
7
- Go ahead and sign in to the site: <%= sign_in_url %>
8
-
9
- Thanks for joining and have a great day!
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
5
- </head>
6
- <body>
7
- <h1>Hello, <%= @user.email %></h1>
8
- <p>
9
- Someone requested to reset your password. If it wasn't you, just disregard this email.
10
- </p>
11
- <p>
12
- To choose a new password, follow this link: <%= link_to reset_password_url(@user.reset_password_token), reset_password_url(@user.reset_password_token) %>.
13
- </p>
14
- <p>Have a great day!</p>
15
- </body>
16
- </html>
@@ -1,8 +0,0 @@
1
- Hello, <%= @user.email %>
2
- ===============================================
3
-
4
- Someone requested to reset your password. If it wasn't you, just disregard this email.
5
-
6
- To choose a new password, follow this link: <%= reset_password_url(@user.reset_password_token) %>
7
-
8
- Have a great day!
@@ -1,13 +0,0 @@
1
- = simple_form_for(@user_session) do |f|
2
- = f.error_notification
3
-
4
- .form-inputs
5
- = f.input :email, placeholder: 'jdoe@example.com', autofocus: true
6
- = f.input :password
7
-
8
- ul.unstyled
9
- li= link_to 'Sign Up', sign_up_path
10
- li= link_to 'Reset Password', forgotten_password_path
11
-
12
- .form-actions
13
- = f.button :submit, 'Sign In', class: 'btn btn-primary'
@@ -1,12 +0,0 @@
1
- = simple_form_for(@user) do |f|
2
- = f.error_notification
3
-
4
- .form-inputs
5
- = f.input :email, autofocus: true
6
- = f.input :name
7
-
8
- .form-actions
9
- = f.button :submit, class: 'btn btn-primary'
10
- '
11
- = link_to 'Back', users_path, class: 'btn'
12
-
@@ -1,5 +0,0 @@
1
- .page-header
2
- h1 Editing user
3
-
4
- == render 'form'
5
-
@@ -1,26 +0,0 @@
1
- div.page-header
2
- h1 Listing users
3
-
4
- table.table.table-striped
5
- thead
6
- tr
7
- th ID
8
- th Email
9
- th Name
10
- th Actions
11
-
12
- tbody
13
- - @users.each do |user|
14
- tr
15
- td= link_to_if can?(:show, user), user.id, user_path(user)
16
- td= user.email
17
- td= user.name
18
- td
19
- - if can? :edit, user
20
- = link_to 'Edit', edit_user_path(user), class: 'btn btn-mini'
21
- '
22
- - if can? :destroy, user
23
- = link_to 'Destroy', user_path(user), method: :delete, data: { confirm: "Are you sure?" }, class: 'btn btn-mini btn-danger'
24
-
25
- - if can? :create, User
26
- = link_to 'New User', new_user_path, class: 'btn btn-primary'
@@ -1,4 +0,0 @@
1
- .page-header
2
- h1 Create user
3
-
4
- == render 'form'
@@ -1,17 +0,0 @@
1
- .page-header
2
- h1 User
3
-
4
- dl
5
- dt Email
6
- dd= @user.email
7
- dt Name
8
- dd= @user.name
9
-
10
- - if can?(:edit, @user)
11
- = link_to 'Edit', edit_user_path(@user), class: 'btn'
12
- '
13
- = link_to 'Back', users_path, class: 'btn'
14
-
15
- - if can?(:destroy, @user)
16
- '
17
- = link_to 'Destroy', user_path(@user), method: :delete, data: { confirm: "Are you sure?" }, class: 'btn btn-danger'
@@ -1,77 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- # Pick the frameworks you want:
4
- require "active_record/railtie"
5
- require "action_controller/railtie"
6
- require "action_mailer/railtie"
7
- #require "active_resource/railtie"
8
- require "sprockets/railtie"
9
-
10
- if defined?(Bundler)
11
- # If you precompile assets before deploying to production, use this line
12
- Bundler.require(*Rails.groups(assets: %w(development test)))
13
- # If you want your assets lazily compiled in production, use this line
14
- # Bundler.require(:default, :assets, Rails.env)
15
- end
16
-
17
- module AppPrototype
18
- class Application < Rails::Application
19
-
20
- config.generators do |generate|
21
- generate.stylesheets false
22
- #generate.helper false
23
- generate.routing_specs false
24
- #generate.view_specs false
25
- generate.request_specs false
26
- end
27
-
28
- # Settings in config/environments/* take precedence over those specified here.
29
- # Application configuration should go into files in config/initializers
30
- # -- all .rb files in that directory are automatically loaded.
31
-
32
- # Custom directories with classes and modules you want to be autoloadable.
33
- # config.autoload_paths += %W(#{config.root}/lib)
34
-
35
- # Only load the plugins named here, in the order given (default is alphabetical).
36
- # :all can be used as a placeholder for all plugins not explicitly named.
37
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
38
-
39
- # Activate observers that should always be running.
40
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
41
-
42
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
43
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
44
- # config.time_zone = 'Pacific Time (US & Canada)'
45
-
46
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
47
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
48
- # config.i18n.default_locale = :de
49
-
50
- # Configure the default encoding used in templates for Ruby 1.9.
51
- config.encoding = 'utf-8'
52
-
53
- # Configure sensitive parameters which will be filtered from the log file.
54
- config.filter_parameters += [:password]
55
-
56
- # Enable escaping HTML in JSON.
57
- config.active_support.escape_html_entities_in_json = true
58
-
59
- # Use SQL instead of Active Record's schema dumper when creating the database.
60
- # This is necessary if your schema can't be completely dumped by the schema dumper,
61
- # like if you have constraints or database-specific column types
62
- # config.active_record.schema_format = :sql
63
-
64
- # Enforce whitelist mode for mass assignment.
65
- # This will create an empty whitelist of attributes available for mass-assignment for all models
66
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
67
- # parameters by using an attr_accessible or attr_protected declaration.
68
- config.active_record.whitelist_attributes = true
69
-
70
- # Enable the asset pipeline
71
- config.assets.enabled = true
72
- config.assets.initialize_on_precompile = false
73
-
74
- # Version of your assets, change this if you want to expire all your assets
75
- config.assets.version = '1.0'
76
- end
77
- end
@@ -1,6 +0,0 @@
1
- require 'rubygems'
2
-
3
- # Set up gems listed in the Gemfile.
4
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
-
6
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -1,13 +0,0 @@
1
- # Use 'createuser -s postgres' to create a general purpose db (super)user.
2
-
3
- development: &default
4
- adapter: postgresql
5
- database: app_prototype_development
6
- username: postgres
7
- pool: 5
8
- timeout: 5000
9
-
10
- test:
11
- <<: *default
12
- database: app_prototype_test
13
- min_messages: warning
@@ -1,5 +0,0 @@
1
- # Load the rails application
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the rails application
5
- AppPrototype::Application.initialize!
@@ -1,69 +0,0 @@
1
- AppPrototype::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # Code is not reloaded between requests
5
- config.cache_classes = true
6
-
7
- # Full error reports are disabled and caching is turned on
8
- config.consider_all_requests_local = false
9
- config.action_controller.perform_caching = true
10
-
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
13
-
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
16
-
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
18
- config.assets.compile = false
19
-
20
- # Generate digests for assets URLs
21
- config.assets.digest = true
22
-
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
25
-
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
-
30
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
- # config.force_ssl = true
32
-
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
35
-
36
- # Prepend all log lines with the following tags
37
- # config.log_tags = [ :subdomain, :uuid ]
38
-
39
- # Use a different logger for distributed setups
40
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
-
42
- # Use a different cache store in production
43
- # config.cache_store = :mem_cache_store
44
-
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
47
-
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
50
-
51
- # Disable delivery errors, bad email addresses will be ignored
52
- # config.action_mailer.raise_delivery_errors = false
53
-
54
- # Enable threaded mode
55
- config.threadsafe! unless $rails_rake_task
56
-
57
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
59
- config.i18n.fallbacks = true
60
-
61
- # Send deprecation notices to registered listeners
62
- config.active_support.deprecation = :notify
63
-
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- config.active_record.auto_explain_threshold_in_seconds = 0.5
67
-
68
- config.action_mailer.default_url_options = { host: 'app-prototype-acceptance.herokuapp.com' }
69
- end
@@ -1,39 +0,0 @@
1
- AppPrototype::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
11
-
12
- # Show full error reports and disable caching
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger
20
- config.active_support.deprecation = :log
21
-
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
24
-
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
31
-
32
- # Do not compress assets
33
- config.assets.compress = false
34
-
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
37
-
38
- config.action_mailer.default_url_options = { host: '0.0.0.0:3000' }
39
- end