solidus_core 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84e6a49d44adf0951d9e774b0e212f39841ca0183827e5ec902d5dfb13f27cf2
4
- data.tar.gz: 1d7e7b23b450a781782ac2259ccd50aa54b455c7b07e90070a2c39ff3320b640
3
+ metadata.gz: be83c0d322bf83fbe2cda07e3a213fdd30dc41750ffd8034faffe99d41b60508
4
+ data.tar.gz: b5ec9f361017db1e7c40f49826b2a0bd7e8146e3b1410df8f4a76742484b8a80
5
5
  SHA512:
6
- metadata.gz: f5caeff8f63a04cc9df497e06e3f782a0f6ff994464b98e5d9f1db58e3cf1149b1a02cf2dd707c4bb5291aad76ff91682df6797fcb56fd87522cda874bbcd0a2
7
- data.tar.gz: 6150acbad591a8bc78d2283dd253deb1c5f47470194117a016d72e32cf633a5e9e56dbf7343d87fd0ffdef8cef4f7ea588ef45481acb918010fe4c2e647bee96
6
+ metadata.gz: df3cccc29e890e117424310fbfa126f788aae6a9ff46d9a4d18827b48047e14d682fbd69343054dae522b2d543950c3dd4351688ba0afc4d9363c89d6d526722
7
+ data.tar.gz: dea0353839b28e798c1aa859edd3d7f52eb378b62a013ca66528281571ee65102719e35633e9b6ea72f4d29996401c07ecab39fa7319afc4be3c9a3b6423a126
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "3.1.1"
4
+ VERSION = "3.1.2"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
data/lib/spree/core.rb CHANGED
@@ -62,13 +62,24 @@ module Spree
62
62
  end
63
63
 
64
64
  module Core
65
- def self.has_install_generator_been_run?
66
- (Rails.env.test? && Rails.application.class.name == 'DummyApp::Application') ||
67
- Rails.application.paths['config/initializers'].paths.any? do |path|
68
- File.exist?(path.join('spree.rb'))
69
- end
65
+ # @api private
66
+ def self.has_install_generator_been_run?(rails_paths: Rails.application.paths, initializer_name: 'spree.rb', dummy_app_name: 'DummyApp::Application')
67
+ does_spree_initializer_exist?(rails_paths, initializer_name) ||
68
+ running_solidus_test_suite_with_dummy_app?(dummy_app_name)
70
69
  end
71
70
 
71
+ def self.running_solidus_test_suite_with_dummy_app?(dummy_app_name)
72
+ Rails.env.test? && Rails.application.class.name == dummy_app_name
73
+ end
74
+ private_class_method :running_solidus_test_suite_with_dummy_app?
75
+
76
+ def self.does_spree_initializer_exist?(rails_paths, initializer_name)
77
+ rails_paths['config/initializers'].any? do |path|
78
+ File.exist?(Pathname.new(path).join(initializer_name))
79
+ end
80
+ end
81
+ private_class_method :does_spree_initializer_exist?
82
+
72
83
  class GatewayError < RuntimeError; end
73
84
  end
74
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-20 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -953,7 +953,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
953
953
  - !ruby/object:Gem::Version
954
954
  version: 1.8.23
955
955
  requirements: []
956
- rubygems_version: 3.2.20
956
+ rubygems_version: 3.1.6
957
957
  signing_key:
958
958
  specification_version: 4
959
959
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.