Ado

 view release on metacpan or  search on metacpan

etc/ado.conf  view on Meta::CPAN

#!/usr/bin/perl
use strict;
use warnings;
use utf8;
my $home     = app->home;
my $mode     = app->mode;
my $moniker  = app->moniker;
my $ado_home = app->ado_home;

my $database_file =
  -s $home->rel_file("etc/$moniker.$mode.sqlite")
  ? $home->rel_file("etc/$moniker.$mode.sqlite")
  : $home->rel_file("etc/$moniker.sqlite");
$database_file =

etc/plugins/auth.conf  view on Meta::CPAN

#!/usr/bin/perl
use strict;
use warnings;
use utf8;

#$MOJO_HOME/etc/plugins/auth.conf
#Default configuration for Ado::Plugin::Auth

{
    #Methods which will be displayed in the "Sign in" menu.
    #must exactly match keys in the providers hash reference below.
    # Add OAuth2 providers to ado.development.conf.
    auth_methods => ['ado'],

etc/plugins/markdown_renderer.conf  view on Meta::CPAN

#!/usr/bin/perl
use strict;
use warnings;
use utf8;

#$MOJO_HOME/etc/plugins/markdown_renderer.conf
#Default configuration for Ado::Plugin::MarkdownRenderer
{   md_renderer => 'Text::MultiMarkdown',

    #Can be a method name or CODEREF.
    #First paramether is the md_renderer instance and
    #the second is the markdown text
    md_method => 'markdown',

lib/Ado.pm  view on Meta::CPAN

        $app->types->type($mime => $mimes->{$mime});
    }
    return $app;
}

1;


=pod

=encoding utf8

=head1 NAME

Ado - a rapid active commotion (framework for web-projects on Mojolicious)

=head1 SYNOPSIS

  require Mojolicious::Commands;
  Mojolicious::Commands->start_app('Ado');

lib/Ado/Build.pm  view on Meta::CPAN

    else {
        $self->SUPER::do_create_readme();
    }
    return;
}

1;

=pod

=encoding utf8

=head1 NAME

Ado::Build - Custom routines for Ado installation

=head1 SYNOPSIS

  #Build.PL
  use 5.014000;
  use strict;

lib/Ado/BuildPlugin.pm  view on Meta::CPAN

use parent 'Module::Build';
use Ado::Build qw(
  process_etc_files process_public_files do_create_readme
  process_templates_files create_build_script
  ACTION_perltidy ACTION_submit PERL_DIRS);

1;

=pod

=encoding utf8

=head1 NAME

Ado::BuildPlugin - Custom routines for Ado::Plugin::* installation

=head1 SYNOPSIS

    #Ado must be already installed  and
    #Ado::BuildPlugin should be somewhere in @INC
    use Ado::BuildPlugin;

lib/Ado/Command.pm  view on Meta::CPAN

          . join(', ', @{$self->config->{actions} || []});
    }

    return;
}
1;


=pod

=encoding utf8

=head1 NAME

Ado::Command - Ado namespace for Mojo commands!

=head1 DESCRIPTION

Ado::Command is the base class for eventual functionality that we
can run directly from the commandline or from controllers.
In this class we can put common functionality shared among all the commands.

lib/Ado/Command/adduser.pm  view on Meta::CPAN

        'd|disabled:i'       => \$args->{disabled},
        'f|first_name=s'     => \$args->{first_name},
        'l|last_name=s'      => \$args->{last_name},
        'start_date=s'       => sub {
            $args->{start_date} =
              $_[1] ? Time::Piece->strptime('%Y-%m-%d', $_[1])->epoch : time;
        },
    );

    # Assume an UTF-8 terminal. TODO: make this more clever
    utf8::decode($args->{login_name})
      if ($args->{login_name} && !utf8::is_utf8($args->{login_name}));
    utf8::decode($args->{first_name})
      if ($args->{first_name} && !utf8::is_utf8($args->{first_name}));
    utf8::decode($args->{last_name})
      if ($args->{last_name} && !utf8::is_utf8($args->{last_name}));
    $args->{login_password} = Mojo::Util::sha1_hex($args->{login_name} . $args->{login_password});
    unless ($args->{ingroup}) {
        say($self->usage)
          unless ($args->{first_name}
            and $args->{last_name}
            and $args->{login_name}
            and $args->{email});
    }
    $self->app->log->debug('$self->args: ' . $self->app->dumper($self->args));
    return $ret;

lib/Ado/Command/adduser.pm  view on Meta::CPAN

        say "User '$args->{login_name}' is already in group '$args->{ingroup}'.";
    }
    return 1;
}


1;

=pod

=encoding utf8

=head1 NAME

