From 970f83978089956a003e7fc54eda3be47ef832e6 Mon Sep 17 00:00:00 2001 From: Vladimir Dobriakov Date: Thu, 16 May 2024 17:10:16 +0200 Subject: [PATCH] README - fix links to github issues --- README.adoc | 13 +++++++++---- test/conditionals_test.rb | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.adoc b/README.adoc index b1521bc..0ed3128 100644 --- a/README.adoc +++ b/README.adoc @@ -408,7 +408,7 @@ When calling a `device.can_?` check, or attempting a `device. * If you've run out of events to check (eg. `battery_level == 0`), then the transition isn't possible. You can also pass additional arguments, which can be evaluated by :if methods or procs. See examples in -[conditionals_test.rb](test/conditionals_test.rb#L45) +link:test/conditionals_test.rb#L45[conditionals_test.rb] ### Advanced transition hooks @@ -517,13 +517,13 @@ Changelog === New in the version 3.1.0 -* gh-227 allow event arguments to be taken into account when selecting the event +* link:https://github.com/geekq/workflow/pull/227[#227] allow event arguments to be taken into account when selecting the event === New in the version 3.0.0 -* gh-228 Support for Ruby 3 keyword args, provided by @agirling +* link:https://github.com/geekq/workflow/pull/228[#228] Support for Ruby 3 keyword args, provided by @agirling * retire Ruby 2.6 since it has reached end of live; please use workflow 2.x, if you still depend on that Ruby version -* gh-229 Switch from travis CI to GihHub actions for continuous integration +* link:https://github.com/geekq/workflow/pull/229[#229] Switch from travis CI to GihHub actions for continuous integration ### New in the versions 2.x @@ -549,6 +549,11 @@ bundle install bundle exec rake test ``` +### Check list for you pull request + +* [ ] unit tests for the new behavior provided: new tests fail without you change, all tests succeed with your change +* [ ] documentation update included + ### Other 3rd party libraries https://github.com/kwent/active_admin-workflow[ActiveAdmin-Workflow] - is an diff --git a/test/conditionals_test.rb b/test/conditionals_test.rb index 17cb14e..852cb45 100644 --- a/test/conditionals_test.rb +++ b/test/conditionals_test.rb @@ -48,7 +48,7 @@ def sufficient_battery_level? # define more advanced workflow, where event methods allow arguments workflow do state :off do - # turn_on accepts additional argument `power_adapter` + # turn_on and transition filters accepts additional argument `power_adapter` event :turn_on, :transitions_to => :on, :if => :sufficient_battery_level? event :turn_on, :transitions_to => :low_battery # otherwise end @@ -77,7 +77,7 @@ def sufficient_battery_level?(power_adapter=false) # define more advanced workflow, where event methods allow arguments workflow do state :off do - # turn_on accepts additional argument `power_adapter` + # turn_on and transition filters accepts additional argument `power_adapter` event :turn_on, :transitions_to => :on, :if => proc { |obj, power_adapter| power_adapter || obj.battery > 10 } event :turn_on, :transitions_to => :low_battery # otherwise end