solidus_support 0.9.0 → 0.9.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 +4 -4
- data/.circleci/config.yml +39 -13
- data/.github/stale.yml +1 -17
- data/CHANGELOG.md +10 -2
- data/Gemfile +1 -1
- data/lib/solidus_support/engine_extensions.rb +23 -5
- data/lib/solidus_support/version.rb +1 -1
- data/spec/examples.txt +9 -15
- data/spec/solidus_support/legacy_event_compat/legacy_event_compat_spec.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c43a1b7508840f6023b1575287415fc3bf181d5ea05126243c97b8838ad2be1c
|
4
|
+
data.tar.gz: 98c56af653e3ae527b117d5ebdec7ef9832ff5e0e8a059fc7de881ed5b1f0949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c8284f184e195e9e0ddbbf60ce476da9f4ac78e0666566d8696d0b41c54a53efa1badf3dc43140f55ad32bff25b1861eaf4275bc009999092c46cad387439ad
|
7
|
+
data.tar.gz: 8f1e30f574df23d1c8c71be6c3e4d0525c5f440d82d84d470b9d932bc0b72c5993a477a7d7151e19bba2d2cdb063a4216c5bf2275e099126ac309f9ed1ca5037
|
data/.circleci/config.yml
CHANGED
@@ -8,28 +8,54 @@ orbs:
|
|
8
8
|
solidusio_extensions: solidusio/extensions@volatile
|
9
9
|
|
10
10
|
jobs:
|
11
|
-
run-specs
|
12
|
-
|
11
|
+
run-specs:
|
12
|
+
parameters:
|
13
|
+
solidus:
|
14
|
+
type: string
|
15
|
+
default: main
|
16
|
+
db:
|
17
|
+
type: string
|
18
|
+
default: "postgres"
|
19
|
+
ruby:
|
20
|
+
type: string
|
21
|
+
default: "3.2"
|
22
|
+
executor:
|
23
|
+
name: solidusio_extensions/<< parameters.db >>
|
24
|
+
ruby_version: << parameters.ruby >>
|
13
25
|
steps:
|
14
|
-
-
|
15
|
-
|
16
|
-
executor: solidusio_extensions/mysql
|
17
|
-
steps:
|
18
|
-
- solidusio_extensions/run-tests
|
26
|
+
- checkout
|
27
|
+
- solidusio_extensions/run-tests-solidus-<< parameters.solidus >>
|
19
28
|
|
20
29
|
workflows:
|
21
30
|
"Run specs on supported Solidus versions":
|
22
31
|
jobs:
|
23
|
-
- run-specs
|
24
|
-
|
25
|
-
|
32
|
+
- run-specs:
|
33
|
+
name: &name "run-specs-solidus-<< matrix.solidus >>-ruby-<< matrix.ruby >>-db-<< matrix.db >>"
|
34
|
+
matrix:
|
35
|
+
parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
|
36
|
+
- run-specs:
|
37
|
+
name: *name
|
38
|
+
matrix:
|
39
|
+
parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] }
|
40
|
+
- run-specs:
|
41
|
+
name: *name
|
42
|
+
matrix:
|
43
|
+
parameters: { solidus: ["older"], ruby: ["3.0"], db: ["sqlite"] }
|
44
|
+
|
45
|
+
"Weekly run specs against main":
|
26
46
|
triggers:
|
27
47
|
- schedule:
|
28
48
|
cron: "0 0 * * 4" # every Thursday
|
29
49
|
filters:
|
30
50
|
branches:
|
31
51
|
only:
|
32
|
-
-
|
52
|
+
- main
|
33
53
|
jobs:
|
34
|
-
- run-specs
|
35
|
-
|
54
|
+
- run-specs:
|
55
|
+
name: *name
|
56
|
+
matrix:
|
57
|
+
parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
|
58
|
+
- run-specs:
|
59
|
+
name: *name
|
60
|
+
matrix:
|
61
|
+
parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] }
|
data/.github/stale.yml
CHANGED
@@ -1,17 +1 @@
|
|
1
|
-
|
2
|
-
daysUntilStale: 60
|
3
|
-
# Number of days of inactivity before a stale issue is closed
|
4
|
-
daysUntilClose: 7
|
5
|
-
# Issues with these labels will never be considered stale
|
6
|
-
exemptLabels:
|
7
|
-
- pinned
|
8
|
-
- security
|
9
|
-
# Label to use when marking an issue as stale
|
10
|
-
staleLabel: wontfix
|
11
|
-
# Comment to post when marking an issue as stale. Set to `false` to disable
|
12
|
-
markComment: >
|
13
|
-
This issue has been automatically marked as stale because it has not had
|
14
|
-
recent activity. It will be closed if no further activity occurs. Thank you
|
15
|
-
for your contributions.
|
16
|
-
# Comment to post when closing a stale issue. Set to `false` to disable
|
17
|
-
closeComment: false
|
1
|
+
_extends: .github
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v0.9.1](https://github.com/solidusio/solidus_support/tree/v0.9.1) (2022-06-01)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/solidusio/solidus_support/compare/v0.
|
5
|
+
[Full Changelog](https://github.com/solidusio/solidus_support/compare/v0.9.0...v0.9.1)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Add extension paths before `initialize_cache` [\#71](https://github.com/solidusio/solidus_support/pull/71) ([gsmendoza](https://github.com/gsmendoza))
|
10
|
+
|
11
|
+
## [v0.9.0](https://github.com/solidusio/solidus_support/tree/v0.9.0) (2022-05-25)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/solidusio/solidus_support/compare/v0.8.1...v0.9.0)
|
6
14
|
|
7
15
|
**Closed issues:**
|
8
16
|
|
data/Gemfile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
5
5
|
|
6
|
-
branch = ENV.fetch('SOLIDUS_BRANCH', '
|
6
|
+
branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
|
7
7
|
gem 'solidus_core', github: 'solidusio/solidus', branch: branch
|
8
8
|
|
9
9
|
case ENV['DB']
|
@@ -82,7 +82,24 @@ module SolidusSupport
|
|
82
82
|
#
|
83
83
|
# @see #load_solidus_decorators_from
|
84
84
|
def enable_solidus_engine_support(engine)
|
85
|
-
|
85
|
+
# In the past, view and controller paths of Solidus extensions were
|
86
|
+
# added at extension loading time. As a result, if an extension
|
87
|
+
# customizing a Solidus engine is loaded before that engine
|
88
|
+
# (for example, the extension is declared before the `solidus_frontend`
|
89
|
+
# engine in the `Gemfile`), then the extension's paths for that Solidus
|
90
|
+
# engine wouldn't be loaded.
|
91
|
+
|
92
|
+
# The initializer below runs before `initialize_cache` because
|
93
|
+
# `initialize_cache` runs 1) after the Solidus engines have already
|
94
|
+
# loaded BUT 2) before Rails has added the paths to `$LOAD_PATH`.
|
95
|
+
# Normally, it would be sufficient to run the initializer below before
|
96
|
+
# the `set_load_path` initializer. However, external gems such as
|
97
|
+
# Deface may also change the load paths immediately before
|
98
|
+
# `set_load_path`. To ensure that our extension paths are not affected
|
99
|
+
# by those gems, we work around those gems by adding our paths before
|
100
|
+
# `initialize_cache`, which is the Rails initializer called before
|
101
|
+
# `set_load_path`.
|
102
|
+
initializer "#{name}_#{engine}_paths", before: :initialize_cache do
|
86
103
|
if SolidusSupport.send(:"#{engine}_available?")
|
87
104
|
paths['app/controllers'] << "lib/controllers/#{engine}"
|
88
105
|
paths['app/views'] << "lib/views/#{engine}"
|
@@ -90,14 +107,15 @@ module SolidusSupport
|
|
90
107
|
end
|
91
108
|
|
92
109
|
if SolidusSupport.send(:"#{engine}_available?")
|
93
|
-
|
94
|
-
|
95
|
-
config.autoload_paths +=
|
110
|
+
decorators_path = root.join("lib/decorators/#{engine}")
|
111
|
+
controllers_path = root.join("lib/controllers/#{engine}")
|
112
|
+
config.autoload_paths += decorators_path.glob('*')
|
113
|
+
config.autoload_paths += controllers_path.glob('*')
|
96
114
|
|
97
115
|
engine_context = self
|
98
116
|
config.to_prepare do
|
99
117
|
engine_context.instance_eval do
|
100
|
-
load_solidus_decorators_from(
|
118
|
+
load_solidus_decorators_from(decorators_path)
|
101
119
|
end
|
102
120
|
end
|
103
121
|
end
|
data/spec/examples.txt
CHANGED
@@ -1,15 +1,9 @@
|
|
1
|
-
example_id
|
2
|
-
|
3
|
-
./spec/
|
4
|
-
./spec/
|
5
|
-
./spec/
|
6
|
-
./spec/
|
7
|
-
./spec/
|
8
|
-
./spec/
|
9
|
-
./spec/
|
10
|
-
./spec/solidus_support/legacy_event_compat/legacy_event_compat_spec.rb[1:1:7] | passed | 0.00656 seconds |
|
11
|
-
./spec/solidus_support_spec.rb[1:1:1:1] | passed | 0.00095 seconds |
|
12
|
-
./spec/solidus_support_spec.rb[1:1:2:1] | passed | 1.11 seconds |
|
13
|
-
./spec/solidus_support_spec.rb[1:2:1:1] | passed | 0.0055 seconds |
|
14
|
-
./spec/solidus_support_spec.rb[1:2:2:1] | passed | 0.00081 seconds |
|
15
|
-
./spec/solidus_support_spec.rb[1:2:3:1] | passed | 0.0003 seconds |
|
1
|
+
example_id | status | run_time |
|
2
|
+
----------------------------------------- | ------ | --------------- |
|
3
|
+
./spec/solidus_support_spec.rb[1:1:1:1] | passed | 0.00024 seconds |
|
4
|
+
./spec/solidus_support_spec.rb[1:1:2:1] | passed | 0.00028 seconds |
|
5
|
+
./spec/solidus_support_spec.rb[1:1:3:1:1] | passed | 0.00094 seconds |
|
6
|
+
./spec/solidus_support_spec.rb[1:1:3:2:1] | passed | 0.25256 seconds |
|
7
|
+
./spec/solidus_support_spec.rb[1:2:1:1] | passed | 0.00599 seconds |
|
8
|
+
./spec/solidus_support_spec.rb[1:2:2:1] | passed | 0.00026 seconds |
|
9
|
+
./spec/solidus_support_spec.rb[1:2:3:1] | passed | 0.0002 seconds |
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'omnes'
|
4
4
|
|
5
|
-
RSpec.describe SolidusSupport::LegacyEventCompat::Subscriber do
|
5
|
+
RSpec.describe SolidusSupport::LegacyEventCompat::Subscriber, if: Spree.solidus_version < Gem::Version.new("4.0.0.dev") do
|
6
6
|
subject { Module.new.include(Spree::Event::Subscriber).include(described_class) }
|
7
7
|
|
8
8
|
describe '#omnes_subscriber' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Hawthorn
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.2.2
|
125
|
-
description:
|
125
|
+
description:
|
126
126
|
email: john@stembolt.com
|
127
127
|
executables: []
|
128
128
|
extensions: []
|
@@ -160,7 +160,7 @@ homepage: https://github.com/solidusio/solidus_support
|
|
160
160
|
licenses:
|
161
161
|
- BSD-3-Clause
|
162
162
|
metadata: {}
|
163
|
-
post_install_message:
|
163
|
+
post_install_message:
|
164
164
|
rdoc_options: []
|
165
165
|
require_paths:
|
166
166
|
- lib
|
@@ -175,15 +175,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
179
|
-
signing_key:
|
178
|
+
rubygems_version: 3.3.7
|
179
|
+
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Common runtime helpers for Solidus extensions.
|
182
182
|
test_files:
|
183
|
-
- spec/spec_helper.rb
|
184
|
-
- spec/solidus_support/legacy_event_compat/legacy_event_compat_spec.rb
|
185
|
-
- spec/solidus_support/legacy_event_compat/bus_spec.rb
|
186
183
|
- spec/examples.txt
|
184
|
+
- spec/solidus_support/legacy_event_compat/bus_spec.rb
|
185
|
+
- spec/solidus_support/legacy_event_compat/legacy_event_compat_spec.rb
|
187
186
|
- spec/solidus_support_spec.rb
|
188
|
-
- spec/
|
187
|
+
- spec/spec_helper.rb
|
189
188
|
- spec/support/dummy_app/database.yml
|
189
|
+
- spec/support/dummy_app.rb
|