From 01c42234b540543e3a9a909f9cb93de6966d47c0 Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Mon, 23 Mar 2015 19:18:30 +0100 Subject: [PATCH 1/2] Use the same namespace that all the related gems --- lib/state_machines/yard/handlers.rb | 2 +- lib/state_machines/yard/handlers/base.rb | 2 +- lib/state_machines/yard/handlers/event.rb | 2 +- lib/state_machines/yard/handlers/machine.rb | 2 +- lib/state_machines/yard/handlers/state.rb | 2 +- lib/state_machines/yard/handlers/transition.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/state_machines/yard/handlers.rb b/lib/state_machines/yard/handlers.rb index 7c34daf..91098db 100644 --- a/lib/state_machines/yard/handlers.rb +++ b/lib/state_machines/yard/handlers.rb @@ -1,4 +1,4 @@ -module StateMachine +module StateMachines module YARD # YARD custom handlers for integrating the state_machine DSL with the # YARD documentation system diff --git a/lib/state_machines/yard/handlers/base.rb b/lib/state_machines/yard/handlers/base.rb index ad72773..0d6e0e2 100644 --- a/lib/state_machines/yard/handlers/base.rb +++ b/lib/state_machines/yard/handlers/base.rb @@ -1,4 +1,4 @@ -module StateMachine +module StateMachines module YARD module Handlers # Handles and processes nodes diff --git a/lib/state_machines/yard/handlers/event.rb b/lib/state_machines/yard/handlers/event.rb index 3d566d4..409d516 100644 --- a/lib/state_machines/yard/handlers/event.rb +++ b/lib/state_machines/yard/handlers/event.rb @@ -1,4 +1,4 @@ -module StateMachine +module StateMachines module YARD module Handlers # Handles and processes #event diff --git a/lib/state_machines/yard/handlers/machine.rb b/lib/state_machines/yard/handlers/machine.rb index c34e0ca..c6f4835 100644 --- a/lib/state_machines/yard/handlers/machine.rb +++ b/lib/state_machines/yard/handlers/machine.rb @@ -1,4 +1,4 @@ -module StateMachine +module StateMachines module YARD module Handlers # Handles and processes #state_machine diff --git a/lib/state_machines/yard/handlers/state.rb b/lib/state_machines/yard/handlers/state.rb index 8da77ec..a513554 100644 --- a/lib/state_machines/yard/handlers/state.rb +++ b/lib/state_machines/yard/handlers/state.rb @@ -1,4 +1,4 @@ -module StateMachine +module StateMachines module YARD module Handlers # Handles and processes #state diff --git a/lib/state_machines/yard/handlers/transition.rb b/lib/state_machines/yard/handlers/transition.rb index 4710342..7b3f2a6 100644 --- a/lib/state_machines/yard/handlers/transition.rb +++ b/lib/state_machines/yard/handlers/transition.rb @@ -1,4 +1,4 @@ -module StateMachine +module StateMachines module YARD module Handlers # Handles and processes #transition From 60d40283f1b484ace2271ceb925445160f5468fd Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Mon, 23 Mar 2015 19:24:31 +0100 Subject: [PATCH 2/2] More robust handling of conditional transitions --- lib/state_machines/yard/handlers/transition.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/state_machines/yard/handlers/transition.rb b/lib/state_machines/yard/handlers/transition.rb index 7b3f2a6..7ba0467 100644 --- a/lib/state_machines/yard/handlers/transition.rb +++ b/lib/state_machines/yard/handlers/transition.rb @@ -13,7 +13,7 @@ def process ast = statement.parameters.first ast.children.each do |assoc| # Skip conditionals - next if %w(if unless).include?(assoc[0].jump(:ident).source) + next if %w(if :if unless :unless).include?(assoc[0].jump(:ident).source) options[extract_requirement(assoc[0])] = extract_requirement(assoc[1]) end