conventional_extensions 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/conventional_extensions/version.rb +1 -1
- data/lib/conventional_extensions.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55f0ae6b450c3fb4363ce991624506d3155878b101b1547ba16dd30c339f93f1
|
4
|
+
data.tar.gz: 4efeba98bac400653a8ba3877da043583da29638f3e934877ae231ec8d33e15c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 023a7134b14d0c20670fb548f4466290278f403ac9cd374b3c8b6a1ab8f58b9f8d9c7c502f599469ce8a4aeeb3288599bcb8c95b773b9b63f9c36e978a61b8d2
|
7
|
+
data.tar.gz: 59b476799cbe313d539b2802420b4fc938e5628dad7e59cc9f258396dcaf140d553d6db6d2c042bbd6f8c1670b3629bcc65e7c02e07e98eb817e0dc164187c54
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.2] - 2022-09-08
|
4
|
+
|
5
|
+
- Fixes Zeitwerk 2.6.0 compatibility issue where extensions wouldn't load and throw an exception. See https://github.com/kaspth/conventional_extensions/commit/7fc25f1e860637e8df9fd0e81e7ca038c8c34aa0
|
6
|
+
|
3
7
|
## [0.2.1] - 2022-09-07
|
4
8
|
|
5
9
|
- Fixes `extend ConventionalExtensions.load_on_inherited` not finding the right directory to load extensions from. See https://github.com/kaspth/conventional_extensions/commit/1f6fe9cbf2fe44ed9d699a5dd485eaa366d875a4
|
data/Gemfile.lock
CHANGED
@@ -5,8 +5,8 @@ require_relative "conventional_extensions/version"
|
|
5
5
|
module ConventionalExtensions
|
6
6
|
Object.extend self # We're enriching object itself, so any object can call `load_extensions`.
|
7
7
|
|
8
|
-
def load_extensions(*extensions)
|
9
|
-
@loader = Loader.new(self,
|
8
|
+
def load_extensions(*extensions, from: Frame.previous.path)
|
9
|
+
@loader = Loader.new(self, from) unless loader_defined_before_entrance = defined?(@loader)
|
10
10
|
@loader.load(*extensions)
|
11
11
|
ensure
|
12
12
|
@loader = nil unless loader_defined_before_entrance
|
@@ -19,7 +19,13 @@ module ConventionalExtensions
|
|
19
19
|
module LoadOnInherited
|
20
20
|
def inherited(klass)
|
21
21
|
super
|
22
|
-
klass.load_extensions
|
22
|
+
klass.load_extensions from: Frame.previous.path
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module Frame
|
27
|
+
def self.previous
|
28
|
+
caller_locations(2, 1).first # Use 2 instead of 1 so we get the frame of who called us.
|
23
29
|
end
|
24
30
|
end
|
25
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conventional_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Timm Hansen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|