Skip to content
Browse files

Add piwik_api_url

  • Loading branch information...
1 parent e74767e commit 5dfa73b6b44ca4358cb9b47a87a3b8cc06711823 Akron committed Mar 5, 2013
Showing with 608 additions and 19 deletions.
  1. +5 −0 Changes
  2. +5 −3 MANIFEST
  3. +52 −16 lib/Mojolicious/Plugin/Piwik.pm
  4. +130 −0 t/piwik_api-track.t
  5. +156 −0 t/piwik_api.t
  6. +107 −0 t/piwik_api_url.t
  7. +94 −0 t/piwik_tag-opt-out.t
  8. +59 −0 t/piwik_tag.t
View
5 Changes
@@ -1,3 +1,8 @@
+0.10 2013-03-04
+ - Delete mentioning api_test in documentation.
+ - Declare 'opt-out' and 'opt-out-url' as EXPERIMENTAL.
+ - Introduce piwik_api_url helper as EXPERIMENTAL.
+
0.09 2013-03-01
- Update year.
- Update comments.
View
8 MANIFEST
@@ -1,7 +1,9 @@
lib/Mojolicious/Plugin/Piwik.pm
-t/piwik.t
-t/piwik-opt-out.t
-t/piwik-track.t
+t/piwik_api.t
+t/piwik_api-track.t
+t/piwik_api_url.t
+t/piwik_tag.t
+t/piwik_tag-opt-out.t
Changes
MANIFEST
LICENSE
View
68 lib/Mojolicious/Plugin/Piwik.pm
@@ -3,7 +3,7 @@ use Mojo::Base 'Mojolicious::Plugin';
use Mojo::ByteStream 'b';
use Mojo::UserAgent;
-our $VERSION = '0.09';
+our $VERSION = '0.10';
# Todo:
# - Better test tracking API support
@@ -13,6 +13,7 @@ our $VERSION = '0.09';
# - Add eCommerce support
# http://piwik.org/docs/ecommerce-analytics/
# - Improve error handling.
+# - Introduce piwik_widget helper
# Register plugin
@@ -236,7 +237,7 @@ SCRIPTTAG
$url->query($param);
# Return string for api testing
- return $url->to_string if $api_test;
+ return $url if $api_test;
# Create Mojo::UserAgent
my $ua = Mojo::UserAgent->new(max_redirects => 2);
@@ -247,7 +248,8 @@ SCRIPTTAG
unless ($cb) {
my $tx = $ua->get($url);
- return _treat_response($tx->res) if $tx->success;
+ # Return prepared response
+ return _prepare_response($tx->res) if $tx->success;
return;
}
@@ -259,32 +261,40 @@ SCRIPTTAG
my ($ua, $tx) = @_;
my $json = {};
- $json = _treat_response($tx->res) if $tx->success;
+ # Return prepared response
+ $json = _prepare_response($tx->res) if $tx->success;
+
+ # Release callback
$cb->($json);
});
Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
};
});
-
+ # Establish 'piwik_api_url' helper
$mojo->helper(
- piwik_widget => sub {
- my $c = shift;
- # http://piwik.org/docs/embed-piwik-report/
- # <div id="widgetIframe"><iframe width="100%" height="350" src="http://grimms-abenteuer.de/piwik/index.php?module=Widgetize&action=iframe&columns[]=nb_visits&widget=1&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&idSite=3&period=range&date=last30&disableLink=1&widget=1" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></div>
+ piwik_api_url => sub {
+ my ($c, $method, $param) = @_;
+
+ # Set api_test to true
+ $param->{api_test} = 1;
+ return $c->piwik_api($method => $param);
}
);
};
-sub _treat_response {
+# Treat response different
+sub _prepare_response {
my $res = shift;
my $ct = $res->headers->content_type;
+ # Return json response
if (index($ct, 'json') >= 0) {
return $res->json;
}
+ # Prepare erroneous html response
elsif (index($ct, 'html') >= 0) {
# Find error message in html
@@ -297,13 +307,18 @@ sub _treat_response {
return { error => $found->all_text };
}
+ # Prepare image responses
elsif ($ct =~ m{^image/(gif|jpe?g)}) {
return {
image => 'data:image/' . $1 . ';base64,' . b($res->body)->b64_encode
};
};
- return { error => 'Unknown response type' };
+ # Return unknown response type
+ return {
+ error => 'Unknown response type',
+ body => $res->body
+ };
};
@@ -435,6 +450,9 @@ not allow third party cookies.
See the L<default tag helper|Mojolicious::Plugin::TagHelpers/tag>
for explanation of usage.
+B<The 'opt-out' and 'opt-out-url' options are
+EXPERIMENTAL and may change in further releases!>
+
=head2 piwik_api
@@ -502,11 +520,6 @@ Defaults to the url given when the plugin was registered.
C<secure> - Boolean value that indicates a request using the https scheme.
Defaults to false.
-=item
-
-C<api_test> - Boolean value that indicates a test request, that returns the
-created request url instead of the JSON response. Defaults to false.
-
=back
C<idSite> is an alias of C<site_id> and C<idsite> and defaults to the id
@@ -529,6 +542,29 @@ If an image is expected instead of a JSON object
encoded and mime-type prefixed in the hash value of image.
+=head2 piwik_api_url
+
+ my $src_url = $c->piwik_api_url(
+ ImageGraph.get => {
+ apiModule => 'VisitsSummary',
+ apiAction => 'get',
+ graphType => 'evolution',
+ period => 'day',
+ date => 'last30',
+ width => 500,
+ height => 250
+ });
+
+ # In template
+ <img src="<%= $src_url %>" alt="Piwik analysis" />
+
+Creates the URL of an API request and returns the L<Mojo::URL> object.
+Accepts the same parameters as the L<piwik_api|/piwik_api> helper,
+excluding the callback.
+
+B<This helper is EXPERIMENTAL and may change without warnings!>
+
+
=head1 LIMITATIONS
The plugin lacks support for eCommerce tracking.
View
130 t/piwik_api-track.t
@@ -0,0 +1,130 @@
+#!/usr/bin/env perl
+use Test::Mojo;
+use Test::More;
+use Mojolicious::Lite;
+use Mojo::JSON;
+use utf8;
+
+$|++;
+use lib '../lib';
+
+our $ft = 'auth.pl';
+
+my $t = Test::Mojo->new;
+
+my $app = $t->app;
+
+$app->mode('production');
+
+$app->plugin(Piwik => {
+ url => 'sojolicio.us/piwik'
+});
+
+my $c = Mojolicious::Controller->new;
+
+$c->app($app);
+
+$c->req->url(Mojo::URL->new('http:/khm.li/Rapunzel'));
+
+$c->app($app);
+for ($c->req->headers) {
+ $_->user_agent('Firefox');
+ $_->referrer('http://khm.li/');
+};
+
+my $track = $c->piwik_api(
+ Track => {
+ idsite => '4',
+ api_test => 1,
+ res => [1024, 768]
+ });
+
+like($track, qr{idsite=4}, 'Tracking 1');
+like($track, qr{ua=Firefox}, 'Tracking 1');
+like($track, qr{rec=1}, 'Tracking 1');
+like($track, qr{urlref=http://khm\.li/}, 'Tracking 1');
+like($track, qr{res=1024x768}, 'Tracking 1');
+
+$c->app($app);
+for ($c->req->headers) {
+ $_->user_agent('Mojo-Test');
+ $_->referrer('http://khm.li/');
+};
+
+$track = $c->piwik_api(
+ Track => {
+ idsite => [qw/4 5 6/],
+ api_test => 1,
+ res => '1024x768',
+ action_url => 'http://khm.li/Rapunzel',
+ action_name => 'Märchen/Rapunzel'
+ });
+
+like($track, qr{idsite=4}, 'Tracking 2');
+like($track, qr{ua=Mojo-Test}, 'Tracking 2');
+like($track, qr{rec=1}, 'Tracking 2');
+like($track, qr{urlref=http://khm\.li/}, 'Tracking 2');
+like($track, qr{url=http://khm\.li/Rapunzel}, 'Tracking 2');
+like($track, qr{action_name=M%C3%A4rchen/Rapunzel}, 'Tracking 2');
+like($track, qr{res=1024x768}, 'Tracking 2');
+
+# Do not track
+$c->req->headers->dnt(1);
+
+$track = $c->piwik_api(
+ Track => {
+ idsite => [qw/4 5 6/],
+ api_test => 1,
+ res => '1024x768',
+ action_url => 'http://khm.li/Rapunzel',
+ action_name => 'Märchen/Rapunzel'
+ });
+
+ok(!$track, 'Do not track');
+
+# Life tests:
+# Testing the piwik api is hard to do ...
+my (%param, $f);
+if (
+ -f ($f = 't/' . $ft) ||
+ -f ($f = $ft) ||
+ -f ($f = '../t/' . $ft) ||
+ -f ($f = '../../t/' . $ft)
+ ) {
+ if (open (CFG, '<' . $f)) {
+ my $cfg = join('', <CFG>);
+ close(CFG);
+ %param = %{ eval $cfg };
+ };
+};
+
+unless ($param{url}) {
+ done_testing;
+ exit;
+};
+
+$track = $c->piwik_api(
+ Track => {
+ idsite => [qw/4 5 6/],
+ res => '1024x768',
+ action_url => 'http://khm.li/Test',
+ action_name => 'Märchen/Test',
+ %param
+});
+
+ok(!$track, 'Do not track');
+
+$c->req->headers->dnt(0);
+
+$track = $c->piwik_api(
+ Track => {
+ res => '1024x768',
+ %param
+});
+
+ok(!$track->{error}, 'No error');
+ok($track->{image}, 'Image');
+like($track->{image}, qr{base64}, 'Image');
+like($track->{image}, qr{image/gif}, 'Image');
+
+done_testing;
View
156 t/piwik_api.t
@@ -0,0 +1,156 @@
+#!/usr/bin/env perl
+use Test::Mojo;
+use Test::More;
+use Mojolicious::Lite;
+use Mojo::JSON;
+use Data::Dumper;
+use utf8;
+
+$|++;
+use lib '../lib';
+
+our $ft = 'auth.pl';
+
+my $t = Test::Mojo->new;
+
+my $app = $t->app;
+
+$app->mode('production');
+
+$app->plugin(Piwik => {
+ url => 'sojolicio.us/piwik'
+});
+
+# API test
+my $url = $app->piwik_api('API.get' => {
+ site_id => [4,5],
+ urls => ['http://grimms-abenteuer.de/', 'http://khm.li/'],
+ period => 'range',
+ date => ['2012-11-01', '2012-12-01'],
+ secure => 1,
+ api_test => 1
+});
+
+like($url, qr{^https://sojolicio.us/piwik\?}, 'Piwik API 1');
+like($url, qr{module=API}, 'Piwik API 2');
+like($url, qr{method=API\.get}, 'Piwik API 3');
+like($url, qr{format=JSON}, 'Piwik API 4');
+like($url, qr{period=range}, 'Piwik API 5');
+like($url, qr{date=2012-11-01,2012-12-01}, 'Piwik API 6');
+like($url, qr{secure=1}, 'Piwik API 7');
+like($url, qr{token_auth=anonymous}, 'Piwik API 8');
+like($url, qr{urls%5B0%5D=http:\/\/grimms-abenteuer\.de/}, 'Piwik API 9');
+like($url, qr{urls%5B1%5D=http:\/\/khm\.li/}, 'Piwik API 10');
+like($url, qr{idSite=4,5}, 'Piwik API 11');
+
+# Life tests:
+# Testing the piwik api is hard to do ...
+my (%param, $f);
+if (
+ -f ($f = 't/' . $ft) ||
+ -f ($f = $ft) ||
+ -f ($f = '../t/' . $ft) ||
+ -f ($f = '../../t/' . $ft)
+ ) {
+ if (open (CFG, '<' . $f)) {
+ my $cfg = join('', <CFG>);
+ close(CFG);
+ %param = %{ eval $cfg };
+ };
+};
+
+unless ($param{url}) {
+ done_testing;
+ exit;
+};
+
+like($app->piwik_api(
+ 'ExampleAPI.getPiwikVersion' => {
+ %param
+ }
+)->{value}, qr{^[\.0-9]+$}, 'API.getPiwikVersion');
+
+is($app->piwik_api(
+ 'ExampleAPI.getAnswerToLife' => {
+ %param
+ }
+)->{value}, 42, 'API.getAnswerToLife');
+
+is($app->piwik_api(
+ 'ExampleAPI.getObject' => {
+ %param
+ }
+)->{result}, 'error', 'API.getObject');
+
+is($app->piwik_api(
+ 'ExampleAPI.getSum' => {
+ %param,
+ a => 5,
+ b => 7
+ }
+)->{value}, 12, 'API.getSum');
+
+ok(!$app->piwik_api(
+ 'ExampleAPI.getNull' => {
+ %param
+ }
+)->{value}, 'API.getNull');
+
+my $array = $app->piwik_api(
+ 'ExampleAPI.getDescriptionArray' => {
+ %param
+ }
+);
+
+is($array->[0], 'piwik', 'API.getDescriptionArray 1');
+is($array->[1], 'open source', 'API.getDescriptionArray 2');
+is($array->[2], 'web analytics', 'API.getDescriptionArray 3');
+is($array->[3], 'free', 'API.getDescriptionArray 4');
+is($array->[4], 'Strong message: Свободный Тибет',
+ 'API.getDescriptionArray 5');
+
+my $table = $app->piwik_api(
+ 'ExampleAPI.getCompetitionDatatable' => {
+ %param
+ }
+);
+
+is($table->[0]->{name}, 'piwik', 'API.getCompetitionDatatable 1');
+is($table->[0]->{license}, 'GPL', 'API.getCompetitionDatatable 2');
+
+is($table->[1]->{name}, 'google analytics', 'API.getCompetitionDatatable 3');
+is($table->[1]->{license}, 'commercial', 'API.getCompetitionDatatable 4');
+
+is($app->piwik_api(
+ 'ExampleAPI.getMoreInformationAnswerToLife' => {
+ %param
+ }
+)->{value},
+ 'Check http://en.wikipedia.org/wiki/The_Answer_to_Life,_the_Universe,_and_Everything',
+ 'API.getMoreInformationAnswerToLife');
+
+my $marray = $app->piwik_api(
+ 'ExampleAPI.getMultiArray' => {
+ %param
+ }
+);
+
+is($marray->{Limitation}->[0],
+ 'Multi dimensional arrays is only supported by format=JSON',
+ 'getMultiArray 1');
+
+is($marray->{Limitation}->[1],
+ 'Known limitation',
+ 'getMultiArray 2');
+
+my $sd = $marray->{'Second Dimension'};
+
+is($sd->[0], Mojo::JSON->true, 'getMultiArray 3');
+is($sd->[1], Mojo::JSON->false, 'getMultiArray 4');
+is($sd->[2], 1, 'getMultiArray 5');
+is($sd->[3], 0, 'getMultiArray 6');
+is($sd->[4], 152, 'getMultiArray 7');
+is($sd->[5], 'test', 'getMultiArray 8');
+is($sd->[6]->{42}, 'end', 'getMultiArray 9');
+
+done_testing;
View
107 t/piwik_api_url.t
@@ -0,0 +1,107 @@
+#!/usr/bin/env perl
+use Test::Mojo;
+use Test::More;
+use Mojolicious::Lite;
+use Mojo::JSON;
+use Mojo::UserAgent;
+use Data::Dumper;
+use utf8;
+
+$|++;
+use lib '../lib';
+
+our $ft = 'auth.pl';
+
+my $t = Test::Mojo->new;
+
+my $app = $t->app;
+
+$app->mode('production');
+
+$app->plugin(Piwik => {
+ url => 'sojolicio.us/piwik'
+});
+
+# API test
+my $url = $app->piwik_api_url('API.get' => {
+ site_id => [4,5],
+ urls => ['http://grimms-abenteuer.de/', 'http://khm.li/'],
+ period => 'range',
+ date => ['2012-11-01', '2012-12-01'],
+ secure => 1
+});
+
+like($url, qr{^https://sojolicio.us/piwik\?}, 'Piwik API URL 1');
+like($url, qr{module=API}, 'Piwik API URL 2');
+like($url, qr{method=API\.get}, 'Piwik API URL 3');
+like($url, qr{format=JSON}, 'Piwik API URL 4');
+like($url, qr{period=range}, 'Piwik API URL 5');
+like($url, qr{date=2012-11-01,2012-12-01}, 'Piwik API URL 6');
+like($url, qr{secure=1}, 'Piwik API URL 7');
+like($url, qr{token_auth=anonymous}, 'Piwik API URL 8');
+like($url, qr{urls%5B0%5D=http:\/\/grimms-abenteuer\.de/}, 'Piwik API URL 9');
+like($url, qr{urls%5B1%5D=http:\/\/khm\.li/}, 'Piwik API URL 10');
+like($url, qr{idSite=4,5}, 'Piwik API URL 11');
+
+# Life tests:
+# Testing the piwik api is hard to do ...
+my (%param, $f);
+if (
+ -f ($f = 't/' . $ft) ||
+ -f ($f = $ft) ||
+ -f ($f = '../t/' . $ft) ||
+ -f ($f = '../../t/' . $ft)
+ ) {
+ if (open (CFG, '<' . $f)) {
+ my $cfg = join('', <CFG>);
+ close(CFG);
+ %param = %{ eval $cfg };
+ };
+};
+
+unless ($param{url}) {
+ done_testing;
+ exit;
+};
+
+
+ok($url = $app->piwik_api_url(
+ 'ExampleAPI.getPiwikVersion' => {
+ %param
+ }
+), 'API.getPiwikVersion');
+
+ok(my $ua = Mojo::UserAgent->new, 'New Mojo::UserAgent');
+ok(my $json = $ua->get($url)->res->json, 'Get JSON');
+like($json->{value}, qr{^[\.0-9]+$}, 'API.getPiwikVersion');
+
+ok($url = $app->piwik_api_url(
+ 'ExampleAPI.getAnswerToLife' => {
+ %param
+ }
+), 'API.getAnswerToLife');
+
+ok($json = $ua->get($url)->res->json, 'Get JSON');
+is($json->{value}, 42, 'API.getAnswerToLife');
+
+ok($url = $app->piwik_api_url(
+ 'ExampleAPI.getObject' => {
+ %param
+ }
+), 'API.getObject');
+
+ok($json = $ua->get($url)->res->json, 'Get JSON');
+is($json->{result}, 'error', 'API.getObject');
+
+ok($url = $app->piwik_api_url(
+ 'ExampleAPI.getSum' => {
+ %param,
+ a => 5,
+ b => 7
+ }
+), 'API.getSum');
+
+ok($json = $ua->get($url)->res->json, 'Get JSON');
+is($json->{value}, 12, 'API.getSum');
+
+done_testing;
View
94 t/piwik_tag-opt-out.t
@@ -0,0 +1,94 @@
+#!/usr/bin/env perl
+use Test::Mojo;
+use Test::More;
+use Mojolicious::Lite;
+use Mojo::JSON;
+use utf8;
+
+$|++;
+use lib '../lib';
+
+our $ft = 'auth.pl';
+
+my $t = Test::Mojo->new;
+
+my $app = $t->app;
+
+$app->mode('production');
+
+$app->plugin(Piwik => {
+ url => 'sojolicio.us/piwik'
+});
+
+my $oo = $app->piwik_tag('opt-out');
+
+like($oo, qr{http://sojolicio\.us/}, 'Opt-Out');
+like($oo, qr{frameborder="no"}, 'Opt-Out');
+like($oo, qr{height="200px"}, 'Opt-Out');
+like($oo, qr{width="600px"}, 'Opt-Out');
+like($oo, qr{^<iframe}, 'Opt-Out');
+like($oo, qr{&amp;}, 'Opt-Out');
+
+$oo = $app->piwik_tag('opt-out', 'width' => '100%');
+
+like($oo, qr{http://sojolicio\.us/}, 'Opt-Out');
+like($oo, qr{frameborder="no"}, 'Opt-Out');
+like($oo, qr{height="200px"}, 'Opt-Out');
+like($oo, qr{width="100%"}, 'Opt-Out');
+like($oo, qr{^<iframe}, 'Opt-Out');
+like($oo, qr{&amp;}, 'Opt-Out');
+
+$oo = $app->piwik_tag('opt-out', 'frameborder' => 'yes');
+
+like($oo, qr{http://sojolicio\.us/}, 'Opt-Out');
+like($oo, qr{frameborder="yes"}, 'Opt-Out');
+like($oo, qr{height="200px"}, 'Opt-Out');
+like($oo, qr{width="600px"}, 'Opt-Out');
+like($oo, qr{^<iframe}, 'Opt-Out');
+like($oo, qr{&amp;}, 'Opt-Out');
+
+$oo = $app->piwik_tag('opt-out', 'frameborder' => 'yes' => sub { 'No iframes supported'});
+
+like($oo, qr{http://sojolicio\.us/}, 'Opt-Out');
+like($oo, qr{frameborder="yes"}, 'Opt-Out');
+like($oo, qr{height="200px"}, 'Opt-Out');
+like($oo, qr{width="600px"}, 'Opt-Out');
+like($oo, qr{^<iframe}, 'Opt-Out');
+like($oo, qr{>No iframes supported<}, 'Opt-Out');
+like($oo, qr{&amp;}, 'Opt-Out');
+
+
+my $c = Mojolicious::Controller->new;
+
+$c->app($app);
+
+$c->req->url(Mojo::URL->new('http:/khm.li/Rapunzel'));
+
+$oo = $c->piwik_tag('opt-out');
+
+like($oo, qr{http://sojolicio\.us/}, 'Opt-Out');
+
+$c->req->url(Mojo::URL->new('https:/khm.li/Rapunzel'));
+
+$oo = $c->piwik_tag('opt-out');
+
+like($oo, qr{https://sojolicio\.us/}, 'Opt-Out');
+like($oo, qr{iframe}, 'Opt-Out');
+
+$oo = $c->piwik_tag('opt-out-link');
+
+like($oo, qr{href="https://sojolicio\.us/piwik/index\.php\?module=CoreAdminHome&amp;action=optOut}, 'opt-out-link');
+like($oo, qr{>Piwik Opt-Out<}, 'opt-out-link');
+like($oo, qr{rel="nofollow"}, 'opt-out-link');
+
+$oo = $c->piwik_tag('opt-out-link', sub { 'MyOptOut' });
+
+like($oo, qr{href="https://sojolicio\.us/piwik/index\.php\?module=CoreAdminHome&amp;action=optOut}, 'opt-out-link');
+like($oo, qr{>MyOptOut<}, 'opt-out-link');
+like($oo, qr{rel="nofollow"}, 'opt-out-link');
+
+$oo = $c->render_partial(inline => "<%= piwik_tag 'opt-out-link', begin %>Opt Out!<% end %>");
+
+like($oo, qr{<a href=".+" rel="nofollow">Opt Out!</a>}, 'opt-out-link');
+
+done_testing;
View
59 t/piwik_tag.t
@@ -0,0 +1,59 @@
+#!/usr/bin/env perl
+use Test::Mojo;
+use Test::More;
+use Mojolicious::Lite;
+use Mojo::JSON;
+use Data::Dumper;
+use utf8;
+
+$|++;
+use lib '../lib';
+
+my $t = Test::Mojo->new;
+
+my $app = $t->app;
+
+$app->mode('production');
+
+$app->plugin(Piwik => {
+ url => 'sojolicio.us/piwik'
+});
+
+like($app->piwik_tag, qr{'://sojolicio.us/piwik/'}, 'URL');
+like($app->piwik_tag, qr{setSiteId',1}, 'SiteId');
+
+like($app->piwik_tag(2), qr{'://sojolicio.us/piwik/'}, 'URL');
+like($app->piwik_tag(2), qr{setSiteId',2}, 'SiteId');
+
+like($app->piwik_tag(
+ 2 => 'http://sojolicio.us/piwik/piwik.php'
+), qr{'://sojolicio.us/piwik/'}, 'URL');
+like($app->piwik_tag(
+ 2 => 'http://sojolicio.us/piwik/piwik.php'
+), qr{setSiteId',2}, 'SiteId');
+
+like($app->piwik_tag(
+ 3 => 'https://sojolicio.us/piwik/piwik.js'
+), qr{'://sojolicio.us/piwik/'}, 'URL');
+like($app->piwik_tag(
+ 3 => 'http://sojolicio.us/piwik/piwik.js'
+), qr{setSiteId',3}, 'SiteId');
+
+like($app->piwik_tag(
+ 4 => 'sojolicio.us/piwik'
+), qr{'://sojolicio.us/piwik/'}, 'URL');
+like($app->piwik_tag(
+ 4 => 'sojolicio.us/piwik'
+), qr{setSiteId',4}, 'SiteId');
+
+$app->mode('development');
+
+$app->plugin('Piwik' => {
+ url => 'sojolicio.us/piwik'
+});
+
+ok(!$app->piwik_tag, 'Development mode');
+
+
+
+done_testing;

0 comments on commit 5dfa73b

Please sign in to comment.
Something went wrong with that request. Please try again.