-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a11d73
commit d879895
Showing
8 changed files
with
62 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
0.02 | ||
0.03 (beta) | ||
- config file become JSON. | ||
- URL become more restful. | ||
0.02 (beta) | ||
- fixed blob, blog_plain, commitdiff, commitdiff_plain encoding bug | ||
0.01 | ||
|
||
0.01 (beta) | ||
- first beta release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
hypnotoad => { | ||
listen => ['http://*:10010'] | ||
// Server config | ||
"hypnotoad" : { | ||
"listen" : ["http://*:10010"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
# Search directory | ||
search_dirs => ['/git/pub', '/home'], | ||
// Search directory | ||
"search_dirs" : ["/git/pub", "/home"], | ||
|
||
# Serach max depth | ||
search_max_depth => 10, | ||
// Serach max depth | ||
"search_max_depth" : 10, | ||
|
||
# Git command | ||
git_bin => '/usr/local/bin/git', | ||
// Git command | ||
"git_bin" : "/usr/local/bin/git", | ||
|
||
# Server config | ||
hypnotoad => { | ||
listen => ['http://*:10010'] | ||
// Server config | ||
"hypnotoad" : { | ||
"listen" : ["http://*:10010"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package Mojolicious::Plugin::JSONConfigLoose; | ||
use Mojo::Base 'Mojolicious::Plugin::JSONConfig'; | ||
|
||
sub load { | ||
my ($self, $file, $conf, $app) = @_; | ||
$app->log->debug(qq/Reading config file "$file"./); | ||
|
||
# Slurp UTF-8 file | ||
open my $handle, "<:encoding(UTF-8)", $file | ||
or die qq/Couldn't open config file "$file": $!/; | ||
my $content; | ||
while (my $line = <$handle>) { | ||
next if $line =~ m#^\s*//#; | ||
$content .= $line; | ||
} | ||
|
||
# Process | ||
return $self->parse($content, $file, $conf, $app); | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters