Skip to content

Commit fa304a3

Browse files
authored
---
yaml --- r: 28563 b: refs/heads/gh-pages c: 4f86314 h: refs/heads/master i: 28561: 09f0733 28559: 9b2ddf7
1 parent 72a1a16 commit fa304a3

6 files changed

Lines changed: 236 additions & 1 deletion

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: a2224afe5f8022a1074fa7055b883ec7bf44af5d
3-
refs/heads/gh-pages: 9b91392095cbb68bba1a32efe7d8caeac44467d9
3+
refs/heads/gh-pages: 4f863146dd080b1013270b1912eb2b6439a3464d
44
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
55
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
66
refs/tags/v0.0.11: ffbfba48a6426ff63c08ff2117e58681f251fbf2

branches/gh-pages/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
target/
2+
bin/
3+
*.iml
4+
.idea
5+
.project
6+
.settings
7+
.classpath
8+
.DS_Store
9+
node_modules/
10+
package-lock.json

branches/gh-pages/404.html

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
5+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'; script-src 'unsafe-inline'">
6+
<title>Page not found &middot; GitHub Pages</title>
7+
<style type="text/css" media="screen">
8+
body {
9+
background-color: #f1f1f1;
10+
margin: 0;
11+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
12+
}
13+
14+
.container { margin: 50px auto 40px auto; width: 600px; text-align: center; }
15+
16+
a { color: #4183c4; text-decoration: none; }
17+
a:hover { text-decoration: underline; }
18+
19+
h1 { width: 800px; position:relative; left: -100px; letter-spacing: -1px; line-height: 60px; font-size: 60px; font-weight: 100; margin: 0px 0 50px 0; text-shadow: 0 1px 0 #fff; }
20+
p { color: rgba(0, 0, 0, 0.5); margin: 20px 0; line-height: 1.6; }
21+
22+
ul { list-style: none; margin: 25px 0; padding: 0; }
23+
li { display: table-cell; font-weight: bold; width: 1%; }
24+
25+
.logo { display: inline-block; margin-top: 35px; }
26+
.logo-img-2x { display: none; }
27+
@media
28+
only screen and (-webkit-min-device-pixel-ratio: 2),
29+
only screen and ( min--moz-device-pixel-ratio: 2),
30+
only screen and ( -o-min-device-pixel-ratio: 2/1),
31+
only screen and ( min-device-pixel-ratio: 2),
32+
only screen and ( min-resolution: 192dpi),
33+
only screen and ( min-resolution: 2dppx) {
34+
.logo-img-1x { display: none; }
35+
.logo-img-2x { display: inline-block; }
36+
}
37+
38+
#suggestions {
39+
margin-top: 35px;
40+
color: #ccc;
41+
}
42+
#suggestions a {
43+
color: #666666;
44+
font-weight: 200;
45+
font-size: 14px;
46+
margin: 0 10px;
47+
}
48+
49+
</style>
50+
</head>
51+
<body>
52+
53+
<div class="container">
54+
55+
<h1>404</h1>
56+
<p><strong>File not found</strong></p>
57+
58+
<p>
59+
The site configured at this address does not
60+
contain the requested file.
61+
</p>
62+
63+
<p>
64+
If this is your site, make sure that the filename case matches the URL.<br>
65+
For root URLs (like <code>http://example.com/</code>) you must provide an
66+
<code>index.html</code> file.
67+
</p>
68+
69+
<p>
70+
<a href="https://help.github.com/pages/">Read the full documentation</a>
71+
for more information about using <strong>GitHub Pages</strong>.
72+
</p>
73+
74+
<div id="suggestions">
75+
<a href="https://githubstatus.com">GitHub Status</a> &mdash;
76+
<a href="https://twitter.com/githubstatus">@githubstatus</a>
77+
</div>
78+
79+
<a href="/" class="logo logo-img-1x">
80+
<img width="32" height="32" title="" alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFMTZCRDY3REIzRjAxMUUyQUQzREIxQzRENUFFNUM5NiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFMTZCRDY3RUIzRjAxMUUyQUQzREIxQzRENUFFNUM5NiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkUxNkJENjdCQjNGMDExRTJBRDNEQjFD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JLuqq6t345p9y3eUy8OTk5PjAHuI9uo4b07FBaOhsu0A4Unc+T1TU1Nj3KsSSE5yJ65jqF2DDd8QqWYmAZrIM2VlZTdnZmb6AbpdV9V6ec9znf5Q7HjYumdRE0JOp3MjitO4SFa+cZz8Umqe3TCbSLvdfkR/kWDdNQl5InuTcysOcpFT35ZrbBxx4p3JAHlZVVW1D/634VRt+FvLBgK/v5LV9WS+10xMTEwtRw7XvqOL+e2Q8V3AYIOIAXQ26/heWVnZCVfcyKHg2CBgTpmPmjYM8l24GyaUHyaIh7XwfR9ErE8qHoDfn2LTNAVC0HX6MFcBIP8Bi+6F6cdW/DICkANRfx99fEYFQ7Nph5i/uQiA214gno7K+guhaiKg9gC62+M8eR7XsBsYJ4ilam60Fb7r7uAj8wFyuwM1oIOWgfmDy6RXEEQzJMPe23DXrVS7rtyD3Df8z/FPgAEAzWU5Ku59ZAUAAAAASUVORK5CYII=">
81+
</a>
82+
83+
<a href="/" class="logo logo-img-2x">
84+
<img width="32" height="32" title="" alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vb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WKXIul3uUbfP8njAFLW1OFr3gdFtZ72cNH+PtQT7/brW+NXqJAHh0y9V8/U/A1U7AfwIMAD7mS3pCbuWJAAAAAElFTkSuQmCC">
85+
</a>
86+
</div>
87+
<script>
88+
(function() {
89+
'use strict';
90+
const redirectUrl = function(url) {
91+
var defaultUrl = 'https://github.com/googleapis/google-cloud-java';
92+
var uri = new URL(url);
93+
var pattern = /^\/google-cloud-java\/(google-cloud-clients|google-api-grpc)\/apidocs\/(.*)/;
94+
var match = pattern.exec(uri.pathname);
95+
if (match == null) {
96+
return null;
97+
}
98+
return 'https://googleapis.dev/java/' + match[1] + '/latest/' + match[2] + uri.search + uri.hash;
99+
};
100+
var destination = redirectUrl(location.href);
101+
if (!destination) {
102+
destination = 'https://googleapis.dev/java/google-cloud-clients/latest/index.html';
103+
}
104+
location.href = destination;
105+
}());
106+
</script>
107+
</body>
108+
</html>

branches/gh-pages/package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "google-cloud-java",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "src/index.js",
6+
"scripts": {
7+
"test": "mocha test/*.js"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/googleapis/google-cloud-java.git"
12+
},
13+
"author": "Google Inc.",
14+
"license": "Apache-2.0",
15+
"bugs": {
16+
"url": "https://github.com/googleapis/google-cloud-java/issues"
17+
},
18+
"homepage": "https://github.com/googleapis/google-cloud-java#readme",
19+
"devDependencies": {
20+
"mocha": "^6.1.4"
21+
}
22+
}

