activitypub 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/lib/activitypub/base.rb +1 -1
- data/lib/activitypub/types.rb +7 -1
- data/lib/activitypub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e07c19938d44be1b64a307808cce4aa7d75034fc3df547c2554164692ba423a8
|
4
|
+
data.tar.gz: 96671de06f1cb30a6b37529b985a4a8f82bb49136018f29919ed5e61df89021c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07290f328de7cf87742c570d345d790b0aefed8eac1b1de5d294b5f00c04fcc9f2f3865ea838aa7347fab0d1a23413cf4adf5dcfba697c463d710513d0b579bb'
|
7
|
+
data.tar.gz: 9077e1a93d5e442547b7ddb38e108d84a9d6141ffd0dc798babfa3b061b82885fbb37bfc10a1c7d02cd08d5ec0982da87252cfb5796cc2f1f3c5967de50883fb
|
data/README.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
# ActivityPub
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
A Ruby gem to make it easy to retrieve and work with ActivityPub/
|
4
|
+
ActivityStreams objects, as used in Mastodon, Lemmy, Pixelfed and
|
5
|
+
similar.
|
6
|
+
|
7
|
+
CAUTION: This is early days and the API is likely to change quickly.
|
8
|
+
If you want to start using this, please follow the project and/or let
|
9
|
+
me know.
|
5
10
|
|
6
11
|
## Goals
|
7
12
|
|
@@ -28,7 +33,10 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
28
33
|
|
29
34
|
## Usage
|
30
35
|
|
31
|
-
TODO: Write usage instructions here
|
36
|
+
TODO: Write usage instructions here.
|
37
|
+
|
38
|
+
For now your best bet is to look at the examples/ dir and the unit
|
39
|
+
tests.
|
32
40
|
|
33
41
|
## Development
|
34
42
|
|
data/lib/activitypub/base.rb
CHANGED
data/lib/activitypub/types.rb
CHANGED
@@ -25,7 +25,7 @@ module ActivityPub
|
|
25
25
|
class Object < Base
|
26
26
|
ap_attr :id
|
27
27
|
ap_attr :attachment
|
28
|
-
ap_attr :attributedTo
|
28
|
+
ap_attr :attributedTo, URI
|
29
29
|
ap_attr :audience
|
30
30
|
ap_attr :content
|
31
31
|
ap_attr :context
|
@@ -71,6 +71,9 @@ module ActivityPub
|
|
71
71
|
ap_attr :first, URI
|
72
72
|
ap_attr :last, URI
|
73
73
|
ap_attr :items
|
74
|
+
|
75
|
+
def each(...) = Array(items).each(...)
|
76
|
+
def map(...) = Array(items).map(...)
|
74
77
|
end
|
75
78
|
|
76
79
|
class OrderedCollection < Collection
|
@@ -81,6 +84,9 @@ module ActivityPub
|
|
81
84
|
#
|
82
85
|
# FIXME: Review/consider whether to marge orderedItems/items internally.
|
83
86
|
ap_attr :orderedItems
|
87
|
+
|
88
|
+
def each(...) = Array(orderedItems).each(...)
|
89
|
+
def map(...) = Array(orderedItems).map(...)
|
84
90
|
end
|
85
91
|
|
86
92
|
class CollectionPage < Collection
|
data/lib/activitypub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activitypub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vidar Hokstad
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: webfinger
|