spree_api 3.7.10 → 3.7.11

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spree_api might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a51b557172e05ed70e620ea24cc37418750ae8049ceb650d037ea8057bc54baa
4
- data.tar.gz: 5fc424cc9a56d991de332f5eca40cb0910c9d20971a56614c7bc1c3f4dbeecfd
3
+ metadata.gz: 96fc20e54aac0b2643858fef36f6d0922f95826c5457fb164f49fcb61343a7a1
4
+ data.tar.gz: 9f2a7b0f5eeefda89ecba23e00d0aed608b98b993c579db75c7440a301144865
5
5
  SHA512:
6
- metadata.gz: 3e1df6df7fda6ea6212b4f75759e9e47480945af34453881264031ae9ddadc80aa3fa89fb8f91f47842c9263652ed945814d0bfba7bfeb4fc1fe463633118a85
7
- data.tar.gz: 411d354a7f0b06621909d05fb331d9adc0ad6edef8fa9b889c96631504695f628aced3b6937d51d1a8631876d56b5576843ff011be80ef4395d8fedfa2e31d57
6
+ metadata.gz: 513ce938dfd546144e0bcdf774730bf7be5075a4818fdcea8b2ec75723af09963ca68f8ffc850ea79f76f283f10ff76a0aed486d40602709b03ce1d674c18613
7
+ data.tar.gz: b62499c581685e13be2be4c782b958694924b31de9f06423dece56c43b22eec09fe2739c65cddd68d39273b9b9e12f83e1f61510ae25998901b6a0608638379e
@@ -36,7 +36,12 @@ module Spree
36
36
  end
37
37
 
38
38
  def spree_current_user
39
- @spree_current_user ||= Spree.user_class.find_by(id: doorkeeper_token.resource_owner_id) if doorkeeper_token
39
+ return nil unless doorkeeper_token
40
+ return @spree_current_user if @spree_current_user
41
+
42
+ doorkeeper_authorize!
43
+
44
+ @spree_current_user ||= Spree.user_class.find_by(id: doorkeeper_token.resource_owner_id)
40
45
  end
41
46
 
42
47
  def spree_authorize!(action, subject, *args)
@@ -4,7 +4,7 @@ shared_context 'API v2 tokens' do
4
4
  let(:headers_order_token) { { 'X-Spree-Order-Token' => order.token } }
5
5
  end
6
6
 
7
- [200, 201, 400, 404, 403, 422].each do |status_code|
7
+ [200, 201, 400, 401, 404, 403, 422].each do |status_code|
8
8
  shared_examples "returns #{status_code} HTTP status" do
9
9
  it "returns #{status_code}" do
10
10
  expect(response.status).to eq(status_code)
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: 3.7.10
4
+ version: 3.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-04 00:00:00.000000000 Z
11
+ date: 2020-10-15 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: 3.7.10
33
+ version: 3.7.11
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: 3.7.10
40
+ version: 3.7.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rabl
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -314,7 +314,7 @@ homepage: http://spreecommerce.org
314
314
  licenses:
315
315
  - BSD-3-Clause
316
316
  metadata: {}
317
- post_install_message:
317
+ post_install_message:
318
318
  rdoc_options: []
319
319
  require_paths:
320
320
  - lib
@@ -329,9 +329,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  - !ruby/object:Gem::Version
330
330
  version: '0'
331
331
  requirements: []
332
- rubyforge_project:
333
- rubygems_version: 2.7.3
334
- signing_key:
332
+ rubygems_version: 3.1.4
333
+ signing_key:
335
334
  specification_version: 4
336
335
  summary: Spree's API
337
336
  test_files: []