devise-bootstrap 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +31 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +1 -0
  7. data/app/controllers/devise/confirmations_controller.rb +47 -0
  8. data/app/controllers/devise/omniauth_callbacks_controller.rb +30 -0
  9. data/app/controllers/devise/passwords_controller.rb +70 -0
  10. data/app/controllers/devise/registrations_controller.rb +137 -0
  11. data/app/controllers/devise/sessions_controller.rb +53 -0
  12. data/app/controllers/devise/unlocks_controller.rb +46 -0
  13. data/app/controllers/devise_controller.rb +176 -0
  14. data/app/helpers/devise_helper.rb +25 -0
  15. data/app/mailers/devise/mailer.rb +20 -0
  16. data/app/views/devise/confirmations/new.html.erb +12 -0
  17. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  18. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  19. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  20. data/app/views/devise/passwords/edit.html.erb +16 -0
  21. data/app/views/devise/passwords/new.html.erb +12 -0
  22. data/app/views/devise/registrations/edit.html.erb +29 -0
  23. data/app/views/devise/registrations/new.html.erb +18 -0
  24. data/app/views/devise/sessions/new.html.erb +17 -0
  25. data/app/views/devise/shared/_links.erb +25 -0
  26. data/app/views/devise/unlocks/new.html.erb +12 -0
  27. data/config/locales/en.yml +59 -0
  28. data/devise-bootstrap.gemspec +30 -0
  29. data/gemfiles/Gemfile.rails-3.2-stable +29 -0
  30. data/gemfiles/Gemfile.rails-4.0-stable +29 -0
  31. data/gemfiles/Gemfile.rails-head +29 -0
  32. data/lib/devise/bootstrap.rb +7 -0
  33. data/lib/devise/bootstrap/version.rb +5 -0
  34. data/lib/devise/devise.rb +491 -0
  35. data/lib/devise/devise/controllers/helpers.rb +213 -0
  36. data/lib/devise/devise/controllers/rememberable.rb +47 -0
  37. data/lib/devise/devise/controllers/scoped_views.rb +17 -0
  38. data/lib/devise/devise/controllers/sign_in_out.rb +103 -0
  39. data/lib/devise/devise/controllers/store_location.rb +50 -0
  40. data/lib/devise/devise/controllers/url_helpers.rb +67 -0
  41. data/lib/devise/devise/delegator.rb +16 -0
  42. data/lib/devise/devise/failure_app.rb +205 -0
  43. data/lib/devise/devise/hooks/activatable.rb +11 -0
  44. data/lib/devise/devise/hooks/csrf_cleaner.rb +5 -0
  45. data/lib/devise/devise/hooks/forgetable.rb +9 -0
  46. data/lib/devise/devise/hooks/lockable.rb +7 -0
  47. data/lib/devise/devise/hooks/proxy.rb +21 -0
  48. data/lib/devise/devise/hooks/rememberable.rb +7 -0
  49. data/lib/devise/devise/hooks/timeoutable.rb +28 -0
  50. data/lib/devise/devise/hooks/trackable.rb +9 -0
  51. data/lib/devise/devise/mailers/helpers.rb +90 -0
  52. data/lib/devise/devise/mapping.rb +172 -0
  53. data/lib/devise/devise/models.rb +119 -0
  54. data/lib/devise/devise/models/authenticatable.rb +284 -0
  55. data/lib/devise/devise/models/confirmable.rb +295 -0
  56. data/lib/devise/devise/models/database_authenticatable.rb +164 -0
  57. data/lib/devise/devise/models/lockable.rb +196 -0
  58. data/lib/devise/devise/models/omniauthable.rb +27 -0
  59. data/lib/devise/devise/models/recoverable.rb +131 -0
  60. data/lib/devise/devise/models/registerable.rb +25 -0
  61. data/lib/devise/devise/models/rememberable.rb +129 -0
  62. data/lib/devise/devise/models/timeoutable.rb +49 -0
  63. data/lib/devise/devise/models/trackable.rb +35 -0
  64. data/lib/devise/devise/models/validatable.rb +66 -0
  65. data/lib/devise/devise/modules.rb +28 -0
  66. data/lib/devise/devise/omniauth.rb +28 -0
  67. data/lib/devise/devise/omniauth/config.rb +45 -0
  68. data/lib/devise/devise/omniauth/url_helpers.rb +18 -0
  69. data/lib/devise/devise/orm/active_record.rb +3 -0
  70. data/lib/devise/devise/orm/mongoid.rb +3 -0
  71. data/lib/devise/devise/parameter_filter.rb +40 -0
  72. data/lib/devise/devise/parameter_sanitizer.rb +99 -0
  73. data/lib/devise/devise/rails.rb +56 -0
  74. data/lib/devise/devise/rails/routes.rb +496 -0
  75. data/lib/devise/devise/rails/warden_compat.rb +22 -0
  76. data/lib/devise/devise/strategies/authenticatable.rb +167 -0
  77. data/lib/devise/devise/strategies/base.rb +20 -0
  78. data/lib/devise/devise/strategies/database_authenticatable.rb +23 -0
  79. data/lib/devise/devise/strategies/rememberable.rb +55 -0
  80. data/lib/devise/devise/test_helpers.rb +132 -0
  81. data/lib/devise/devise/time_inflector.rb +14 -0
  82. data/lib/devise/devise/token_generator.rb +70 -0
  83. data/lib/devise/devise/version.rb +3 -0
  84. data/lib/devise/generators/active_record/devise_generator.rb +73 -0
  85. data/lib/devise/generators/active_record/templates/migration.rb +18 -0
  86. data/lib/devise/generators/active_record/templates/migration_existing.rb +25 -0
  87. data/lib/devise/generators/devise/devise_generator.rb +26 -0
  88. data/lib/devise/generators/devise/install_generator.rb +29 -0
  89. data/lib/devise/generators/devise/orm_helpers.rb +51 -0
  90. data/lib/devise/generators/devise/views_generator.rb +135 -0
  91. data/lib/devise/generators/mongoid/devise_generator.rb +55 -0
  92. data/lib/devise/generators/templates/README +35 -0
  93. data/lib/devise/generators/templates/devise.rb +260 -0
  94. data/lib/devise/generators/templates/markerb/confirmation_instructions.markerb +5 -0
  95. data/lib/devise/generators/templates/markerb/reset_password_instructions.markerb +8 -0
  96. data/lib/devise/generators/templates/markerb/unlock_instructions.markerb +7 -0
  97. data/lib/devise/generators/templates/simple_form_for/confirmations/new.html.erb +16 -0
  98. data/lib/devise/generators/templates/simple_form_for/passwords/edit.html.erb +19 -0
  99. data/lib/devise/generators/templates/simple_form_for/passwords/new.html.erb +15 -0
  100. data/lib/devise/generators/templates/simple_form_for/registrations/edit.html.erb +27 -0
  101. data/lib/devise/generators/templates/simple_form_for/registrations/new.html.erb +17 -0
  102. data/lib/devise/generators/templates/simple_form_for/sessions/new.html.erb +15 -0
  103. data/lib/devise/generators/templates/simple_form_for/unlocks/new.html.erb +16 -0
  104. metadata +250 -0
