Skip to content

Commit 9dd02e3

Browse files
authored
Merge pull request #15 from Kaligo/chore/monkey-patch
Require hanami monkey-patch in idempotency/hanami
2 parents 333fa1d + 0186d52 commit 9dd02e3

File tree

8 files changed

+12
-4
lines changed

8 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## [Change Log]
22

3+
## [0.2.0] - 2025-07-28
4+
5+
- Enforce explicit monkey-patch requirement
6+
37
## [0.1.5] - 2025-02-04
48

59
- Set correct expiration time for idempotency cache

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
idempotency (0.1.5)
4+
idempotency (0.2.0)
55
base64
66
dry-configurable
77
dry-monitor

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Add this to your controller:
7272

7373
```ruby
7474
require 'idempotency/hanami'
75+
require 'idempotency/hanami_extend' # use this if around callback is necessary
7576

7677
class Api::Controllers::Users::Create
7778
include Hanami::Action
File renamed without changes.

lib/idempotency/hanami_extend.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# frozen_string_literal: true
2+
3+
require_relative 'hanami/action/callbacks'
4+
require_relative 'hanami/utils/callbacks'

lib/idempotency/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
class Idempotency
4-
VERSION = '0.1.5'
4+
VERSION = '0.2.0'
55
end

spec/hanami/action/callbacks_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'hanami-controller'
4-
require_relative '../../../lib/hanami/action/callbacks'
5-
require_relative '../../../lib/hanami/utils/callbacks'
4+
require_relative '../../../lib/idempotency/hanami_extend'
65

76
RSpec.describe Hanami::Action::Callbacks do
87
describe 'callbacks' do

0 commit comments

Comments
 (0)