Ado
view release on metacpan or search on metacpan
lib/Ado/Manual/Intro.pod view on Meta::CPAN
L<RAD|http://en.wikipedia.org/wiki/Rapid_application_development>, good
practices, and team-work. The default Ado page uses L<Semantic UI|http
://semantic-ui.com/> via L<Mojolicious::Plugin::SemanticUI> and is a good
place to get acquainted. In short, Ado can be used right away as a
L<CMS|http://en.wikipedia.org/wiki/Content_management_system> that can be
extended with L<plugins|Ado::Manual::Plugins> and L<commands|Ado::Command> or
as a L<CMF|http://en.wikipedia.org/wiki/List_of_content_management_frameworks>
on which to build many different specific applications.
Here is the directory structure. It does not contain the files for brevity. It
looks much the same as a full Mojolicious application would look and as
described in L<Mojolicious::Guides::Growing/Differences>. One noticeable
difference is that Ado has it's starter script in C<bin> instead of in
C<script> and this is only to ease the deployment. Another one is the
L<Ado::Control> namespace instead of Ado::Controlller. We did this for
brevity. The third difference is C<site_templates>, used for putting Ado
system-templates which you want to override, e.g put our own copy of
C<templates/partials/head.html.ep> in C<site_templates/partials/head.html.ep>
and modify it. This way you can create your own themes without fearing that on
the next upgrade your changes may be lost.
lib/Ado/Manual/Intro.pod view on Meta::CPAN
â  âââ sessions
âââ templates # Template directory. Copy from here to "site_templates" and
â # modify if you want to override some of the system templates
âââ default
âââ doc
âââ layouts
âââ partials
âââ test
And here is how Ado looks as building blocks:
=for HTML <img src="https://raw.githubusercontent.com/kberov/Ado/master/public/img/Ado-Building-Blocks.png" />
To learn more about Ado plugins, please look at L<Ado::Manual::Plugins>.
Now that you know what additional features Ado provides, you can proceed to
L<Ado::Manual::Installation>.
=head1 SEE ALSO
lib/Ado/Manual/Plugins.pod view on Meta::CPAN
Ado::Manual::Plugins - Ado plugins and how to write an Ado::Plugin
=head1 DESCRIPTION
C<@Ado::ISA=qw(Mojolicious)>. It is distributed together with a few plugins to
make it usable as a basic Mojolicious application. Theoretically all of the
plugins, distributed with L<Ado> could be disabled so you can start your project
only as a bare (I<but full>) L<Mojolicious> application, if you wish. Later you
can decide to enable some of them and eventually add (your own) L<Mojolicious>
or L<Ado> plugins. Here is how it looks.
=for HTML <img src="https://raw.githubusercontent.com/kberov/Ado/master/public/img/Ado-Building-Blocks.png" />
=head1 PLUGINS
Ado comes with the following default plugins. They can be used as examples and
for inspiration.
=over
lib/Ado/Manual/Plugins.pod view on Meta::CPAN
even be uploaded to and subsequently downloaded from
L<CPAN|http://www.cpan.org/>. L<CPAN> is the best open source dependency
management system. You can also use L<Stratopan|https://stratopan.com/> if you
wish.
=back
Ado uses L<Ado::Build> and L<Ado::BuildPlugin> which extend L<Module::Build>.
They were created to add some custom actions and handle the additional
C<templates>,C<log> and C<public> directories in Ado root folder.
The file tree looks like the following:
~/opt/public_dev/Ado-Plugin-Blog$ tree
.
âââ Build.PL
âââ etc
â  âââ plugins
â  âââ blog.conf
âââ lib
â  âââ Ado
â  âââ Control
public/doc/en/intro.md view on Meta::CPAN
4. Ado::Plugin::Auth is a plugin that authenticates users to an Ado system. Users can be authenticated locally or using (TODO!) Facebook, Google, Twitter and other authentication service-providers. A pre-made login form can be used directly or as a...
5. Ado::Plugin::MarkdownRenderer - Render static files in markdown format. One can create a personal blog or enterprise wiki using static files in markdown format.
3. The following libraries for user-interface development are used:
1. Semantic UI â a CSS and JS framework for development of mobile-ready layouts. Its usage also results in more clean HTML than other popular frameworks.
2. PageDown is the version of Attacklab's Showdown and WMD as used on Stack Overflow and the other Stack Exchange sites. It includes a converter that turns Markdown into HTML, a Markdown editor with realtime preview of the generated HTML, and a few...
4. The following Ado specific commands are available:
1. Ado::Command::adduser allows adding users to an Ado application via a terminal. It also allows adding users to existing or not existing groups. The new group is automatically created.
2. Ado::Command::version shows version information for installed core and optional modules.
1. Last but not least, Ado code is well covered with tests. Special care is taken to avoid accumulating technical debt by having Test::Perl::Critic tests set to level âharshâ. This way the coding style is forced to be consistent across the framew...
Here is how an Ado system looks like from architectural point of view:

