solidus_api 2.9.0 → 2.9.1

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 834aa6a4949827db3419aae589595ee89940a213fd30b647885f1e0ef67a5bd3
4
- data.tar.gz: 6ace5df26496b2c06ce3b25cdd94ba6c51659c361ddf40b711be5080d8f04d66
3
+ metadata.gz: f5e8760eff9291ece478f70fd95f7565de1c584e2362d98603c62d64b9775b34
4
+ data.tar.gz: 76ef3f9dfd9733a4a6e934198c276abc57aa48f4239da8d022600055ccd1d4ea
5
5
  SHA512:
6
- metadata.gz: bbf516888a34278dba247c806238d694299d22975df8d75104e14a0cfc53177ee3997984e1c62f98ade575784a2384e84cdfd04c94b2b4903c9862a5d838cb68
7
- data.tar.gz: 75219246a61972a2b9d965703083e5ac7c0bd48366d92ee8d884d7f078f06d18c1f691bed2e0431583e40ff09ae5d00348151806bcc5e9ebf445fceb7e55d31c
6
+ metadata.gz: a06bc98625ddcfb2912972a09abc319d7c23d66363a27a5a4352a66825789f9c04e6a53c865be92b460e86a5bc84755757ea2c35e8ffcd74ee0ee36ab3f0debb
7
+ data.tar.gz: 3392d0663e074ebb98ff4aeced208d8a4f3108c90dc7a1773cee7c2b0d476e403d510796d533738d4ede381d1e72dcd50d76d788b3d004b9fb9ed1b65de03531
@@ -4,7 +4,9 @@ require 'spec_helper'
4
4
 
5
5
  module Spree
6
6
  describe 'Api Feature Specs', type: :request do
7
- before { Spree::Api::Config[:requires_authentication] = false }
7
+ before do
8
+ stub_spree_preferences(Spree::Api::Config, requires_authentication: false)
9
+ end
8
10
  let!(:promotion) { FactoryBot.create(:promotion, :with_order_adjustment, code: 'foo', weighted_order_adjustment_amount: 10) }
9
11
  let(:promotion_code) { promotion.codes.first }
10
12
  let!(:store) { FactoryBot.create(:store) }
@@ -54,7 +54,7 @@ module Spree
54
54
 
55
55
  before {
56
56
  user.clear_spree_api_key!
57
- stub_spree_preferences roles_for_auto_api_key: ['hobbit']
57
+ stub_spree_preferences(roles_for_auto_api_key: ['hobbit'])
58
58
  }
59
59
 
60
60
  it { expect { subject }.to change { user.reload.spree_api_key }.from(nil) }
@@ -6,7 +6,7 @@ module Spree
6
6
  describe Api::CheckoutsController, type: :request do
7
7
  before(:each) do
8
8
  stub_authentication!
9
- stub_spree_preferences track_inventory_levels: false
9
+ stub_spree_preferences(track_inventory_levels: false)
10
10
  country_zone = create(:zone, name: 'CountryZone')
11
11
  @state = create(:state)
12
12
  @country = @state.country
@@ -326,11 +326,7 @@ module Spree
326
326
  # Regression test for https://github.com/spree/spree/issues/2140
327
327
  context "with authentication_required set to false" do
328
328
  before do
329
- Spree::Api::Config.requires_authentication = false
330
- end
331
-
332
- after do
333
- Spree::Api::Config.requires_authentication = true
329
+ stub_spree_preferences(Spree::Api::Config, requires_authentication: false)
334
330
  end
335
331
 
336
332
  it "can still create a product" do
@@ -9,7 +9,9 @@ module Spree
9
9
  let(:attributes) { [:id, :name, :description, :price, :available_on, :slug, :meta_description, :meta_keywords, :taxon_ids, :meta_title] }
10
10
 
11
11
  context "without authentication" do
12
- before { Spree::Api::Config[:requires_authentication] = false }
12
+ before do
13
+ stub_spree_preferences(Spree::Api::Config, requires_authentication: false)
14
+ end
13
15
 
14
16
  it "retrieves a list of products" do
15
17
  get spree.api_products_path
data/spec/spec_helper.rb CHANGED
@@ -59,7 +59,6 @@ RSpec.configure do |config|
59
59
 
60
60
  config.before(:each) do
61
61
  Rails.cache.clear
62
- Spree::Api::Config[:requires_authentication] = true
63
62
  end
64
63
 
65
64
  config.include ActiveJob::TestHelper
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-16 00:00:00.000000000 Z
11
+ date: 2019-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jbuilder
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 2.9.0
61
+ version: 2.9.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 2.9.0
68
+ version: 2.9.1
69
69
  description: REST API for the Solidus e-commerce framework.
70
70
  email: contact@solidus.io
71
71
  executables: []