about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-01-12 21:32:33 +0000
committerEric Wong <e@80x24.org>2016-04-05 18:58:27 +0000
commit1e7a2bbd2c7b0c1d5f989c0e225d22276055eff1 (patch)
tree38673ce828a8e35b2776415c9ff633b8b7964f1e /lib
parent6cc4db944fa85f97734ed93763dd745e8938b8e6 (diff)
downloadpublic-inbox-1e7a2bbd2c7b0c1d5f989c0e225d22276055eff1.tar.gz
We mainly call it "repobrowse" (all lowercase), so do not imply
it is two separate words by capitalizing "Browse".
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Repobrowse.pm (renamed from lib/PublicInbox/RepoBrowse.pm)10
-rw-r--r--lib/PublicInbox/RepobrowseBase.pm (renamed from lib/PublicInbox/RepoBrowseBase.pm)4
-rw-r--r--lib/PublicInbox/RepobrowseConfig.pm (renamed from lib/PublicInbox/RepoConfig.pm)4
-rw-r--r--lib/PublicInbox/RepobrowseGit.pm (renamed from lib/PublicInbox/RepoBrowseGit.pm)4
-rw-r--r--lib/PublicInbox/RepobrowseGitBlob.pm (renamed from lib/PublicInbox/RepoBrowseGitBlob.pm)6
-rw-r--r--lib/PublicInbox/RepobrowseGitCommit.pm (renamed from lib/PublicInbox/RepoBrowseGitCommit.pm)8
-rw-r--r--lib/PublicInbox/RepobrowseGitFallback.pm (renamed from lib/PublicInbox/RepoBrowseGitFallback.pm)6
-rw-r--r--lib/PublicInbox/RepobrowseGitLog.pm (renamed from lib/PublicInbox/RepoBrowseGitLog.pm)8
-rw-r--r--lib/PublicInbox/RepobrowseGitPatch.pm (renamed from lib/PublicInbox/RepoBrowseGitPatch.pm)6
-rw-r--r--lib/PublicInbox/RepobrowseGitPlain.pm (renamed from lib/PublicInbox/RepoBrowseGitPlain.pm)8
-rw-r--r--lib/PublicInbox/RepobrowseGitTag.pm (renamed from lib/PublicInbox/RepoBrowseGitTag.pm)6
-rw-r--r--lib/PublicInbox/RepobrowseGitTree.pm (renamed from lib/PublicInbox/RepoBrowseGitTree.pm)6
-rw-r--r--lib/PublicInbox/RepobrowseQuery.pm (renamed from lib/PublicInbox/RepoBrowseQuery.pm)2
13 files changed, 39 insertions, 39 deletions
diff --git a/lib/PublicInbox/RepoBrowse.pm b/lib/PublicInbox/Repobrowse.pm
index ec54ed05..75dee72f 100644
--- a/lib/PublicInbox/RepoBrowse.pm
+++ b/lib/PublicInbox/Repobrowse.pm
@@ -12,16 +12,16 @@
 #
 # This allows an M:N relationship between "normal" repos for project
 # and public-inbox (ssoma) git repositories where N may be zero.
-# In other words, RepoBrowse must work for repositories without
+# In other words, repobrowse must work for repositories without
 # any public-inbox at all; or with multiple public-inboxes.
 # And the rest of public-inbox will always work without a "normal"
 # code repo for the project.
 
-package PublicInbox::RepoBrowse;
+package PublicInbox::Repobrowse;
 use strict;
 use warnings;
 use URI::Escape qw(uri_escape_utf8 uri_unescape);
-use PublicInbox::RepoConfig;
+use PublicInbox::RepobrowseConfig;
 
 my %CMD = map { lc($_) => $_ } qw(Log Commit Tree Patch Blob Plain Tag);
 my %VCS = (git => 'Git');
@@ -29,7 +29,7 @@ my %LOADED;
 
 sub new {
         my ($class, $file) = @_;
-        bless { rconfig => PublicInbox::RepoConfig->new($file) }, $class;
+        bless { rconfig => PublicInbox::RepobrowseConfig->new($file) }, $class;
 }
 
 # simple response for errors
@@ -71,7 +71,7 @@ sub run {
                         unshift @extra, $cmd;
                         $mod = 'Fallback';
                 }
