omniauth-vkontakte 1.5.1 → 1.7.1

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
  SHA256:
3
- metadata.gz: 97a799d1a663fd5b32fbb1b5ed00385314955ff3d8af788d37b8949c99402b95
4
- data.tar.gz: dc69884b28a8fce16bb73ec4d06bdf9c63314fba54386ce22d503ce13b097003
3
+ metadata.gz: f5e77d3608f8ffe151363232409686cd04951f3ad82892d5452e82e649976e96
4
+ data.tar.gz: ac475f089c5aeaa54a010f80342cb540182a9aa08303a4aa99b12e6665c1d07a
5
5
  SHA512:
6
- metadata.gz: 619795bc0590021e0fde0044ed06bd8500740f133f68180c53525859863f505cf035e130e958723eb07ed838cc4b1132fdd875e6b97296d28d847a3bea2b9628
7
- data.tar.gz: e7eab5866e9bf03eb1b071a65b603d6adfcb1e421401712ef02b5537618721446d9380ffa45c527ee332bc9241c8e2faa360880a5e3cfe70a983987e04e3b130
6
+ metadata.gz: e5fddd2cc46e35fb4b26e711ed95b629bdb68aef390f9c6c4eb83d541321496afd8fe8951613ab666a4ac827a58855f64354293edee6936c465b4e0e68f3f4ba
7
+ data.tar.gz: 9f1a3be96a75531a5c2d854bd5b88d99142783a23d6e06eab06fa0ab9ddf3ff3d4288ce7d1af64da9bee05159339593d05c6ee7c2710e4e2a06e12fe151f820c
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "daily"
@@ -0,0 +1,22 @@
1
+ name: Ruby
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: build (${{ matrix.ruby }} / ${{ matrix.os }})
8
+ strategy:
9
+ matrix:
10
+ ruby: [2.5, 2.6, 2.7, 3.0, head, jruby, jruby-head]
11
+ os: [ubuntu-latest, macos-latest]
12
+ runs-on: ${{ matrix.os }}
13
+ steps:
14
+ - uses: actions/checkout@master
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ - name: Install dependencies
20
+ run: bundle install
21
+ - name: Run test
22
+ run: rspec
data/.rubocop.yml CHANGED
@@ -1,8 +1,16 @@
1
- Metrics/LineLength:
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 2.5
4
+ Layout/LineLength:
2
5
  Max: 120
3
6
  Metrics/MethodLength:
4
7
  Enabled: false
5
8
  Metrics/BlockLength:
6
9
  Enabled: false
7
-
8
-
10
+ Metrics/ClassLength:
11
+ Max: 101
12
+ Lint/DuplicateBranch:
13
+ Enabled: false
14
+ Naming/FileName:
15
+ Exclude:
16
+ - 'lib/omniauth-vkontakte.rb'
data/Gemfile CHANGED
@@ -1,16 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
4
6
 
5
- gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '>= 2.0'
6
- gem 'rake'
7
-
8
7
  group :development do
9
8
  gem 'rubocop', require: false
10
9
  end
11
10
 
12
11
  group :test do
13
- gem 'rack-test'
14
12
  gem 'rspec'
15
13
  gem 'simplecov'
16
14
  gem 'webmock'
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2011-2019 Anton Maminov
3
+ Copyright (c) 2011-2021 Anton Maminov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # OmniAuth VKontakte
2
2
 
