Skip to content

Commit

Permalink
Undeprecate Granite::Action#perform (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
lstrzebinczyk authored Oct 7, 2024
1 parent 59ad5ba commit 0b4437c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Next

## v0.17.4

* Undeprecate the `Granite::Action#perform` method.

## v0.17.3

* Stopped preconditions from being executed twice on `#try_perform!`
Expand Down
3 changes: 0 additions & 3 deletions lib/granite/action/performing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ def perform(*)
# database transaction. Returns the result of execute_perform! method execution
# or true if method execution returned false or nil
#
# @deprecated Use {#perform!} or {#try_perform!} instead
# @param context [Symbol] can be optionally provided to define which
# validations to test against (the context is defined on validations
# using `:on`)
# @return [Object] result of execute_perform! method execution or false in case of errors
def perform(context: nil, **options)
Granite.deprecator.warn('Granite::Action#perform is deprecated, use #perform! or #try_perform! instead')

transaction do
raise Rollback unless valid?(context)

Expand Down
2 changes: 1 addition & 1 deletion lib/granite/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Granite
VERSION = '0.17.3'.freeze
VERSION = '0.17.4'.freeze
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
require 'rspec/matchers/fail_matchers'
require 'simplecov'
SimpleCov.start do
minimum_coverage 99.66
minimum_coverage 99.63
end

require 'granite'
Expand Down

0 comments on commit 0b4437c

Please sign in to comment.