Skip to content

Commit

Permalink
Merge pull request #419 from w3c/tripu/miscellanea
Browse files Browse the repository at this point in the history
Omnibus PR
  • Loading branch information
deniak authored Jun 14, 2016
2 parents 02a0f6d + d236c54 commit 58318fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/rules/sotd/group-homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const self = {
exports.check = function (sr, done) {

var deliverers = sr.getDelivererIDs()
, ua = "Specberus/" + sr.version
, ua = "W3C-Pubrules/" + sr.version
, $sotd = sr.getSotDSection()
, count = 0
, apikey = process.env.API_KEY
Expand All @@ -33,7 +33,7 @@ exports.check = function (sr, done) {
req.query({apikey: apikey});
req.end(function(err, res) {
if (err || !res.ok) {
sr.error(self, "no-response", {status: res.status});
sr.error(self, "no-response", {status: (res ? res.status : (err ? err : 'error'))});
} else {
var homepage = res.body._links.homepage.href
, found = false;
Expand Down
6 changes: 3 additions & 3 deletions lib/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ Specberus.prototype.loadURL = function (url, cb) {
if (!cb) return this.throw("Missing callback to loadURL.");
var self = this;
sua.get(url)
.set("User-Agent", "Specberus/" + version + " Node/" + process.version + " by sexy Robin")
.set("User-Agent", "W3C-Pubrules/" + version)
.end(function (err, res) {
if (err) return self.throw(err.message);
if (!res.text) return self.throw("Body of " + url + " is empty.");
Expand Down Expand Up @@ -415,9 +415,9 @@ Specberus.prototype.transition = function (options) {
};

if (!process || !process.env || !process.env.API_KEY || process.env.API_KEY.length < 1)
throw new Error('Specberus is missing a valid key for the W3C API; define environment variable “API_KEY”');
throw new Error('Pubrules is missing a valid key for the W3C API; define environment variable “API_KEY”');
else {
if (!process || !process.env || !process.env.BASE_URI || process.env.BASE_URI.length < 1)
console.warn(`Environment variable “BASE_URI” not defined; assuming that Specberus lives at “/”`);
console.warn(`Environment variable “BASE_URI” not defined; assuming that Pubrules lives at “/”`);
exports.Specberus = Specberus;
}
6 changes: 3 additions & 3 deletions views/layouts/main.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<meta charset="utf-8">
<meta name="application-name" content="Pubrules Checker">
<meta name="description" content="Pubrules checker — reloaded">
<meta name="keywords" content="pubrules,checker,specberus,w3c,publict">
<meta name="keywords" content="pubrules,checker,specberus,w3c">
<meta name="author" content="W3C">
<title>Technical Report Publication Policy (Pubrules) {{version}}{{#if title }} &mdash; {{title}}{{/if}}</title>
<title>Pubrules {{version}}{{#if title }} &mdash; {{title}}{{/if}}</title>
{{#if DEBUG}}
<link rel="stylesheet" type="text/css" href="https://www.w3.org/scripts/bootstrap/3.3/css/bootstrap.css">
{{else}}
Expand All @@ -26,7 +26,7 @@
<div class="col-xs-7 navbar-brand">
<a href="http://www.w3.org/"><img class="logo" src="{{BASE_URI}}img/logo-w3c.svg" alt="W3C logo"></a>
<img src="{{BASE_URI}}img/logo.svg" alt="Logo for the Pubrules Checker">
<a href="{{BASE_URI}}">Technical Report Publication Policy (Pubrules)</a> {{version}}{{#if title }} &mdash; {{title}}{{/if}}
<a href="{{BASE_URI}}"><abbr title="Technical Report Publication Policy">Pubrules</abbr></a> {{version}}{{#if title }} &mdash; {{title}}{{/if}}
</div>
<div class="contribute col-xs-5 text-right">
<a id="infoLink" href="#" onclick="$('#about').show(); $('#infoLink').hide();">Important information about this tool</a>
Expand Down

0 comments on commit 58318fe

Please sign in to comment.