omniauth-vkontakte 1.3.7 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -6
- data/Gemfile +1 -0
- data/README.md +23 -9
- data/examples/.env.example +2 -0
- data/examples/Gemfile +1 -0
- data/examples/README.md +11 -0
- data/examples/config.ru +4 -0
- data/examples/{sinatra.rb → main.rb} +7 -8
- data/lib/omniauth-vkontakte/version.rb +1 -1
- data/omniauth-vkontakte.gemspec +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bbb5ebfe457fb2b2fa3c01baabc9fb69d6042fc
|
4
|
+
data.tar.gz: 21bc7b86af4c1e5a6747b1cef1ca3de5f01849db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dea88602f662ea0ca3f13807e1047970fd5778ba49149a9474a7c9259f9ce2932c56f34c93c43bee1b09508c0ca10cb31b3118b233af01e90db64bb5313ad05
|
7
|
+
data.tar.gz: b5424f4bfb1e0aa035e5918cd75af5f991b62d0ad9f7978d8ccb1d672055b996c441c901d1e616a008d35deb938d4520f61c60632114e0c0b785f6381285b655
|
data/.travis.yml
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
language: ruby
|
2
|
-
|
2
|
+
before_install:
|
3
|
+
- gem update bundler
|
4
|
+
- bundle --version
|
5
|
+
- gem update --system
|
6
|
+
- gem --version
|
3
7
|
rvm:
|
8
|
+
- 2.4.0
|
9
|
+
- 2.3.1
|
10
|
+
- 2.2.6
|
11
|
+
- 2.1
|
12
|
+
- 2.0
|
4
13
|
- 1.9.3
|
5
|
-
-
|
6
|
-
- 2.1.8
|
7
|
-
- 2.2.4
|
8
|
-
- 2.3.0
|
9
|
-
- jruby
|
14
|
+
- jruby-19mode
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -8,15 +8,33 @@ This is the unofficial [OmniAuth](https://github.com/intridea/omniauth) strategy
|
|
8
8
|
To use it, you'll need to sign up for an OAuth2 Application ID and Secret
|
9
9
|
on the [Vkontakte Developers Page](http://vk.com/dev).
|
10
10
|
|
11
|
-
##
|
11
|
+
## Installing
|
12
|
+
|
13
|
+
Add to your `Gemfile`:
|
12
14
|
|
13
15
|
```ruby
|
14
|
-
|
16
|
+
gem 'omniauth-vkontakte'
|
17
|
+
```
|
18
|
+
|
19
|
+
Then `bundle install`
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
`OmniAuth::Strategies::Vkontakte` is simply a Rack middleware.
|
24
|
+
|
25
|
+
Here's a quick example, adding the middleware to a Rails app in `config/initializers/omniauth.rb`:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
15
29
|
provider :vkontakte, ENV['API_KEY'], ENV['API_SECRET']
|
16
30
|
end
|
17
31
|
```
|
18
32
|
|
33
|
+
[See the example Sinatra app](https://github.com/mamantoha/omniauth-vkontakte/blob/master/examples/main.rb).
|
34
|
+
|
35
|
+
|
19
36
|
## Configuring
|
37
|
+
|
20
38
|
You can configure several options, which you pass in to the `provider` method via a `Hash`:
|
21
39
|
|
22
40
|
* `scope`: a comma-separated list of access permissions you want to request from the user. [Read the Vkontakte docs for more details](http://vk.com/dev/permissions)
|
@@ -88,12 +106,8 @@ The precise information available may depend on the permissions which you reques
|
|
88
106
|
|
89
107
|
Tested with the following Ruby versions:
|
90
108
|
|
91
|
-
- MRI
|
92
|
-
-
|
93
|
-
- MRI 2.1
|
94
|
-
- MRI 2.0
|
95
|
-
- MRI 1.9.3
|
96
|
-
- JRUBY 1.x
|
109
|
+
- Ruby MRI (1.9.3+)
|
110
|
+
- JRuby (1.9 mode)
|
97
111
|
|
98
112
|
## Contributing to omniauth-vkontakte
|
99
113
|
|
@@ -101,7 +115,7 @@ Tested with the following Ruby versions:
|
|
101
115
|
|
102
116
|
## License
|
103
117
|
|
104
|
-
Copyright (c) 2011-
|
118
|
+
Copyright (c) 2011-2017 Anton Maminov
|
105
119
|
|
106
120
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
107
121
|
|
data/examples/Gemfile
CHANGED
data/examples/README.md
ADDED
data/examples/config.ru
ADDED
@@ -1,11 +1,10 @@
|
|
1
|
-
require '
|
2
|
-
require 'bundler'
|
3
|
-
|
4
|
-
Bundler.setup :default, :development, :example
|
1
|
+
require 'pp'
|
5
2
|
require 'sinatra'
|
6
3
|
require 'omniauth'
|
7
4
|
require 'omniauth-vkontakte'
|
8
5
|
|
6
|
+
configure { set :server, :puma }
|
7
|
+
|
9
8
|
SCOPE = 'friends,audio'
|
10
9
|
|
11
10
|
use Rack::Session::Cookie
|
@@ -13,10 +12,10 @@ use Rack::Session::Cookie
|
|
13
12
|
use OmniAuth::Builder do
|
14
13
|
provider :vkontakte, ENV['VKONTAKTE_KEY'], ENV['VKONTAKTE_SECRET']
|
15
14
|
{
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
15
|
+
scope: SCOPE,
|
16
|
+
display: 'web',
|
17
|
+
lang: 'en',
|
18
|
+
image_size: 'original'
|
20
19
|
}
|
21
20
|
end
|
22
21
|
|
data/omniauth-vkontakte.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-vkontakte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Maminov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.2'
|
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
|
-
version: '1.
|
26
|
+
version: '1.2'
|
27
27
|
description: Unofficial VKontakte strategy for OmniAuth 1.0
|
28
28
|
email:
|
29
29
|
- anton.linux@gmail.com
|
@@ -37,8 +37,11 @@ files:
|
|
37
37
|
- Gemfile
|
38
38
|
- README.md
|
39
39
|
- Rakefile
|
40
|
+
- examples/.env.example
|
40
41
|
- examples/Gemfile
|
41
|
-
- examples/
|
42
|
+
- examples/README.md
|
43
|
+
- examples/config.ru
|
44
|
+
- examples/main.rb
|
42
45
|
- lib/omniauth-vkontakte.rb
|
43
46
|
- lib/omniauth-vkontakte/version.rb
|
44
47
|
- lib/omniauth/strategies/vkontakte.rb
|
@@ -64,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
67
|
version: '0'
|
65
68
|
requirements: []
|
66
69
|
rubyforge_project:
|
67
|
-
rubygems_version: 2.5.
|
70
|
+
rubygems_version: 2.5.2
|
68
71
|
signing_key:
|
69
72
|
specification_version: 4
|
70
73
|
summary: Unofficial VKontakte strategy for OmniAuth 1.0
|