simple_token_authentication 1.16.0 → 1.17.0
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 +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/simple_token_authentication/adapters/mongoid_adapter.rb +8 -15
- data/lib/simple_token_authentication/errors.rb +1 -1
- data/lib/simple_token_authentication/version.rb +1 -1
- data/spec/lib/simple_token_authentication/adapters/mongoid_adapter_spec.rb +11 -18
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d3a315e88f986f08c26158c60d69e1cd4d1d1bf088f9e61e11129622fbc7f18
|
|
4
|
+
data.tar.gz: de36d6b37d3ebb209b8f056e84c1bea8e7a5957c1133589dd20d332e52e082b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 877bbae3534c495be6e95142dd2d5722f0c54b7eb90142845e6a269764701553ff3b0d312e444bf3f78618f3ef7dd5f5cb076c7281f045f1dbf7162bb8262a97
|
|
7
|
+
data.tar.gz: 17142a55dcdb14f9b59de8c216be1e326e82a66892ab13cc44778f66c38c33a26432d426c75f4aeb63fe7885a19d42f3f0530a6039ca45b116a658f555754c95
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [1.17.0] - 2019-09-21
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Add Rails 6 support for Mongoid adapter - @unused
|
|
11
|
+
|
|
6
12
|
## [1.16.0] - 2019-08-20
|
|
7
13
|
|
|
8
14
|
### Added
|
|
@@ -278,7 +284,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
278
284
|
This [gist][gist] did refactor the Jose Valim's code into an `ActiveSupport::Concern`.
|
|
279
285
|
|
|
280
286
|
[gist]: https://gist.github.com/gonzalo-bulnes/7659739
|
|
281
|
-
[Unreleased]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.
|
|
287
|
+
[Unreleased]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.17.0...master
|
|
288
|
+
[1.17.0]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.16.0...v1.17.0
|
|
282
289
|
[1.16.0]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.15.1...v1.16.0
|
|
283
290
|
[1.15.1]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.15.0...v1.15.1
|
|
284
291
|
[1.15.0]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.14.0...v1.15.0
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
ActiveModel::Serializers.const_defined?('Xml')
|
|
4
|
-
# As far as I know Mongoid doesn't support Rails 6
|
|
5
|
-
# Please let me know if this isn't true when you read it!
|
|
1
|
+
require 'mongoid'
|
|
2
|
+
require 'simple_token_authentication/adapter'
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
module SimpleTokenAuthentication
|
|
5
|
+
module Adapters
|
|
6
|
+
class MongoidAdapter
|
|
7
|
+
extend SimpleTokenAuthentication::Adapter
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class MongoidAdapter
|
|
13
|
-
extend SimpleTokenAuthentication::Adapter
|
|
14
|
-
|
|
15
|
-
def self.base_class
|
|
16
|
-
::Mongoid::Document
|
|
17
|
-
end
|
|
9
|
+
def self.base_class
|
|
10
|
+
::Mongoid::Document
|
|
18
11
|
end
|
|
19
12
|
end
|
|
20
13
|
end
|
|
@@ -12,7 +12,7 @@ module SimpleTokenAuthentication
|
|
|
12
12
|
|
|
13
13
|
# Gemfile
|
|
14
14
|
|
|
15
|
-
gem 'mongoid', '~>
|
|
15
|
+
gem 'mongoid', '~> 7.0.5' # for example
|
|
16
16
|
gem 'simple_token_authentication', '~> 1.0'
|
|
17
17
|
|
|
18
18
|
See https://github.com/gonzalo-bulnes/simple_token_authentication/issues/158
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
ActiveModel.const_defined?('Serializers') &&
|
|
3
|
-
ActiveModel::Serializers.const_defined?('Xml')
|
|
4
|
-
# As far as I know Mongoid doesn't support Rails 6
|
|
5
|
-
# Please let me know if this isn't true when you read it!
|
|
6
|
-
|
|
7
|
-
require 'spec_helper'
|
|
1
|
+
require 'spec_helper'
|
|
8
2
|
require 'simple_token_authentication/adapters/mongoid_adapter'
|
|
9
3
|
|
|
10
|
-
|
|
4
|
+
describe 'SimpleTokenAuthentication::Adapters::MongoidAdapter' do
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
before(:each) do
|
|
7
|
+
stub_const('Mongoid', Module.new)
|
|
8
|
+
stub_const('Mongoid::Document', double())
|
|
15
9
|
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
@subject = SimpleTokenAuthentication::Adapters::MongoidAdapter
|
|
11
|
+
end
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
it_behaves_like 'an adapter'
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
describe '.base_class' do
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
end
|
|
17
|
+
it 'is Mongoid::Document', private: true do
|
|
18
|
+
expect(@subject.base_class).to eq Mongoid::Document
|
|
26
19
|
end
|
|
27
20
|
end
|
|
28
21
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_token_authentication
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gonzalo Bulnes Guilpain
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionmailer
|
|
@@ -127,7 +127,7 @@ dependencies:
|
|
|
127
127
|
version: 3.1.0
|
|
128
128
|
- - "<"
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '
|
|
130
|
+
version: '8'
|
|
131
131
|
type: :development
|
|
132
132
|
prerelease: false
|
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -137,7 +137,7 @@ dependencies:
|
|
|
137
137
|
version: 3.1.0
|
|
138
138
|
- - "<"
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
|
-
version: '
|
|
140
|
+
version: '8'
|
|
141
141
|
- !ruby/object:Gem::Dependency
|
|
142
142
|
name: appraisal
|
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|