Skip to content

Commit

Permalink
README - fix links to github issues
Browse files Browse the repository at this point in the history
  • Loading branch information
geekq committed May 17, 2024
1 parent b118f24 commit 970f839
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ When calling a `device.can_<fire_event>?` check, or attempting a `device.<event>
* 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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/conditionals_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 970f839

Please sign in to comment.