3
+ ![Ruby](https://github.com/mamantoha/omniauth-vkontakte/workflows/Ruby/badge.svg)
3
4
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/149c0614deef469faa49e1e8ae384bd3)](https://app.codacy.com/app/mamantoha/omniauth-vkontakte?utm_source=github.com&utm_medium=referral&utm_content=mamantoha/omniauth-vkontakte&utm_campaign=Badge_Grade_Dashboard)
4
- [![Build Status](https://travis-ci.org/mamantoha/omniauth-vkontakte.svg?branch=master)](https://travis-ci.org/mamantoha/omniauth-vkontakte)
5
5
  [![Gem Version][rubygems_badge]][rubygems]
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/1ea61cb860f9f6aafb4f/maintainability)](https://codeclimate.com/github/mamantoha/omniauth-vkontakte/maintainability)
7
7
 
@@ -27,7 +27,7 @@ Here's a quick example, adding the middleware to a Rails app in `config/initiali
27
27
 
28
28
  ```ruby
29
29
  Rails.application.config.middleware.use OmniAuth::Builder do
30
- provider :vkontakte, ENV['API_KEY'], ENV['API_SECRET']
30
+ provider :vkontakte, ENV['VK_API_ID'], ENV['VK_API_SECRET']
31
31
  end
32
32
  ```
33
33
 
@@ -50,14 +50,12 @@ Here's an example of a possible configuration:
50
50
 
51
51
  ```ruby
52
52
  use OmniAuth::Builder do
53
- provider :vkontakte, ENV['API_KEY'], ENV['API_SECRET'],
54
- {
55
- :scope => 'friends,audio,photos',
56
- :display => 'popup',
57
- :lang => 'en',
58
- :https => 1,
59
- :image_size => 'original'
60
- }
53
+ provider :vkontakte, ENV['VKONTAKTE_KEY'], ENV['VKONTAKTE_SECRET'],
54
+ scope: 'friends,audio,photos',
55
+ display: 'popup',
56
+ lang: 'en',
57
+ https: 1,
58
+ image_size: 'original'
61
59
  end
62
60
  ```
63
61
 
@@ -105,8 +103,8 @@ The precise information available may depend on the permissions which you reques
105
103
 
106
104
  Tested with the following Ruby versions:
107
105
 
108
- - Ruby MRI (2.3.0+)
109
- - JRuby
106
+ - Ruby MRI (2.5.0+)
107
+ - JRuby (9.2.0+)
110
108
 
111
109
  ## Contributing to omniauth-vkontakte
112
110
 
@@ -114,7 +112,7 @@ Tested with the following Ruby versions:
114
112
 
115
113
  ## License
116
114
 
117
- Copyright: 2011-2019 Anton Maminov (anton.maminov@gmail.com)
115
+ Copyright: 2011-2021 Anton Maminov (anton.maminov@gmail.com)
118
116
 
119
117
  This library is distributed under the MIT license. Please see the LICENSE file.
120
118
 
data/examples/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gem 'omniauth-vkontakte', path: '../'
data/examples/config.ru CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/setup'
2
4
  require_relative 'main'
3
5
 
data/examples/main.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pp'
2
4
  require 'sinatra'
3
5
  require 'omniauth'
@@ -5,7 +7,7 @@ require 'omniauth-vkontakte'
5
7
 
6
8
  configure { set :server, :puma }
7
9
 
8
- SCOPE = 'friends,audio'.freeze
10
+ SCOPE = 'friends,audio'
9
11
 
10
12
  use Rack::Session::Cookie
11
13
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'omniauth/strategies/oauth2'
2
4
 
3
5
  module OmniAuth
@@ -13,9 +15,9 @@ module OmniAuth
13
15
  class Vkontakte < OmniAuth::Strategies::OAuth2
14
16
  class NoRawData < StandardError; end
15
17
 
16
- API_VERSION = '5.8'.freeze
18
+ API_VERSION = '5.107'
17
19
 
18
- DEFAULT_SCOPE = ''.freeze
20
+ DEFAULT_SCOPE = ''
19
21
 
20
22
  option :name, 'vkontakte'
21
23
 
@@ -56,13 +58,6 @@ module OmniAuth
56
58
  access_token.options[:mode] = :query
57
59
  access_token.options[:param_name] = :access_token
58
60
  @raw_info ||= begin
59
- params = {
60
- fields: info_options,
61
- lang: lang_option,
62
- https: https_option,
63
- v: API_VERSION
64
- }
65
-
66
61
  result = access_token.get('/method/users.get', params: params).parsed['response']
67
62
 
68
63
  raise NoRawData, result unless result.is_a?(Array) && result.first
@@ -95,6 +90,15 @@ module OmniAuth
95
90
 
96
91
  private
97
92
 
93
+ def params
94
+ {
95
+ fields: info_options,
96
+ lang: lang_option,
97
+ https: https_option,
98
+ v: API_VERSION
99
+ }
100
+ end
101
+
98
102
  def callback_url
99
103
  options.redirect_url || (full_host + script_name + callback_path)
100
104
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OmniAuth
2
4
  module Vkontakte
3
- VERSION = '1.5.1'.freeze
5
+ VERSION = '1.7.1'
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'omniauth/vkontakte/version'
2
4
  require 'omniauth'
3
5
 
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require File.expand_path('lib/omniauth/vkontakte/version', __dir__)
2
4
 
3
5
  Gem::Specification.new do |gem|
4
6
  gem.authors = ['Anton Maminov']
5
- gem.email = ['anton.linux@gmail.com']
7
+ gem.email = ['anton.maminov@gmail.com']
6
8
  gem.summary = 'Vkontakte OAuth2 Strategy for OmniAuth'
7
9
  gem.homepage = 'https://github.com/mamantoha/omniauth-vkontakte'
8
10
  gem.licenses = ['MIT']
@@ -13,6 +15,6 @@ Gem::Specification.new do |gem|
13
15
  gem.name = 'omniauth-vkontakte'
14
16
  gem.require_paths = ['lib']
15
17
  gem.version = OmniAuth::Vkontakte::VERSION
16
-
17
- gem.add_runtime_dependency 'omniauth-oauth2', ['>= 1.5', '<= 1.6']
18
+ gem.required_ruby_version = '>= 2.5.0'
19
+ gem.add_runtime_dependency 'omniauth-oauth2', '>= 1.5', '<= 1.7.3'
18
20
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe OmniAuth::Strategies::Vkontakte do
data/spec/spec_helper.rb CHANGED
@@ -1,16 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  $LOAD_PATH.unshift File.expand_path(__dir__)
2
4
  $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
3
5
  require 'simplecov'
4
6
  SimpleCov.start
5
7
  require 'rspec'
6
- require 'rack/test'
7
8
  require 'webmock/rspec'
8
9
  require 'omniauth'
9
10
  require 'omniauth-vkontakte'
10
11
 
11
12
  RSpec.configure do |config|
12
13
  config.include WebMock::API
13
- config.include Rack::Test::Methods
14
14
  config.extend OmniAuth::Test::StrategyMacros, type: :strategy
15
15
  config.expect_with :rspec do |c|
16
16
  c.syntax = :expect
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.5.1
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Maminov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-13 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1.5'
20
20
  - - "<="
21
21
  - !ruby/object:Gem::Version
22
- version: '1.6'
22
+ version: 1.7.3
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,22 +29,22 @@ dependencies:
29
29
  version: '1.5'
30
30
  - - "<="
31
31
  - !ruby/object:Gem::Version
32
- version: '1.6'
33
- description:
32
+ version: 1.7.3
33
+ description:
34
34
  email:
35
- - anton.linux@gmail.com
35
+ - anton.maminov@gmail.com
36
36
  executables: []
37
37
  extensions: []
38
38
  extra_rdoc_files: []
39
39
  files:
40
+ - ".github/dependabot.yml"
41
+ - ".github/workflows/ruby.yml"
40
42
  - ".gitignore"
41
43
  - ".rspec"
42
44
  - ".rubocop.yml"
43
- - ".travis.yml"
44
45
  - Gemfile
45
46
  - LICENSE
46
47
  - README.md
47
- - Rakefile
48
48
  - examples/.env.example
49
49
  - examples/Gemfile
50
50
  - examples/README.md
@@ -60,7 +60,7 @@ homepage: https://github.com/mamantoha/omniauth-vkontakte
60
60
  licenses:
61
61
  - MIT
62
62
  metadata: {}
63
- post_install_message:
63
+ post_install_message:
64
64
  rdoc_options: []
65
65
  require_paths:
66
66
  - lib
@@ -68,15 +68,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: '0'
71
+ version: 2.5.0
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.0.3
79
- signing_key:
78
+ rubygems_version: 3.2.32
79
+ signing_key:
80
80
  specification_version: 4
81
81
  summary: Vkontakte OAuth2 Strategy for OmniAuth
82
- test_files: []
82
+ test_files:
83
+ - spec/omniauth/strategies/vkontakte_spec.rb
84
+ - spec/spec_helper.rb
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- before_install:
2
- - gem update bundler
3
- - bundle --version
4
- - gem update --system
5
- - gem --version
6
- rvm:
7
- - 2.6.0
8
- - 2.5.3
9
- - 2.4.5
10
- - 2.3.8
11
- - jruby-head
data/Rakefile DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
- require 'rspec/core/rake_task'
4
-
5
- desc 'Run specs'
6
- RSpec::Core::RakeTask.new
7
-
8
- desc 'Default: run specs.'
9
- task default: :spec