-                $mod = load_once("PublicInbox::RepoBrowse$vcs$mod");
+                $mod = load_once("PublicInbox::Repobrowse$vcs$mod");
                 $vcs = load_once("PublicInbox::$vcs");
                 $repo_info->{$vcs_lc} ||= $vcs->new($repo_info->{path});
                 $req->{relcmd} = '../' x scalar(@extra);
diff --git a/lib/PublicInbox/RepoBrowseBase.pm b/lib/PublicInbox/RepobrowseBase.pm
index 2ff5680a..06381b2a 100644
--- a/lib/PublicInbox/RepoBrowseBase.pm
+++ b/lib/PublicInbox/RepobrowseBase.pm
@@ -1,9 +1,9 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepoBrowseBase;
+package PublicInbox::RepobrowseBase;
 use strict;
 use warnings;
-require PublicInbox::RepoBrowseQuery;
+require PublicInbox::RepobrowseQuery;
 use PublicInbox::Hval;
 
 sub new { bless {}, shift }
diff --git a/lib/PublicInbox/RepoConfig.pm b/lib/PublicInbox/RepobrowseConfig.pm
index d55a27d2..2f780b65 100644
--- a/lib/PublicInbox/RepoConfig.pm
+++ b/lib/PublicInbox/RepobrowseConfig.pm
@@ -1,6 +1,6 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepoConfig;
+package PublicInbox::RepobrowseConfig;
 use strict;
 use warnings;
 use PublicInbox::Config qw/try_cat/;
