Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 4 commits
  • 6 files changed
  • 0 comments
  • 1 contributor
7 Changes
... ... @@ -1,5 +1,12 @@
1 1 Revision history for AtomBus
2 2
  3 +1.0405 2012-04-17
  4 + Fixed tests to set config options at compile time before AtomBus module
  5 + is loaded.
  6 + Removed unnecessary before hook. Initializing now happens when AtomBus
  7 + is loaded.
  8 + Fixed the structure of the config options in config.yml.
  9 +
3 10 1.0404 2010-12-29
4 11 Making configuration more friendly. All AtomBus specific settings
5 12 should now be under the 'atombus' config setting.
16 config.yml
... ... @@ -1,11 +1,9 @@
1   -appname: "AtomMQ"
  1 +appname: "AtomBus"
2 2 charset: "UTF-8"
3 3
4   -page_size: 100
5   -
6   -plugins:
7   - DBIC:
8   - atommq:
9   - schema_class: "AtomMQ::Schema"
10   - dsn: "dbi:mysql:database=atommq"
11   - user: root
  4 +atombus:
  5 + page_size: 100
  6 + db:
  7 + dsn: "dbi:Pg:dbname=atombus"
  8 + user: "joe"
  9 + pass: "momma"
4 dist.ini
... ... @@ -1,10 +1,10 @@
1 1 name = AtomBus
2   -author = Naveed Massjouni <naveed.massjouni@rackspace.com>
  2 +author = Naveed Massjouni <naveedm9@gmail.com>
3 3 license = Perl_5
4 4 copyright_holder = Naveed Massjouni
5 5 copyright_year = 2010
6 6
7   -version = 1.0404
  7 +version = 1.0405
8 8
9 9 [Prereqs]
10 10 Atompub = 0
13 lib/AtomBus.pm
@@ -10,16 +10,9 @@ $XML::Atom::DefaultVersion = '1.0';
10 10 # VERSION
11 11
12 12 set content_type => 'application/xml';
13   -
14   -my $deployed = 0;
15   -before sub {
16   - config->{plugins}{DBIC}{atombus} = config->{atombus}{db};
17   - config->{plugins}{DBIC}{atombus}{schema_class} = 'AtomBus::Schema';
18   - # Automagically create db if it doesn't exist.
19   - if (not $deployed++) {
20   - eval { schema->deploy }; # Fails gracefully if tables already exist.
21   - }
22   -};
  13 +config->{plugins}{DBIC}{atombus} = config->{atombus}{db};
  14 +config->{plugins}{DBIC}{atombus}{schema_class} = 'AtomBus::Schema';
  15 +eval { schema->deploy }; # Fails gracefully if tables already exist.
23 16
24 17 get '/feeds/:feed_title/entries/:entry_id' => sub {
25 18 my $entry_id = 'urn:uuid:' . params->{entry_id};
15 t/01-basic.t
@@ -3,14 +3,17 @@ use Dancer qw(:syntax);
3 3 use Dancer::Test;
4 4
5 5 use Dancer::Plugin::DBIC qw(schema);
6   -use AtomBus;
7 6 use Capture::Tiny qw(capture);
8 7
9   -set atombus => {
10   - db => {
11   - dsn => 'dbi:SQLite:dbname=:memory:',
12   - }
13   -};
  8 +BEGIN {
  9 + set atombus => {
  10 + db => {
  11 + dsn => 'dbi:SQLite:dbname=:memory:',
  12 + }
  13 + };
  14 +}
  15 +
  16 +use AtomBus;
14 17
15 18 my $xml1 = q{
16 19 <entry>
15 t/02-paging.t
@@ -5,14 +5,17 @@ use Dancer::Test;
5 5 use URI;
6 6 use XML::XPath;
7 7 use Dancer::Plugin::DBIC qw(schema);
8   -use AtomBus;
9 8 use Capture::Tiny qw(capture);
10 9
11   -set atombus => {
12   - db => {
13   - dsn => 'dbi:SQLite:dbname=:memory:',
14   - }
15   -};
  10 +BEGIN {
  11 + set atombus => {
  12 + db => {
  13 + dsn => 'dbi:SQLite:dbname=:memory:',
  14 + }
  15 + };
  16 +}
  17 +
  18 +use AtomBus;
16 19
17 20 my $xml = q{
18 21 <entry>

No commit comments for this range

Something went wrong with that request. Please try again.