Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

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

No commit comments for this range

Something went wrong with that request. Please try again.