shopify_app 7.2.7 → 7.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/controllers/shopify_app/authenticated_controller.rb +4 -0
- data/config/locales/de.yml +4 -0
- data/config/locales/ja.yml +4 -0
- data/lib/shopify_app.rb +1 -0
- data/lib/shopify_app/localization.rb +16 -0
- data/lib/shopify_app/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da5334ef600cd3a2b85e2d563063c4971f9c4216
|
4
|
+
data.tar.gz: 80ff75561b661796dd57950ce1e1f2772d848bff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00b236462b953a09ebf7cf48a02d0124ff1b1e3d1baa08b2965119e114802a77794f945a3941d2910891f1fb4d93be615ea77c03b967da57de8bec589e33f66e
|
7
|
+
data.tar.gz: 35ef4a7b8a5a42b17160f7b275dbabce8e00f5ec79458c83bc90b9b147e8e378be987464e85140afb1de3c44b9148f2fe4cda6fd689cda9ec278d1762c746269
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
module ShopifyApp
|
2
2
|
class AuthenticatedController < ApplicationController
|
3
|
+
include ShopifyApp::Localization
|
3
4
|
include ShopifyApp::LoginProtection
|
5
|
+
|
6
|
+
before_action :set_locale
|
4
7
|
before_action :login_again_if_different_shop
|
5
8
|
around_action :shopify_session
|
9
|
+
|
6
10
|
layout ShopifyApp.configuration.embedded_app? ? 'embedded_app' : 'application'
|
7
11
|
end
|
8
12
|
end
|
data/lib/shopify_app.rb
CHANGED
@@ -18,6 +18,7 @@ require 'shopify_app/scripttags_manager_job'
|
|
18
18
|
require 'shopify_app/shop'
|
19
19
|
require 'shopify_app/session_storage'
|
20
20
|
require 'shopify_app/sessions_concern'
|
21
|
+
require 'shopify_app/localization'
|
21
22
|
require 'shopify_app/login_protection'
|
22
23
|
require 'shopify_app/webhooks_manager'
|
23
24
|
require 'shopify_app/scripttags_manager'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module ShopifyApp
|
2
|
+
module Localization
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
def set_locale
|
6
|
+
if params[:locale]
|
7
|
+
session[:locale] = params[:locale]
|
8
|
+
else
|
9
|
+
session[:locale] ||= I18n.default_locale
|
10
|
+
end
|
11
|
+
I18n.locale = session[:locale]
|
12
|
+
rescue I18n::InvalidLocale
|
13
|
+
I18n.locale = I18n.default_locale
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/shopify_app/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.
|
4
|
+
version: 7.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -145,9 +145,11 @@ files:
|
|
145
145
|
- app/controllers/shopify_app/sessions_controller.rb
|
146
146
|
- app/controllers/shopify_app/webhooks_controller.rb
|
147
147
|
- app/views/shopify_app/sessions/new.html.erb
|
148
|
+
- config/locales/de.yml
|
148
149
|
- config/locales/en.yml
|
149
150
|
- config/locales/es.yml
|
150
151
|
- config/locales/fr.yml
|
152
|
+
- config/locales/ja.yml
|
151
153
|
- config/routes.rb
|
152
154
|
- images/app-proxy-screenshot.png
|
153
155
|
- lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
|
@@ -182,6 +184,7 @@ files:
|
|
182
184
|
- lib/shopify_app/configuration.rb
|
183
185
|
- lib/shopify_app/engine.rb
|
184
186
|
- lib/shopify_app/in_memory_session_store.rb
|
187
|
+
- lib/shopify_app/localization.rb
|
185
188
|
- lib/shopify_app/login_protection.rb
|
186
189
|
- lib/shopify_app/scripttags_manager.rb
|
187
190
|
- lib/shopify_app/scripttags_manager_job.rb
|