omniauth-mapsme 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: 2ed0d42ea8af07ed220f298ec328ea454c8ff61c
4
- data.tar.gz: c15023e615228a0739ad409e977e68e66426d02a
3
+ metadata.gz: 8bf188cbd8ce5954c90fe16ab1c73ae8f70f8eda
4
+ data.tar.gz: 0686d890cb7c6d6085f1c83c0e9c695559158909
5
5
  SHA512:
6
- metadata.gz: e91c9979a8937f4a2cdc3beab3d61f442f447d9686c715cca7c35c9b8170e0cd40dd1d3e23d180af45e6e3efe984ef42038ccd4201c47b34d6784e8d3010c63e
7
- data.tar.gz: 2c997dcc67a3a8e3ebe6a507a500d3d17a974c49608f5926293272bf89b02e799317ccdb7b41c0913f04efb8f006d806f63a278c22c154ca84edef1cdf93ec19
6
+ metadata.gz: bbfd385d2d3b2885cb205b3be5c4f484d387d5694d0f4a7ae5f8ec13104e7b564e8f605666711cee4c82d0bede32c587fb861f1fb7a88f06c8585d8994aa1b32
7
+ data.tar.gz: 61626badcbf0f1b5719a348431044e09c35e5c0ecc50c008f322a97da28462840ba90e65f225f041cfd7a68b3fbdb56e0377c04a72de19bb2bc8e80544c6a5ca
@@ -1,6 +1,6 @@
1
1
  module OmniAuth
2
2
  module MapsMe
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
 
6
6
  module MapsMeToken
@@ -95,6 +95,22 @@ module OmniAuth
95
95
  fail!(:failed_to_connect, e)
96
96
  end
97
97
 
98
+ def mock_callback_call
99
+ # Copying the parent implementation just so we can replace the provider name
100
+ setup_phase
101
+ @env['omniauth.origin'] = session.delete('omniauth.origin')
102
+ @env['omniauth.origin'] = nil if env['omniauth.origin'] == ''
103
+ mocked_auth = OmniAuth.mock_auth_for(:mapsme)
104
+ if mocked_auth.is_a?(Symbol)
105
+ fail!(mocked_auth)
106
+ else
107
+ @env['omniauth.auth'] = mocked_auth
108
+ @env['omniauth.params'] = session.delete('omniauth.params') || {}
109
+ OmniAuth.config.before_callback_phase.call(@env) if OmniAuth.config.before_callback_phase
110
+ call_app!
111
+ end
112
+ end
113
+
98
114
  protected
99
115
 
100
116
  def deep_symbolize(hash)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-mapsme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Zverev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-09 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth