shopapp 0.2.67 → 0.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/concerns/shoplift_client.rb +9 -2
- data/app/controllers/shopapp_login_controller.rb +12 -1
- data/app/views/shopapp/login_message.haml +9 -7
- data/shopapp.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 738ab7bb67c5529b4184fd324415e44aad3bfa911bbd6bdec41f28e13af43f37
|
|
4
|
+
data.tar.gz: 694d7f2e1d4976f7c651f239c24e70810107dc16e0472ca724c6d203ca00df56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5254b85c1219fc355cc615a916d530bfa468a40a71f027ff883bad4910969ec1847869f69e546692334ebad8761daef433d47308cf1399dbd385bdb9801368a
|
|
7
|
+
data.tar.gz: 58fa561426e2f322acd0e66ccac96af5d62628fd7d1a97ebe4b3f5575b9fc511239b18a38e6efe99b49cf1b5b1c3508db2fcfd6bb498e0362e8d6b66d0f585a6
|
data/README.md
CHANGED
|
@@ -93,4 +93,4 @@ shopapp to support i18n, add two methods to your ApplicationController:
|
|
|
93
93
|
|
|
94
94
|
To build new version of this gem, change the version in shopapp.gemspec and run:
|
|
95
95
|
|
|
96
|
-
gem build shopapp.gemspec ; gem push shopapp-0.2.
|
|
96
|
+
gem build shopapp.gemspec ; gem push shopapp-0.2.68.gem; gem install shopapp
|
|
@@ -109,9 +109,16 @@ module ShopliftClient
|
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
def shoplift_login_url
|
|
112
|
-
|
|
112
|
+
redirect_parameters = {
|
|
113
113
|
redirect_uri: local_authlift_redirect_uri,
|
|
114
|
-
scope: scope
|
|
114
|
+
scope: scope
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if cookies[:set_i18n_pub]
|
|
118
|
+
redirect_parameters[:set_i18n_pub] = cookies[:set_i18n_pub]
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
client.auth_code.authorize_url(redirect_parameters)
|
|
115
122
|
end
|
|
116
123
|
|
|
117
124
|
def redirect_unauthorized(skip_landing_page = false)
|
|
@@ -2,6 +2,17 @@ class ShopappLoginController < ApplicationController
|
|
|
2
2
|
include ShopliftClient
|
|
3
3
|
|
|
4
4
|
def welcome
|
|
5
|
+
redirect_parameters = { return_path: request.url }
|
|
6
|
+
|
|
7
|
+
if params['set_i18n_pub']
|
|
8
|
+
cookies[:set_i18n_pub] = params['set_i18n_pub']
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
if cookies[:set_i18n_pub]
|
|
12
|
+
redirect_parameters[:set_i18n_pub] = cookies[:set_i18n_pub]
|
|
13
|
+
I18n.locale = (cookies[:set_i18n_pub] || I18n.default_locale).to_sym
|
|
14
|
+
end
|
|
15
|
+
|
|
5
16
|
unless Rails.configuration.settings['use_welcome_screen'].present?
|
|
6
17
|
redirect_to root_path
|
|
7
18
|
return
|
|
@@ -16,7 +27,7 @@ class ShopappLoginController < ApplicationController
|
|
|
16
27
|
authenticate_user! true
|
|
17
28
|
else
|
|
18
29
|
destination = URI("#{Rails.configuration.settings['authlift_url']}softly_verify_login")
|
|
19
|
-
destination.query =
|
|
30
|
+
destination.query = redirect_parameters.to_query
|
|
20
31
|
redirect_to destination.to_s
|
|
21
32
|
end
|
|
22
33
|
end
|
|
@@ -20,12 +20,14 @@
|
|
|
20
20
|
.jumbotron.bg-secondary.text-light
|
|
21
21
|
.container.h-100
|
|
22
22
|
= image_tag company_logo_path_defined
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
= link_to '?set_i18n_pub=fi', class: 'float-right ml-2', data: { turbolinks: false } do
|
|
24
|
+
= image_tag "flags/fi.png", style: "height: 24; width: 36px;"
|
|
25
|
+
= link_to '?set_i18n_pub=en', class: 'float-right', data: { turbolinks: false } do
|
|
26
|
+
= image_tag "flags/en.png", style: "height: 24; width: 36px;"
|
|
27
|
+
%h2.pt-5 #{@current_shop_owner.name} #{t :b2b_shop}
|
|
28
|
+
%h1.mt-3= t :welcome
|
|
25
29
|
%p.mt-5
|
|
26
|
-
#{@current_shop_owner.name}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
%button.btn.btn-primary.btn-lg.float-right.my-5
|
|
30
|
-
Proceed to login
|
|
30
|
+
#{@current_shop_owner.name} #{t :landing_message}
|
|
31
|
+
= link_to shoplift_login_url, data: { turbolinks: false } do
|
|
32
|
+
%button.btn.btn-primary.btn-lg.float-right.my-5= t :landing_button
|
|
31
33
|
.clearfix
|
data/shopapp.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'shopapp'
|
|
3
|
-
s.version = '0.2.
|
|
4
|
-
s.date = '2019-
|
|
3
|
+
s.version = '0.2.68'
|
|
4
|
+
s.date = '2019-10-03'
|
|
5
5
|
s.summary = 'Do a shoplift.'
|
|
6
6
|
s.description = 'Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca\'s fatal web? Hence!\
|
|
7
7
|
I am qualmish at the smell of leek.'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shopapp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.68
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zeljko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|