mongo_session_store-rails4 5.1.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -3
- data/Gemfile +19 -12
- data/README.md +6 -4
- data/Rakefile +18 -2
- data/lib/mongo_session_store/mongo_store.rb +13 -8
- data/lib/mongo_session_store/mongo_store_base.rb +2 -1
- data/lib/mongo_session_store/version.rb +1 -1
- data/mongo_session_store-rails3.gemspec +1 -0
- data/mongo_session_store-rails4.gemspec +1 -0
- data/spec/rails_3.1_app/config/initializers/session_store.rb +1 -1
- data/spec/rails_3.2_app/config/initializers/session_store.rb +1 -1
- data/spec/rails_4.0_app/config/initializers/session_store.rb +1 -1
- data/spec/rails_4.1_app/config/initializers/session_store.rb +1 -1
- data/spec/rails_4.2_app/.gitignore +17 -0
- data/spec/rails_4.2_app/Rakefile +6 -0
- data/spec/rails_4.2_app/app/assets/images/.keep +0 -0
- data/spec/rails_4.2_app/app/assets/javascripts/application.js +13 -0
- data/spec/rails_4.2_app/app/assets/stylesheets/application.css +15 -0
- data/spec/rails_4.2_app/app/controllers/application_controller.rb +5 -0
- data/spec/rails_4.2_app/app/controllers/concerns/.keep +0 -0
- data/spec/rails_4.2_app/app/controllers/home_controller.rb +4 -0
- data/spec/rails_4.2_app/app/helpers/application_helper.rb +2 -0
- data/spec/rails_4.2_app/app/mailers/.keep +0 -0
- data/spec/rails_4.2_app/app/models/.keep +0 -0
- data/spec/rails_4.2_app/app/models/concerns/.keep +0 -0
- data/spec/rails_4.2_app/app/models/user.rb +5 -0
- data/spec/rails_4.2_app/app/views/devise/confirmations/new.html.erb +12 -0
- data/spec/rails_4.2_app/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/spec/rails_4.2_app/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/spec/rails_4.2_app/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/spec/rails_4.2_app/app/views/devise/passwords/edit.html.erb +16 -0
- data/spec/rails_4.2_app/app/views/devise/passwords/new.html.erb +12 -0
- data/spec/rails_4.2_app/app/views/devise/registrations/edit.html.erb +29 -0
- data/spec/rails_4.2_app/app/views/devise/registrations/new.html.erb +18 -0
- data/spec/rails_4.2_app/app/views/devise/sessions/new.html.erb +17 -0
- data/spec/rails_4.2_app/app/views/devise/shared/_links.erb +25 -0
- data/spec/rails_4.2_app/app/views/devise/unlocks/new.html.erb +12 -0
- data/spec/rails_4.2_app/app/views/home/index.html.erb +10 -0
- data/spec/rails_4.2_app/app/views/layouts/application.html.erb +17 -0
- data/spec/rails_4.2_app/bin/bundle +3 -0
- data/spec/rails_4.2_app/bin/rails +8 -0
- data/spec/rails_4.2_app/bin/rake +8 -0
- data/spec/rails_4.2_app/bin/setup +29 -0
- data/spec/rails_4.2_app/bin/spring +15 -0
- data/spec/rails_4.2_app/config.ru +4 -0
- data/spec/rails_4.2_app/config/application.rb +26 -0
- data/spec/rails_4.2_app/config/boot.rb +3 -0
- data/spec/rails_4.2_app/config/database.yml +11 -0
- data/spec/rails_4.2_app/config/environment.rb +5 -0
- data/spec/rails_4.2_app/config/environments/development.rb +41 -0
- data/spec/rails_4.2_app/config/environments/production.rb +79 -0
- data/spec/rails_4.2_app/config/environments/test.rb +42 -0
- data/spec/rails_4.2_app/config/initializers/assets.rb +11 -0
- data/spec/rails_4.2_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails_4.2_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/rails_4.2_app/config/initializers/devise.rb +254 -0
- data/spec/rails_4.2_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/rails_4.2_app/config/initializers/inflections.rb +16 -0
- data/spec/rails_4.2_app/config/initializers/mime_types.rb +4 -0
- data/spec/rails_4.2_app/config/initializers/session_store.rb +5 -0
- data/spec/rails_4.2_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/rails_4.2_app/config/locales/en.yml +23 -0
- data/spec/rails_4.2_app/config/mongo.yml +11 -0
- data/spec/rails_4.2_app/config/mongoid.yml +13 -0
- data/spec/rails_4.2_app/config/routes.rb +4 -0
- data/spec/rails_4.2_app/config/secrets.yml +22 -0
- data/spec/rails_4.2_app/db/migrate/20140301171212_add_devise_users.rb +11 -0
- data/spec/rails_4.2_app/db/schema.rb +25 -0
- data/spec/rails_4.2_app/db/seeds.rb +7 -0
- data/spec/rails_4.2_app/lib/assets/.keep +0 -0
- data/spec/rails_4.2_app/lib/tasks/.keep +0 -0
- data/spec/rails_4.2_app/log/.keep +0 -0
- data/spec/rails_4.2_app/public/404.html +67 -0
- data/spec/rails_4.2_app/public/422.html +67 -0
- data/spec/rails_4.2_app/public/500.html +66 -0
- data/spec/rails_4.2_app/public/favicon.ico +0 -0
- data/spec/rails_4.2_app/public/robots.txt +5 -0
- data/spec/rails_helper.rb +1 -1
- metadata +133 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 281b4f7e0d7ab3e7f406f6ac88a3a0c198c6e0fe
|
4
|
+
data.tar.gz: 626f581c73c25cabd8fb7de5e16216d19ac3c53a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56f257c4daf81557871e4ad70e5cf571bcf25bf674d00b510d2ddafb2bb7f524c02d02d0b7b8270f9565e1ab519af2d0af215b824172424700e05bb2c1b58b73
|
7
|
+
data.tar.gz: 6b8957999bf31806567e8aad4fd5aa8451a3b52eaf818c6945e204686669887e1dec9861b68762ecd53abd9b271549144b034395d23b2e9cb27873fa3c019c8f
|
data/.travis.yml
CHANGED
@@ -3,7 +3,8 @@ script: "rake"
|
|
3
3
|
rvm:
|
4
4
|
- 1.9.3
|
5
5
|
- 2.0.0
|
6
|
-
- 2.1.
|
6
|
+
- 2.1.5
|
7
|
+
- "2.2"
|
7
8
|
- ruby-head
|
8
9
|
- jruby-19mode
|
9
10
|
- jruby-head
|
@@ -13,5 +14,8 @@ matrix:
|
|
13
14
|
- rvm: jruby-head
|
14
15
|
- rvm: ruby-head
|
15
16
|
- rvm: rbx-2.2.9
|
16
|
-
|
17
|
-
- mongodb
|
17
|
+
before_script:
|
18
|
+
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz -O /tmp/mongodb.tgz
|
19
|
+
- tar -xvf /tmp/mongodb.tgz
|
20
|
+
- mkdir /tmp/data
|
21
|
+
- ${PWD}/mongodb-linux-x86_64-3.0.1/bin/mongod --dbpath /tmp/data --bind_ip 127.0.0.1 &> /dev/null &
|
data/Gemfile
CHANGED
@@ -8,33 +8,35 @@ RAILS_VERS = case ENV['RAILS_VERS']
|
|
8
8
|
when '4.0'
|
9
9
|
'~>4.0.5'
|
10
10
|
when '4.1'
|
11
|
-
'~>4.1.
|
11
|
+
'~>4.1.9'
|
12
|
+
when '4.2'
|
13
|
+
'~>4.2.0'
|
12
14
|
when nil
|
13
15
|
nil
|
14
16
|
else
|
15
|
-
raise "Invalid RAILS_VERS. Available versions are 3.2 and 4.
|
17
|
+
raise "Invalid RAILS_VERS. Available versions are 3.1, 3.2, 4.0, 4.1, and 4.2."
|
16
18
|
end
|
17
19
|
|
18
20
|
gemspec :name => 'mongo_session_store-rails4'
|
19
21
|
|
20
22
|
group :development, :test do
|
21
23
|
gem 'rake'
|
22
|
-
if ENV['MONGO_SESSION_STORE_ORM'] == 'mongo_mapper'
|
23
|
-
gem 'mongo_mapper', '>= 0.13.0.beta2'
|
24
|
-
end
|
25
24
|
|
26
|
-
|
25
|
+
case ENV['MONGO_SESSION_STORE_ORM']
|
26
|
+
when 'mongo_mapper'
|
27
|
+
gem 'mongo_mapper', '>= 0.13.1'
|
28
|
+
when 'mongoid'
|
27
29
|
if ENV['RAILS_VERS'] =~ /^4\.\d/
|
28
|
-
gem 'mongoid', '>= 4.0.
|
30
|
+
gem 'mongoid', '>= 4.0.2'
|
29
31
|
elsif ENV['RAILS_VERS'] =~ /^3\.2\d/
|
30
32
|
gem 'mongoid', '>= 3.1.0'
|
31
33
|
else
|
32
34
|
gem 'mongoid', '>= 3.0.0'
|
33
35
|
end
|
34
|
-
|
35
|
-
|
36
|
-
if ENV['MONGO_SESSION_STORE_ORM'] == 'mongo'
|
36
|
+
when 'mongo'
|
37
37
|
gem 'mongo'
|
38
|
+
else
|
39
|
+
gem 'mongo' # So rake test_all can wait for Mongo to start
|
38
40
|
end
|
39
41
|
|
40
42
|
gem 'pry'
|
@@ -48,8 +50,13 @@ group :development, :test do
|
|
48
50
|
else
|
49
51
|
gem 'sqlite3' # for devise User storage
|
50
52
|
end
|
51
|
-
|
52
|
-
|
53
|
+
|
54
|
+
if RAILS_VERS
|
55
|
+
gem 'rails', RAILS_VERS
|
56
|
+
else
|
57
|
+
gem 'rails'
|
58
|
+
end
|
59
|
+
gem 'test-unit'
|
53
60
|
|
54
61
|
gem 'rspec-rails', '2.12.0'
|
55
62
|
gem 'devise'
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
MongoSessionStore is a collection of Rails-compatible session stores for MongoMapper and Mongoid, but also included is a generic Mongo store that works with any (or no!) Mongo ODM.
|
6
6
|
|
7
|
-
MongoSessionStore is tested [on Travis CI](https://travis-ci.org/brianhempel/mongo_session_store) against Ruby 1.9.3, 2.0.0, 2.1.2, and JRuby with Rails 3.1 through 4.
|
7
|
+
MongoSessionStore is tested [on Travis CI](https://travis-ci.org/brianhempel/mongo_session_store) against Ruby 1.9.3, 2.0.0, 2.1.5, 2.2.0, and JRuby with Rails 3.1 through 4.2.
|
8
8
|
|
9
9
|
Mongoid users: This gem is compatible with both Mongoid 3 and 4.
|
10
10
|
|
@@ -14,7 +14,7 @@ See the [Changelog](#changelog) if you need support for an older version of Ruby
|
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
17
|
-
MongoSessionStore is compatible with Rails 3.1 through 4.
|
17
|
+
MongoSessionStore is compatible with Rails 3.1 through 4.2.
|
18
18
|
|
19
19
|
In your Gemfile:
|
20
20
|
|
@@ -37,7 +37,7 @@ MyApp::Application.config.session_store :mongoid_store
|
|
37
37
|
|
38
38
|
# anything else
|
39
39
|
MyApp::Application.config.session_store :mongo_store
|
40
|
-
MongoStore::Session.database = Mongo::
|
40
|
+
MongoStore::Session.database = Mongo::Client.new(['127.0.0.1:27017'], database: \"my_app_development\")
|
41
41
|
```
|
42
42
|
|
43
43
|
By default, the sessions will be stored in the "sessions" collection in MongoDB. If you want to use a different collection, you can set that in the initializer:
|
@@ -61,6 +61,8 @@ MongoStore::Session.where('updated_at' => { '$gt' => 2.days.ago })
|
|
61
61
|
|
62
62
|
## Changelog
|
63
63
|
|
64
|
+
6.0.0 supports the Mongo Ruby Driver 2.0 for the generic MongoStore. The other stores are unchanged. Tests added for Rails 4.2. Tests against MongoDB 3.0.1 on Travis CI.
|
65
|
+
|
64
66
|
5.1.0 generates a new session ID when a session is not found. Previously, when a session ID is provided in the request but the session was not found (because for example, it was removed from Mongo by a sweeper job) a new session with the provided ID would be created. This would cause a write error if two simultaneous requests both create a session with the same ID and both try to insert a new document with that ID.
|
65
67
|
|
66
68
|
5.0.1 suppresses a warning from Mongoid 4 when setting the _id field type to String.
|
@@ -87,7 +89,7 @@ To run the tests for a specific store (examples):
|
|
87
89
|
To see a list of all options for running tests, run
|
88
90
|
|
89
91
|
rake -T
|
90
|
-
|
92
|
+
|
91
93
|
## Previous contributors
|
92
94
|
|
93
95
|
MongoSessionStore started as a fork of the DataMapper session store, modified to work with MongoMapper and Mongoid. Much thanks to all the previous contributors:
|
data/Rakefile
CHANGED
@@ -20,15 +20,31 @@ def set_versions(rails_vers, orm)
|
|
20
20
|
success
|
21
21
|
end
|
22
22
|
|
23
|
-
@rails_versions = ['3.1', '3.2', '4.0', '4.1']
|
23
|
+
@rails_versions = ['3.1', '3.2', '4.0', '4.1', '4.2']
|
24
24
|
@orms = ['mongo_mapper', 'mongoid', 'mongo']
|
25
25
|
|
26
26
|
task :default => :test_all
|
27
27
|
|
28
|
-
desc 'Test each session store against Rails 3.1, 3.2, 4.0, and 4.
|
28
|
+
desc 'Test each session store against Rails 3.1, 3.2, 4.0, 4.1, and 4.2'
|
29
29
|
task :test_all do
|
30
30
|
# inspired by http://pivotallabs.com/users/jdean/blog/articles/1728-testing-your-gem-against-multiple-rubies-and-rails-versions-with-rvm
|
31
31
|
|
32
|
+
# Wait for mongod to start on Travis.
|
33
|
+
# From the Mongo Ruby Driver gem.
|
34
|
+
if ENV['TRAVIS']
|
35
|
+
require 'mongo'
|
36
|
+
client = Mongo::Client.new(['127.0.0.1:27017'])
|
37
|
+
begin
|
38
|
+
puts "Waiting for MongoDB..."
|
39
|
+
client.command(Mongo::Server::Monitor::STATUS)
|
40
|
+
rescue Mongo::ServerSelector::NoServerAvailable => e
|
41
|
+
sleep(2)
|
42
|
+
# 1 Retry
|
43
|
+
puts "Waiting for MongoDB..."
|
44
|
+
client.cluster.scan!
|
45
|
+
client.command(Mongo::ServerSelector::NoServerAvailable)
|
46
|
+
end
|
47
|
+
end
|
32
48
|
|
33
49
|
@failed_suites = []
|
34
50
|
|
@@ -9,7 +9,7 @@ module ActionDispatch
|
|
9
9
|
|
10
10
|
def initialize(options = {})
|
11
11
|
@_id = options[:_id]
|
12
|
-
@data = options[:data] || BSON::Binary.new(Marshal.dump({}))
|
12
|
+
@data = options[:data] || BSON::Binary.new(Marshal.dump({}), :generic)
|
13
13
|
@created_at = options[:created_at]
|
14
14
|
@updated_at = options[:updated_at]
|
15
15
|
end
|
@@ -19,20 +19,25 @@ module ActionDispatch
|
|
19
19
|
new(options)
|
20
20
|
end
|
21
21
|
|
22
|
+
def scope
|
23
|
+
collection.find(:_id => _id)
|
24
|
+
end
|
25
|
+
|
22
26
|
def destroy
|
23
|
-
|
27
|
+
scope.delete_one
|
24
28
|
end
|
25
29
|
|
26
30
|
def save
|
27
31
|
@created_at ||= Time.now
|
28
32
|
@updated_at = Time.now
|
29
|
-
|
30
|
-
|
31
|
-
:
|
32
|
-
:data => BSON::Binary.new(@data),
|
33
|
+
|
34
|
+
attributes = {
|
35
|
+
:data => BSON::Binary.new(@data, :generic),
|
33
36
|
:created_at => @created_at,
|
34
37
|
:updated_at => @updated_at
|
35
|
-
|
38
|
+
}
|
39
|
+
|
40
|
+
scope.replace_one(attributes, upsert: true)
|
36
41
|
end
|
37
42
|
|
38
43
|
def data=(stuff)
|
@@ -51,7 +56,7 @@ module ActionDispatch
|
|
51
56
|
if @database
|
52
57
|
@database
|
53
58
|
else
|
54
|
-
raise "MongoStore needs a database, e.g. MongoStore::Session.database = Mongo::
|
59
|
+
raise "MongoStore needs a database, e.g. MongoStore::Session.database = Mongo::Client.new(['127.0.0.1:27017'], database: \"my_app_development\")"
|
55
60
|
end
|
56
61
|
end
|
57
62
|
|
@@ -9,6 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.files = `git ls-files`.split("\n")
|
10
10
|
s.test_files = `git ls-files -- {test,spec,features,perf}/*`.split("\n")
|
11
11
|
s.homepage = "http://github.com/brianhempel/mongo_session_store"
|
12
|
+
s.license = "MIT"
|
12
13
|
s.require_paths = ["lib"]
|
13
14
|
s.rubygems_version = "1.3.7"
|
14
15
|
s.summary = "Rails session stores for MongoMapper, Mongoid, or any other ODM. Rails 3.1, 3.2, 4.0, and 4.1 compatible."
|
@@ -9,6 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.files = `git ls-files`.split("\n")
|
10
10
|
s.test_files = `git ls-files -- {test,spec,features,perf}/*`.split("\n")
|
11
11
|
s.homepage = "http://github.com/brianhempel/mongo_session_store"
|
12
|
+
s.license = "MIT"
|
12
13
|
s.require_paths = ["lib"]
|
13
14
|
s.rubygems_version = "1.3.7"
|
14
15
|
s.summary = "Rails session stores for MongoMapper, Mongoid, or any other ODM. Rails 3.1, 3.2, 4.0, and 4.1 compatible."
|
@@ -5,5 +5,5 @@
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
7
7
|
# (create the session table with "rails generate session_migration")
|
8
|
-
MongoStore::Session.database = Mongo::
|
8
|
+
MongoStore::Session.database = Mongo::Client.new(['127.0.0.1:27017'], database: "rails31_app_#{Rails.env}") if ENV['MONGO_SESSION_STORE_ORM'] == "mongo"
|
9
9
|
Rails31App::Application.config.session_store :"#{ENV['MONGO_SESSION_STORE_ORM']}_store"
|
@@ -5,5 +5,5 @@
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
7
7
|
# (create the session table with "rails generate session_migration")
|
8
|
-
MongoStore::Session.database = Mongo::
|
8
|
+
MongoStore::Session.database = Mongo::Client.new(['127.0.0.1:27017'], database: "rails32_app_#{Rails.env}") if ENV['MONGO_SESSION_STORE_ORM'] == "mongo"
|
9
9
|
Rails32App::Application.config.session_store :"#{ENV['MONGO_SESSION_STORE_ORM']}_store"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# Rails40App::Application.config.session_store :cookie_store, key: '_rails_4_0_app_session'
|
4
|
-
MongoStore::Session.database = Mongo::
|
4
|
+
MongoStore::Session.database = Mongo::Client.new(['127.0.0.1:27017'], database: "rails40_app_#{Rails.env}") if ENV['MONGO_SESSION_STORE_ORM'] == "mongo"
|
5
5
|
Rails40App::Application.config.session_store :"#{ENV['MONGO_SESSION_STORE_ORM']}_store"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# Rails.application.config.session_store :cookie_store, key: '_rails_41_app_session'
|
4
|
-
MongoStore::Session.database = Mongo::
|
4
|
+
MongoStore::Session.database = Mongo::Client.new(['127.0.0.1:27017'], database: "rails41_app_#{Rails.env}") if ENV['MONGO_SESSION_STORE_ORM'] == "mongo"
|
5
5
|
Rails.application.config.session_store :"#{ENV['MONGO_SESSION_STORE_ORM']}_store"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*
|
16
|
+
!/log/.keep
|
17
|
+
/tmp
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend confirmation instructions</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Resend confirmation instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
|
6
|
+
|
7
|
+
<p>If you didn't request this, please ignore this email.</p>
|
8
|
+
<p>Your password won't change until you access the link above and create a new one.</p>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
4
|
+
|
5
|
+
<p>Click the link below to unlock your account:</p>
|
6
|
+
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2>Change your password</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
<%= f.hidden_field :reset_password_token %>
|
6
|
+
|
7
|
+
<div><%= f.label :password, "New password" %><br />
|
8
|
+
<%= f.password_field :password, :autofocus => true %></div>
|
9
|
+
|
10
|
+
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
11
|
+
<%= f.password_field :password_confirmation %></div>
|
12
|
+
|
13
|
+
<div><%= f.submit "Change my password" %></div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Forgot your password?</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Send me reset password instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|