hidden_hooks 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +4 -1
- data/hidden_hooks.gemspec +2 -2
- data/lib/hidden_hooks/active_record.rb +11 -0
- data/lib/hidden_hooks/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e80baab48dbc8bc16a9dd82cbe6ba965d1b5076d0658404e7641e3c1e7818797
|
4
|
+
data.tar.gz: 13b66da95b3dad6192d4ccab88b9f19f2c0cbb980b6e721b24df06e1cbea32ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b234e254887127321a42ff8ee96da7ba0f6a80179ca1bd1871a24d753143295746b1f99afcf57a01a4aa8f9fe987c3aefc791b655351e7f0aa6f69bdcbd0cd1
|
7
|
+
data.tar.gz: 26eb29ecc3824a2628fafc7d21b687e37e66da4a3d2c16c439fcc9351b5c3324cb4aaf2a78b116b756e1324c1411bd21d00ddd780f89add7c0df9cf3a2bbe151
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,13 @@
|
|
8
8
|
### Bug fixes
|
9
9
|
)-->
|
10
10
|
|
11
|
+
## 1.1.0 2025-01-28
|
12
|
+
|
13
|
+
### New features
|
14
|
+
|
15
|
+
- Added transactional callbacks to the Active Record integration.
|
16
|
+
- Added `around_*` callbacks to the Active Record integration.
|
17
|
+
|
11
18
|
## 1.0.0 2025-01-24
|
12
19
|
|
13
20
|
First release. Refer to [README.md](README.md) for the full documentation.
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
A way to defer hooks to reduce dependencies.
|
4
4
|
|
5
|
-
Sometimes we need callbacks that break dependencies. This gem allows to invert those dependencies.
|
5
|
+
Sometimes we need callbacks that break architectural dependencies. This gem allows to invert those dependencies.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -115,6 +115,9 @@ module IssueTracker
|
|
115
115
|
end
|
116
116
|
```
|
117
117
|
|
118
|
+
> [!NOTE]
|
119
|
+
> You can call the hook whatever you want. The only constraint is if you use the [Rails integration](#rails-callbacks), as you see below.
|
120
|
+
|
118
121
|
#### Interface Declaration
|
119
122
|
|
120
123
|
A class `C` declares the interface through `HiddenHooks[C]`. Calling a method on the returned proxy will call every hook that someone else defined, forwarding any argument.
|
data/hidden_hooks.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.license = 'MIT'
|
9
9
|
|
10
10
|
spec.summary = 'A way to defer hooks to reduce dependencies.'
|
11
|
-
spec.description = 'Sometimes we need callbacks that break dependencies. This gem allows to
|
12
|
-
'dependencies.'
|
11
|
+
spec.description = 'Sometimes we need callbacks that break architectural dependencies. This gem allows to ' \
|
12
|
+
'invert those dependencies.'
|
13
13
|
spec.homepage = 'https://github.com/moku-io/hidden_hooks'
|
14
14
|
spec.required_ruby_version = '>= 3.0.0'
|
15
15
|
|
@@ -6,14 +6,25 @@ module HiddenHooks
|
|
6
6
|
|
7
7
|
included do
|
8
8
|
[
|
9
|
+
:after_commit,
|
9
10
|
:after_create,
|
11
|
+
:after_create_commit,
|
10
12
|
:after_destroy,
|
13
|
+
:after_destroy_commit,
|
11
14
|
:after_find,
|
12
15
|
:after_initialize,
|
16
|
+
:after_rollback,
|
13
17
|
:after_save,
|
18
|
+
:after_save_commit,
|
14
19
|
:after_touch,
|
15
20
|
:after_update,
|
21
|
+
:after_update_commit,
|
16
22
|
:after_validation,
|
23
|
+
:around_create,
|
24
|
+
:around_destroy,
|
25
|
+
:around_save,
|
26
|
+
:around_update,
|
27
|
+
:before_commit,
|
17
28
|
:before_create,
|
18
29
|
:before_destroy,
|
19
30
|
:before_save,
|
data/lib/hidden_hooks/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hidden_hooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moku S.r.l.
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-01-
|
12
|
+
date: 2025-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -25,8 +25,8 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
|
-
description: Sometimes we need callbacks that break dependencies. This
|
29
|
-
to invert those dependencies.
|
28
|
+
description: Sometimes we need callbacks that break architectural dependencies. This
|
29
|
+
gem allows to invert those dependencies.
|
30
30
|
email:
|
31
31
|
- info@moku.io
|
32
32
|
executables: []
|