[Bps-public-commit] rt-extension-assets branch, master, updated. 1.04

Alex Vandiver alexmv at bestpractical.com
Mon Mar 2 17:34:48 EST 2015


The branch, master has been updated
       via  d5d9fd22cd2754e5a1f799432ac2c5b72150abc9 (commit)
       via  0e4a49c28a0f80b5da0dffecf4083574311ffe0e (commit)
       via  3ff4055d0fac79f0d40a32e48f03940f8429ab03 (commit)
       via  c1a3060f89f60ab24578ecacb0d1b18141f440e2 (commit)
      from  5af1be5e592570a0a6b0ac107c15b0807ce045b9 (commit)

Summary of changes:
 .gitignore                 | 16 ++++++++--------
 MANIFEST.SKIP              |  3 +++
 META.yml                   |  2 +-
 Makefile.PL                | 16 ++++++++++++++++
 lib/RT/Assets.pm           | 22 +++++++++++++++++++++-
 lib/RT/Extension/Assets.pm |  2 +-
 6 files changed, 50 insertions(+), 11 deletions(-)

- Log -----------------------------------------------------------------
commit c1a3060f89f60ab24578ecacb0d1b18141f440e2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Mar 2 15:45:13 2015 -0500

    Bundle similar RoleLimits, if possible
    
    This notably improves performance if MergeUsers is in effect.

diff --git a/lib/RT/Assets.pm b/lib/RT/Assets.pm
index 0403bee..787b5f3 100644
--- a/lib/RT/Assets.pm
+++ b/lib/RT/Assets.pm
@@ -53,7 +53,7 @@ package RT::Assets;
 use base 'RT::SearchBuilder';
 
 use Role::Basic "with";
-with "RT::SearchBuilder::Role::Roles";
+with "RT::SearchBuilder::Role::Roles" => { -rename => {RoleLimit => '_RoleLimit'}};
 
 use Scalar::Util qw/blessed/;
 
@@ -112,6 +112,26 @@ sub Limit {
     $self->SUPER::Limit(%args);
 }
 
+=head2 RoleLimit
+
+Re-uses the underlying JOIN, if possible.
+
+=cut
+
+sub RoleLimit {
+    my $self = shift;
+    my %args = (
+        TYPE => '',
+        SUBCLAUSE => '',
+        OPERATOR => '=',
+        @_
+    );
+
+    my $key = "role-join-".join("-",map {$args{$_}//''} qw/SUBCLAUSE TYPE OPERATOR/);
+    my @ret = $self->_RoleLimit(%args, BUNDLE => $self->{$key} );
+    $self->{$key} = \@ret;
+}
+
 =head1 INTERNAL METHODS
 
 Public methods which encapsulate implementation details.  You shouldn't need to

commit 3ff4055d0fac79f0d40a32e48f03940f8429ab03
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Mar 2 15:54:50 2015 -0500

    Add "snapshot" and "parallel-test" targets
    
    The former is useful for publishing releases; the latter for faster
    testing.  Code taken from RTIR.

diff --git a/Makefile.PL b/Makefile.PL
index 0b6d23d..7424108 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -27,5 +27,21 @@ substitute(
     q(xt/lib/RT/Extension/Assets/Test.pm),
 );
 
+postamble(<<POSTAMBLE
+snapshot: dist sign-dist dist-shasums
+
+sign-dist:
+	gpg -a --detach-sign \$(DISTVNAME).tar.gz
+
+dist-shasums:
+	sha1sum \$(DISTVNAME).tar.gz*
+
+parallel-test: test-parallel
+
+test-parallel:
+	RT_TEST_PARALLEL=1 \$(FULLPERLRUN) "-MApp::Prove" -e 'my \$\$p = App::Prove->new(); \$\$p->process_args("-wlrj5","--state=slow,save", "xt"); exit( \$\$p->run() ? 0 : 1 )'
+POSTAMBLE
+);
+
 sign;
 WriteAll;

commit 0e4a49c28a0f80b5da0dffecf4083574311ffe0e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Mar 2 15:55:40 2015 -0500

    Update .gitignore
    
    Root most of the expressions at the root of the repository for
    efficiency, and ignore .prove (which "make parallel-test" may now
    generate)

diff --git a/.gitignore b/.gitignore
index d0e2233..68f6a57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,10 @@
-blib*
-Makefile
-Makefile.old
-pm_to_blib*
-*.tar.gz
-.lwpcookies
-cover_db
+/blib*
+/Makefile
+/Makefile.old
+/pm_to_blib*
+/*.tar.gz
+/.lwpcookies
+/cover_db
 pod2htm*.tmp
 /RT-Extension-Assets*
 *.bak
@@ -12,4 +12,4 @@ pod2htm*.tmp
 /MYMETA.*
 /xt/tmp/
 /xt/lib/RT/Extension/Assets/Test.pm
-SIGNATURE
\ No newline at end of file
+/.prove
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
index a0f75c7..7adb346 100644
--- a/MANIFEST.SKIP
+++ b/MANIFEST.SKIP
@@ -69,3 +69,6 @@
 
 # ctags files
 ^\.tags
+
+# Prove state
+^\.prove$

commit d5d9fd22cd2754e5a1f799432ac2c5b72150abc9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Mar 2 16:11:51 2015 -0500

    Version 1.04 releng

diff --git a/META.yml b/META.yml
index 01c007a..88b62ac 100644
--- a/META.yml
+++ b/META.yml
@@ -32,6 +32,6 @@ requires:
   perl: 5.10.1
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: '1.03'
+version: '1.04'
 x_module_install_rtx_version: '0.37'
 x_requires_rt: 4.2.1
diff --git a/lib/RT/Extension/Assets.pm b/lib/RT/Extension/Assets.pm
index d6006d6..74898bb 100644
--- a/lib/RT/Extension/Assets.pm
+++ b/lib/RT/Extension/Assets.pm
@@ -50,7 +50,7 @@ use strict;
 use warnings;
 package RT::Extension::Assets;
 
-our $VERSION = '1.03';
+our $VERSION = '1.04';
 
 # Loaded so they're available and rights are injected.
 use RT::Catalog;

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list