App-DuckPAN
view release on metacpan or search on metacpan
Change: 1eae4b2b3acdb9968e39780a28e690237fbd77b0
Author: Matt Miller <mwmiller@outlook.com>
Date : 2014-11-10 17:29:14 +0000
DuckPAN: improve check_requirements.
This makes it just exit on its own when requirements checking fails.
Also, improve both message text and "emission levels."
Also removes verify_versions which was not well-integrated. This
involves extra checking on git and SSH which didn't happen to much
before, but is fairly cheap in the grand scheme of things.
Change: c87d99f4ca041eb60bd5eaaba43d8c0399209b39
Author: Matt Miller <mwmiller@outlook.com>
Date : 2014-11-10 13:35:55 +0000
Server: include file info prefix on errors.
If you're not in verbose mode these messages won't make any sense,
Author: Usman Raza <usman.r123@gmail.com>
Date : 2014-10-24 14:09:40 +0000
Better Handling of Instant Answer load option, so instead of
Spice::IsItUp we can pass IsItUp
Change: 777f366da0d14d630ea60705f4979fd86e963e4b
Author: Matt Miller <mwmiller@outlook.com>
Date : 2014-10-24 11:00:29 +0000
Merge pull request #144 from mwmiller/verify
Query: verify_versions on correct package.
Change: 343dd81565b887140e7aa6fe1fb3de7f36e22525
Author: Matt Miller <mwmiller@outlook.com>
Date : 2014-10-24 10:42:01 +0000
Versions: bump required to 5.14.
We're no longer testing against 5.10, so we won't know if it is
broken for them (as it likely already is).
- Bump version check in App::DuckPAN - Updated README for Travis
change
Change: cec18745f23c9e7f4bfa5fa108b4a16248ca8d54
Author: Matt Miller <mwmiller@outlook.com>
Date : 2014-10-24 10:36:22 +0000
Query: verify_versions on correct package.
Change: 679c743d2ad9e1fb8081fcc6c82972108841eac6
Author: Zaahir Moolla <moollaza@fastmail.fm>
Date : 2014-10-23 23:43:00 +0000
Merge pull request #143 from
duckduckgo/zaahir/duckpan-new-more-updates
More updates to duckpan new
bin/duckpan view on Meta::CPAN
[package_name ...]:
Loads only the specified Spice or Goodie Instant Answers.
Examples:
duckpan query Npm
duckpan query Twitter IsItUp
=item C<duckpan server> [--port <number>] [package_name ...]
Starts a local web server, which emulates the DuckDuckGo production environment. Allows for live testing of Goodie and Spice Instant Answers. This tool should be used to ensure your Instant Answer displays correctly. For Spice Instant Answers, this i...
-p, --port <number>:
Forces DuckPAN server to run on the specified port (default port is 5000)
[package_name ...]:
Loads only the specified Spice or Goodie Instant Answers.
Examples:
duckpan server Movie
duckpan server IDN Sort Morse
lib/App/DuckPAN/Web.pm view on Meta::CPAN
has _share_dir_hash => ( is => 'rw' );
has _path_hash => ( is => 'rw' );
has _rewrite_hash => ( is => 'rw' );
has ua => (
is => 'ro',
default => sub {
LWP::UserAgent->new(
agent => "Mozilla/5.0", #User Agent required for some API's (eg. Vimeo, IsItUp)
timeout => 5,
ssl_opts => { verify_hostname => 0 },
env_proxy => 1,
);
},
);
sub BUILD {
my ( $self ) = @_;
my %share_dir_hash;
my %path_hash;
my %rewrite_hash;
lib/App/DuckPAN/WebStatic.pm view on Meta::CPAN
has sites => ( is => 'ro', required => 1 );
has _ports => ( is => 'rw', default => sub {{}} );
has ua => (
is => 'ro',
default => sub {
LWP::UserAgent->new(
agent => "Mozilla/5.0", #User Agent required for some API's (eg. Vimeo, IsItUp)
timeout => 5,
ssl_opts => { verify_hostname => 0 },
);
},
);
sub BUILD {
my ( $self ) = @_;
for my $site (keys %{$self->sites}) {
my $port = $self->sites->{$site}->{port};
my $url = $self->sites->{$site}->{url};
my $data_file = path($site.'.json');
t/templates.t view on Meta::CPAN
clear_output_directory();
%generate_res = $template_set_map{required_and_optional}->generate(\%vars, [ $template_map{js} ]);
is_deeply [ sort @{$generate_res{created_files}} ],
[ $pm_out_file, $js_out_file, $test_out_file ],
'template set: return value has all the created files';
ok !$generate_res{error}, 'template set: no errors when succesfully generating files';
# verify all required files have been generated
ok -f $_, "template set: required file '$_' generated from template set"
for ($pm_out_file, $test_out_file);
ok -f $js_out_file, "template set: selected optional file '$js_out_file' generated from template set";
ok !-f $css_out_file, "template set: unselected optional file '$css_out_file' not generated from template set";
#############################################
# File generation errors from template sets #
#############################################
( run in 0.450 second using v1.01-cache-2.11-cpan-73692580452 )