Skip to content

Commit

Permalink
#80 removed $app->home attribute
Browse files Browse the repository at this point in the history
Also $ENV{MOJO_HOME} is not set explicitly any more.
  • Loading branch information
kberov committed Feb 5, 2015
1 parent 71aed42 commit 9d5a199
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
5 changes: 3 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Revision history for Ado

0.79 2015-02-05
- Implemented $app->home to better detect and set MOJO_HOME.
0.79 2015-02-06
- $ENV{MOJO_HOME} is not set explicitly any more.
Just using app->home from Mojo.

0.78 2015-02-01
- Improved documentation.
Expand Down
18 changes: 0 additions & 18 deletions lib/Ado.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ use Ado::Sessions;
sub CODENAME { return $CODENAME }
has sessions => sub { Ado::Sessions::get_instance(shift->config) };

#allow many ado scripts sharing the same lib
has home => sub {
return Mojo::Home->new->detect(ref shift) if $ENV{MOJO_HOME};
my @home = splitdir File::Basename::dirname(__FILE__);
while (pop @home) {
$ENV{MOJO_HOME} = catdir(@home) if -s catfile(@home, 'bin', 'ado');
}
return Mojo::Home->new->detect(ref shift);
};

# This method will run once at server start
sub startup {
Expand Down Expand Up @@ -137,15 +128,6 @@ Ado inherits all attributes from Mojolicious and implements the following ones.
Returns the current C<CODENAME>.
=head2 home
#/where/is/ado/root dir
$app->home;
Returns the root directory into which Ado is installed.
B<Note>: This is the directory that contains C<bin/ado>.
=head2 sessions
Access the L<Ado::Sessions> instance. Instantiates one of
Expand Down
2 changes: 1 addition & 1 deletion lib/Ado/Command/generate/adoplugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ sub register {
<% %>=head1 SYNOPSIS
# <%= $ENV{MOJO_HOME}%>/etc/ado.config
# $ENV{MOJO_HOME}/etc/ado.config
plugins => {
# other plugins here...
'<%= $name %>',
Expand Down

0 comments on commit 9d5a199

Please sign in to comment.