##Installation/Deployment
The most flexible way to install Ado is manually on the command line.
It is highly recommended to have a separate Perl distribution (not the one that comes with your OS).
ActivePerl or perlbrew are both fine.
All deployment scenarios described at [Mojolicious/Guides/Cookbook#DEPLOYMENT](http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#DEPLOYMENT)
are possible and specific custom deployments can be done.
public/vendor/pagedown/Markdown.Converter.js view on Meta::CPAN
// tags like paragraphs, headers, and list items.
//
text = pluginHooks.preSpanGamut(text);
text = _DoCodeSpans(text);
text = _EscapeSpecialCharsWithinTagAttributes(text);
text = _EncodeBackslashEscapes(text);
// Process anchor and image tags. Images must come first,
// because ![foo][f] looks like an anchor.
text = _DoImages(text);
text = _DoAnchors(text);
// Make links out of things like `<http://example.com/>`
// Must come after _DoAnchors(), because you can use < and >
// delimiters in inline links like [this](<url>).
text = _DoAutoLinks(text);
text = text.replace(/~P/g, "://"); // put in place to prevent autolinking; reset now
t/command/apache2htaccess.t view on Meta::CPAN
my $app = $t->app;
my $command = 'Ado::Command::generate::apache2htaccess';
my $tempdir = tempdir(CLEANUP => 1);
my $config_file = catfile($tempdir, '.htaccess');
use_ok($command);
ok( my $c = $app->start("generate", "apache2htaccess", '-M' => 'cgi,fcgid', '-c' => $config_file),
'run() ok'
);
isa_ok($c, $command);
like($c->description, qr/Apache2\s+.htaccess/, 'description looks alike');
like($c->usage, qr/generate\sapache2htaccess.*?mod_fcgid/ms, 'usage looks alike');
ok(my $config_file_content = path($config_file)->slurp, 'generated $config_file');
like($config_file_content, qr/<IfModule\s+mod_cgi.+?"\^\(ado\)\$"/msx, 'mod_cgi block produced');
like($config_file_content, qr/<IfModule\s+mod_fcgid\.c/msx, 'mod_fcgid block produced');
TODO: {
local $TODO = 'Not reliable test under this platform.' if $IS_DOS;
# Note! not sure if the produced .htacces will work fine with Apache on Windows
# so make sure to test locally first.
t/command/apache2vhost.t view on Meta::CPAN
"generate", "apache2vhost",
'-n' => 'example.com',
'-c' => $config_file,
'-s'
),
'run() ok'
);
isa_ok($c, $command);
like($c->description, qr/Apache2 Virtual Host/, 'description looks alike');
like($c->usage, qr/the command-line.+with_suexec/ms, 'usage looks alike');
ok(my $config_file_content = path($config_file)->slurp(), 'generated $config_file');
my $app_home = $c->app->home;
like($config_file_content, qr/VirtualHost example.com:80/, 'produced file looks alike');
TODO: {
local $TODO = 'Not reliable test under this platform.' if $IS_DOS;
like($config_file_content, qr|ErrorLog\s+$app_home/log|, 'ErrorLog looks alike');
like($config_file_content, qr|CustomLog\s+$app_home/log|, 'CustomLog looks alike');
like($config_file_content, qr|Directory\s+"$app_home">|, 'Directory looks alike');
} # end TODO:
done_testing;
( run in 0.372 second using v1.01-cache-2.11-cpan-64827b87656 )