Skip to content

Commit 346564a

Browse files
committed
purge 0data events
1 parent 0fbd6d3 commit 346564a

3 files changed

Lines changed: 1 addition & 63 deletions

File tree

.env-sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ZDA_VITRINE_FLOWS_TRADITIONAL_URL=https://static.rosano.ca/0data/flowtraditional.svg
44
ZDA_VITRINE_FLOWS_MODERN_URL=https://static.rosano.ca/0data/flowmodern.svg
55
ZDA_TASK_BANKS_URLS="https://remotestorage.io/apps,https://github.com/0dataapp/unofficial-fission-apps-list,https://github.com/0dataapp/awesome-0data/raw/master/README.md,https://unhosted.org/apps,https://solidproject.org/apps"
6-
ZDA_TASK_EVENTS_URLS="https://community.remotestorage.io/c/events/12.rss,https://lu.ma/embed-events/usr-q0wId4DZFlx7LCP,https://www.eventbrite.co.uk/o/solid-project-30026804546,https://chat.0data.app/c/events/5.rss"
6+
ZDA_TASK_EVENTS_URLS="https://community.remotestorage.io/c/events/12.rss,https://lu.ma/embed-events/usr-q0wId4DZFlx7LCP,https://www.eventbrite.co.uk/o/solid-project-30026804546"
77
ZDA_VITRINE_GROUP_DISCUSSION_VIDEO_URL="https://www.youtube-nocookie.com/embed/UNKgD8OzjCk"
88
ZDA_VITRINE_IDENTITY_URL=https://static.rosano.ca/0data/identity.svg
99
ZDA_VITRINE_EASY_INDIE_URL=https://easyIndie.app

os-app/task-d-events/controller-tests.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ describe('ZDAEventURLSolidProject', function test_ZDAEventURLSolidProject() {
4242

4343
});
4444

45-
describe('ZDAEventURLZeroData', function test_ZDAEventURLZeroData() {
46-
47-
it('returns string', function () {
48-
deepEqual(mod.ZDAEventURLZeroData(), mod.ZDAEventURLs().filter(function (e) {
49-
return e.match(/0data/i);
50-
}).shift());
51-
});
52-
53-
});
54-
5545
describe('_DataEventObjects', function test__DataEventObjects() {
5646

5747
it('throws if param1 not in ZDAEventURLs', function () {
@@ -167,41 +157,6 @@ describe('_DataEventObjects', function test__DataEventObjects() {
167157

168158
});
169159

170-
context('ZeroData', function test_ZeroData () {
171-
172-
const uEvent = function (inputData = {}) {
173-
const item = Object.assign({
174-
ZDAEventURL: Math.random().toString(),
175-
ZDAEventName: Math.random().toString(),
176-
ZDAEventStart: new Date(),
177-
}, inputData);
178-
179-
return `<?xml version="1.0" encoding="UTF-8" ?>
180-
<rss version="2.0" xmlns:discourse="http://www.discourse.org/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><atom:link href="https://chat.0data.app/c/events/5.rss" rel="self" type="application/rss+xml" /><item><title>${ item.ZDAEventName }</title><description><![CDATA[
181-
<div class="discourse-post-event" data-start="${ item.ZDAEventStart.toJSON() }" data-status="public" data-end="2021-08-03 14:00" data-allowed-groups="trust_level_0"></div>
182-
]]></description><link>https://chat.0data.app/t/zero-data-swap-2-files-portability-september-29-2021/37</link><source url="${ item.ZDAEventURL }.rss">Zero Data Swap #2: Files / Portability — September 29, 2021</source></item></channel></rss>`;
183-
};
184-
185-
it('parses data', function () {
186-
const ZDAEventURL = Math.random().toString();
187-
const ZDAEventName = Math.random().toString();
188-
const ZDAEventStart = new Date();
189-
190-
deepEqual(mod._DataEventObjects(mod.ZDAEventURLZeroData(), uEvent({
191-
ZDAEventURL,
192-
ZDAEventName,
193-
ZDAEventStart,
194-
})), [{
195-
ZDAEventURL,
196-
ZDAEventName,
197-
ZDAEventStart,
198-
}]);
199-
});
200-
201-
});
202-
203-
204-
205160
});
206161

207162
describe('DataEvents', function test_DataEvents() {

os-app/task-d-events/controller.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ const mod = {
5757
}).shift();
5858
},
5959

60-
ZDAEventURLZeroData () {
61-
return mod.ZDAEventURLs().filter(function (e) {
62-
return e.match(/0data/i);
63-
}).shift();
64-
},
65-
6660
async _DataContentString (inputData) {
6761
return (await require('node-fetch')(inputData)).text();
6862
},
@@ -122,17 +116,6 @@ const mod = {
122116
};
123117
});
124118
},
125-
[mod.ZDAEventURLZeroData()]: function () {
126-
return cheerio('channel', param2).first().find('item').filter(function () {
127-
return cheerio('description', this).html().match('discourse-post-event');
128-
}).map(function () {
129-
return {
130-
ZDAEventURL: cheerio('source', this).attr('url').split('.rss').shift(),
131-
ZDAEventName: cheerio('title', this).text(),
132-
ZDAEventStart: new Date(cheerio('description', this).html().match(/data-start="(.*)/)[0].split('"')[1]),
133-
};
134-
});
135-
},
136119
}[item],
137120
});
138121
}, {})[param1]()).map(function (e) {

0 commit comments

Comments
 (0)