Skip to content

Commit

Permalink
Merge pull request #1756 from metacpan/oalders/staticpan
Browse files Browse the repository at this point in the history
Begin using st.aticpan.org
  • Loading branch information
mickeyn committed Jul 27, 2016
2 parents e8254d8 + 63d04a5 commit 35c8eb4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -29,7 +29,6 @@ user can be changed in the `metacpan_web.conf` file. Ideally you would create a
new file called `metacpan_web_local.conf` that contains

api http://127.0.0.1:5000
api_external http://127.0.0.1:5000
api_secure http://127.0.0.1:5000
api_external_secure http://127.0.0.1:5000

Expand Down
7 changes: 2 additions & 5 deletions lib/MetaCPAN/Web/Controller/Root.pm
Expand Up @@ -102,16 +102,13 @@ sub end : ActionClass('RenderView') {
$c->stash->{req} = $c->req;
$c->stash->{api} = $c->config->{api};
$c->stash->{api_secure} = $c->config->{api_secure} || $c->config->{api};
$c->stash->{api_external}
= $c->config->{api_external} || $c->config->{api};
$c->stash->{api_external_secure}
= $c->config->{api_external_secure}
|| $c->config->{api_external}
$c->stash->{api_external_secure} = $c->config->{api_external_secure}
|| $c->stash->{api_secure};
$c->stash->{oauth_prefix}
= $c->stash->{api_external_secure}
. '/oauth2/authorize?client_id='
. $c->config->{consumer_key};
$c->stash->{source_host} = $c->config->{source_host};

$c->stash->{site_alert_message} = $c->config->{site_alert_message};

Expand Down
1 change: 1 addition & 0 deletions metacpan_web.conf
Expand Up @@ -5,6 +5,7 @@ default_view HTML

api_secure = https://api-v1.metacpan.org
api_external_secure = https://api-v1.metacpan.org
source_host = https://st.aticpan.org
consumer_key = metacpan.dev
cookie_secret = seekrit
consumer_secret = ClearAirTurbulence
Expand Down
2 changes: 1 addition & 1 deletion root/browse.html
Expand Up @@ -13,7 +13,7 @@
<li class="nav-header">Tools</li>
<li><a data-keyboard-shortcut="g d" href="/release/<% author %>/<% release %>"><i class="fa fa-fw fa-info-circle black"></i>Release Info</a></li>
<li><a data-keyboard-shortcut="g a" href="/author/<% author %>"><i class="fa fa-user fa-fw black"></i>Author</a></li>
<li><a href="<% api_external_secure %>/source/<% base %>"><i class="fa fa-file-text-o fa-fw black"></i>Raw browser</a></li>
<li><a href="<% source_host %>/source/<% base %>"><i class="fa fa-file-text-o fa-fw black"></i>Raw browser</a></li>
<li class="nav-header">Info</li>
<li><% count = files.grep(->{this.directory == 1 }).size; count %> folder<% count != 1 ? "s" : "" %></li>
<li><% count = files.grep(->{this.directory == 0 }).size; count %> file<% count != 1 ? "s" : "" %></li>
Expand Down
4 changes: 2 additions & 2 deletions root/pod.html
Expand Up @@ -25,11 +25,11 @@
<% END %>
<li>
<a data-keyboard-shortcut="g s" href="/source/<% module.author %>/<% module.release %>/<% module.path %>"><i class="fa fa-fw fa-file-code-o black"></i>Source</a>
(<a href="<% api_external_secure %>/source/<% module.author %>/<% module.release %>/<% module.path %>">raw</a>)
(<a href="<% source_host %>/source/<% module.author %>/<% module.release %>/<% module.path %>">raw</a>)
</li>
<li>
<a data-keyboard-shortcut="g b" href="/source/<% module.author %>/<% module.release %>/<% module.path.split("/").splice(0,-1).join("/") %>"><i class="fa fa-fw fa-folder-open black"></i>Browse</a>
(<a href="<% api_external_secure %>/source/<% module.author %>/<% module.release %>/">raw</a>)
(<a href="<% source_host %>/source/<% module.author %>/<% module.release %>/">raw</a>)
</li>
<% PROCESS inc/release-info.html schema_org = 1 %>
<li class="nav-header">Activity</li>
Expand Down
2 changes: 1 addition & 1 deletion root/release.html
Expand Up @@ -10,7 +10,7 @@
<% INCLUDE mobile/toolbar-search-form.html %>
</li>
<li class="nav-header"><span class="relatize"><% release.date.dt_http %></span></li>
<li><a href="/source/<% release.author %>/<% release.name %>"><i class="fa fa-fw fa-folder-open black"></i>Browse</a> (<a href="<% api_external_secure %>/source/<% release.author %>/<% release.name %>/">raw</a>)</li>
<li><a href="/source/<% release.author %>/<% release.name %>"><i class="fa fa-fw fa-folder-open black"></i>Browse</a> (<a href="<% source_host %>/source/<% release.author %>/<% release.name %>/">raw</a>)</li>
<% PROCESS inc/release-info.html %>
<li class="nav-header">Activity</li>
<li><% INCLUDE inc/activity.html query = 'distribution=' _ release.distribution %></li>
Expand Down

0 comments on commit 35c8eb4

Please sign in to comment.