Skip to content

Commit e57c2ad

Browse files
committed
Ensure the naming of files during app and dockerfile generation is consistent
1 parent 4093223 commit e57c2ad

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/Mojolicious.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ has log => sub {
3535
};
3636
has 'max_request_size';
3737
has mode => sub { $ENV{MOJO_MODE} || $ENV{PLACK_ENV} || 'development' };
38-
has moniker => sub { Mojo::Util::decamelize ref shift };
38+
has moniker => sub { Mojo::Util::class_to_file ref shift };
3939
has plugins => sub { Mojolicious::Plugins->new };
4040
has preload_namespaces => sub { [] };
4141
has renderer => sub { Mojolicious::Renderer->new };
@@ -425,7 +425,7 @@ variables or C<development>.
425425
$app = $app->moniker('foo_bar');
426426
427427
Moniker of this application, often used as default filename for configuration files and the like, defaults to
428-
decamelizing the application class with L<Mojo::Util/"decamelize">.
428+
transforming the application class with L<Mojo::Util/"class_to_file">.
429429
430430
=head2 plugins
431431

lib/Mojolicious/Command/Author/generate/app.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sub run {
1919
$self->render_to_rel_file('appclass', "$name/lib/$app", {class => $class});
2020

2121
# Config file (using the default moniker)
22-
$self->render_to_rel_file('config', "$name/@{[decamelize $class]}.yml");
22+
$self->render_to_rel_file('config', "$name/$name.yml");
2323

2424
# Controller
2525
my $controller = "${class}::Controller::Example";

t/mojo/daemon.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ subtest 'Timeout' => sub {
270270
subtest 'Pipelined' => sub {
271271
my $daemon = Mojo::Server::Daemon->new({listen => ['http://127.0.0.1'], silent => 1});
272272
my $port = $daemon->start->ports->[0];
273-
is $daemon->app->moniker, 'mojo-hello_world', 'right moniker';
273+
is $daemon->app->moniker, 'mojo_hello_world', 'right moniker';
274274
my $buffer = '';
275275
my $id;
276276
$id = Mojo::IOLoop->client(

0 commit comments

Comments
 (0)