micro_vkontakte 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -2
- data/Rakefile +1 -1
- data/lib/micro_vkontakte/session.rb +2 -1
- data/lib/omniauth/strategies/vkontakte/view_helper.rb +26 -1
- data/micro_vkontakte.gemspec +3 -3
- metadata +3 -18
data/CHANGELOG
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
v0.1.
|
1
|
+
v0.1.7 added vk login page
|
2
2
|
v0.1.5 updated vk api version
|
3
3
|
v0.1.4 updated error info
|
4
4
|
v0.1.3 updated error info
|
@@ -14,4 +14,4 @@ v0.0.5 bug fixes
|
|
14
14
|
v0.0.4 bug fixes
|
15
15
|
v0.0.3 bug fixes
|
16
16
|
v0.0.2 second release
|
17
|
-
v0.0.1 first release
|
17
|
+
v0.0.1 first release
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('micro_vkontakte', '0.1.
|
5
|
+
Echoe.new('micro_vkontakte', '0.1.7') do |p|
|
6
6
|
p.description = "Vkontakte api tools."
|
7
7
|
p.url = "http://github.com/gvalmon/micro_vkontakte"
|
8
8
|
p.author = "Iskander Haziev"
|
@@ -21,7 +21,8 @@ module MicroVkontakte
|
|
21
21
|
params[:method] = @prefix ? "#{@prefix}.#{method}" : method
|
22
22
|
params[:api_id] = app_id
|
23
23
|
params[:format] = 'json'
|
24
|
-
params[:v] = '
|
24
|
+
params[:v] = '3.0'
|
25
|
+
params[:timestamp] = Time.now.to_i
|
25
26
|
params[:sig] = sig(params.stringify_keys)
|
26
27
|
response = JSON.parse(Net::HTTP.post_form(URI.parse(VK_API_URL), params).body)
|
27
28
|
if response['error']
|
@@ -3,7 +3,25 @@ module OmniAuth
|
|
3
3
|
module Strategies
|
4
4
|
class Vkontakte
|
5
5
|
class ViewHelper
|
6
|
-
module PageHelper
|
6
|
+
module PageHelper
|
7
|
+
def vkontakte_login_page
|
8
|
+
vkontakte_header +
|
9
|
+
vkontakte_login_button +
|
10
|
+
vkontakte_footer
|
11
|
+
end
|
12
|
+
|
13
|
+
def vkontakte_header
|
14
|
+
<<-HEADER
|
15
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
16
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
17
|
+
<head>
|
18
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
19
|
+
<title>Вход во ВКонтакте</title>
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
HEADER
|
23
|
+
end
|
24
|
+
|
7
25
|
def vkontakte_login_button
|
8
26
|
<<-BUTTON
|
9
27
|
<a href="#" id="vk_login">
|
@@ -103,6 +121,13 @@ module OmniAuth
|
|
103
121
|
</script>
|
104
122
|
BUTTON
|
105
123
|
end
|
124
|
+
|
125
|
+
def vkontakte_footer
|
126
|
+
<<-FOOTER
|
127
|
+
</body></html>
|
128
|
+
FOOTER
|
129
|
+
end
|
130
|
+
|
106
131
|
end
|
107
132
|
end
|
108
133
|
end
|
data/micro_vkontakte.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{micro_vkontakte}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.7"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Iskander Haziev"]
|
9
|
-
s.date = %q{2011-03-
|
9
|
+
s.date = %q{2011-03-18}
|
10
10
|
s.description = %q{Vkontakte api tools.}
|
11
11
|
s.email = %q{gvalmon@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/micro_vkontakte.rb", "lib/micro_vkontakte/base.rb", "lib/micro_vkontakte/session.rb", "lib/omniauth/strategies/vkontakte.rb", "lib/omniauth/strategies/vkontakte/view_helper.rb", "lib/omniauth/vkontakte.rb"]
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Micro_vkontakte", "--main", "README"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = %q{micro_vkontakte}
|
18
|
-
s.rubygems_version = %q{1.
|
18
|
+
s.rubygems_version = %q{1.6.2}
|
19
19
|
s.summary = %q{Vkontakte api tools.}
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micro_vkontakte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 23
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 6
|
10
|
-
version: 0.1.6
|
5
|
+
version: 0.1.7
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Iskander Haziev
|
@@ -15,7 +10,7 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-18 00:00:00 +03:00
|
19
14
|
default_executable:
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
@@ -26,9 +21,6 @@ dependencies:
|
|
26
21
|
requirements:
|
27
22
|
- - ">="
|
28
23
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
24
|
version: "0"
|
33
25
|
type: :runtime
|
34
26
|
version_requirements: *id001
|
@@ -81,24 +73,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
73
|
requirements:
|
82
74
|
- - ">="
|
83
75
|
- !ruby/object:Gem::Version
|
84
|
-
hash: 3
|
85
|
-
segments:
|
86
|
-
- 0
|
87
76
|
version: "0"
|
88
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
78
|
none: false
|
90
79
|
requirements:
|
91
80
|
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
|
-
hash: 11
|
94
|
-
segments:
|
95
|
-
- 1
|
96
|
-
- 2
|
97
82
|
version: "1.2"
|
98
83
|
requirements: []
|
99
84
|
|
100
85
|
rubyforge_project: micro_vkontakte
|
101
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.6.2
|
102
87
|
signing_key:
|
103
88
|
specification_version: 3
|
104
89
|
summary: Vkontakte api tools.
|