@@ -0,0 +1,260 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # The secret key used by Devise. Devise uses this key to generate
5
+ # random tokens. Changing this key will render invalid all existing
6
+ # confirmation, reset password and unlock tokens in the database.
7
+ <% if rails_4? -%>
8
+ # config.secret_key = '<%= SecureRandom.hex(64) %>'
9
+ <% else -%>
10
+ config.secret_key = '<%= SecureRandom.hex(64) %>'
11
+ <% end -%>
12
+
13
+ # ==> Mailer Configuration
14
+ # Configure the e-mail address which will be shown in Devise::Mailer,
15
+ # note that it will be overwritten if you use your own mailer class
16
+ # with default "from" parameter.
17
+ config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
18
+
19
+ # Configure the class responsible to send e-mails.
20
+ # config.mailer = 'Devise::Mailer'
21
+
22
+ # ==> ORM configuration
23
+ # Load and configure the ORM. Supports :active_record (default) and
24
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
25
+ # available as additional gems.
26
+ require 'devise/orm/<%= options[:orm] %>'
27
+
28
+ # ==> Configuration for any authentication mechanism
29
+ # Configure which keys are used when authenticating a user. The default is
30
+ # just :email. You can configure it to use [:username, :subdomain], so for
31
+ # authenticating a user, both parameters are required. Remember that those
32
+ # parameters are used only when authenticating and not when retrieving from
33
+ # session. If you need permissions, you should implement that in a before filter.
34
+ # You can also supply a hash where the value is a boolean determining whether
35
+ # or not authentication should be aborted when the value is not present.
36
+ # config.authentication_keys = [ :email ]
37
+
38
+ # Configure parameters from the request object used for authentication. Each entry
39
+ # given should be a request method and it will automatically be passed to the
40
+ # find_for_authentication method and considered in your model lookup. For instance,
41
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
42
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
43
+ # config.request_keys = []
44
+
45
+ # Configure which authentication keys should be case-insensitive.
46
+ # These keys will be downcased upon creating or modifying a user and when used
47
+ # to authenticate or find a user. Default is :email.
48
+ config.case_insensitive_keys = [ :email ]
49
+
50
+ # Configure which authentication keys should have whitespace stripped.
51
+ # These keys will have whitespace before and after removed upon creating or
52
+ # modifying a user and when used to authenticate or find a user. Default is :email.
53
+ config.strip_whitespace_keys = [ :email ]
54
+
55
+ # Tell if authentication through request.params is enabled. True by default.
56
+ # It can be set to an array that will enable params authentication only for the
57
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
58
+ # enable it only for database (email + password) authentication.
59
+ # config.params_authenticatable = true
60
+
61
+ # Tell if authentication through HTTP Auth is enabled. False by default.
62
+ # It can be set to an array that will enable http authentication only for the
63
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
64
+ # enable it only for database authentication. The supported strategies are:
65
+ # :database = Support basic authentication with authentication key + password
66
+ # config.http_authenticatable = false
67
+
68
+ # If http headers should be returned for AJAX requests. True by default.
69
+ # config.http_authenticatable_on_xhr = true
70
+
71
+ # The realm used in Http Basic Authentication. 'Application' by default.
72
+ # config.http_authentication_realm = 'Application'
73
+
74
+ # It will change confirmation, password recovery and other workflows
75
+ # to behave the same regardless if the e-mail provided was right or wrong.
76
+ # Does not affect registerable.
77
+ # config.paranoid = true
78
+
79
+ # By default Devise will store the user in session. You can skip storage for
80
+ # particular strategies by setting this option.
81
+ # Notice that if you are skipping storage for all authentication paths, you
82
+ # may want to disable generating routes to Devise's sessions controller by
83
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
84
+ config.skip_session_storage = [:http_auth]
85
+
86
+ # By default, Devise cleans up the CSRF token on authentication to
87
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
88
+ # requests for sign in and sign up, you need to get a new CSRF token
89
+ # from the server. You can disable this option at your own risk.
90
+ # config.clean_up_csrf_token_on_authentication = true
91
+
92
+ # ==> Configuration for :database_authenticatable
93
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
94
+ # using other encryptors, it sets how many times you want the password re-encrypted.
95
+ #
96
+ # Limiting the stretches to just one in testing will increase the performance of
97
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
98
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
99
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
100
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
101
+ config.stretches = Rails.env.test? ? 1 : 10
102
+
103
+ # Setup a pepper to generate the encrypted password.
104
+ # config.pepper = '<%= SecureRandom.hex(64) %>'
105
+
106
+ # ==> Configuration for :confirmable
107
+ # A period that the user is allowed to access the website even without
108
+ # confirming their account. For instance, if set to 2.days, the user will be
109
+ # able to access the website for two days without confirming their account,
110
+ # access will be blocked just in the third day. Default is 0.days, meaning
111
+ # the user cannot access the website without confirming their account.
112
+ # config.allow_unconfirmed_access_for = 2.days
113
+
114
+ # A period that the user is allowed to confirm their account before their
115
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
116
+ # their account within 3 days after the mail was sent, but on the fourth day
117
+ # their account can't be confirmed with the token any more.
118
+ # Default is nil, meaning there is no restriction on how long a user can take
119
+ # before confirming their account.
120
+ # config.confirm_within = 3.days
121
+
122
+ # If true, requires any email changes to be confirmed (exactly the same way as
123
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
124
+ # db field (see migrations). Until confirmed, new email is stored in
125
+ # unconfirmed_email column, and copied to email column on successful confirmation.
126
+ config.reconfirmable = true
127
+
128
+ # Defines which key will be used when confirming an account
129
+ # config.confirmation_keys = [ :email ]
130
+
131
+ # ==> Configuration for :rememberable
132
+ # The time the user will be remembered without asking for credentials again.
133
+ # config.remember_for = 2.weeks
134
+
135
+ # If true, extends the user's remember period when remembered via cookie.
136
+ # config.extend_remember_period = false
137
+
138
+ # Options to be passed to the created cookie. For instance, you can set
139
+ # secure: true in order to force SSL only cookies.
140
+ # config.rememberable_options = {}
141
+
142
+ # ==> Configuration for :validatable
143
+ # Range for password length.
144
+ config.password_length = 8..128
145
+
146
+ # Email regex used to validate email formats. It simply asserts that
147
+ # one (and only one) @ exists in the given string. This is mainly
148
+ # to give user feedback and not to assert the e-mail validity.
149
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
150
+
151
+ # ==> Configuration for :timeoutable
152
+ # The time you want to timeout the user session without activity. After this
153
+ # time the user will be asked for credentials again. Default is 30 minutes.
154
+ # config.timeout_in = 30.minutes
155
+
156
+ # If true, expires auth token on session timeout.
157
+ # config.expire_auth_token_on_timeout = false
158
+
159
+ # ==> Configuration for :lockable
160
+ # Defines which strategy will be used to lock an account.
161
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
162
+ # :none = No lock strategy. You should handle locking by yourself.
163
+ # config.lock_strategy = :failed_attempts
164
+
165
+ # Defines which key will be used when locking and unlocking an account
166
+ # config.unlock_keys = [ :email ]
167
+
168
+ # Defines which strategy will be used to unlock an account.
169
+ # :email = Sends an unlock link to the user email
170
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
171
+ # :both = Enables both strategies
172
+ # :none = No unlock strategy. You should handle unlocking by yourself.
173
+ # config.unlock_strategy = :both
174
+
175
+ # Number of authentication tries before locking an account if lock_strategy
176
+ # is failed attempts.
177
+ # config.maximum_attempts = 20
178
+
179
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
180
+ # config.unlock_in = 1.hour
181
+
182
+ # Warn on the last attempt before the account is locked.
183
+ # config.last_attempt_warning = false
184
+
185
+ # ==> Configuration for :recoverable
186
+ #
187
+ # Defines which key will be used when recovering the password for an account
188
+ # config.reset_password_keys = [ :email ]
189
+
190
+ # Time interval you can reset your password with a reset password key.
191
+ # Don't put a too small interval or your users won't have the time to
192
+ # change their passwords.
193
+ config.reset_password_within = 6.hours
194
+
195
+ # ==> Configuration for :encryptable
196
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
197
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
198
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
199
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
200
+ # REST_AUTH_SITE_KEY to pepper).
201
+ #
202
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
203
+ # config.encryptor = :sha512
204
+
205
+ # ==> Scopes configuration
206
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
207
+ # "users/sessions/new". It's turned off by default because it's slower if you
208
+ # are using only default views.
209
+ # config.scoped_views = false
210
+
211
+ # Configure the default scope given to Warden. By default it's the first
212
+ # devise role declared in your routes (usually :user).
213
+ # config.default_scope = :user
214
+
215
+ # Set this configuration to false if you want /users/sign_out to sign out
216
+ # only the current scope. By default, Devise signs out all scopes.
217
+ # config.sign_out_all_scopes = true
218
+
219
+ # ==> Navigation configuration
220
+ # Lists the formats that should be treated as navigational. Formats like
221
+ # :html, should redirect to the sign in page when the user does not have
222
+ # access, but formats like :xml or :json, should return 401.
223
+ #
224
+ # If you have any extra navigational formats, like :iphone or :mobile, you
225
+ # should add them to the navigational formats lists.
226
+ #
227
+ # The "*/*" below is required to match Internet Explorer requests.
228
+ # config.navigational_formats = ['*/*', :html]
229
+
230
+ # The default HTTP method used to sign out a resource. Default is :delete.
231
+ config.sign_out_via = :delete
232
+
233
+ # ==> OmniAuth
234
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
235
+ # up on your models and hooks.
236
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
237
+
238
+ # ==> Warden configuration
239
+ # If you want to use other strategies, that are not supported by Devise, or
240
+ # change the failure app, you can configure them inside the config.warden block.
241
+ #
242
+ # config.warden do |manager|
243
+ # manager.intercept_401 = false
244
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
245
+ # end
246
+
247
+ # ==> Mountable engine configurations
248
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
249
+ # is mountable, there are some extra configurations to be taken into account.
250
+ # The following options are available, assuming the engine is mounted as:
251
+ #
252
+ # mount MyEngine, at: '/my_engine'
253
+ #
254
+ # The router that invoked `devise_for`, in the example above, would be:
255
+ # config.router_name = :my_engine
256
+ #
257
+ # When using omniauth, Devise cannot automatically set Omniauth path,
258
+ # so you need to do it manually. For the users scope, it would be:
259
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
260
+ end
@@ -0,0 +1,5 @@
1
+ Welcome <%= @email %>!
2
+
3
+ You can confirm your account through the link below:
4
+
5
+ <%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
@@ -0,0 +1,8 @@
1
+ Hello <%= @resource.email %>!
2
+
3
+ Someone has requested a link to change your password, and you can do this through the link below.
4
+
5
+ <%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
6
+
7
+ If you didn't request this, please ignore this email.
8
+ Your password won't change until you access the link above and create a new one.
@@ -0,0 +1,7 @@
1
+ Hello <%= @resource.email %>!
2
+
3
+ Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4
+
5
+ Click the link below to unlock your account:
6
+
7
+ <%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
@@ -0,0 +1,16 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+ <%= f.full_error :confirmation_token %>
6
+
7
+ <div class="form-inputs">
8
+ <%= f.input :email, required: true, autofocus: true %>
9
+ </div>
10
+
11
+ <div class="form-actions">
12
+ <%= f.button :submit, "Resend confirmation instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,19 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <%= f.input :reset_password_token, as: :hidden %>
7
+ <%= f.full_error :reset_password_token %>
8
+
9
+ <div class="form-inputs">
10
+ <%= f.input :password, label: "New password", required: true, autofocus: true %>
11
+ <%= f.input :password_confirmation, label: "Confirm your new password", required: true %>
12
+ </div>
13
+
14
+ <div class="form-actions">
15
+ <%= f.button :submit, "Change my password" %>
16
+ </div>
17
+ <% end %>
18
+
19
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="form-inputs">
7
+ <%= f.input :email, required: true, autofocus: true %>
8
+ </div>
9
+
10
+ <div class="form-actions">
11
+ <%= f.button :submit, "Send me reset password instructions" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,27 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="form-inputs">
7
+ <%= f.input :email, required: true, autofocus: true %>
8
+
9
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
+ <p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
11
+ <% end %>
12
+
13
+ <%= f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false %>
14
+ <%= f.input :password_confirmation, required: false %>
15
+ <%= f.input :current_password, hint: "we need your current password to confirm your changes", required: true %>
16
+ </div>
17
+
18
+ <div class="form-actions">
19
+ <%= f.button :submit, "Update" %>
20
+ </div>
21
+ <% end %>
22
+
23
+ <h3>Cancel my account</h3>
24
+
25
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
26
+
27
+ <%= link_to "Back", :back %>
@@ -0,0 +1,17 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="form-inputs">
7
+ <%= f.input :email, required: true, autofocus: true %>
8
+ <%= f.input :password, required: true %>
9
+ <%= f.input :password_confirmation, required: true %>
10
+ </div>
11
+
12
+ <div class="form-actions">
13
+ <%= f.button :submit, "Sign up" %>
14
+ </div>
15
+ <% end %>
16
+
17
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Sign in</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
+ <div class="form-inputs">
5
+ <%= f.input :email, required: false, autofocus: true %>
6
+ <%= f.input :password, required: false %>
7
+ <%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
8
+ </div>
9
+
10
+ <div class="form-actions">
11
+ <%= f.button :submit, "Sign in" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,16 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+ <%= f.full_error :unlock_token %>
6
+
7
+ <div class="form-inputs">
8
+ <%= f.input :email, required: true, autofocus: true %>
9
+ </div>
10
+
11
+ <div class="form-actions">
12
+ <%= f.button :submit, "Resend unlock instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
metadata ADDED
@@ -0,0 +1,250 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: devise-bootstrap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - ratnakar
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: warden
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 1.2.3
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.2.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: orm_adapter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '0.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bcrypt
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: thread_safe
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '0.1'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '0.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: railties
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: 3.2.6
104
+ - - <
105
+ - !ruby/object:Gem::Version
106
+ version: '5'
107
+ type: :runtime
108
+ prerelease: false
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - '>='
112
+ - !ruby/object:Gem::Version
113
+ version: 3.2.6
114
+ - - <
115
+ - !ruby/object:Gem::Version
116
+ version: '5'
117
+ description: deveise with bootstrap
118
+ email:
119
+ - ratnakarrao_nyros@yahoo.com
120
+ executables: []
121
+ extensions: []
122
+ extra_rdoc_files: []
123
+ files:
124
+ - .gitignore
125
+ - Gemfile
126
+ - LICENSE.txt
127
+ - README.md
128
+ - Rakefile
129
+ - app/controllers/devise/confirmations_controller.rb
130
+ - app/controllers/devise/omniauth_callbacks_controller.rb
131
+ - app/controllers/devise/passwords_controller.rb
132
+ - app/controllers/devise/registrations_controller.rb
133
+ - app/controllers/devise/sessions_controller.rb
134
+ - app/controllers/devise/unlocks_controller.rb
135
+ - app/controllers/devise_controller.rb
136
+ - app/helpers/devise_helper.rb
137
+ - app/mailers/devise/mailer.rb
138
+ - app/views/devise/confirmations/new.html.erb
139
+ - app/views/devise/mailer/confirmation_instructions.html.erb
140
+ - app/views/devise/mailer/reset_password_instructions.html.erb
141
+ - app/views/devise/mailer/unlock_instructions.html.erb
142
+ - app/views/devise/passwords/edit.html.erb
143
+ - app/views/devise/passwords/new.html.erb
144
+ - app/views/devise/registrations/edit.html.erb
145
+ - app/views/devise/registrations/new.html.erb
146
+ - app/views/devise/sessions/new.html.erb
147
+ - app/views/devise/shared/_links.erb
148
+ - app/views/devise/unlocks/new.html.erb
149
+ - config/locales/en.yml
150
+ - devise-bootstrap.gemspec
151
+ - gemfiles/Gemfile.rails-3.2-stable
152
+ - gemfiles/Gemfile.rails-4.0-stable
153
+ - gemfiles/Gemfile.rails-head
154
+ - lib/devise/bootstrap.rb
155
+ - lib/devise/bootstrap/version.rb
156
+ - lib/devise/devise.rb
157
+ - lib/devise/devise/controllers/helpers.rb
158
+ - lib/devise/devise/controllers/rememberable.rb
159
+ - lib/devise/devise/controllers/scoped_views.rb
160
+ - lib/devise/devise/controllers/sign_in_out.rb
161
+ - lib/devise/devise/controllers/store_location.rb
162
+ - lib/devise/devise/controllers/url_helpers.rb
163
+ - lib/devise/devise/delegator.rb
164
+ - lib/devise/devise/failure_app.rb
165
+ - lib/devise/devise/hooks/activatable.rb
166
+ - lib/devise/devise/hooks/csrf_cleaner.rb
167
+ - lib/devise/devise/hooks/forgetable.rb
168
+ - lib/devise/devise/hooks/lockable.rb
169
+ - lib/devise/devise/hooks/proxy.rb
170
+ - lib/devise/devise/hooks/rememberable.rb
171
+ - lib/devise/devise/hooks/timeoutable.rb
172
+ - lib/devise/devise/hooks/trackable.rb
173
+ - lib/devise/devise/mailers/helpers.rb
174
+ - lib/devise/devise/mapping.rb
175
+ - lib/devise/devise/models.rb
176
+ - lib/devise/devise/models/authenticatable.rb
177
+ - lib/devise/devise/models/confirmable.rb
178
+ - lib/devise/devise/models/database_authenticatable.rb
179
+ - lib/devise/devise/models/lockable.rb
180
+ - lib/devise/devise/models/omniauthable.rb
181
+ - lib/devise/devise/models/recoverable.rb
182
+ - lib/devise/devise/models/registerable.rb
183
+ - lib/devise/devise/models/rememberable.rb
184
+ - lib/devise/devise/models/timeoutable.rb
185
+ - lib/devise/devise/models/trackable.rb
186
+ - lib/devise/devise/models/validatable.rb
187
+ - lib/devise/devise/modules.rb
188
+ - lib/devise/devise/omniauth.rb
189
+ - lib/devise/devise/omniauth/config.rb
190
+ - lib/devise/devise/omniauth/url_helpers.rb
191
+ - lib/devise/devise/orm/active_record.rb
192
+ - lib/devise/devise/orm/mongoid.rb
193
+ - lib/devise/devise/parameter_filter.rb
194
+ - lib/devise/devise/parameter_sanitizer.rb
195
+ - lib/devise/devise/rails.rb
196
+ - lib/devise/devise/rails/routes.rb
197
+ - lib/devise/devise/rails/warden_compat.rb
198
+ - lib/devise/devise/strategies/authenticatable.rb
199
+ - lib/devise/devise/strategies/base.rb
200
+ - lib/devise/devise/strategies/database_authenticatable.rb
201
+ - lib/devise/devise/strategies/rememberable.rb
202
+ - lib/devise/devise/test_helpers.rb
203
+ - lib/devise/devise/time_inflector.rb
204
+ - lib/devise/devise/token_generator.rb
205
+ - lib/devise/devise/version.rb
206
+ - lib/devise/generators/active_record/devise_generator.rb
207
+ - lib/devise/generators/active_record/templates/migration.rb
208
+ - lib/devise/generators/active_record/templates/migration_existing.rb
209
+ - lib/devise/generators/devise/devise_generator.rb
210
+ - lib/devise/generators/devise/install_generator.rb
211
+ - lib/devise/generators/devise/orm_helpers.rb
212
+ - lib/devise/generators/devise/views_generator.rb
213
+ - lib/devise/generators/mongoid/devise_generator.rb
214
+ - lib/devise/generators/templates/README
215
+ - lib/devise/generators/templates/devise.rb
216
+ - lib/devise/generators/templates/markerb/confirmation_instructions.markerb
217
+ - lib/devise/generators/templates/markerb/reset_password_instructions.markerb
218
+ - lib/devise/generators/templates/markerb/unlock_instructions.markerb
219
+ - lib/devise/generators/templates/simple_form_for/confirmations/new.html.erb
220
+ - lib/devise/generators/templates/simple_form_for/passwords/edit.html.erb
221
+ - lib/devise/generators/templates/simple_form_for/passwords/new.html.erb
222
+ - lib/devise/generators/templates/simple_form_for/registrations/edit.html.erb
223
+ - lib/devise/generators/templates/simple_form_for/registrations/new.html.erb
224
+ - lib/devise/generators/templates/simple_form_for/sessions/new.html.erb
225
+ - lib/devise/generators/templates/simple_form_for/unlocks/new.html.erb
226
+ homepage: ''
227
+ licenses:
228
+ - MIT
229
+ metadata: {}
230
+ post_install_message:
231
+ rdoc_options: []
232
+ require_paths:
233
+ - lib
234
+ required_ruby_version: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - '>='
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ required_rubygems_version: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ requirements: []
245
+ rubyforge_project:
246
+ rubygems_version: 2.0.14
247
+ signing_key:
248
+ specification_version: 4
249
+ summary: deveise with bootstrap
250
+ test_files: []