Ado::Command::adduser - adduser command

=head1 SYNOPSIS

  USAGE
  # On the command line
  # Minimal required options to add a user

lib/Ado/Command/generate.pm  view on Meta::CPAN

package Ado::Command::generate;
use Ado;
use Mojo::Base 'Mojolicious::Command::generate';

has namespaces => sub { ['Ado::Command::generate', 'Mojolicious::Command::generate'] };
has app        => sub { Mojo::Server->new->build_app('Ado') };
has args       => sub { {} };

1;

=encoding utf8

=head1 NAME

Ado::Command::generate - Generator command

=head1 SYNOPSIS

  Usage: APPLICATION generate GENERATOR [OPTIONS]

=head1 DESCRIPTION

lib/Ado/Command/generate/adoplugin.pm  view on Meta::CPAN

    # Configuration
    $self->render_to_rel_file('config_file', "$dir/etc/plugins/$decamelized.conf",
        $decamelized, $self->crud, $args);

    return $self;
}
1;

=pod

=encoding utf8

=head1 NAME

Ado::Command::generate::adoplugin - Generates an Ado::Plugin

=head1 SYNOPSIS

On the command-line:

  $ cd ~/opt/public_dev

lib/Ado/Command/generate/adoplugin.pm  view on Meta::CPAN

    # or some new complex routes definitions,
    # or register this plugin as a template renderer.
    # Look in Mojolicious and Ado sources for examples and inspiration.
    return $self;
}

1;

<% %>__END__

<% %>=encoding utf8

<% %>=head1 NAME

<%= $class %> - an Ado Plugin that does foooooo.

<% %>=head1 SYNOPSIS

  # $ENV{MOJO_HOME}/etc/ado.config
  plugins => {
    # other plugins here...

lib/Ado/Command/generate/apache2htaccess.pm  view on Meta::CPAN

        say $config;
    }
    return $self;
}

1;


=pod

=encoding utf8

=head1 NAME

Ado::Command::generate::apache2htaccess - Generates Apache2 .htaccess file

=head1 SYNOPSIS

  Usage:
  #on the command-line

lib/Ado/Command/generate/apache2vhost.pm  view on Meta::CPAN

        say $config;
    }
    return $self;
}

1;


=pod

=encoding utf8

=head1 NAME

Ado::Command::generate::apache2vhost - Generates minimal Apache2 Virtual Host configuration file

=head1 SYNOPSIS

On the command-line:

  $ bin/ado generate apache2vhost --ServerName example.com -s \

lib/Ado/Command/generate/crud.pm  view on Meta::CPAN


    return $self;
}


1;


=pod

=encoding utf8

=head1 NAME

Ado::Command::generate::crud - Generates MVC set of files

=head1 SYNOPSIS

  Usage:
  #on the command-line
  # for one or more tables.

lib/Ado/Command/generate/crud.pm  view on Meta::CPAN

sub delete {
    return shift->render(message => '"delete" is not implemented...');
}



1;

<% %>__END__

<% %>=encoding utf8

<% %>=head1 NAME

<%= $a->{class} %> - a controller for resource <%= $a->{t} %>.

<% %>=head1 SYNOPSIS




lib/Ado/Command/version.pm  view on Meta::CPAN

    }
    say $msg;
    Mojolicious::Command::version->new->run();
    return;
}

1;

=pod

=encoding utf8

=head1 NAME

Ado::Command::version - Version command

=head1 SYNOPSIS

  use Ado::Command::version;

  my $v = Ado::Command::version->new;

lib/Ado/Control.pm  view on Meta::CPAN

    # Defaults to current user or Guest.
    $c->{user} = Ado::Model::Users->by_login_name($c->session->{login_name} //= 'guest');
    delete @{$c->{user}->data}{@$delete_fields};
    return $c->{user};
}

1;

=pod

=encoding utf8

=head1 NAME

Ado::Control - The base class for all controllers!

=head1 SYNOPSIS

It must be inherited by all controllers. Put code here only to be shared by
it's subclasses or used in hooks.

lib/Ado/Control/Articles.pm  view on Meta::CPAN

        $c->res->code(404);
        return;
    }
    Carp::croak('Should never get here!');
}

1;

=pod

=encoding utf8

=head1 NAME

Ado::Control::Articles - display markdown documents.

=head1 SYNOPSIS

  #in your browser go to
  http://your-host/articles

lib/Ado/Control/Default.pm  view on Meta::CPAN

    my $c = shift;
    $c->render(text => __PACKAGE__ . '::form');
    return;
}

1;


=pod

=encoding utf8

=head1 NAME

Ado::Control::Ado::Default - The default controller for the site.

=head1 SYNOPSIS

