flickwerk 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flickwerk/railtie.rb +9 -5
- data/lib/flickwerk/version.rb +1 -1
- data/lib/flickwerk.rb +3 -1
- 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: a2282cc97b8ee8bb05493ba03cf1ed27690fdffacf62bb8ff203b6db3bf6c36c
|
4
|
+
data.tar.gz: 943a5ae6ec43be5b7139ba5b578335339564cb0ab832a0038250a58e005e46cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a93c5ffc75887ee60dde2635995ac097b70fe6b068106be82a173106eeb9c8d122e38053f9e42880940434fde943adf6b2bc02fab3965da252819c1880f2a89
|
7
|
+
data.tar.gz: 28891d06643e9cc430a5b793704abe65baa14825af3bf49a52bcc07fa9e4c32bcdce56a97e0b8f16f70ce3b125c9dcf3efaf64d09b8e0cf21e44b18191b3cc5b
|
data/lib/flickwerk/railtie.rb
CHANGED
@@ -10,13 +10,17 @@ class Flickwerk::Railtie < Rails::Railtie
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
initializer "flickwerk.find_patches"
|
14
|
-
|
15
|
-
Flickwerk
|
13
|
+
initializer "flickwerk.find_patches" do |app|
|
14
|
+
app.config.to_prepare do
|
15
|
+
Flickwerk.patch_paths.each do |path|
|
16
|
+
Flickwerk::PatchFinder.new(path).call
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
19
|
-
initializer "flickwerk.add_patches", after: "flickwerk.find_patches" do
|
20
|
-
|
21
|
+
initializer "flickwerk.add_patches", after: "flickwerk.find_patches" do |app|
|
22
|
+
app.config.to_prepare do
|
23
|
+
Flickwerk::PatchLoader.call
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
data/lib/flickwerk/version.rb
CHANGED
data/lib/flickwerk.rb
CHANGED
@@ -9,6 +9,7 @@ module Flickwerk
|
|
9
9
|
|
10
10
|
mattr_accessor :patch_paths, default: []
|
11
11
|
mattr_accessor :patches, default: Hash.new([])
|
12
|
+
mattr_accessor :aliases, default: {}
|
12
13
|
|
13
14
|
def self.included(engine)
|
14
15
|
engine.root.glob("app/patches/*").each do |path|
|
@@ -17,6 +18,7 @@ module Flickwerk
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def self.patch(class_name, with:)
|
20
|
-
|
21
|
+
klass_name = aliases[class_name] || class_name
|
22
|
+
patches[klass_name] += [with]
|
21
23
|
end
|
22
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickwerk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Meyerhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|