diff --git a/.gitignore b/.gitignore index 4a06d57..bdc01d0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ MYMETA.* !META.json /.prove +.idea diff --git a/README.md b/README.md index f94e766..89ce1a6 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,14 @@ BioX::Workflow::Command::REST - REST API for BioX::Workflow::Command # SYNOPSIS This is an extremely beta release - plackup -E deployment -s Starman -p 3001 -r -R `pwd`/lib -a script/biox-app.psgi + plackup -E deployment -s Starman -p 3001 -r -R $(pwd)/lib -a script/biox-app.psgi # DESCRIPTION BioX::Workflow::Command::REST exposes a REST API for BioX::Workflow::Command +This is hopefully the 1.0 version + # AUTHOR Jillian Rowe diff --git a/lib/BioX/Workflow/Command/REST/run.pm b/lib/BioX/Workflow/Command/REST/run.pm index 0f37cae..4c0ba8b 100644 --- a/lib/BioX/Workflow/Command/REST/run.pm +++ b/lib/BioX/Workflow/Command/REST/run.pm @@ -2,31 +2,33 @@ package Main; use MooseX::App::Command; extends 'BioX::Workflow::Command::run'; -with 'BioX::Workflow::Command::run::Utils::Rules'; +#with 'BioX::Workflow::Command::run::Utils::Rules'; use Data::Dumper; option '+workflow' => ( required => 0, ); -has 'text_obj' => ( - is => 'rw', - isa => 'HashRef', - default => sub { {} }, -); - -around 'eval_process' => sub { - my $orig = shift; - my $self = shift; - - my $text = $self->$orig(@_); - - if(! exists $self->text_obj->{$self->rule_name} ){ - $self->text_obj->{$self->rule_name} = [] ; - } - - push(@{$self->text_obj->{$self->rule_name}}, $text); - - return $text; -}; +# has 'text_obj' => ( +# is => 'rw', +# isa => 'HashRef', +# default => sub { {} }, +# ); +# +# #This is no longer necessary - we get this in the process_obj +# +# around 'eval_process' => sub { +# my $orig = shift; +# my $self = shift; +# +# my $text = $self->$orig(@_); +# +# if(! exists $self->text_obj->{$self->rule_name} ){ +# $self->text_obj->{$self->rule_name} = [] ; +# } +# +# push(@{$self->text_obj->{$self->rule_name}}, $text); +# +# return $text; +# }; package BioX::Workflow::Command::REST::run; @@ -88,7 +90,7 @@ api_default_format 'json'; desc 'Run a Workflow'; resource run => sub { - summary 'List users'; + summary 'Run a Workflow'; params( optional( 'select_rules', @@ -140,7 +142,7 @@ resource run => sub { $biox->iterate_rules; }; - { process_text => $stdout, logs => $stderr, text_obj => $biox->text_obj }; + { process_text => $stdout, logs => $stderr, text_obj => $biox->process_obj }; }; };