Permalink
Browse files

project REPLs working perfectly!

  • Loading branch information...
1 parent b6569cd commit 98b2afcdb0e52c709fff9b723f7d3dd387aaec11 @jrockway committed Apr 29, 2010
Showing with 6 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +2 −0 lib/Stylish/REPL/Project.pm
  3. +3 −1 lib/Stylish/Server/Session.pm
View
@@ -7,3 +7,4 @@ pm_to_blib
MANIFEST
Makefile.old
TAGS
+/el/*.elc
@@ -141,4 +141,6 @@ class Stylish::REPL::Project {
method push_eval(@args){
$self->good_repl->push_eval(@args);
}
+
+ method BUILD { $self->change }
}
@@ -117,6 +117,8 @@ class Stylish::Server::Session {
# kill any in-progress activities
$_->cancel for @coros;
+ $self->remove_project($_) for $self->list_projects;
+ $self->remove_repl($_) for $self->list_repls;
}
method project_change(Stylish::Project $project, Str $name){
@@ -242,8 +244,8 @@ class Stylish::Server::Session {
when('register_project'){
my $dir = Path::Class::dir($args->{root} || die 'need root')
->resolve->absolute;
+ my $name = Path::Class::file($dir)->basename;
- my $name = $args->{name} || $dir->basename;
return $self->register_project(
$name, $dir,
sub {

0 comments on commit 98b2afc

Please sign in to comment.