omniauth-cz-shop-platforms 1.1.1 → 1.2.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
  SHA256:
3
- metadata.gz: 266c4af03e88ee7e38201f9d5b0cf6f980fc7fb62430ed41824b9a3adf1a9bef
4
- data.tar.gz: 3a8293c815420e4a4b14d4c1ff0d59257932c0c9a0a69dfcad04fc8f637434e4
3
+ metadata.gz: 345eca97b2c37d8d95c5c1ab201084041adcab48408c77f026070b0aea09d2a3
4
+ data.tar.gz: 727ef27ff005f855634043abd598c1bc6388d97ad5e3da487234f4b62d7370fe
5
5
  SHA512:
6
- metadata.gz: a6275679aeb2dabd4d03a5fa9fdce9695b6ed91b7f3f6d461b8241bcfc115eb3230fc71924c0f32bb5515274379b6a8c5639603a3c96cd080647e7aef7e0b7c6
7
- data.tar.gz: 9ccde7f9f93986a82ba4ae8672c592050837cff04d5a1e376b1a6b62501c47eccdb804eaee828f6fd83d484b7bc48ac1f8c229f8be320486e9bfcd8a038d09e6
6
+ metadata.gz: 6c8336b67cb5ed030f72873febea63da491f58be08364dc24724c337bdca414377a2443e1b8f503c2d9458e2080711836970c845868f87c36439252b207f3c4b
7
+ data.tar.gz: 64f22c02a5cf16db8fe63f2c36c8f44bb56cf4844316f379e4a17e05771477b3f24d51c00e2e2ff54358508bc91ea6b7b1c14de586630a66568b3c8cc8c53990
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## 1.1.2 - 2022-05-28
5
+
6
+ ### Added
7
+ - Nothing.
8
+
9
+ ### Deprecated
10
+ - Nothing.
11
+
12
+ ### Removed
13
+ - cleaned up webareal code
14
+
15
+ ### Fixed
16
+ - Shoptet configuration requests full site, since domain can differ.
17
+
4
18
  ## 1.1.0 - 2022-04-11
5
19
 
6
20
  ### Added
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module CzShopPlatforms
5
- VERSION = '1.1.1'
5
+ VERSION = '1.2.0'
6
6
  end
7
7
  end
@@ -15,8 +15,8 @@ module OmniAuth
15
15
  option :scope, DEFAULT_SCOPE
16
16
 
17
17
  option :client_options,
18
- authorize_url: '/action/OAuthServer/authorize',
19
- token_url: '/action/OAuthServer/token',
18
+ authorize_url: 'authorize',
19
+ token_url: 'token',
20
20
  auth_scheme: :request_body
21
21
  option :authorize_options, %i[scope]
22
22
  option :token_options, %i[scope]
@@ -24,15 +24,14 @@ module OmniAuth
24
24
  def client_site
25
25
  if options.site
26
26
  options.site
27
- elsif request.params['shop_name']
28
- shop_name = request.params['shop_name']
29
- site = "https://#{shop_name}.myshoptet.com"
30
- session['omniauth.shoptet.site'] = site
31
- site
27
+ elsif request.params['shoptet_site']
28
+ shoptet_site = request.params['shoptet_site']
29
+ session['omniauth.shoptet.site'] = shoptet_site
30
+ shoptet_site
32
31
  elsif session['omniauth.shoptet.site']
33
32
  session['omniauth.shoptet.site']
34
33
  else
35
- raise 'Cannot determine client site, set :site option or shop_name request param.'
34
+ raise 'Cannot determine client site, set :site option or shoptet_site request param or .'
36
35
  end
37
36
  end
38
37
 
@@ -18,13 +18,13 @@ Gem::Specification.new do |gem|
18
18
  gem.files = `git ls-files`.split("\n")
19
19
  gem.require_paths = ['lib']
20
20
 
21
- gem.required_ruby_version = '>= 2.7'
21
+ gem.required_ruby_version = '>= 3.0'
22
22
 
23
- gem.add_runtime_dependency 'oauth2', '~> 1.1'
23
+ gem.add_runtime_dependency 'oauth2', '< 2'
24
24
  gem.add_runtime_dependency 'omniauth', '~> 2.0'
25
- gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.7.1'
25
+ gem.add_runtime_dependency 'omniauth-oauth2', '< 2'
26
26
 
27
- gem.add_development_dependency 'rake', '~> 12.0'
28
- gem.add_development_dependency 'rspec', '~> 3.6'
29
- gem.add_development_dependency 'rubocop', '~> 0.49'
27
+ gem.add_development_dependency 'rake'
28
+ gem.add_development_dependency 'rspec'
29
+ gem.add_development_dependency 'rubocop'
30
30
  end
@@ -50,20 +50,20 @@ describe OmniAuth::Strategies::Shoptet do
50
50
 
51
51
  describe 'on authorize' do
52
52
  before do
53
- @params = { 'shop_name' => 'awesome-shop' }
53
+ @params = { 'shoptet_site' => 'https://awesome-shop.myshoptet.com/action/OAuthServer/' }
54
54
  end
55
55
 
56
56
  describe '#client_options' do
57
57
  it 'has correct authorize_url' do
58
- expect(subject.client.options[:authorize_url]).to eq('/action/OAuthServer/authorize')
58
+ expect(subject.client.options[:authorize_url]).to eq('authorize')
59
59
  end
60
60
 
61
61
  it 'has correct token_url' do
62
- expect(subject.client.options[:token_url]).to eq('/action/OAuthServer/token')
62
+ expect(subject.client.options[:token_url]).to eq('token')
63
63
  end
64
64
 
65
65
  it 'has site from request param' do
66
- expect(subject.client.site).to eq('https://awesome-shop.myshoptet.com')
66
+ expect(subject.client.site).to eq('https://awesome-shop.myshoptet.com/action/OAuthServer/')
67
67
  end
68
68
 
69
69
  describe 'overrides' do
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-cz-shop-platforms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Sterba
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-24 00:00:00.000000000 Z
11
+ date: 2024-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - "<"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '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: '2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,58 +42,58 @@ dependencies:
42
42
  name: omniauth-oauth2
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - "<"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.7.1
47
+ version: '2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - "<"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.7.1
54
+ version: '2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '12.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '12.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '3.6'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '3.6'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0.49'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0.49'
96
+ version: '0'
97
97
  description: This allows you to login via multiple Czech e-commerce platforms with
98
98
  your ruby app.
99
99
  email:
@@ -124,7 +124,7 @@ homepage: https://github.com/honzasterba/omniauth-cz-shop-platforms
124
124
  licenses:
125
125
  - MIT
126
126
  metadata: {}
127
- post_install_message:
127
+ post_install_message:
128
128
  rdoc_options: []
129
129
  require_paths:
130
130
  - lib
@@ -132,15 +132,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - ">="
134
134
  - !ruby/object:Gem::Version
135
- version: '2.7'
135
+ version: '3.0'
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubygems_version: 3.1.4
143
- signing_key:
142
+ rubygems_version: 3.4.10
143
+ signing_key:
144
144
  specification_version: 4
145
145
  summary: A collection of strategies for OmniAuth
146
146
  test_files: []