From a2aec426abff6d422f1b9fe0d2353516066f125c Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Sun, 23 Jun 2024 21:02:16 -0500 Subject: [PATCH] Add tests for remaining ActivityVocabulary types --- t/activity-streams.lisp | 3 ++- .../activity-vocabulary/accept-2.json | 17 ++++++++++++++ .../activity-vocabulary/accept.json | 17 ++++++++++++++ .../activity-vocabulary/add-2.json | 22 ++++++++++++++++++ .../activity-vocabulary/add.json | 10 ++++++++ .../activity-vocabulary/announce.json | 18 +++++++++++++++ .../activity-vocabulary/application.json | 5 ++++ .../activity-vocabulary/arrive.json | 17 ++++++++++++++ .../activity-vocabulary/article.json | 7 ++++++ .../activity-vocabulary/audio.json | 10 ++++++++ .../activity-vocabulary/block.json | 7 ++++++ .../activity-vocabulary/create.json | 14 +++++++++++ .../activity-vocabulary/delete.json | 14 +++++++++++ .../activity-vocabulary/dislike.json | 7 ++++++ .../activity-vocabulary/document.json | 6 +++++ .../activity-vocabulary/event.json | 7 ++++++ .../activity-vocabulary/flag.json | 10 ++++++++ .../activity-vocabulary/follow.json | 13 +++++++++++ .../activity-vocabulary/group.json | 5 ++++ .../activity-vocabulary/ignore.json | 10 ++++++++ .../activity-vocabulary/image.json | 17 ++++++++++++++ .../activity-vocabulary/invite.json | 23 +++++++++++++++++++ .../activity-vocabulary/join.json | 13 +++++++++++ .../activity-vocabulary/leave-2.json | 13 +++++++++++ .../activity-vocabulary/leave.json | 13 +++++++++++ .../activity-vocabulary/like.json | 10 ++++++++ .../activity-vocabulary/listen.json | 10 ++++++++ .../activity-vocabulary/mention.json | 7 ++++++ .../activity-vocabulary/move.json | 18 +++++++++++++++ .../activity-vocabulary/note.json | 6 +++++ .../activity-vocabulary/offer.json | 17 ++++++++++++++ .../activity-vocabulary/organization.json | 5 ++++ .../activity-vocabulary/page.json | 6 +++++ .../activity-vocabulary/person.json | 5 ++++ .../activity-vocabulary/place-2.json | 9 ++++++++ .../activity-vocabulary/place.json | 5 ++++ .../activity-vocabulary/profile.json | 9 ++++++++ .../activity-vocabulary/question-2.json | 6 +++++ .../activity-vocabulary/question.json | 15 ++++++++++++ .../activity-vocabulary/read.json | 10 ++++++++ .../activity-vocabulary/reject.json | 17 ++++++++++++++ .../activity-vocabulary/relationship.json | 14 +++++++++++ .../activity-vocabulary/remove-2.json | 17 ++++++++++++++ .../activity-vocabulary/remove.json | 14 +++++++++++ .../activity-vocabulary/service.json | 5 ++++ .../activity-vocabulary/tentative-accept.json | 17 ++++++++++++++ .../activity-vocabulary/tentative-reject.json | 17 ++++++++++++++ .../activity-vocabulary/tombstone.json | 21 +++++++++++++++++ .../activity-vocabulary/travel.json | 17 ++++++++++++++ .../activity-vocabulary/undo.json | 12 ++++++++++ .../activity-vocabulary/update.json | 10 ++++++++ .../activity-vocabulary/video.json | 7 ++++++ .../activity-vocabulary/view.json | 13 +++++++++++ 53 files changed, 616 insertions(+), 1 deletion(-) create mode 100644 t/activity-streams/activity-vocabulary/accept-2.json create mode 100644 t/activity-streams/activity-vocabulary/accept.json create mode 100644 t/activity-streams/activity-vocabulary/add-2.json create mode 100644 t/activity-streams/activity-vocabulary/add.json create mode 100644 t/activity-streams/activity-vocabulary/announce.json create mode 100644 t/activity-streams/activity-vocabulary/application.json create mode 100644 t/activity-streams/activity-vocabulary/arrive.json create mode 100644 t/activity-streams/activity-vocabulary/article.json create mode 100644 t/activity-streams/activity-vocabulary/audio.json create mode 100644 t/activity-streams/activity-vocabulary/block.json create mode 100644 t/activity-streams/activity-vocabulary/create.json create mode 100644 t/activity-streams/activity-vocabulary/delete.json create mode 100644 t/activity-streams/activity-vocabulary/dislike.json create mode 100644 t/activity-streams/activity-vocabulary/document.json create mode 100644 t/activity-streams/activity-vocabulary/event.json create mode 100644 t/activity-streams/activity-vocabulary/flag.json create mode 100644 t/activity-streams/activity-vocabulary/follow.json create mode 100644 t/activity-streams/activity-vocabulary/group.json create mode 100644 t/activity-streams/activity-vocabulary/ignore.json create mode 100644 t/activity-streams/activity-vocabulary/image.json create mode 100644 t/activity-streams/activity-vocabulary/invite.json create mode 100644 t/activity-streams/activity-vocabulary/join.json create mode 100644 t/activity-streams/activity-vocabulary/leave-2.json create mode 100644 t/activity-streams/activity-vocabulary/leave.json create mode 100644 t/activity-streams/activity-vocabulary/like.json create mode 100644 t/activity-streams/activity-vocabulary/listen.json create mode 100644 t/activity-streams/activity-vocabulary/mention.json create mode 100644 t/activity-streams/activity-vocabulary/move.json create mode 100644 t/activity-streams/activity-vocabulary/note.json create mode 100644 t/activity-streams/activity-vocabulary/offer.json create mode 100644 t/activity-streams/activity-vocabulary/organization.json create mode 100644 t/activity-streams/activity-vocabulary/page.json create mode 100644 t/activity-streams/activity-vocabulary/person.json create mode 100644 t/activity-streams/activity-vocabulary/place-2.json create mode 100644 t/activity-streams/activity-vocabulary/place.json create mode 100644 t/activity-streams/activity-vocabulary/profile.json create mode 100644 t/activity-streams/activity-vocabulary/question-2.json create mode 100644 t/activity-streams/activity-vocabulary/question.json create mode 100644 t/activity-streams/activity-vocabulary/read.json create mode 100644 t/activity-streams/activity-vocabulary/reject.json create mode 100644 t/activity-streams/activity-vocabulary/relationship.json create mode 100644 t/activity-streams/activity-vocabulary/remove-2.json create mode 100644 t/activity-streams/activity-vocabulary/remove.json create mode 100644 t/activity-streams/activity-vocabulary/service.json create mode 100644 t/activity-streams/activity-vocabulary/tentative-accept.json create mode 100644 t/activity-streams/activity-vocabulary/tentative-reject.json create mode 100644 t/activity-streams/activity-vocabulary/tombstone.json create mode 100644 t/activity-streams/activity-vocabulary/travel.json create mode 100644 t/activity-streams/activity-vocabulary/undo.json create mode 100644 t/activity-streams/activity-vocabulary/update.json create mode 100644 t/activity-streams/activity-vocabulary/video.json create mode 100644 t/activity-streams/activity-vocabulary/view.json diff --git a/t/activity-streams.lisp b/t/activity-streams.lisp index d8c0f23..159b90e 100644 --- a/t/activity-streams.lisp +++ b/t/activity-streams.lisp @@ -44,7 +44,8 @@ We compare the original JSON to that of the parsed-then-reserialized JSON, ensuring they are semantically equivalent. White-space and key order are ignored." (let ((content (alexandria:read-file-into-string (relative-pathname path)))) - `(define-test ,(intern (string-upcase (pathname-name path))) (:tags ,tags) + `(define-test ,(intern (format nil "EX-~A" (string-upcase (pathname-name path)))) + (:tags ,tags) (assert-equal (hash-table-sorted-alist (yason:parse ,content)) diff --git a/t/activity-streams/activity-vocabulary/accept-2.json b/t/activity-streams/activity-vocabulary/accept-2.json new file mode 100644 index 0000000..d84ec10 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/accept-2.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally accepted Joe into the club", + "type": "Accept", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Person", + "name": "Joe" + }, + "target": { + "type": "Group", + "name": "The Club" + } +} diff --git a/t/activity-streams/activity-vocabulary/accept.json b/t/activity-streams/activity-vocabulary/accept.json new file mode 100644 index 0000000..7456b5a --- /dev/null +++ b/t/activity-streams/activity-vocabulary/accept.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally accepted an invitation to a party", + "type": "Accept", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Invite", + "actor": "http://john.example.org", + "object": { + "type": "Event", + "name": "Going-Away Party for Jim" + } + } +} diff --git a/t/activity-streams/activity-vocabulary/add-2.json b/t/activity-streams/activity-vocabulary/add-2.json new file mode 100644 index 0000000..06b1765 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/add-2.json @@ -0,0 +1,22 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally added a picture of her cat to her cat picture collection", + "type": "Add", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Image", + "name": "A picture of my cat", + "url": "http://example.org/img/cat.png" + }, + "origin": { + "type": "Collection", + "name": "Camera Roll" + }, + "target": { + "type": "Collection", + "name": "My Cat Pictures" + } +} diff --git a/t/activity-streams/activity-vocabulary/add.json b/t/activity-streams/activity-vocabulary/add.json new file mode 100644 index 0000000..9b86694 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/add.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally added an object", + "type": "Add", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/abc" +} diff --git a/t/activity-streams/activity-vocabulary/announce.json b/t/activity-streams/activity-vocabulary/announce.json new file mode 100644 index 0000000..1a4d245 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/announce.json @@ -0,0 +1,18 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally announced that she had arrived at work", + "type": "Announce", + "actor": { + "type": "Person", + "id": "http://sally.example.org", + "name": "Sally" + }, + "object": { + "type": "Arrive", + "actor": "http://sally.example.org", + "location": { + "type": "Place", + "name": "Work" + } + } +} diff --git a/t/activity-streams/activity-vocabulary/application.json b/t/activity-streams/activity-vocabulary/application.json new file mode 100644 index 0000000..5a8c185 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/application.json @@ -0,0 +1,5 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Application", + "name": "Exampletron 3000" +} diff --git a/t/activity-streams/activity-vocabulary/arrive.json b/t/activity-streams/activity-vocabulary/arrive.json new file mode 100644 index 0000000..a211b88 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/arrive.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally arrived at work", + "type": "Arrive", + "actor": { + "type": "Person", + "name": "Sally" + }, + "location": { + "type": "Place", + "name": "Work" + }, + "origin": { + "type": "Place", + "name": "Home" + } +} diff --git a/t/activity-streams/activity-vocabulary/article.json b/t/activity-streams/activity-vocabulary/article.json new file mode 100644 index 0000000..de698b3 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/article.json @@ -0,0 +1,7 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Article", + "name": "What a Crazy Day I Had", + "content": "
... you will never believe ...
", + "attributedTo": "http://sally.example.org" +} diff --git a/t/activity-streams/activity-vocabulary/audio.json b/t/activity-streams/activity-vocabulary/audio.json new file mode 100644 index 0000000..8a6fa0a --- /dev/null +++ b/t/activity-streams/activity-vocabulary/audio.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Audio", + "name": "Interview With A Famous Technologist", + "url": { + "type": "Link", + "href": "http://example.org/podcast.mp3", + "mediaType": "audio/mp3" + } +} diff --git a/t/activity-streams/activity-vocabulary/block.json b/t/activity-streams/activity-vocabulary/block.json new file mode 100644 index 0000000..f5cddff --- /dev/null +++ b/t/activity-streams/activity-vocabulary/block.json @@ -0,0 +1,7 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally blocked Joe", + "type": "Block", + "actor": "http://sally.example.org", + "object": "http://joe.example.org" +} diff --git a/t/activity-streams/activity-vocabulary/create.json b/t/activity-streams/activity-vocabulary/create.json new file mode 100644 index 0000000..1ef268f --- /dev/null +++ b/t/activity-streams/activity-vocabulary/create.json @@ -0,0 +1,14 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Note", + "name": "A Simple Note", + "content": "This is a simple note" + } +} diff --git a/t/activity-streams/activity-vocabulary/delete.json b/t/activity-streams/activity-vocabulary/delete.json new file mode 100644 index 0000000..95cd3be --- /dev/null +++ b/t/activity-streams/activity-vocabulary/delete.json @@ -0,0 +1,14 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a note", + "type": "Delete", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/notes/1", + "origin": { + "type": "Collection", + "name": "Sally's Notes" + } +} diff --git a/t/activity-streams/activity-vocabulary/dislike.json b/t/activity-streams/activity-vocabulary/dislike.json new file mode 100644 index 0000000..7958bb8 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/dislike.json @@ -0,0 +1,7 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally disliked a post", + "type": "Dislike", + "actor": "http://sally.example.org", + "object": "http://example.org/posts/1" +} diff --git a/t/activity-streams/activity-vocabulary/document.json b/t/activity-streams/activity-vocabulary/document.json new file mode 100644 index 0000000..f8ad0b8 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/document.json @@ -0,0 +1,6 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Document", + "name": "4Q Sales Forecast", + "url": "http://example.org/4q-sales-forecast.pdf" +} diff --git a/t/activity-streams/activity-vocabulary/event.json b/t/activity-streams/activity-vocabulary/event.json new file mode 100644 index 0000000..1f20074 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/event.json @@ -0,0 +1,7 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Event", + "name": "Going-Away Party for Jim", + "startTime": "2014-12-31T23:00:00-08:00", + "endTime": "2015-01-01T06:00:00-08:00" +} diff --git a/t/activity-streams/activity-vocabulary/flag.json b/t/activity-streams/activity-vocabulary/flag.json new file mode 100644 index 0000000..1066f32 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/flag.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally flagged an inappropriate note", + "type": "Flag", + "actor": "http://sally.example.org", + "object": { + "type": "Note", + "content": "An inappropriate note" + } +} diff --git a/t/activity-streams/activity-vocabulary/follow.json b/t/activity-streams/activity-vocabulary/follow.json new file mode 100644 index 0000000..7843027 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/follow.json @@ -0,0 +1,13 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally followed John", + "type": "Follow", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Person", + "name": "John" + } +} diff --git a/t/activity-streams/activity-vocabulary/group.json b/t/activity-streams/activity-vocabulary/group.json new file mode 100644 index 0000000..0d112f8 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/group.json @@ -0,0 +1,5 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Group", + "name": "Big Beards of Austin" +} diff --git a/t/activity-streams/activity-vocabulary/ignore.json b/t/activity-streams/activity-vocabulary/ignore.json new file mode 100644 index 0000000..524d199 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/ignore.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally ignored a note", + "type": "Ignore", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/notes/1" +} diff --git a/t/activity-streams/activity-vocabulary/image.json b/t/activity-streams/activity-vocabulary/image.json new file mode 100644 index 0000000..81e78e1 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/image.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Image", + "name": "Cat Jumping on Wagon", + "url": [ + { + "type": "Link", + "href": "http://example.org/image.jpeg", + "mediaType": "image/jpeg" + }, + { + "type": "Link", + "href": "http://example.org/image.png", + "mediaType": "image/png" + } + ] +} diff --git a/t/activity-streams/activity-vocabulary/invite.json b/t/activity-streams/activity-vocabulary/invite.json new file mode 100644 index 0000000..24eca0f --- /dev/null +++ b/t/activity-streams/activity-vocabulary/invite.json @@ -0,0 +1,23 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally invited John and Lisa to a party", + "type": "Invite", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Event", + "name": "A Party" + }, + "target": [ + { + "type": "Person", + "name": "John" + }, + { + "type": "Person", + "name": "Lisa" + } + ] +} diff --git a/t/activity-streams/activity-vocabulary/join.json b/t/activity-streams/activity-vocabulary/join.json new file mode 100644 index 0000000..686f458 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/join.json @@ -0,0 +1,13 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally joined a group", + "type": "Join", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Group", + "name": "A Simple Group" + } +} diff --git a/t/activity-streams/activity-vocabulary/leave-2.json b/t/activity-streams/activity-vocabulary/leave-2.json new file mode 100644 index 0000000..9f5add0 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/leave-2.json @@ -0,0 +1,13 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally left a group", + "type": "Leave", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Group", + "name": "A Simple Group" + } +} diff --git a/t/activity-streams/activity-vocabulary/leave.json b/t/activity-streams/activity-vocabulary/leave.json new file mode 100644 index 0000000..54b14da --- /dev/null +++ b/t/activity-streams/activity-vocabulary/leave.json @@ -0,0 +1,13 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally left work", + "type": "Leave", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Place", + "name": "Work" + } +} diff --git a/t/activity-streams/activity-vocabulary/like.json b/t/activity-streams/activity-vocabulary/like.json new file mode 100644 index 0000000..57fb414 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/like.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally liked a note", + "type": "Like", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/notes/1" +} diff --git a/t/activity-streams/activity-vocabulary/listen.json b/t/activity-streams/activity-vocabulary/listen.json new file mode 100644 index 0000000..48cfe29 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/listen.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally listened to a piece of music", + "type": "Listen", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/music.mp3" +} diff --git a/t/activity-streams/activity-vocabulary/mention.json b/t/activity-streams/activity-vocabulary/mention.json new file mode 100644 index 0000000..5b3093a --- /dev/null +++ b/t/activity-streams/activity-vocabulary/mention.json @@ -0,0 +1,7 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Mention of Joe by Carrie in her note", + "type": "Mention", + "href": "http://example.org/joe", + "name": "Joe" +} diff --git a/t/activity-streams/activity-vocabulary/move.json b/t/activity-streams/activity-vocabulary/move.json new file mode 100644 index 0000000..4c2d280 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/move.json @@ -0,0 +1,18 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally moved a post from List A to List B", + "type": "Move", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/posts/1", + "target": { + "type": "Collection", + "name": "List B" + }, + "origin": { + "type": "Collection", + "name": "List A" + } +} diff --git a/t/activity-streams/activity-vocabulary/note.json b/t/activity-streams/activity-vocabulary/note.json new file mode 100644 index 0000000..9722893 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/note.json @@ -0,0 +1,6 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Note", + "name": "A Word of Warning", + "content": "Looks like it is going to rain today. Bring an umbrella!" +} diff --git a/t/activity-streams/activity-vocabulary/offer.json b/t/activity-streams/activity-vocabulary/offer.json new file mode 100644 index 0000000..c7a6b6c --- /dev/null +++ b/t/activity-streams/activity-vocabulary/offer.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally offered 50% off to Lewis", + "type": "Offer", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "http://www.types.example/ProductOffer", + "name": "50% Off!" + }, + "target": { + "type": "Person", + "name": "Lewis" + } +} diff --git a/t/activity-streams/activity-vocabulary/organization.json b/t/activity-streams/activity-vocabulary/organization.json new file mode 100644 index 0000000..14dd9b1 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/organization.json @@ -0,0 +1,5 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Organization", + "name": "Example Co." +} diff --git a/t/activity-streams/activity-vocabulary/page.json b/t/activity-streams/activity-vocabulary/page.json new file mode 100644 index 0000000..409b148 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/page.json @@ -0,0 +1,6 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Page", + "name": "Omaha Weather Report", + "url": "http://example.org/weather-in-omaha.html" +} diff --git a/t/activity-streams/activity-vocabulary/person.json b/t/activity-streams/activity-vocabulary/person.json new file mode 100644 index 0000000..93721ac --- /dev/null +++ b/t/activity-streams/activity-vocabulary/person.json @@ -0,0 +1,5 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Person", + "name": "Sally Smith" +} diff --git a/t/activity-streams/activity-vocabulary/place-2.json b/t/activity-streams/activity-vocabulary/place-2.json new file mode 100644 index 0000000..b53cb62 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/place-2.json @@ -0,0 +1,9 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Place", + "name": "Fresno Area", + "latitude": 36.75, + "longitude": 119.7667, + "radius": 15, + "units": "miles" +} diff --git a/t/activity-streams/activity-vocabulary/place.json b/t/activity-streams/activity-vocabulary/place.json new file mode 100644 index 0000000..556bb39 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/place.json @@ -0,0 +1,5 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Place", + "name": "Work" +} diff --git a/t/activity-streams/activity-vocabulary/profile.json b/t/activity-streams/activity-vocabulary/profile.json new file mode 100644 index 0000000..40449f7 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/profile.json @@ -0,0 +1,9 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Profile", + "summary": "Sally's Profile", + "describes": { + "type": "Person", + "name": "Sally Smith" + } +} diff --git a/t/activity-streams/activity-vocabulary/question-2.json b/t/activity-streams/activity-vocabulary/question-2.json new file mode 100644 index 0000000..7363c60 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/question-2.json @@ -0,0 +1,6 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Question", + "name": "What is the answer?", + "closed": "2016-05-10T00:00:00Z" +} diff --git a/t/activity-streams/activity-vocabulary/question.json b/t/activity-streams/activity-vocabulary/question.json new file mode 100644 index 0000000..802954b --- /dev/null +++ b/t/activity-streams/activity-vocabulary/question.json @@ -0,0 +1,15 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Question", + "name": "What is the answer?", + "oneOf": [ + { + "type": "Note", + "name": "Option A" + }, + { + "type": "Note", + "name": "Option B" + } + ] +} diff --git a/t/activity-streams/activity-vocabulary/read.json b/t/activity-streams/activity-vocabulary/read.json new file mode 100644 index 0000000..3519306 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/read.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a blog post", + "type": "Read", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/posts/1" +} diff --git a/t/activity-streams/activity-vocabulary/reject.json b/t/activity-streams/activity-vocabulary/reject.json new file mode 100644 index 0000000..d95eb22 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/reject.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally rejected an invitation to a party", + "type": "Reject", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Invite", + "actor": "http://john.example.org", + "object": { + "type": "Event", + "name": "Going-Away Party for Jim" + } + } +} diff --git a/t/activity-streams/activity-vocabulary/relationship.json b/t/activity-streams/activity-vocabulary/relationship.json new file mode 100644 index 0000000..2f08671 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/relationship.json @@ -0,0 +1,14 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally is an acquaintance of John", + "type": "Relationship", + "subject": { + "type": "Person", + "name": "Sally" + }, + "relationship": "http://purl.org/vocab/relationship/acquaintanceOf", + "object": { + "type": "Person", + "name": "John" + } +} diff --git a/t/activity-streams/activity-vocabulary/remove-2.json b/t/activity-streams/activity-vocabulary/remove-2.json new file mode 100644 index 0000000..25722d2 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/remove-2.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "The moderator removed Sally from a group", + "type": "Remove", + "actor": { + "type": "http://example.org/Role", + "name": "The Moderator" + }, + "object": { + "type": "Person", + "name": "Sally" + }, + "origin": { + "type": "Group", + "name": "A Simple Group" + } +} diff --git a/t/activity-streams/activity-vocabulary/remove.json b/t/activity-streams/activity-vocabulary/remove.json new file mode 100644 index 0000000..ed7ea1c --- /dev/null +++ b/t/activity-streams/activity-vocabulary/remove.json @@ -0,0 +1,14 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally removed a note from her notes folder", + "type": "Remove", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/notes/1", + "target": { + "type": "Collection", + "name": "Notes Folder" + } +} diff --git a/t/activity-streams/activity-vocabulary/service.json b/t/activity-streams/activity-vocabulary/service.json new file mode 100644 index 0000000..1da6de7 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/service.json @@ -0,0 +1,5 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Service", + "name": "Acme Web Service" +} diff --git a/t/activity-streams/activity-vocabulary/tentative-accept.json b/t/activity-streams/activity-vocabulary/tentative-accept.json new file mode 100644 index 0000000..b2e2e11 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/tentative-accept.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally tentatively accepted an invitation to a party", + "type": "TentativeAccept", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Invite", + "actor": "http://john.example.org", + "object": { + "type": "Event", + "name": "Going-Away Party for Jim" + } + } +} diff --git a/t/activity-streams/activity-vocabulary/tentative-reject.json b/t/activity-streams/activity-vocabulary/tentative-reject.json new file mode 100644 index 0000000..faf1a33 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/tentative-reject.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally tentatively rejected an invitation to a party", + "type": "TentativeReject", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Invite", + "actor": "http://john.example.org", + "object": { + "type": "Event", + "name": "Going-Away Party for Jim" + } + } +} diff --git a/t/activity-streams/activity-vocabulary/tombstone.json b/t/activity-streams/activity-vocabulary/tombstone.json new file mode 100644 index 0000000..6b643e3 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/tombstone.json @@ -0,0 +1,21 @@ +{ + "type": "OrderedCollection", + "totalItems": 3, + "name": "Vacation photos 2016", + "orderedItems": [ + { + "type": "Image", + "id": "http://image.example/1" + }, + { + "type": "Tombstone", + "formerType": "Image", + "id": "http://image.example/2", + "deleted": "2016-03-17T00:00:00Z" + }, + { + "type": "Image", + "id": "http://image.example/3" + } + ] +} diff --git a/t/activity-streams/activity-vocabulary/travel.json b/t/activity-streams/activity-vocabulary/travel.json new file mode 100644 index 0000000..ec4ca4c --- /dev/null +++ b/t/activity-streams/activity-vocabulary/travel.json @@ -0,0 +1,17 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally went home from work", + "type": "Travel", + "actor": { + "type": "Person", + "name": "Sally" + }, + "target": { + "type": "Place", + "name": "Home" + }, + "origin": { + "type": "Place", + "name": "Work" + } +} diff --git a/t/activity-streams/activity-vocabulary/undo.json b/t/activity-streams/activity-vocabulary/undo.json new file mode 100644 index 0000000..0b37fb2 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/undo.json @@ -0,0 +1,12 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally retracted her offer to John", + "type": "Undo", + "actor": "http://sally.example.org", + "object": { + "type": "Offer", + "actor": "http://sally.example.org", + "object": "http://example.org/posts/1", + "target": "http://john.example.org" + } +} diff --git a/t/activity-streams/activity-vocabulary/update.json b/t/activity-streams/activity-vocabulary/update.json new file mode 100644 index 0000000..01c9b72 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/update.json @@ -0,0 +1,10 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally updated her note", + "type": "Update", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": "http://example.org/notes/1" +} diff --git a/t/activity-streams/activity-vocabulary/video.json b/t/activity-streams/activity-vocabulary/video.json new file mode 100644 index 0000000..2678dcc --- /dev/null +++ b/t/activity-streams/activity-vocabulary/video.json @@ -0,0 +1,7 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Video", + "name": "Puppy Plays With Ball", + "url": "http://example.org/video.mkv", + "duration": "PT2H" +} diff --git a/t/activity-streams/activity-vocabulary/view.json b/t/activity-streams/activity-vocabulary/view.json new file mode 100644 index 0000000..7591885 --- /dev/null +++ b/t/activity-streams/activity-vocabulary/view.json @@ -0,0 +1,13 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read an article", + "type": "View", + "actor": { + "type": "Person", + "name": "Sally" + }, + "object": { + "type": "Article", + "name": "What You Should Know About Activity Streams" + } +}