oa-vkontakte 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Oa
2
2
  module Vkontakte
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -5,6 +5,7 @@ module OmniAuth
5
5
  class Configuration
6
6
  attr_accessor :vkontakte_app_id
7
7
  attr_accessor :vkontakte_app_key
8
+ attr_accessor :vkontakte_params
8
9
  end
9
10
  end
10
11
 
@@ -14,10 +15,11 @@ module OmniAuth
14
15
  include OmniAuth::Strategy
15
16
  include ViewHelper::PageHelper
16
17
 
17
- def initialize(app, app_id, app_key, options = {})
18
- @options = options
18
+ # Про права приложения можно узнать здесь: http://vkontakte.ru/developers.php?o=-1&p=%D0%9F%D1%80%D0%B0%D0%B2%D0%B0+%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B9
19
+ def initialize(app, app_id, app_key, params = {:permissions => '1'})
19
20
  OmniAuth.config.vkontakte_app_id = app_id
20
21
  OmniAuth.config.vkontakte_app_key = app_key
22
+ OmniAuth.config.vkontakte_params = params
21
23
  super(app, :vkontakte)
22
24
  end
23
25
 
@@ -40,7 +40,7 @@ HEADER
40
40
  };
41
41
  vkLogin = {
42
42
  doLogin: function() {
43
- VK.Auth.login(vkLogin.loginResult);
43
+ VK.Auth.login(vkLogin.loginResult, '#{OmniAuth.config.vkontakte_params[:permissions]}');
44
44
  },
45
45
  redirectWithPost: function(url, data) {
46
46
  data = data || {};
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: oa-vkontakte
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nick Recobra
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-06 00:00:00 +03:00
13
+ date: 2011-03-26 23:00:00 +03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency