Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Resolve an issue with JSON content and add test for it

  • Loading branch information...
commit 6d6a40db02d6e0453c7bbcb2997009863d4bed29 1 parent 42d95ff
Chris Williams authored
1  .gitignore
... ... @@ -0,0 +1 @@
  1 +Changes
231 Changes
... ... @@ -1,231 +0,0 @@
1   -==============================
2   -2011-01-03 14:33:44 +0000 0.30
3   -==============================
4   -
5   - commit 6ee72040120c5d4ec793f8fe40a25480e154d3f9
6   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
7   - Date: Mon Jan 3 14:33:44 2011 +0000
8   -
9   - Sync up dist
10   -
11   - commit 0d291b19d24db8da6febd4e4162a2ec904a05ef1
12   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
13   - Date: Mon Jan 3 14:32:19 2011 +0000
14   -
15   - Bump version to 0.30
16   -
17   - commit d5c8d61cb14f8e57a5f49d3f2b2bc4ec6a0d6bda
18   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
19   - Date: Mon Jan 3 14:31:02 2011 +0000
20   -
21   - Fix schoolboy error
22   -
23   - commit e83f4c743592946f95ba60bff6801a619c267f5a
24   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
25   - Date: Mon Jan 3 14:27:55 2011 +0000
26   -
27   - Make error handling more robust and add skip(core|mirrors|perms)
28   - options to cpanidx-gendb
29   -
30   -==============================
31   -2011-01-01 23:55:45 +0000 0.28
32   -==============================
33   -
34   - commit db1321ddf049fa7098bb040146863291cab8e38d
35   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
36   - Date: Sat Jan 1 23:55:45 2011 +0000
37   -
38   - Update version to 0.28
39   -
40   - commit d602cfe7ed460983195fbdb922cf3982c99c7045
41   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
42   - Date: Sat Jan 1 23:55:09 2011 +0000
43   -
44   - Update docs for new 'perms' query
45   -
46   - commit b0dbb8bebc893e117ad0887a1d87a4acb155a450
47   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
48   - Date: Sat Jan 1 23:28:15 2011 +0000
49   -
50   - Added CPAN permissions data
51   -
52   - commit e479ffc864179bb586c0b7a825c03775368258b5
53   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
54   - Date: Tue Nov 2 12:43:43 2010 +0000
55   -
56   - Post release changes
57   -
58   -==============================
59   -2010-11-02 12:40:45 +0000 0.26
60   -==============================
61   -
62   - commit 51cd6d674d301bd3c54a2b12c51883407608ee04
63   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
64   - Date: Tue Nov 2 12:40:45 2010 +0000
65   -
66   - Bump version to 0.26
67   -
68   - commit 0fd43148a2638bb552a04e74e9d9f89c1bf75061
69   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
70   - Date: Tue Nov 2 09:21:26 2010 +0000
71   -
72   - Extend size of dist_vers columns to handle 'withoutworldwriteables'
73   -
74   -==============================
75   -2010-09-06 15:15:43 +0100 0.24
76   -==============================
77   -
78   - commit 1b9b1bc8d7537a6c13388a5fe9518a6239e748f5
79   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
80   - Date: Mon Sep 6 15:15:43 2010 +0100
81   -
82   - Added 'dist' query for querying distributions
83   -
84   -==============================
85   -2010-07-27 22:16:04 +0100 0.22
86   -==============================
87   -
88   - commit a505b717f380bf26ab6b39e01e9a72140982994c
89   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
90   - Date: Tue Jul 27 22:16:04 2010 +0100
91   -
92   - Bump version to 0.22
93   -
94   - commit 561cbea48a6a103df47cdab8d80aa9bcc38eda7d
95   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
96   - Date: Tue Jul 27 22:15:16 2010 +0100
97   -
98   - Make everything optional for cpanidx-gendb
99   -
100   -==============================
101   -2010-07-14 13:41:56 +0100 0.20
102   -==============================
103   -
104   - commit f619eba3589df527ea7fdfc04a0170da687835fd
105   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
106   - Date: Wed Jul 14 13:41:56 2010 +0100
107   -
108   - Make the 'url' parameter optional for the cpanidx-gendb script
109   -
110   - commit 43fe7c2bb247b9fec0eb5e9a674bde3b4290b0e9
111   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
112   - Date: Wed Jun 16 15:04:34 2010 +0100
113   -
114   - Write MYMETA.yml file.
115   -
116   -==============================
117   -2010-06-09 11:18:37 +0100 0.18
118   -==============================
119   -
120   - commit a46424ef7ea551a4046a8ef8e477a2b2be07900d
121   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
122   - Date: Wed Jun 9 11:18:37 2010 +0100
123   -
124   - Added lastupdated to the timestamp table which is when the packages
125   - file we used was last updated
126   -
127   - commit 83de37da7ff5e452af3d866fed308c3c860b61ba
128   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
129   - Date: Sun May 23 23:02:22 2010 +0100
130   -
131   - Sync
132   -
133   -==============================
134   -2010-05-06 10:41:11 +0100 0.16
135   -==============================
136   -
137   - commit 42fb2ad4995d70f43c35eb13e5a9fb9d377c4620
138   - Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
139   - Date: Thu May 6 10:41:11 2010 +0100
140   -
141   - Added corelist functionality by integrating
142   - Module::CoreList::DBSchema
143   -
144   -==============================
145   -2010-04-19 16:00:33 +0100 0.14
146   -==============================
147   -
148   - commit ccbcab5dfc4abaacca913f1a9803fcfbdd63f8ff
149   - Author: Chris Williams <chris@bingosnet.co.uk>
150   - Date: Mon Apr 19 16:00:33 2010 +0100
151   -
152   - Version bump to 0.14
153   -
154   - commit 625574c6a1fa45f8759642b7cd1fa2241a95d2ed
155   - Author: Chris Williams <chris@bingosnet.co.uk>
156   - Date: Mon Apr 19 15:32:05 2010 +0100
157   -
158   - Added CPAN MIRRORED.BY support
159   -
160   -==============================
161   -2010-04-03 00:02:12 +0100 0.12
162   -==============================
163   -
164   - commit 6ef290644e646bd873102274c842d856b35f61d4
165   - Author: Chris Williams <chris@bingosnet.co.uk>
166   - Date: Sat Apr 3 00:02:12 2010 +0100
167   -
168   - Detect whether the dsn is SQLite and apply the PRAGMA appropriately.
169   -
170   -==============================
171   -2010-04-02 23:10:21 +0100 0.10
172   -==============================
173   -
174   - commit 300d14584aea5ba4165e451b8f920a4020586325
175   - Author: Chris Williams <chris@bingosnet.co.uk>
176   - Date: Fri Apr 2 23:10:21 2010 +0100
177   -
178   - Bump version
179   -
180   - commit d4d40db356c77c777978f8a9789409872c7fc09d
181   - Author: Chris Williams <chris@bingosnet.co.uk>
182   - Date: Fri Apr 2 23:07:07 2010 +0100
183   -
184   - Amended table tests
185   -
186   - commit ad81bcaa43975d4b03eb16ba96f65761bbc1271b
187   - Author: apocalypse <perl@0ne.us>
188   - Date: Fri Apr 2 22:53:08 2010 +0100
189   -
190   - Applied patches RT #56214 "cpanidx-gendb is slow when building the
191   - SQLite db"
192   -
193   -==============================
194   -2010-03-09 16:10:16 +0000 0.08
195   -==============================
196   -
197   - commit f7c6ccc2550d2fc7808346f11b9eb56eaa91f555
198   - Author: Chris Williams <chris@bingosnet.co.uk>
199   - Date: Tue Mar 9 16:10:16 2010 +0000
200   -
201   - Added App::CPANIDX::Renderer renderers() class method
202   -
203   -==============================
204   -2010-03-08 14:01:45 +0000 0.06
205   -==============================
206   -
207   - commit 3da66bd900c6462040b73b32ac27cc66fcd83a8f
208   - Author: Chris Williams <chris@bingosnet.co.uk>
209   - Date: Mon Mar 8 14:01:45 2010 +0000
210   -
211   - Added App::CPANIDX::Tables module
212   -
213   -==============================
214   -2010-03-05 22:48:51 +0000 0.04
215   -==============================
216   -
217   - commit e7cb1d37370638858d03b4f7d5b6919ee0eb340b
218   - Author: Chris Williams <chris@bingosnet.co.uk>
219   - Date: Fri Mar 5 22:48:51 2010 +0000
220   -
221   - Fixed compile error
222   -
223   - commit f96c1ab41925d8b12885d3c341539637b219e7a2
224   - Author: Chris Williams <chris@bingosnet.co.uk>
225   - Date: Fri Mar 5 22:39:03 2010 +0000
226   -
227   - Refactored stuff into modules
228   -
229   -==============
230   -End of Excerpt
231   -==============
2  Makefile.PL
@@ -20,7 +20,7 @@ requires 'File::Path' => '2.08';
20 20 requires 'File::Spec' => '3.31';
21 21 requires 'HTML::Tiny' => '1.05';
22 22 requires 'IO::Zlib' => '1.10';
23   -requires 'JSON::XS' => '2.27';
  23 +requires 'JSON::XS' => '2.32';
