[Bps-public-commit] SD branch, master, updated. 0.70-41-gfd9973c
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Sep 4 04:48:02 EDT 2009
The branch, master has been updated
via fd9973cf52c27d7aaf806f7924e271fcbcdf7000 (commit)
from b4a3a4725682e3a11f70eeb6c80aa40bc4d12788 (commit)
Summary of changes:
lib/App/SD/Replica/lighthouse.pm | 9 +++++----
lib/App/SD/Replica/lighthouse/PullEncoder.pm | 5 +++--
2 files changed, 8 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit fd9973cf52c27d7aaf806f7924e271fcbcdf7000
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Sep 4 16:47:54 2009 +0800
lighthouse replica: add query support
diff --git a/lib/App/SD/Replica/lighthouse.pm b/lib/App/SD/Replica/lighthouse.pm
index c775be0..07d4d33 100644
--- a/lib/App/SD/Replica/lighthouse.pm
+++ b/lib/App/SD/Replica/lighthouse.pm
@@ -27,13 +27,14 @@ our %PROP_MAP = ( state => 'status', title => 'summary' );
sub BUILD {
my $self = shift;
- my ( $auth, $account, $project ) =
- $self->{url} =~ m{^lighthouse:(?:(.*)@)?(.*?)/(.*)}
+ my ( $auth, $account, $project, $query ) =
+ $self->{url} =~ m{^lighthouse:(?:(.*)@)?(.*?)/(.*?)(?:/(.*))?$}
or die
"Can't parse lighthouse server spec. Expected
- lighthouse:user:password\@account/project or\n"
- ."lighthouse:token\@account/project.";
+ lighthouse:email:password\@account/project/query or\n"
+ ."lighthouse:token\@account/project/query.";
my $server = "http://$account.lighthouseapp.com";
+ $self->query( $query || 'all' );
my ( $email, $password, $token );
if ($auth) {
diff --git a/lib/App/SD/Replica/lighthouse/PullEncoder.pm b/lib/App/SD/Replica/lighthouse/PullEncoder.pm
index 76e52a2..21e780f 100644
--- a/lib/App/SD/Replica/lighthouse/PullEncoder.pm
+++ b/lib/App/SD/Replica/lighthouse/PullEncoder.pm
@@ -39,10 +39,11 @@ Returns a array of all tickets found matching your QUERY hash.
sub find_matching_tickets {
my $self = shift;
- my %query = (@_);
+ my %args = (@_);
my $last_changeset_seen_dt = $self->_only_pull_tickets_modified_after()
|| DateTime->from_epoch( epoch => 0 );
- my @tickets = $self->sync_source->lighthouse->tickets( query => 'all' );
+ my @tickets =
+ $self->sync_source->lighthouse->tickets( query => $args{query} );
my @updated = map { $_->load( $_->number ); $_ }
grep { $_->{updated_at} ge $last_changeset_seen_dt } @tickets;
return \@updated;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list