oa-vkontakte 0.1.2 → 0.1.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.
data/README.rdoc CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  <%= vkontakte_login_button %>
22
22
 
23
- Также кнопка доступна по адресу /auth/vkontakte. Можно пропробовать встроить её как iframe.
23
+ Также кнопка доступна по адресу /auth/vkontakte, но форма там передается GET-запросом. Можно пропробовать встроить её как iframe.
24
24
 
25
25
  После клика на кнопку и разрешения добавления приложения, будет совершен POST-запрос на /auth/vkontakte/callback.
26
26
  В action, к которому будет привязан этот путь, будет доступна переменная
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  module OmniAuth
2
3
  module Strategies
3
4
  class VkontakteOpenApi
@@ -37,12 +38,14 @@ HEADER
37
38
  VK.Auth.login(vkLogin.loginResult);
38
39
  },
39
40
  redirectWithPost: function(url, data) {
40
- method = "POST";
41
41
  data = data || {};
42
+ #{ respond_to?(:request_forgery_protection_token) && respond_to?(:form_authenticity_token) ?
43
+ "data['#{request_forgery_protection_token}'] = '#{form_authenticity_token}'; var method = 'POST';" :
44
+ "var method = 'GET';" }
42
45
  var form = document.createElement("form"),
43
46
  input;
44
47
  form.setAttribute("action", url);
45
- form.setAttribute("method", "POST");
48
+ form.setAttribute("method", method);
46
49
 
47
50
  for (var property in data) {
48
51
  if (data.hasOwnProperty(property)) {
data/oa-vkontakte.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{oa-vkontakte}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Recobra"]
12
- s.date = %q{2010-10-19}
12
+ s.date = %q{2010-10-20}
13
13
  s.description = %q{OmniAuth extension for vkontakte.ru authentication}
14
14
  s.email = %q{oruenu@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oa-vkontakte
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nick Recobra
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-19 00:00:00 +04:00
18
+ date: 2010-10-20 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency