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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e06373ee4e154f6e293faa83da80796505da615
4
- data.tar.gz: 0797f013d01ae1cd9612ccd50a90b68a9eaea100
3
+ metadata.gz: 1bbb5ebfe457fb2b2fa3c01baabc9fb69d6042fc
4
+ data.tar.gz: 21bc7b86af4c1e5a6747b1cef1ca3de5f01849db
5
5
  SHA512:
6
- metadata.gz: eec29dc7c8c85f5e3503291e4f3ca4b5eff0a2f1f95642b439ae37e76f8692819b816a332cb8cef33fc9850e29725f42ebab2a440fcb79468668643851999a2d
7
- data.tar.gz: 7214c811616d5906607adcfd3b65638d60b7b3ee6c42d34f78a244f67b1b04376d77f0e0d10d7573540a2c908f1b305c1857dbfcadffed06c7dd0c2826356a2a
6
+ metadata.gz: 5dea88602f662ea0ca3f13807e1047970fd5778ba49149a9474a7c9259f9ce2932c56f34c93c43bee1b09508c0ca10cb31b3118b233af01e90db64bb5313ad05
7
+ data.tar.gz: b5424f4bfb1e0aa035e5918cd75af5f991b62d0ad9f7978d8ccb1d672055b996c441c901d1e616a008d35deb938d4520f61c60632114e0c0b785f6381285b655
@@ -1,9 +1,14 @@
1
1
  language: ruby
2
- cache: bundler
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
- - 2.0.0
6
- - 2.1.8
7
- - 2.2.4
8
- - 2.3.0
9
- - jruby
14
+ - jruby-19mode
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'rake'
6
+ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '>= 2.0'
6
7
 
7
8
  group :test do
8
9
  gem 'rspec', '~> 3.2'
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
- ## Basic Usage
11
+ ## Installing
12
+
13
+ Add to your `Gemfile`:
12
14
 
13
15
  ```ruby
14
- use OmniAuth::Builder do
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 2.3
92
- - MRI 2.2
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-2016 Anton Maminov
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
 
@@ -0,0 +1,2 @@
1
+ export VKONTAKTE_KEY=""
2
+ export VKONTAKTE_SECRET=""
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'sinatra'
4
+ gem 'puma'
4
5
  gem 'omniauth-vkontakte', :path => '../'
@@ -0,0 +1,11 @@
1
+ Install the puma-dev (https://github.com/puma/puma-dev)
2
+
3
+ Create links to `examples` directories into your puma-dev directory (`~/.puma-dev`):
4
+
5
+ Load environment variables from `.env`
6
+
7
+ Start server:
8
+
9
+ ```
10
+ puma-dev -sysbind -debug
11
+ ```
@@ -0,0 +1,4 @@
1
+ require 'bundler/setup'
2
+ require_relative 'main'
3
+
4
+ run Sinatra::Application
@@ -1,11 +1,10 @@
1
- require 'rubygems'
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
- :scope => SCOPE,
17
- :display => 'mobile',
18
- :lang => 'en',
19
- :image_size => 'original'
15
+ scope: SCOPE,
16
+ display: 'web',
17
+ lang: 'en',
18
+ image_size: 'original'
20
19
  }
21
20
  end
22
21
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Vkontakte
3
- VERSION = "1.3.7"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  end
@@ -14,5 +14,5 @@ Gem::Specification.new do |gem|
14
14
  gem.require_paths = ["lib"]
15
15
  gem.version = OmniAuth::Vkontakte::VERSION
16
16
 
17
- gem.add_dependency 'omniauth-oauth2', '~> 1.1'
17
+ gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.2'
18
18
  end
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.3.7
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: 2016-06-04 00:00:00.000000000 Z
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.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.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/sinatra.rb
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.1
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