omniauth-esia 0.2.0 → 0.2.1

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: c942e17554438b69bd1b85bfe9c399d5ce78ccac
4
- data.tar.gz: e67083b533784a0b0fab5039b62ce9cec85fc842
3
+ metadata.gz: 27a6367077f11dfc155f198a8e0e166c906ca957
4
+ data.tar.gz: 3862ac1987083bb9fc208abb5e62f3edafa0231c
5
5
  SHA512:
6
- metadata.gz: 85858aeb14e15770f013767b457ff58a13f9465f43d5c72f10c05d98647d4d4f917ff395ab5630abae61faeb22af3fc3559c16e0dab465beec94a75a5453bb2c
7
- data.tar.gz: 22ba386eeaaf0e531717cc3892526c0b54a64eeb576ad3fecde6346bb179e78175ce77642b6ab6ed76dbfc35a28039fd86c05e70fd72099d82638fb40487b131
6
+ metadata.gz: 471ed5c534c3a08bd620dee2ad975d7465f4500fd79dbc29089cfbd3bbd6a53e2b6c83a3cd90ac43f8a26522c68c9be03ecbd089f296f6a98a4e8aa4d94b1cf9
7
+ data.tar.gz: cea679fc3fac72581a90bbf815eb46240e91bbc4df96c9974a465d1cefc209b580a1ff063aac8ff9463907feb725c8b3f51bd2a65a15ac6d46a383130b131b24
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-esia (0.2.0)
4
+ omniauth-esia (0.2.1)
5
5
  omniauth-oauth2 (~> 1.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -71,7 +71,7 @@ client_options: {
71
71
  }
72
72
  ```
73
73
  ## Changes
74
-
74
+ v 0.2.1 - corrects email fetching
75
75
  v 0.2.0 - corrects namespacing
76
76
  v 0.1.0 - first release
77
77
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Esia
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
@@ -86,10 +86,11 @@ module OmniAuth
86
86
  end
87
87
 
88
88
  def get_email
89
- {'email' => access_token
89
+ { 'email' => access_token
90
90
  .get("/rs/prns/#{uid}/ctts?embed=(elements)")
91
91
  .parsed.fetch('elements', {})
92
- .first.fetch('value', '') }
92
+ .find { |e| e['type'] == 'EML' }
93
+ .fetch('value') }
93
94
  rescue => e
94
95
  {}
95
96
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-esia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elsant
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-12 00:00:00.000000000 Z
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2