@@ -17,7 +17,7 @@ sub new {
 sub default_file {
         my $f = $ENV{PI_REPO_CONFIG};
         return $f if defined $f;
-        PublicInbox::Config::config_dir() . '/repo_config';
+        PublicInbox::Config::config_dir() . '/repobrowse_config';
 }
 
 # Returns something like:
diff --git a/lib/PublicInbox/RepoBrowseGit.pm b/lib/PublicInbox/RepobrowseGit.pm
index 498b82c7..eb79e563 100644
--- a/lib/PublicInbox/RepoBrowseGit.pm
+++ b/lib/PublicInbox/RepobrowseGit.pm
@@ -1,8 +1,8 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ (https://www.gnu.org/licenses/agpl-3.0.txt)
 
-# common functions used by other RepoBrowseGit* modules
-package PublicInbox::RepoBrowseGit;
+# common functions used by other RepobrowseGit* modules
+package PublicInbox::RepobrowseGit;
 use strict;
 use warnings;
 use base qw(Exporter);
diff --git a/lib/PublicInbox/RepoBrowseGitBlob.pm b/lib/PublicInbox/RepobrowseGitBlob.pm
index 3be069f7..273a1018 100644
--- a/lib/PublicInbox/RepoBrowseGitBlob.pm
+++ b/lib/PublicInbox/RepobrowseGitBlob.pm
@@ -2,17 +2,17 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Show a blob as-is
-package PublicInbox::RepoBrowseGitBlob;
+package PublicInbox::RepobrowseGitBlob;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepoBrowseBase);
+use base qw(PublicInbox::RepobrowseBase);
 use base qw(Exporter);
 our @EXPORT = qw(git_blob_mime_type git_blob_stream_response);
 
 sub call_git_blob {
         my ($self, $req) = @_;
         my $git = $req->{repo_info}->{git};
-        my $q = PublicInbox::RepoBrowseQuery->new($req->{cgi});
+        my $q = PublicInbox::RepobrowseQuery->new($req->{cgi});
         my $id = $q->{id};
         $id eq '' and $id = 'HEAD';
 
diff --git a/lib/PublicInbox/RepoBrowseGitCommit.pm b/lib/PublicInbox/RepobrowseGitCommit.pm
index 6278c53a..b3973392 100644
--- a/lib/PublicInbox/RepoBrowseGitCommit.pm
+++ b/lib/PublicInbox/RepobrowseGitCommit.pm
@@ -2,12 +2,12 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # shows the /commit/ endpoint for git repositories
-package PublicInbox::RepoBrowseGitCommit;
+package PublicInbox::RepobrowseGitCommit;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepoBrowseBase);
+use base qw(PublicInbox::RepobrowseBase);
 use PublicInbox::Hval qw(utf8_html);
-use PublicInbox::RepoBrowseGit qw(git_unquote git_commit_title);
+use PublicInbox::RepobrowseGit qw(git_unquote git_commit_title);
 
 use constant GIT_FMT => '--pretty=format:'.join('%n',
         '%H', '%h', '%s', '%an <%ae>', '%ai', '%cn <%ce>', '%ci',
@@ -118,7 +118,7 @@ sub git_commit_stream {
 sub call_git_commit {
         my ($self, $req) = @_;
 
-        my $q = PublicInbox::RepoBrowseQuery->new($req->{cgi});
+        my $q = PublicInbox::RepobrowseQuery->new($req->{cgi});
         my $id = $q->{id};
         $id eq '' and $id = 'HEAD';
         my $git = $req->{repo_info}->{git};
diff --git a/lib/PublicInbox/RepoBrowseGitFallback.pm b/lib/PublicInbox/RepobrowseGitFallback.pm
index 03b282ef..79cc2fe4 100644
--- a/lib/PublicInbox/RepoBrowseGitFallback.pm
+++ b/lib/PublicInbox/RepobrowseGitFallback.pm
@@ -3,13 +3,13 @@
 
 # when no endpoints match, fallback to this and serve a static file
 # This can serve Smart HTTP in the future.
-package PublicInbox::RepoBrowseGitFallback;
+package PublicInbox::RepobrowseGitFallback;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepoBrowseBase);
+use base qw(PublicInbox::RepobrowseBase);
 use Fcntl qw(:seek);
 
-# overrides PublicInbox::RepoBrowseBase::call
+# overrides PublicInbox::RepobrowseBase::call
 sub call {
         my ($self, undef, $req) = @_;
         my $expath = $req->{expath};
diff --git a/lib/PublicInbox/RepoBrowseGitLog.pm b/lib/PublicInbox/RepobrowseGitLog.pm
index 9192c7fc..5d2c855c 100644
--- a/lib/PublicInbox/RepoBrowseGitLog.pm
+++ b/lib/PublicInbox/RepobrowseGitLog.pm
@@ -1,12 +1,12 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
-package PublicInbox::RepoBrowseGitLog;
+package PublicInbox::RepobrowseGitLog;
 use strict;
 use warnings;
 use PublicInbox::Hval qw(utf8_html);
-use base qw(PublicInbox::RepoBrowseBase);
-use PublicInbox::RepoBrowseGit qw(git_dec_links git_commit_title);
+use base qw(PublicInbox::RepobrowseBase);
+use PublicInbox::RepobrowseGit qw(git_dec_links git_commit_title);
 # cannot rely on --date=format-local:... yet, it is too new (September 2015)
 my $LOG_FMT = '--pretty=tformat:'.
                 join('%x00', qw(%h %p %s D%D));
@@ -19,7 +19,7 @@ sub call_git_log {
         $max = int($max);
         $max = 50 if $max == 0;
 
-        my $q = PublicInbox::RepoBrowseQuery->new($req->{cgi});
+        my $q = PublicInbox::RepobrowseQuery->new($req->{cgi});
         my $h = $q->{h};
         $h eq '' and $h = 'HEAD';
 
diff --git a/lib/PublicInbox/RepoBrowseGitPatch.pm b/lib/PublicInbox/RepobrowseGitPatch.pm
index 432bbd3c..7f03864e 100644
--- a/lib/PublicInbox/RepoBrowseGitPatch.pm
+++ b/lib/PublicInbox/RepobrowseGitPatch.pm
@@ -3,10 +3,10 @@
 
 # shows the /patch/ endpoint for git repositories
 # usage: /repo.git/patch?id=COMMIT_ID
-package PublicInbox::RepoBrowseGitPatch;
+package PublicInbox::RepobrowseGitPatch;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepoBrowseBase);
+use base qw(PublicInbox::RepobrowseBase);
 
 # try to be educational and show the command-line used in the signature
 my @CMD = qw(format-patch -M --stdout);
@@ -15,7 +15,7 @@ my $sig = '--signature=git '.join(' ', @CMD);
 sub call_git_patch {
         my ($self, $req) = @_;
         my $git = $req->{repo_info}->{git};
-        my $q = PublicInbox::RepoBrowseQuery->new($req->{cgi});
+        my $q = PublicInbox::RepobrowseQuery->new($req->{cgi});
         my $id = $q->{id};
         $id =~ /\A[\w-]+([~\^][~\^\d])*\z/ or $id = 'HEAD';
 
diff --git a/lib/PublicInbox/RepoBrowseGitPlain.pm b/lib/PublicInbox/RepobrowseGitPlain.pm
index e16195dd..ebb4f397 100644
--- a/lib/PublicInbox/RepoBrowseGitPlain.pm
+++ b/lib/PublicInbox/RepobrowseGitPlain.pm
@@ -1,16 +1,16 @@
 # Copyright (C) 2015-2016 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepoBrowseGitPlain;
+package PublicInbox::RepobrowseGitPlain;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepoBrowseBase);
-use PublicInbox::RepoBrowseGitBlob;
+use base qw(PublicInbox::RepobrowseBase);
+use PublicInbox::RepobrowseGitBlob;
 use PublicInbox::Hval qw(utf8_html);
 
 sub call_git_plain {
         my ($self, $req) = @_;
         my $git = $req->{repo_info}->{git};
-        my $q = PublicInbox::RepoBrowseQuery->new($req->{cgi});
+        my $q = PublicInbox::RepobrowseQuery->new($req->{cgi});
         my $id = $q->{id};
         $id eq '' and $id = 'HEAD';
 
diff --git a/lib/PublicInbox/RepoBrowseGitTag.pm b/lib/PublicInbox/RepobrowseGitTag.pm
index 2019dd6f..13af0a34 100644
--- a/lib/PublicInbox/RepoBrowseGitTag.pm
+++ b/lib/PublicInbox/RepobrowseGitTag.pm
@@ -2,10 +2,10 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # shows the /tag/ endpoint for git repositories
-package PublicInbox::RepoBrowseGitTag;
+package PublicInbox::RepobrowseGitTag;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepoBrowseBase);
+use base qw(PublicInbox::RepobrowseBase);
 use POSIX qw(strftime);
 use PublicInbox::Hval qw(utf8_html);
 
@@ -18,7 +18,7 @@ my %cmd_map = ( # type => action
 sub call_git_tag {
         my ($self, $req) = @_;
 
-        my $q = PublicInbox::RepoBrowseQuery->new($req->{cgi});
+        my $q = PublicInbox::RepobrowseQuery->new($req->{cgi});
         my $h = $q->{h};
         $h eq '' and return sub {
                 my ($res) = @_;
diff --git a/lib/PublicInbox/RepoBrowseGitTree.pm b/lib/PublicInbox/RepobrowseGitTree.pm
index 6d5d4b8c..13ded634 100644
--- a/lib/PublicInbox/RepoBrowseGitTree.pm
+++ b/lib/PublicInbox/RepobrowseGitTree.pm
@@ -1,9 +1,9 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepoBrowseGitTree;
+package PublicInbox::RepobrowseGitTree;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepoBrowseBase);
+use base qw(PublicInbox::RepobrowseBase);
 use PublicInbox::Hval qw(utf8_html);
 
 my %GIT_MODE = (
@@ -20,7 +20,7 @@ sub git_tree_stream {
         my ($self, $req, $res) = @_; # res: Plack callback
         my @extra = @{$req->{extra}};
         my $git = $req->{repo_info}->{git};
-        my $q = PublicInbox::RepoBrowseQuery->new($req->{cgi});
+        my $q = PublicInbox::RepobrowseQuery->new($req->{cgi});
         my $id = $q->{id};
         if ($id eq '') {
                 chomp($id = $git->qx(qw(rev-parse --short=10 HEAD)));
diff --git a/lib/PublicInbox/RepoBrowseQuery.pm b/lib/PublicInbox/RepobrowseQuery.pm
index 861e587b..e9c5153f 100644
--- a/lib/PublicInbox/RepoBrowseQuery.pm
+++ b/lib/PublicInbox/RepobrowseQuery.pm
@@ -2,7 +2,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # query parameter management for repobrowse
-package PublicInbox::RepoBrowseQuery;
+package PublicInbox::RepobrowseQuery;
 use strict;
 use warnings;
 use PublicInbox::Hval;