#!/usr/bin/env perl

use strict;
use warnings;
use Web::API::Mock;
use Plack::Runner;
use FindBin::libs;

use Getopt::Long qw/GetOptions :config posix_default auto_help pass_through/;

GetOptions(\my %options, qw/
    files=s@
    not-implemented-urls=s
/);

my $mock = Web::API::Mock->new();
$mock->setup($options{files}, $options{'not-implemented-urls'});
my $app = $mock->psgi();

my $runner = Plack::Runner->new;
$runner->parse_options(@ARGV);
$runner->run($app)

__END__

=encoding utf-8

=head1 NAME

run-api-mock - It's Plack Server

=head1 SYNOPSIS

    $ run-api-mock --files api.md --not-implemented-urls url.txt --port 8080

=cut

