Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'dancer2'

  • Loading branch information...
commit aa3a7fe40346e43e584f5666636cf3cfc934e28d 2 parents 35ccd79 + b896f15
Dave Cross authored
1  PoliticalWeb/MANIFEST
@@ -7,7 +7,6 @@ views/index.tt
7 7
 views/layouts/main.tt
8 8
 MANIFEST.SKIP
9 9
 lib/PoliticalWeb.pm
10  
-public/css/style.css
11 10
 public/css/error.css
12 11
 public/images/perldancer-bg.jpg
13 12
 public/images/perldancer.jpg
2  PoliticalWeb/bin/app.pl
... ...
@@ -1,4 +1,4 @@
1 1
 #!/usr/bin/env perl
2  
-use Dancer;
  2
+use Dancer2;
3 3
 use PoliticalWeb;
4 4
 dance;
1  PoliticalWeb/config.yml
@@ -21,6 +21,7 @@ charset: "UTF-8"
21 21
 #template: "simple"
22 22
 
23 23
 template: "template_toolkit"
  24
+layout: main.tt
24 25
 engines:
25 26
   template_toolkit:
26 27
     WRAPPER:   layouts/main.tt
9  PoliticalWeb/lib/PoliticalWeb.pm
... ...
@@ -1,14 +1,15 @@
1 1
 package PoliticalWeb;
2  
-use Dancer ':syntax';
3  
-use Dancer::Plugin::DBIC;
4  
-use Dancer::Plugin::Cache::CHI;
  2
+
  3
+use Dancer2;
  4
+use Dancer2::Plugin::DBIC;
  5
+use Dancer2::Plugin::Cache::CHI;
5 6
 use Data::Dumper;
6 7
 
7 8
 use PoliticalWeb::Constituency;
8 9
 
9 10
 our $VERSION = '0.1';
10 11
 
11  
-check_page_cache;
  12
+# check_page_cache;
12 13
 
13 14
 get '/' => sub {
14 15
   return template 'index' unless keys %{ +params };
6  PoliticalWeb/lib/PoliticalWeb/Constituency.pm
@@ -6,9 +6,9 @@ use 5.010;
6 6
 
7 7
 use Moose;
8 8
 use WebService::TWFY::API;
9  
-use Dancer ':syntax';
10  
-use Dancer::Plugin::DBIC;
11  
-use Dancer::Plugin::Cache::CHI;
  9
+use Dancer2;
  10
+use Dancer2::Plugin::DBIC;
  11
+use Dancer2::Plugin::Cache::CHI;
12 12
 use Encode qw[encode decode];
13 13
 
14 14
 use PoliticalWeb::Schema::Result::Constituency;
6  PoliticalWeb/lib/PoliticalWeb/Mp.pm
@@ -6,9 +6,9 @@ use 5.010;
6 6
 
7 7
 use Moose;
8 8
 use WebService::TWFY::API;
9  
-use Dancer ':syntax';
10  
-use Dancer::Plugin::DBIC;
11  
-use Dancer::Plugin::Cache::CHI;
  9
+use Dancer2;
  10
+use Dancer2::Plugin::DBIC;
  11
+use Dancer2::Plugin::Cache::CHI;
12 12
 use Encode qw[encode decode];
13 13
 
14 14
 my $twfy_query = WebService::TWFY::API->new({
2  PoliticalWeb/t/002_index_route.t
@@ -4,7 +4,7 @@ use warnings;
4 4
 
5 5
 # the order is important
6 6
 use PoliticalWeb;
7  
-use Dancer::Test;
  7
+use Dancer2::Test apps => [ 'PoliticalWeb' ];
8 8
 
9 9
 route_exists [GET => '/'], 'a route handler is defined for /';
10 10
 response_status_is ['GET' => '/'], 200, 'response status is 200 for /';
2  PoliticalWeb/views/layouts/main.tt
@@ -28,10 +28,8 @@
28 28
           </ul>
29 29
 
30 30
           <ul class="nav navbar-nav navbar-right">
31  
-<!--
32 31
             <li><a href="/register">Register</a></li>
33 32
             <li><a href="/login">Log in</a></li>
34  
--->
35 33
             <li class="dropdown">
36 34
               <a href="#" class="dropdown-toggle" data-toggle="dropdown">
37 35
                 Share

0 notes on commit aa3a7fe

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