solidus_support 0.10.0 → 0.10.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a0741932321e5bc770d8d9fa4c4d178eaa71268ca2ffafddb03a269d48bb9ee
|
4
|
+
data.tar.gz: 32b5a77f1610a7695a32a9bfe9ebf1ea632d14aefce3a7552c6ecbe09f881e33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d05ddfde94137a189d0b11dd88774c753d271142e91df0576d886a0e36268f6c59430e880dbc1eb5249418d464f9805a17b4dd56fcc65081dff44ef61350726
|
7
|
+
data.tar.gz: 4322be2a95d7e24ad6c41b9f789d71d092aa8847b795182bf8d84a776fbaada9452f3e330416955d3bd06b2d23ba6d2b978aab171803bfa3c36c7342ee3b0804
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SolidusSupport
|
4
|
+
class << self
|
5
|
+
def deprecator
|
6
|
+
@deprecator ||= ActiveSupport::Deprecation.new(Gem::Version.new('1.0'), 'SolidusSupport')
|
7
|
+
end
|
8
|
+
|
9
|
+
def solidus_deprecator
|
10
|
+
Spree.solidus_gem_version >= Gem::Version.new('4.2') ? Spree.deprecator : Spree::Deprecation
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module SolidusSupport
|
4
4
|
module EngineExtensions
|
5
5
|
include ActiveSupport::Deprecation::DeprecatedConstantAccessor
|
6
|
-
deprecate_constant 'Decorators', 'SolidusSupport::EngineExtensions'
|
6
|
+
deprecate_constant 'Decorators', 'SolidusSupport::EngineExtensions', deprecator: SolidusSupport.deprecator
|
7
7
|
|
8
8
|
def self.included(engine)
|
9
9
|
engine.extend ClassMethods
|
@@ -18,6 +18,7 @@ module SolidusSupport
|
|
18
18
|
enable_solidus_engine_support('backend')
|
19
19
|
enable_solidus_engine_support('frontend')
|
20
20
|
enable_solidus_engine_support('api')
|
21
|
+
enable_solidus_engine_support('admin')
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
@@ -109,8 +110,10 @@ module SolidusSupport
|
|
109
110
|
if SolidusSupport.send(:"#{engine}_available?")
|
110
111
|
decorators_path = root.join("lib/decorators/#{engine}")
|
111
112
|
controllers_path = root.join("lib/controllers/#{engine}")
|
113
|
+
components_path = root.join("lib/components/#{engine}")
|
112
114
|
config.autoload_paths += decorators_path.glob('*')
|
113
115
|
config.autoload_paths << controllers_path if controllers_path.exist?
|
116
|
+
config.autoload_paths << components_path if components_path.exist?
|
114
117
|
|
115
118
|
engine_context = self
|
116
119
|
config.to_prepare do
|
data/lib/solidus_support.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'solidus_support/version'
|
4
|
+
require 'solidus_support/deprecator'
|
4
5
|
require 'solidus_support/migration'
|
5
6
|
require 'solidus_support/legacy_event_compat'
|
6
7
|
require 'solidus_support/engine_extensions'
|
@@ -8,14 +9,6 @@ require 'solidus_core'
|
|
8
9
|
|
9
10
|
module SolidusSupport
|
10
11
|
class << self
|
11
|
-
def deprecator
|
12
|
-
@deprecator ||= ActiveSupport::Deprecation.new(Gem::Version.new('1.0'), 'SolidusSupport')
|
13
|
-
end
|
14
|
-
|
15
|
-
def solidus_deprecator
|
16
|
-
Spree.solidus_gem_version >= Gem::Version.new('4.2') ? Spree.deprecator : Spree::Deprecation
|
17
|
-
end
|
18
|
-
|
19
12
|
def solidus_gem_version
|
20
13
|
deprecator.warn <<-WARN.squish, caller
|
21
14
|
SolidusSupport.solidus_gem_version is deprecated and will be removed
|
@@ -87,5 +80,9 @@ module SolidusSupport
|
|
87
80
|
def api_available?
|
88
81
|
defined?(Spree::Api::Engine)
|
89
82
|
end
|
83
|
+
|
84
|
+
def admin_available?
|
85
|
+
defined?(SolidusAdmin::Engine)
|
86
|
+
end
|
90
87
|
end
|
91
88
|
end
|
data/spec/support/dummy_app.rb
CHANGED
@@ -14,7 +14,7 @@ module DummyApp
|
|
14
14
|
class Application < ::Rails::Application
|
15
15
|
config.eager_load = false
|
16
16
|
config.paths['config/database'] = File.expand_path('dummy_app/database.yml', __dir__)
|
17
|
-
if ActiveRecord::VERSION::MAJOR >= 7
|
17
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR < 1
|
18
18
|
config.active_record.legacy_connection_handling = false
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Hawthorn
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-04-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -144,6 +144,7 @@ files:
|
|
144
144
|
- bin/console
|
145
145
|
- bin/setup
|
146
146
|
- lib/solidus_support.rb
|
147
|
+
- lib/solidus_support/deprecator.rb
|
147
148
|
- lib/solidus_support/engine_extensions.rb
|
148
149
|
- lib/solidus_support/legacy_event_compat.rb
|
149
150
|
- lib/solidus_support/legacy_event_compat/bus.rb
|
@@ -179,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
180
|
- !ruby/object:Gem::Version
|
180
181
|
version: '0'
|
181
182
|
requirements: []
|
182
|
-
rubygems_version: 3.3
|
183
|
+
rubygems_version: 3.5.3
|
183
184
|
signing_key:
|
184
185
|
specification_version: 4
|
185
186
|
summary: Common runtime helpers for Solidus extensions.
|