#in your browser go to
http://your-host/default/index
#or

lib/Ado/Control/Doc.pm  view on Meta::CPAN

        $c->title($title->text);
    }
    return;
}

1;


=pod

=encoding utf8

=head1 NAME

Ado::Control::Doc - The controller for the end-user documentation

=head1 SYNOPSIS

  #in your browser go to
  http://your-host/help

lib/Ado/Control/Test.pm  view on Meta::CPAN


    #get users from group with the same name as the user login_name
    state $guest = Ado::Model::Users->by_login_name('guest')->data;
    return $c->render(json => $guest);
}

1;

=pod

=encoding utf8

=head1 NAME

Ado::Control::Test - a controller used for testing Ado.

=head1 DESCRIPTION

In this package we put actions which are used only for testing Ado functionality.
Below is the list of defined actions.

lib/Ado/I18n.pm  view on Meta::CPAN

        my $class_lex = ref($self) . '::Lexicon';
        %{$class_lex} = (%{$class_lex}, %lex);
    };
    return;
}

1;

=pod

=encoding utf8

=head1 NAME

Ado::I18n - Languages' lexicons and handle namespace

=head1 DESCRIPTION

This class is used to instantiate the language handle in L<Ado>.

=head1 METHODS

lib/Ado/I18n/bg.pm  view on Meta::CPAN

    Translate       => 'Превод',
    LoginThanks => 'Благодарим, че ни посетихте! Добре дошли!',


);

1;

=pod

=encoding utf8

=head1 NAME

Ado::I18n::bg - lexicon for Bulgarian

=cut

lib/Ado/I18n/de.pm  view on Meta::CPAN

    ASC        => 'Aufsteigend',
    DESC       => 'Absteigend',
    created_by => 'Erstellt von',
    disabled   => 'Gesperrt',
);

1;

=pod

=encoding utf8

=head1 NAME

Ado::I18n::de - lexicon for German language

=cut

lib/Ado/I18n/en.pm  view on Meta::CPAN

    'Sign in'         => 'Sign in',
    Translate         => 'Translate',
    LoginThanks       => 'Thanks for logging in! Welcome!',

);

1;

=pod

=encoding utf8

=head1 NAME

Ado::I18n::en - lexicon for English

=cut

lib/Ado/Manual.pod  view on Meta::CPAN

=encoding utf8

=head1 NAME

Ado::Manual - Developers' manual

=head1 DESCRIPTION

L<Ado> is a light on dependencies framework and application for web-projects,
based on L<Mojolicious>, written in the L<Perl programming
language|http://www.perl.org/>. Ado is a typical well structured,

lib/Ado/Manual/Contributing.pod  view on Meta::CPAN

=encoding utf8

=head1 NAME

Ado::Manual::Contributing - Making Ado the ERP solution for the enterprise

=head1 DESCRIPTION

Ado is a community project.
Changes and improvements need to be
discussed and well understood by the pumpkin-holder and at least

lib/Ado/Manual/FiveMinutes.pod  view on Meta::CPAN

=encoding utf8

=head1 NAME

Ado::Manual::FiveMinutes - Start a personal blog in five minutes.

=head1 FIVE MINUTES

Within five minutes we will use L<Ado::Plugin::MarkdownRenderer> and
L<Ado::Control::Articles> to create a personal blog.

lib/Ado/Manual/Installation.pod  view on Meta::CPAN

=encoding utf8

=head1 NAME

Ado::Manual::Installation - Various ways to install and deploy Ado

=head1 DESCRIPTION

We strongly recommend using Ado with L<your own
Perl|https://metacpan.org/pod/distribution/App-perlbrew/bin/perlbrew> (not the
system-wide)! This will give you freedom to install modules from CPAN etc.

lib/Ado/Manual/Intro.pod  view on Meta::CPAN

=encoding utf8

=head1 NAME

Ado::Manual::Intro - General overview


=head1 What is Ado?

Ado was started in November 2013 as a rewrite of a previous project
(L<MYDLjE|https://github.com/kberov/MYDLjE>) based on Mojolicious 1.9x. MYDLjE

lib/Ado/Manual/Plugins.pod  view on Meta::CPAN

=pod

=encoding utf8

=head1 NAME

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

lib/Ado/Manual/RESTAPI.pod  view on Meta::CPAN

=pod

=encoding utf8

=head1 NAME

Ado::Manual::RESTAPI - all resources provided by Ado.


=head1 RESOURCES

This REST API was developed in an essay to get the best from the following ressources.
L<Web Linking|http://tools.ietf.org/html/rfc5988>,



( run in 1.602 second using v1.01-cache-2.11-cpan-49f99fa48dc )