omniauth-cz-shop-platforms 1.1.1 → 1.1.2

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: f77783b8c5d35865170e1f25931123b7681ee4d92bc63f303c28eb2b5ee0cd1c
4
+ data.tar.gz: e0905656028ce24e5e457d8d2e0e84820c76432bf158644b3d4061bec4567384
5
5
  SHA512:
6
- metadata.gz: a6275679aeb2dabd4d03a5fa9fdce9695b6ed91b7f3f6d461b8241bcfc115eb3230fc71924c0f32bb5515274379b6a8c5639603a3c96cd080647e7aef7e0b7c6
7
- data.tar.gz: 9ccde7f9f93986a82ba4ae8672c592050837cff04d5a1e376b1a6b62501c47eccdb804eaee828f6fd83d484b7bc48ac1f8c229f8be320486e9bfcd8a038d09e6
6
+ metadata.gz: 4c1202c7990de0cd87e6ae2a47d25a931d7766246a3ce8222c6cafc6cd24c3f35ace9dafa1e1cff609b8d95d79f5751f002e5239fc6c1741f791f8664e77b631
7
+ data.tar.gz: e09801d6d0ffa71c627d99d8bf1c52b9956faa7b8d41700515ad504bd3c51c2e839890d78791a6580a9a467ebe680136c9211d33b374705855f4c72acd60761b
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.1.2'
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
 
@@ -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,14 +1,14 @@
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.1.2
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: 2022-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -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
@@ -139,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
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.2.32
143
+ signing_key:
144
144
  specification_version: 4
145
145
  summary: A collection of strategies for OmniAuth
146
146
  test_files: []