From 4ff4af68977785786713627720f795ba0a913758 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Sat, 4 Nov 2023 02:57:18 +0100 Subject: [PATCH] Allow omniauth 2.0, specify user URL as https --- Gemfile.lock | 139 ++++++++++++++------------- lib/omniauth-ely/version.rb | 2 +- lib/omniauth/strategies/ely.rb | 2 +- omniauth-ely.gemspec | 2 +- spec/omniauth/strategies/ely_spec.rb | 2 +- 5 files changed, 78 insertions(+), 69 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ebd27a3..68c0663 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,36 +1,40 @@ PATH remote: . specs: - omniauth-ely (0.1.0) - omniauth (~> 1.0) + omniauth-ely (0.2.1) + omniauth (>= 1.0, < 3.0) omniauth-oauth2 (>= 1.1.1, < 2.0) GEM remote: http://rubygems.org/ specs: - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - coderay (1.1.2) - crack (0.4.3) - safe_yaml (~> 1.0.0) - diff-lcs (1.3) - docile (1.1.5) - faraday (0.12.2) - multipart-post (>= 1.2, < 3) - ffi (1.9.18) - formatador (0.2.5) + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) + base64 (0.1.1) + coderay (1.1.3) + crack (0.4.5) + rexml + diff-lcs (1.5.0) + docile (1.4.0) + faraday (2.7.11) + base64 + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-net_http (3.0.2) + ffi (1.16.3) + formatador (1.1.0) growl (1.0.3) - guard (2.14.1) + guard (2.18.1) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) - lumberjack (~> 1.0) + lumberjack (>= 1.0.12, < 2.0) nenv (~> 0.1) notiffany (~> 0.0) - pry (>= 0.9.12) + pry (>= 0.13.0) shellany (~> 0.0) thor (>= 0.18.1) - guard-bundler (2.1.0) - bundler (~> 1.0) + guard-bundler (3.0.1) + bundler (>= 2.1, < 3) guard (~> 2.2) guard-compat (~> 1.1) guard-compat (1.2.1) @@ -38,45 +42,46 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - hashdiff (0.3.7) - hashie (3.5.6) - json (2.1.0) - jwt (1.5.6) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - lumberjack (1.0.12) - method_source (0.9.0) - multi_json (1.12.2) + hashdiff (1.0.1) + hashie (5.0.0) + jwt (2.7.1) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + lumberjack (1.2.9) + method_source (1.0.0) multi_xml (0.6.0) - multipart-post (2.0.0) nenv (0.3.0) - notiffany (0.1.1) + notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - oauth2 (1.4.0) - faraday (>= 0.8, < 0.13) - jwt (~> 1.0) - multi_json (~> 1.3) + oauth2 (2.0.9) + faraday (>= 0.17.3, < 3.0) + jwt (>= 1.0, < 3.0) multi_xml (~> 0.5) - rack (>= 1.2, < 3) - omniauth (1.7.1) - hashie (>= 3.4.6, < 3.6.0) - rack (>= 1.6.2, < 3) - omniauth-oauth2 (1.4.0) - oauth2 (~> 1.0) - omniauth (~> 1.2) - pry (0.11.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - public_suffix (3.0.0) - rack (2.0.3) - rack-test (0.7.0) - rack (>= 1.0, < 3) - rb-fsevent (0.10.2) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + omniauth (2.1.1) + hashie (>= 3.4.6) + rack (>= 2.2.3) + rack-protection + omniauth-oauth2 (1.8.0) + oauth2 (>= 1.4, < 3) + omniauth (~> 2.0) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + public_suffix (5.0.3) + rack (3.0.8) + rack-protection (3.0.6) + rack + rack-test (2.1.0) + rack (>= 1.3) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.6) rspec (2.99.0) rspec-core (~> 2.99.0) rspec-expectations (~> 2.99.0) @@ -85,22 +90,26 @@ GEM rspec-expectations (2.99.2) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.99.4) - ruby_dep (1.5.0) - safe_yaml (1.0.4) + ruby2_keywords (0.0.5) shellany (0.0.1) - simplecov (0.15.1) - docile (~> 1.1.0) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) - thor (0.20.0) - webmock (3.1.0) - addressable (>= 2.3.6) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) + thor (1.3.0) + version_gem (1.1.3) + webmock (3.19.1) + addressable (>= 2.8.0) crack (>= 0.3.2) - hashdiff + hashdiff (>= 0.4.0, < 2.0.0) PLATFORMS - ruby + x86_64-linux DEPENDENCIES growl @@ -115,4 +124,4 @@ DEPENDENCIES webmock BUNDLED WITH - 1.16.0 + 2.4.20 diff --git a/lib/omniauth-ely/version.rb b/lib/omniauth-ely/version.rb index c0fb10d..3780cd2 100644 --- a/lib/omniauth-ely/version.rb +++ b/lib/omniauth-ely/version.rb @@ -1,5 +1,5 @@ module OmniAuth module Ely - VERSION = '0.2.0' + VERSION = '0.2.1' end end diff --git a/lib/omniauth/strategies/ely.rb b/lib/omniauth/strategies/ely.rb index 1c5760b..123ad0d 100644 --- a/lib/omniauth/strategies/ely.rb +++ b/lib/omniauth/strategies/ely.rb @@ -40,7 +40,7 @@ module OmniAuth end def profile_url - 'http://ely.by/u' + raw_info['id'].to_s + 'https://ely.by/u' + raw_info['id'].to_s end def callback_url diff --git a/omniauth-ely.gemspec b/omniauth-ely.gemspec index 48c2596..dc6b5d6 100644 --- a/omniauth-ely.gemspec +++ b/omniauth-ely.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |gem| gem.description = %q{Official OmniAuth strategy for Ely.by.} gem.summary = %q{Official OmniAuth strategy for Ely.by.} - gem.add_dependency 'omniauth', '~> 1.0' + gem.add_dependency 'omniauth', '>= 1.0', '< 3.0' gem.add_dependency 'omniauth-oauth2', '>= 1.1.1', '< 2.0' gem.add_development_dependency 'rspec', '~> 2.7' gem.add_development_dependency 'rack-test' diff --git a/spec/omniauth/strategies/ely_spec.rb b/spec/omniauth/strategies/ely_spec.rb index 6b6c9a1..250c410 100644 --- a/spec/omniauth/strategies/ely_spec.rb +++ b/spec/omniauth/strategies/ely_spec.rb @@ -37,7 +37,7 @@ describe OmniAuth::Strategies::Ely do raw_info = Hash.new raw_info['id'] = 1 allow(subject).to receive(:raw_info).and_return(raw_info) - expect(subject.profile_url).to eq('http://ely.by/u1') + expect(subject.profile_url).to eq('https://ely.by/u1') end it 'should build valid skin link' do