24 24 requires 'Module::CoreList::DBSchema' => '0.06';
25 25 requires 'Parse::CPAN::MirroredBy' => '0.02';
26 26 requires 'URI' => '1.52';
2  lib/App/CPANIDX.pm
@@ -5,7 +5,7 @@ use warnings;
5 5
6 6 use vars qw($VERSION);
7 7
8   -$VERSION = '0.32';
  8 +$VERSION = '0.34';
9 9
10 10 1;
11 11
2  lib/App/CPANIDX/Queries.pm
@@ -5,7 +5,7 @@ use warnings;
5 5 use Module::CoreList::DBSchema;
6 6 use vars qw[$VERSION];
7 7
8   -$VERSION = '0.32';
  8 +$VERSION = '0.34';
9 9
10 10 my $mcdbs = Module::CoreList::DBSchema->new();
11 11
4 lib/App/CPANIDX/Renderer.pm
@@ -8,7 +8,7 @@ use XML::Simple;
8 8 use HTML::Tiny;
9 9 use vars qw[$VERSION];
10 10
11   -$VERSION = '0.32';
  11 +$VERSION = '0.34';
12 12
13 13 my %types = (
14 14 'yaml', 'application/x-yaml; charset=utf-8',
@@ -27,7 +27,7 @@ my %renderers = (
27 27 'json', sub {
28 28 my $ref = shift;
29 29 my $string;
30   - eval { $string = JSON::XS->new->utf(1)->pretty(1)->encode( $ref ); };
  30 + eval { $string = JSON::XS->new->utf8(1)->pretty(1)->encode( $ref ); };
31 31 return $string;
32 32 },
33 33 'xml', sub {
2  lib/App/CPANIDX/Tables.pm
@@ -5,7 +5,7 @@ use warnings;
5 5 use Module::CoreList::DBSchema;
6 6 use vars qw[$VERSION];
7 7
8   -$VERSION = '0.32';
  8 +$VERSION = '0.34';
9 9
10 10 my $mcdbs = Module::CoreList::DBSchema->new();
11 11 my %cl_tables = $mcdbs->tables();
3  t/01_renderer.t
... ... @@ -1,6 +1,6 @@
1 1 use strict;
2 2 use warnings;
3   -use Test::More tests => 9;
  3 +use Test::More tests => 13;
4 4 use App::CPANIDX::Renderer;
5 5
6 6 my $data = [
@@ -28,4 +28,5 @@ foreach my $enc ( qw(yaml json xml html) ) {
28 28 isa_ok( $ren, 'App::CPANIDX::Renderer' );
29 29 my ($type,$content) = $ren->render('auth');
30 30 is( $type, $types{ $enc }, "$enc type is okay" );
  31 + ok( $content, "There is $type content" );
31 32 }

0 comments on commit 6d6a40d

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