simple_token_authentication 1.18.0 → 1.18.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cce55a8f3ec6efaf7b97a87960e9dd26fb99f772cc7f4ac4dc8d88ded9cfbba2
4
- data.tar.gz: 819f681fcd4cc4865e4451726bd751ded237cfed929f8a552afd37a6dc66fd73
3
+ metadata.gz: a6aca3b41664f8049ffe17c95b1c89c8664cfb5d5f98e352a4bf45e634a3d583
4
+ data.tar.gz: fb1df872ad44fe0cd0f8f7153893d484173f33103d16aa3c607167be042eeaa3
5
5
  SHA512:
6
- metadata.gz: fec02f6a88f35b138bac9d8d0687f03745ce448f8ad0d66c02261af8999c0cf6cdcc82a3a2b4130eea4cb646121c1049361ccdf1cde965870e90a47326875df6
7
- data.tar.gz: 4f4b5db1dbd67282b31dcd22a8c38039a7901450fa3df49456eca0edb1a789f6df590472c8de8a76e4ff164bfa51e2a4f11c5915c1dfc478540923ffb6d06f11
6
+ metadata.gz: 43aa19854353c443d99d7050ec6899b054b0267c51d5163fdce9a932ee897f490ab91b159baa33f848f2178721666168e34a044223aec8964795dcd3d132319f
7
+ data.tar.gz: 0d5f1c666e52098abdaed64233d3d32aa8e8759c8ef0d853e53504648a7e4799215865f63cf53cd5df81e1f6a8da73d56aeddd0511c77cebac0f58c9d1371a36
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.18.1] - 2023-01-03
7
+
8
+ ### Fixed
9
+
10
+ - Fix a regression introduced by #402, that caused hooks not to be invoked - @dmke
11
+
6
12
  ## [1.18.0] - 2022-12-27
7
13
 
8
14
  ### Added
@@ -294,7 +300,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
294
300
  This [gist][gist] did refactor the Jose Valim's code into an `ActiveSupport::Concern`.
295
301
 
296
302
  [gist]: https://gist.github.com/gonzalo-bulnes/7659739
297
- [Unreleased]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.18.0...master
303
+ [Unreleased]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.18.1...master
304
+ [1.18.1]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.18.0...v1.18.1
298
305
  [1.18.0]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.17.0...v1.18.0
299
306
  [1.17.0]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.16.0...v1.17.0
300
307
  [1.16.0]: https://github.com/gonzalo-bulnes/simple_token_authentication/compare/v1.15.1...v1.16.0
@@ -32,7 +32,7 @@ module SimpleTokenAuthentication
32
32
 
33
33
  if token_correct?(record, entity, token_comparator)
34
34
  perform_sign_in!(record, sign_in_handler)
35
- after_successful_token_authentication if respond_to?(:after_successful_token_authentication)
35
+ after_successful_token_authentication if respond_to?(:after_successful_token_authentication, true)
36
36
  end
37
37
  end
38
38
 
@@ -1,3 +1,3 @@
1
1
  module SimpleTokenAuthentication
2
- VERSION = "1.18.0".freeze
2
+ VERSION = "1.18.1".freeze
3
3
  end
@@ -736,6 +736,21 @@ describe 'Any class which includes SimpleTokenAuthentication::TokenAuthenticatio
736
736
  expect(token_authentication_handler).to have_received(:after_successful_token_authentication).once
737
737
  end
738
738
  end
739
+
740
+ context 'when the handler implements a private :after_successful_token_authentication', protected: true do
741
+ before(:each) do
742
+ token_authentication_handler.singleton_class.send(:include, Module.new {
743
+ def after_successful_token_authentication; end
744
+ private :after_successful_token_authentication
745
+ })
746
+ allow(token_authentication_handler).to receive(:after_successful_token_authentication)
747
+ end
748
+
749
+ it 'calls the :after_successful_token_authentication hook' do
750
+ token_authentication_handler.send(:authenticate_entity_from_token!, double)
751
+ expect(token_authentication_handler).to have_received(:after_successful_token_authentication).once
752
+ end
753
+ end
739
754
  end
740
755
  end
741
756
  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.18.0
4
+ version: 1.18.1
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: 2022-12-27 00:00:00.000000000 Z
11
+ date: 2023-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer