Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: perl
perl:
- "5.16"
script:
perl Build.PL && ./Build build && cover -test -report coveralls
29 changes: 29 additions & 0 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use strict;
use warnings;
use Module::Build;

my $builder = Module::Build->new(
module_name => 'ToopherAPI',
license => 'perl',
dist_abstract => 'ToopherAPI - Toopher API wrapper in Perl',
dist_author => 'Toopher <dev@toopher.com>',
dist_version => '1.0.0',
build_requires => {
'Test::More' => 0,
'Test::Exception' => 0,
'Devel::Cover::Report::Coveralls' => 0,
'HTTP::Request::Common' => 0,
'JSON' => 0,
'LWP::UserAgent' => 0,
'LWP::Protocol::https' => 0,
'Net::OAuth::ConsumerRequest' => 0,
'Class::Struct' => 0,
'URI::Escape' => 0,
'Try::Tiny' => 0,
'HTTP::Response' => 0,
'URI' => 0,
'URL::Encode' => 0
},
);

$builder->create_build_script();
8 changes: 2 additions & 6 deletions t/01sanity.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ my $ua = eval {
use HTTP::Response;
use URI;
use URL::Encode qw ( url_params_mixed );
sub new {
sub new
{
my ($class) = @_;
my $self = {
'_response' => new HTTP::Response(200),
Expand Down Expand Up @@ -44,8 +45,6 @@ my $ua = eval {
}->new($code, $message);




my $api = new ToopherAPI(key => 'foo', secret => 'bar', ua => $ua);

subtest 'test version UA string' => sub {
Expand Down Expand Up @@ -99,7 +98,6 @@ subtest 'authenticate with otp' => sub {
is($ua->request->{'post_data'}->{'otp'}, '123456');
};


subtest 'authentication status' => sub {
$ua->response->content('{"id":"1", "pending":false, "granted":true, "automated":false, "reason":"its a test", "terminal":{"id":"1", "name":"test terminal"}}');
my $auth_request = $api->get_authentication_status('1');
Expand Down Expand Up @@ -210,5 +208,3 @@ subtest 'unauthorized pairing raises correct error' => sub {
};

done_testing();

# vim: ts=2:sw=2:expandtab:autoindent