omniauth-vkontakte 1.3.1 → 1.3.2

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
  SHA1:
3
- metadata.gz: ef1874496560d9ff3b43fb2c80a78790d204b41d
4
- data.tar.gz: df6dc4e266969c9c14b559206b35b11fb161f8b0
3
+ metadata.gz: 1d146ea5e9de54fe538402b57e34360e638d2e93
4
+ data.tar.gz: e04cebda94757717d58d3e2272eb9d3dea863264
5
5
  SHA512:
6
- metadata.gz: 09ccbe1b867711010f1aecb57ede46f07945c0ee619cc3355972be37f489c7f2caf53ce52e72e9aebb1fc6af5cd25d531bcf070165558430027b8ca63461b5c4
7
- data.tar.gz: 19278f224eeabe70370e7fc90d249e029b54eb58913d407266ad5dbe1e1e3b447d04fa21aeb5fa17f14df5231f7924e88989daa57c01775a521b37cb7f34c101
6
+ metadata.gz: ed7f184363b36bcbeb6312f5b6ccbebc92642daba58f2d65d547720c0ba64c541fbbe97fbe39add548ae4bd865ecf2e7fefc91cae75c8e0dab8a4c2e44a6cbff
7
+ data.tar.gz: e421e08da0e95a5f94dea7c2f0bd57ce70f035ff92d23329913f5e2be5dd9ea7cb83798c25585b95703c1171a98fa69b88d7a321e1be4f77fb7f285bc1843d46
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Vkontakte
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
@@ -13,7 +13,10 @@ module OmniAuth
13
13
  # use OmniAuth::Strategies::Vkontakte, 'API Key', 'Secret Key'
14
14
  #
15
15
  class Vkontakte < OmniAuth::Strategies::OAuth2
16
+ class NoRawData < StandardError; end
17
+
16
18
  API_VERSION = '5.2'
19
+
17
20
  DEFAULT_SCOPE = ''
18
21
 
19
22
  option :name, 'vkontakte'
@@ -60,7 +63,9 @@ module OmniAuth
60
63
  }
61
64
 
62
65
  result = access_token.get('/method/users.get', :params => params).parsed["response"]
63
- (result && result.first) ? result.first : nil
66
+
67
+ raise NoRawData, result unless (result.is_a?(Array) and result.first)
68
+ result.first
64
69
  end
65
70
  end
66
71
 
@@ -145,6 +150,11 @@ module OmniAuth
145
150
  @location ||= [get_country, get_city].map(&:strip).reject(&:empty?).join(', ')
146
151
  end
147
152
 
153
+ def callback_phase
154
+ super
155
+ rescue NoRawData => e
156
+ fail!(:no_raw_data, e)
157
+ end
148
158
  end
149
159
  end
150
160
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-vkontakte
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Maminov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-15 00:00:00.000000000 Z
11
+ date: 2013-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: multi_json
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Unofficial VKontakte strategy for OmniAuth 1.0
@@ -76,17 +76,17 @@ require_paths:
76
76
  - lib
77
77
  required_ruby_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - '>='
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.0.3
89
+ rubygems_version: 2.1.11
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Unofficial VKontakte strategy for OmniAuth 1.0