From 0b4437c6b270557390249d46dbc1f1f3d86fd951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strzebi=C5=84czyk?= Date: Mon, 7 Oct 2024 13:35:16 +0200 Subject: [PATCH] Undeprecate Granite::Action#perform (#139) --- CHANGELOG.md | 4 ++++ lib/granite/action/performing.rb | 3 --- lib/granite/version.rb | 2 +- spec/spec_helper.rb | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db69e03..6313c42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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!` diff --git a/lib/granite/action/performing.rb b/lib/granite/action/performing.rb index b8d7185..fce56dc 100644 --- a/lib/granite/action/performing.rb +++ b/lib/granite/action/performing.rb @@ -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) diff --git a/lib/granite/version.rb b/lib/granite/version.rb index 182b597..88f7ca2 100644 --- a/lib/granite/version.rb +++ b/lib/granite/version.rb @@ -1,3 +1,3 @@ module Granite - VERSION = '0.17.3'.freeze + VERSION = '0.17.4'.freeze end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8aad349..d8fd4a0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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'