spree_api 4.2.0.rc3 → 4.2.0.rc4

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: 91e71f07d6f92ec8d91766b639b1b8cac45eb77d7b315cb9f1c64386781f4e93
4
- data.tar.gz: 30599040f61b4ce8a2b43f806d7b5a1ecb06caab6412de565da6eed3370924b5
3
+ metadata.gz: 7c7b8ebf1a65cf7fb7063b4811c8d6226298c6435b5fdb9a60fd0c9a0579567d
4
+ data.tar.gz: 33ab903daaec69fdcb23340146c6e78be7dc64dbe760d2885353518d977887d3
5
5
  SHA512:
6
- metadata.gz: c5b26dc1484564a4fc64da2ef148a2662c6b9d5ac11f059b894feb1362659e4841c496bc2c8926f8e60536251a1b5d8ff8f17bcc23eecd265edc5ee95d12e458
7
- data.tar.gz: 4d7e2cf195104266d197256c0b9fb1fd08cbe13855f11dfead0246c780f6fa92b0c2f0ca86483b1708eebd77b03bec6ece68f40d28cf97b1f53c06cc5b9db1b7
6
+ metadata.gz: 4f108ec0840bcfdf1aa5f15a8cf7f1de53fc7420bc0d0fc93072786ce139f60afcf5506470dca75c32cfac4b70221b4a9858e8b0a528b643e3f411c892cd46c9
7
+ data.tar.gz: 75d052059dda3df22fd17236878a14b9ca9a07da5bb287b0df03c11ea347a02abadabf75e2f7f7da950cd9e8bfdb56e96294d0a14ec46049797a63a69da58711
@@ -9,6 +9,8 @@ module Spree
9
9
  rescue_from CanCan::AccessDenied, with: :access_denied
10
10
  rescue_from Spree::Core::GatewayError, with: :gateway_error
11
11
 
12
+ before_action :set_user_language
13
+
12
14
  def content_type
13
15
  Spree::Api::Config[:api_v2_content_type]
14
16
  end
@@ -93,6 +95,10 @@ module Spree
93
95
  def gateway_error(exception)
94
96
  render_error_payload(exception.message)
95
97
  end
98
+
99
+ def set_user_language
100
+ I18n.locale = current_store.default_locale
101
+ end
96
102
  end
97
103
  end
98
104
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.rc3
4
+ version: 4.2.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-18 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-rspec
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.0.rc3
33
+ version: 4.2.0.rc4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.0.rc3
40
+ version: 4.2.0.rc4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rabl
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -308,9 +308,9 @@ licenses:
308
308
  - BSD-3-Clause
309
309
  metadata:
310
310
  bug_tracker_uri: https://github.com/spree/spree/issues
311
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0.rc3
311
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0.rc4
312
312
  documentation_uri: https://guides.spreecommerce.org/
313
- source_code_uri: https://github.com/spree/spree/tree/v4.2.0.rc3
313
+ source_code_uri: https://github.com/spree/spree/tree/v4.2.0.rc4
314
314
  post_install_message:
315
315
  rdoc_options: []
316
316
  require_paths: