flickwerk 0.2.1 → 0.3.1
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: a3f767550c0a11caaa3f1fd9d2ceb95cebc12ed22d7b0a0f90891127364f2843
|
4
|
+
data.tar.gz: 83d91c33bffa4f7f2a66ad22fe19c0e55a768ee0f88db1d6e03aec423e844740
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75ff28c2a648734224cf853f91bd27c2349c8fe57d6ac0d7637977ed55a13cb14fcee781cd15757d1c8a851d654c7cceadb849f03702fd713099ddf26e4b5edc
|
7
|
+
data.tar.gz: '00192ccc657c51c20aab77b476dde7d0c2344ae03d0dadbc87697fa5f91691c7350dda66071ea373d40df00da53b42239035bf7d63177abff5716e04d21abb44'
|
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.reloader.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.reloader.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.1
|
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
|