branches/gh-pages/src/redirects.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2019, Google LLC All rights reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
16+
17+
module.exports.redirectUrl = function(url) {
18+
var defaultUrl = 'https://github.com/googleapis/google-cloud-java';
19+
var uri = new URL(url);
20+
var pattern = /^\/google-cloud-java\/(google-cloud-clients|google-api-grpc)\/apidocs\/(.*)/;
21+
var match = pattern.exec(uri.pathname);
22+
if (match == null) {
23+
return null;
24+
}
25+
return 'https://googleapis.dev/java/' + match[1] + '/latest/' + match[2] + uri.search + uri.hash;
26+
};
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
16+
17+
const assert = require('assert');
18+
const redirectUrl = require('../src/redirects.js').redirectUrl;
19+
20+
describe('redirectUrl', () => {
21+
22+
it('should handle framed root link', () => {
23+
const url = 'https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html';
24+
const expected = 'https://googleapis.dev/java/google-cloud-clients/latest/index.html';
25+
assert.equal(redirectUrl(url), expected);
26+
});
27+
28+
it('should handle framed root link with no index.html', () => {
29+
const url = 'https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/';
30+
const expected = 'https://googleapis.dev/java/google-cloud-clients/latest/';
31+
assert.equal(redirectUrl(url), expected);
32+
});
33+
34+
it('should handle framed cloud package summary link', () => {
35+
const url = 'https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/datalabeling/v1beta1/package-summary.html';
36+
const expected = 'https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/datalabeling/v1beta1/package-summary.html';
37+
assert.equal(redirectUrl(url), expected);
38+
});
39+
40+
it('should handle framed cloud class link', () => {
41+
const url = 'https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/bigquery/Acl.Role.html';
42+
const expected = 'https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/bigquery/Acl.Role.html';
43+
assert.equal(redirectUrl(url), expected);
44+
});
45+
46+
it('should handle framed proto package summary link', () => {
47+
const url = 'https://googleapis.github.io/google-cloud-java/google-api-grpc/apidocs/index.html?com/google/cloud/dataproc/v1beta2/package-summary.html';
48+
const expected = 'https://googleapis.dev/java/google-api-grpc/latest/index.html?com/google/cloud/dataproc/v1beta2/package-summary.html';
49+
assert.equal(redirectUrl(url), expected);
50+
});
51+
52+
it('should handle framed proto class link', () => {
53+
const url = 'https://googleapis.github.io/google-cloud-java/google-api-grpc/apidocs/index.html?com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequest.html';
54+
const expected = 'https://googleapis.dev/java/google-api-grpc/latest/index.html?com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequest.html';
55+
assert.equal(redirectUrl(url), expected);
56+
});
57+
58+
it('should handle framed grpc class link', () => {
59+
const url = 'https://googleapis.github.io/google-cloud-java/google-api-grpc/apidocs/index.html?com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.WorkflowTemplateServiceBlockingStub.html'
60+
const expected = 'https://googleapis.dev/java/google-api-grpc/latest/index.html?com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.WorkflowTemplateServiceBlockingStub.html';
61+
assert.equal(redirectUrl(url), expected);
62+
});
63+
64+
it('should handle anchor to method', () => {
65+
const url = 'https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/com/google/cloud/bigtable/data/v2/BigtableDataClient.html#bulkMutateRows-com.google.cloud.bigtable.data.v2.models.BulkMutation-';
66+
const expected = 'https://googleapis.dev/java/google-cloud-clients/latest/com/google/cloud/bigtable/data/v2/BigtableDataClient.html#bulkMutateRows-com.google.cloud.bigtable.data.v2.models.BulkMutation-';
67+
assert.equal(redirectUrl(url), expected);
68+
});
69+
});

0 commit comments

Comments
 (0)