openvibers/openvibe.rent Commits
OpenVibe.Homes has the update log every OpenVibe site has (/updates was a 404 on the Homes host) (#77)
Changes
@@@ -52,6 +52,14 @@ function createHomesRoutes(ctx) {</div><p><button class="sc-btn sc-primary" type="submit">Search every site</button></p></form>`;++ // ── The update log (every OpenVibe site has one): this repository's, shared with OpenVibe.Rent ──++ r.get('/updates', (req, res) => page(req, res, {++ index: true, cache: PUBLIC_CACHE,++ title: 'What shipped on OpenVibe.Homes',++ description: 'Every change deployed to OpenVibe.Homes and OpenVibe.Rent, newest first, from the OpenVibe network\'s shared update log.',++ body: raw(require('openvibe-shared/frame').updatesBody({ service: 'rent', siteName: 'OpenVibe.Homes' }) + `<script src="${require('openvibe-shared/serve').url('shipped.js')}" defer></script>`),++ }));++// ── Home ─────────────────────────────────────────────────r.get('/', (req, res) => page(req, res, {index: true, cache: PUBLIC_CACHE,@@@ -74,6 +74,9 @@ const housingFetchImpl = async (url) => (new URL(String(url)).pathname.endsWith(const r = await homes('/');assert.strictEqual(r.status, 200);assert.ok(r.text.includes('Buying a home?') && r.text.includes('OpenVibe.Homes'));++ const up = await homes('/updates');++ assert.strictEqual(up.status, 200, 'the update log, as on every OpenVibe site');++ assert.ok(up.text.includes('What shipped on OpenVibe.Homes') && up.text.includes('data-ov-shipped'));assert.ok(/<script type="application\/ld\+json">[^<]*"@type":"WebSite"[^<]*"name":"OpenVibe.Homes"/.test(r.text), 'the home says what the site is (JSON-LD)');assert.ok(r.text.includes('<link rel="canonical" href="https://openvibe.homes/">'), 'its own canonical');const rent = await t.get('/');
@@ -52,6 +52,14 @@ function createHomesRoutes(ctx) {
@@ -52,6 +52,14 @@ function createHomesRoutes(ctx) {
</div>
</div>
<p><button class="sc-btn sc-primary" type="submit">Search every site</button></p></form>`;
<p><button class="sc-btn sc-primary" type="submit">Search every site</button></p></form>`;
+ // ── The update log (every OpenVibe site has one): this repository's, shared with OpenVibe.Rent ──
+ r.get('/updates', (req, res) => page(req, res, {
+ index: true, cache: PUBLIC_CACHE,
+ title: 'What shipped on OpenVibe.Homes',
+ description: 'Every change deployed to OpenVibe.Homes and OpenVibe.Rent, newest first, from the OpenVibe network\'s shared update log.',
+ body: raw(require('openvibe-shared/frame').updatesBody({ service: 'rent', siteName: 'OpenVibe.Homes' }) + `<script src="${require('openvibe-shared/serve').url('shipped.js')}" defer></script>`),
+ }));
+
// ── Home ─────────────────────────────────────────────────
// ── Home ─────────────────────────────────────────────────
r.get('/', (req, res) => page(req, res, {
r.get('/', (req, res) => page(req, res, {
index: true, cache: PUBLIC_CACHE,
index: true, cache: PUBLIC_CACHE,
@@ -74,6 +74,9 @@ const housingFetchImpl = async (url) => (new URL(String(url)).pathname.endsWith(
@@ -74,6 +74,9 @@ const housingFetchImpl = async (url) => (new URL(String(url)).pathname.endsWith(
const r = await homes('/');
const r = await homes('/');
assert.strictEqual(r.status, 200);
assert.strictEqual(r.status, 200);
assert.ok(r.text.includes('Buying a home?') && r.text.includes('OpenVibe.Homes'));
assert.ok(r.text.includes('Buying a home?') && r.text.includes('OpenVibe.Homes'));
+ const up = await homes('/updates');
+ assert.strictEqual(up.status, 200, 'the update log, as on every OpenVibe site');
+ assert.ok(up.text.includes('What shipped on OpenVibe.Homes') && up.text.includes('data-ov-shipped'));
assert.ok(/<script type="application\/ld\+json">[^<]*"@type":"WebSite"[^<]*"name":"OpenVibe.Homes"/.test(r.text), 'the home says what the site is (JSON-LD)');
assert.ok(/<script type="application\/ld\+json">[^<]*"@type":"WebSite"[^<]*"name":"OpenVibe.Homes"/.test(r.text), 'the home says what the site is (JSON-LD)');
assert.ok(r.text.includes('<link rel="canonical" href="https://openvibe.homes/">'), 'its own canonical');
assert.ok(r.text.includes('<link rel="canonical" href="https://openvibe.homes/">'), 'its own canonical');
const rent = await t.get('/');
const rent = await t.get('/');