devise_token_auth_multi_email 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f38c0b3641519bd0810319419aaf08804b532fd43cb0096bb72cd8b88d889bb1
4
- data.tar.gz: 81d521ee99a8ae5ccf45ae72be78d355d39350dd6344933703cac1b880f9d3a2
3
+ metadata.gz: b64416ecea73707dd5e16d865b8f4aa94052fe8ce3f92bea9b7e0b621c286ea5
4
+ data.tar.gz: '0394e3369d03ad09d14c38c10706fb3938db9c8d586bd7a5b6054ceda69af70b'
5
5
  SHA512:
6
- metadata.gz: 5f4ad633633d142a5f3d5dc4f33c1351d9040ceffd4e683b16fc3275f12444545ab3e576aec9b0fa42089dffde199bc3c9759aca480a3a1fc92d786c74d776c5
7
- data.tar.gz: 8626946a5de31ccfc622e0a9b29a51640a414d478f70a2d77e931fc8854ae5dc9900218263327dd35d115dcb6c8c3c6360487425c76468d92b09d43a30a5b438
6
+ metadata.gz: e7f28119adf9053489c3edacfdcfbd45a6f6b59c244607f018768c50da4d2579a6ec8bd597522a5e42d51904e28d2774d6537fcd1902e8a08d66b9fde6d1b2e7
7
+ data.tar.gz: bcb97cec0899fcfb86a5ec845a3babe140f3a464c11609a0c02c1f94896361400ca913788f9324a01c586ca5e39b99a1c8c42889006b67c5967cb31a420a60d0
data/README.md CHANGED
@@ -1,13 +1,4 @@
1
- # Devise Token Auth
2
-
3
- [![Gem Version](https://badge.fury.io/rb/devise_token_auth.svg)](http://badge.fury.io/rb/devise_token_auth)
4
- [![Build Status](https://github.com/lynndylanhurley/devise_token_auth/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/lynndylanhurley/devise_token_auth/actions/workflows/test.yml)
5
- [![Code Climate](https://codeclimate.com/github/lynndylanhurley/devise_token_auth/badges/gpa.svg)](https://codeclimate.com/github/lynndylanhurley/devise_token_auth)
6
- [![Test Coverage](https://codeclimate.com/github/lynndylanhurley/devise_token_auth/badges/coverage.svg)](https://codeclimate.com/github/lynndylanhurley/devise_token_auth/coverage)
7
- [![Downloads](https://img.shields.io/gem/dt/devise_token_auth.svg)](https://rubygems.org/gems/devise_token_auth)
8
- [![Backers on Open Collective](https://opencollective.com/devise_token_auth/backers/badge.svg)](#backers)
9
- [![Sponsors on Open Collective](https://opencollective.com/devise_token_auth/sponsors/badge.svg)](#sponsors)
10
- [![Join the chat at https://gitter.im/lynndylanhurley/devise_token_auth](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lynndylanhurley/devise_token_auth?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1
+ # Devise Token Auth Multi Email
11
2
 
12
3
  Simple, multi-client and secure token-based authentication for Rails.
13
4
 
@@ -15,6 +6,9 @@ If you're building SPA or a mobile app, and you want authentication, you need to
15
6
  This gem refreshes the tokens on each request, and expires them in a short time, so the app is secure.
16
7
  Also, it maintains a session for each client/device, so you can have as many sessions as you want.
17
8
 
9
+ This version deviates from the parent in that it supports multiple
10
+ email addresses per user.
11
+
18
12
  ## Main features
19
13
 
20
14
  * Seamless integration with:
@@ -30,19 +24,21 @@ Also, it maintains a session for each client/device, so you can have as many ses
30
24
  * Login and logout
31
25
  * Password reset, account confirmation
32
26
  * Support for [multiple user models](./docs/usage/multiple_models.md).
27
+ * Support for multiple emails using * [devise-multi_email](https://github.com/allenwq/devise-multi_email)
33
28
  * It is [secure](docs/security.md).
34
29
 
35
30
  This project leverages the following gems:
36
31
 
37
32
  * [Devise](https://github.com/plataformatec/devise)
38
33
  * [OmniAuth](https://github.com/intridea/omniauth)
34
+ * [DeviseMultiEmail](https://github.com/allenwq/devise-multi_email)
39
35
 
40
36
  ## Installation
41
37
 
42
38
  Add the following to your `Gemfile`:
43
39
 
44
40
  ~~~ruby
45
- gem 'devise_token_auth'
41
+ gem 'devise_token_auth_multi_email'
46
42
  ~~~
47
43
 
48
44
  Then install the gem using bundle:
@@ -55,41 +51,37 @@ bundle install
55
51
 
56
52
  ## Need help?
57
53
 
58
- Please use [StackOverflow](https://stackoverflow.com/questions/tagged/devise-token-auth) for help requests and how-to questions.
54
+ Please use
55
+ [StackOverflow](https://stackoverflow.com/questions/tagged/devise-token-auth-multi-email) for help requests and how-to questions.
59
56
 
60
57
  Please open GitHub issues for bugs and enhancements only, not general help requests. Please search previous issues (and Google and StackOverflow) before creating a new issue.
61
58
 
62
- Please read the [issue template](https://github.com/lynndylanhurley/devise_token_auth/blob/master/.github/ISSUE_TEMPLATE.md) before posting issues.
59
+ Please read the [issue
60
+ template](https://github.com/mgmodell/devise_token_auth_multi_email/blob/master/.github/ISSUE_TEMPLATE.md) before posting issues.
63
61
 
64
62
  ## [FAQ](docs/faq.md)
65
63
 
66
64
  ## Contributors wanted!
67
65
 
68
- See our [Contribution Guidelines](https://github.com/lynndylanhurley/devise_token_auth/blob/master/.github/CONTRIBUTING.md). Feel free to submit pull requests, review pull requests, or review open issues. If you'd like to get in contact, [Zach Feldman](https://github.com/zachfeldman) has been wrangling this effort, you can reach him with his name @gmail. Further discussion of this in [this issue](https://github.com/lynndylanhurley/devise_token_auth/issues/969).
69
-
70
- We have some bounties for some issues, [check them out](https://github.com/lynndylanhurley/devise_token_auth/issues?q=is%3Aopen+is%3Aissue+label%3Abounty)!
71
-
72
- ## Live Demos
73
-
74
- [Here is a demo](https://stackblitz.com/github/neroniaky/angular-token) of this app running with the [Angular-Token](https://github.com/neroniaky/angular-token) service and [Angular](https://github.com/angular/angular).
75
-
76
- The fully configured api used in these demos can be found [here](https://github.com/lynndylanhurley/devise_token_auth_demo).
77
-
66
+ See our [Contribution
67
+ Guidelines](https://github.com/mgmodell/devise_token_auth_multi_email/blob/master/.github/CONTRIBUTING.md).
68
+ Feel free to submit pull requests, review pull requests, or review open
69
+ issues.
78
70
 
79
71
  ## Contributors
80
72
 
81
- <a href="graphs/contributors"><img src="https://opencollective.com/devise_token_auth/contributors.svg?width=890&button=false" /></a>
73
+ <a href="graphs/contributors"><img src="https://opencollective.com/devise_token_auth_multi_email/contributors.svg?width=890&button=false" /></a>
82
74
 
83
75
  ## Backers
84
76
 
85
- Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/devise_token_auth#backer)]
77
+ Thank you to all the backers of the parent project! 🙏 [[Become a backer](https://opencollective.com/devise_token_auth#backer)]
86
78
 
87
79
  [![](https://opencollective.com/devise_token_auth/backers.svg?width=890)](https://opencollective.com/devise_token_auth#backers)
88
80
 
89
81
 
90
82
  ## Sponsors
91
83
 
92
- Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/devise_token_auth#sponsor)]
84
+ Support this project by becoming a sponsor of the parent. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/devise_token_auth#sponsor)]
93
85
 
94
86
  [![](https://opencollective.com/devise_token_auth/sponsor/0/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/0/website) [![](https://opencollective.com/devise_token_auth/sponsor/1/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/1/website) [![](https://opencollective.com/devise_token_auth/sponsor/2/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/2/website) [![](https://opencollective.com/devise_token_auth/sponsor/3/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/3/website) [![](https://opencollective.com/devise_token_auth/sponsor/4/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/4/website) [![](https://opencollective.com/devise_token_auth/sponsor/5/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/5/website) [![](https://opencollective.com/devise_token_auth/sponsor/6/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/6/website) [![](https://opencollective.com/devise_token_auth/sponsor/7/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/7/website) [![](https://opencollective.com/devise_token_auth/sponsor/8/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/8/website) [![](https://opencollective.com/devise_token_auth/sponsor/9/avatar.svg)](https://opencollective.com/devise_token_auth/sponsor/9/website)
95
87
 
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ require 'rdoc/task'
10
10
 
11
11
  RDoc::Task.new(:rdoc) do |rdoc|
12
12
  rdoc.rdoc_dir = 'rdoc'
13
- rdoc.title = 'DeviseTokenAuth'
13
+ rdoc.title = 'DeviseTokenAuthMultiEmail'
14
14
  rdoc.options << '--line-numbers'
15
15
  rdoc.rdoc_files.include('README.rdoc')
16
16
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeviseTokenAuth
4
- VERSION = '0.9.0'.freeze
4
+ VERSION = '0.9.2'.freeze
5
5
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'devise'
4
+ require 'devise/multi_email'
4
5
 
5
6
  module DeviseTokenAuth
6
7
  end
@@ -39,8 +39,6 @@ module Dummy
39
39
  config.autoload_paths << Rails.root.join('lib')
40
40
  config.autoload_paths += ["#{config.root}/app/#{DEVISE_TOKEN_AUTH_ORM}"]
41
41
 
42
- config.active_record.legacy_connection_handling = false
43
-
44
42
  if DEVISE_TOKEN_AUTH_ORM == :mongoid
45
43
  Mongoid.configure do |config|
46
44
  config.load! Rails.root.join('./config/mongoid.yml')
@@ -23,10 +23,6 @@ Rails.application.configure do
23
23
  (config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }) :
24
24
  (config.static_cache_control = 'public, max-age=3600')
25
25
 
26
- if Rails::VERSION::MAJOR < 7 && ENV['DEVISE_TOKEN_AUTH_ORM'] != 'mongoid'
27
- config.active_record.legacy_connection_handling = false
28
- end
29
-
30
26
  # Show full error reports and disable caching.
31
27
  config.consider_all_requests_local = true
32
28
  config.action_controller.perform_caching = false
@@ -7,11 +7,12 @@ class DeviseTokenAuth::CustomRoutesTest < ActiveSupport::TestCase
7
7
  Rails.application.reload_routes!
8
8
  end
9
9
  test 'custom controllers' do
10
- class ActionDispatch::Routing::Mapper
11
- include Mocha::ParameterMatchers
12
- end
13
10
  Rails.application.routes.draw do
14
- self.expects(:devise_for).with(
11
+ mapper = self
12
+ mapper.singleton_class.include(Mocha::API)
13
+ mapper.singleton_class.include(Mocha::ParameterMatchers)
14
+
15
+ mapper.expects(:devise_for).with(
15
16
  :users,
16
17
  has_entries(
17
18
  controllers: has_entries(
data/test/test_helper.rb CHANGED
@@ -6,6 +6,11 @@ SimpleCov.start 'rails' do
6
6
  add_filter ['.bundle', 'test', 'config']
7
7
  end
8
8
 
9
+ if ENV['CI']
10
+ require 'coveralls'
11
+ Coveralls.wear!
12
+ end
13
+
9
14
  ENV['RAILS_ENV'] = 'test'
10
15
  DEVISE_TOKEN_AUTH_ORM = (ENV['DEVISE_TOKEN_AUTH_ORM'] || :active_record).to_sym
11
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_token_auth_multi_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lynn Hurley
@@ -30,26 +30,6 @@ dependencies:
30
30
  - - "<="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '8.2'
33
- - !ruby/object:Gem::Dependency
34
- name: devise
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">"
38
- - !ruby/object:Gem::Version
39
- version: 3.5.2
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '6.0'
43
- type: :runtime
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">"
48
- - !ruby/object:Gem::Version
49
- version: 3.5.2
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '6.0'
53
33
  - !ruby/object:Gem::Dependency
54
34
  name: bcrypt
55
35
  requirement: !ruby/object:Gem::Requirement
@@ -92,20 +72,34 @@ dependencies:
92
72
  - - ">="
93
73
  - !ruby/object:Gem::Version
94
74
  version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: coveralls_reborn
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "<="
80
+ - !ruby/object:Gem::Version
81
+ version: 0.29.0
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "<="
87
+ - !ruby/object:Gem::Version
88
+ version: 0.29.0
95
89
  - !ruby/object:Gem::Dependency
96
90
  name: sqlite3
97
91
  requirement: !ruby/object:Gem::Requirement
98
92
  requirements:
99
93
  - - "~>"
100
94
  - !ruby/object:Gem::Version
101
- version: '1.4'
95
+ version: '2.9'
102
96
  type: :development
103
97
  prerelease: false
104
98
  version_requirements: !ruby/object:Gem::Requirement
105
99
  requirements:
106
100
  - - "~>"
107
101
  - !ruby/object:Gem::Version
108
- version: '1.4'
102
+ version: '2.9'
109
103
  - !ruby/object:Gem::Dependency
110
104
  name: pg
111
105
  requirement: !ruby/object:Gem::Requirement
@@ -143,7 +137,7 @@ dependencies:
143
137
  version: '4'
144
138
  - - "<"
145
139
  - !ruby/object:Gem::Version
146
- version: '8'
140
+ version: '10'
147
141
  type: :development
148
142
  prerelease: false
149
143
  version_requirements: !ruby/object:Gem::Requirement
@@ -153,7 +147,7 @@ dependencies:
153
147
  version: '4'
154
148
  - - "<"
155
149
  - !ruby/object:Gem::Version
156
- version: '8'
150
+ version: '10'
157
151
  - !ruby/object:Gem::Dependency
158
152
  name: mongoid-locker
159
153
  requirement: !ruby/object:Gem::Requirement
@@ -375,7 +369,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
375
369
  requirements:
376
370
  - - ">="
377
371
  - !ruby/object:Gem::Version
378
- version: 2.3.0
372
+ version: '3.0'
379
373
  required_rubygems_version: !ruby/object:Gem::Requirement
380
374
  requirements:
381
375
  - - ">="