spree_api 4.1.7 → 4.1.8

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: 76c3f1cd95091b79ee1beb6fffc494c87914cf332be9d1314b70383d059f267a
4
- data.tar.gz: a4c12d109f2517b68b202b484d91fd7ddf255417cd776e9bfd834b90c34b9df0
3
+ metadata.gz: 2ce01ac97150e84ad430f83628328fa2b07a18166ad6d819a5143be5792a042c
4
+ data.tar.gz: 3f04100734efc0d0c88e8c58d7ae481a3158f46292144712cccd9fdea806fc24
5
5
  SHA512:
6
- metadata.gz: e98952caa2783c1bdaba56f8e91b21df7b620cca80a5895da1ca29f77bf374befa276dc2c0319881d158501fe2c0752b658e03f5c37447921cd1d2d9103e56e3
7
- data.tar.gz: 4e8607d0e68f83fd13d98ccb1fa241b22b965826a46f42eed412c6ea1e09c5ae3e6c1053657d9e4aa5499618daf4d321d7049174d06e97b50283bb0ebdd002a3
6
+ metadata.gz: bd83e6d0bae731fd7291905cf90de9da31a77d1b086cbbcbddc98030d395fb86f859b2b1a76ea6dd1132e0d30dd2b3f58b4c99b0809e6b6d44ab6396f834d5ed
7
+ data.tar.gz: 5c604cf0684a2589d054966bd5a6b4e1a215d21b0e5731a48c91718934e05bef3eb8783d1ddbc559ac258d2a3184445b0362341ecb4aeb451923f388726df2c8
@@ -7,6 +7,7 @@ module Spree
7
7
  include Spree::Core::ControllerHelpers::Store
8
8
  rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
9
9
  rescue_from CanCan::AccessDenied, with: :access_denied
10
+ rescue_from Spree::Core::GatewayError, with: :gateway_error
10
11
 
11
12
  def content_type
12
13
  Spree::Api::Config[:api_v2_content_type]
@@ -108,6 +109,10 @@ module Spree
108
109
  def access_denied(exception)
109
110
  render_error_payload(exception.message, 403)
110
111
  end
112
+
113
+ def gateway_error(exception)
114
+ render_error_payload(exception.message)
115
+ end
111
116
  end
112
117
  end
113
118
  end
@@ -65,7 +65,11 @@ module Spree
65
65
  def shipping_rates
66
66
  result = shipping_rates_service.call(order: spree_current_order)
67
67
 
68
- render_serialized_payload { serialize_shipping_rates(result.value) }
68
+ if result.success?
69
+ render_serialized_payload { serialize_shipping_rates(result.value) }
70
+ else
71
+ render_error_payload(result.error)
72
+ end
69
73
  end
70
74
 
71
75
  def payment_methods
@@ -774,7 +774,7 @@ paths:
774
774
  description: >-
775
775
  Returns a list of available Shipping Rates for Checkout.
776
776
  Shipping Rates are grouped against Shipments.
777
- Each checkout cna have multiple Shipments eg. some products are available
777
+ Each checkout can have multiple Shipments eg. some products are available
778
778
  in stock and will be send out instantly and some needs to be backordered.
779
779
  tags:
780
780
  - Checkout
@@ -2,20 +2,27 @@
2
2
  require_relative '../core/lib/spree/core/version.rb'
3
3
 
4
4
  Gem::Specification.new do |s|
5
+ s.name = "spree_api"
6
+ s.version = Spree.version
5
7
  s.authors = ["Ryan Bigg"]
6
8
  s.email = ["ryan@spreecommerce.com"]
7
- s.description = %q{Spree's API}
8
9
  s.summary = %q{Spree's API}
10
+ s.description = %q{Spree's API}
9
11
  s.homepage = 'http://spreecommerce.org'
10
12
  s.license = 'BSD-3-Clause'
11
13
 
14
+ s.metadata = {
15
+ "bug_tracker_uri" => "https://github.com/spree/spree/issues",
16
+ "changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
17
+ "documentation_uri" => "https://guides.spreecommerce.org/",
18
+ "source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
19
+ }
20
+
12
21
  s.required_ruby_version = '>= 2.5.0'
13
22
 
14
23
  s.files = `git ls-files`.split($\).reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
15
24
  s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
- s.name = "spree_api"
17
25
  s.require_paths = ["lib"]
18
- s.version = Spree.version
19
26
 
20
27
  s.add_development_dependency 'jsonapi-rspec'
21
28
 
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.1.7
4
+ version: 4.1.8
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: 2020-06-08 00:00:00.000000000 Z
11
+ date: 2020-08-05 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.1.7
33
+ version: 4.1.8
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.1.7
40
+ version: 4.1.8
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rabl
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -300,8 +300,12 @@ files:
300
300
  homepage: http://spreecommerce.org
301
301
  licenses:
302
302
  - BSD-3-Clause
303
- metadata: {}
304
- post_install_message:
303
+ metadata:
304
+ bug_tracker_uri: https://github.com/spree/spree/issues
305
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.8
306
+ documentation_uri: https://guides.spreecommerce.org/
307
+ source_code_uri: https://github.com/spree/spree/tree/v4.1.8
308
+ post_install_message:
305
309
  rdoc_options: []
306
310
  require_paths:
307
311
  - lib
@@ -317,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
321
  version: '0'
318
322
  requirements: []
319
323
  rubygems_version: 3.1.2
320
- signing_key:
324
+ signing_key:
321
325
  specification_version: 4
322
326
  summary: Spree's API
323
327
  test_files: []