activitypub 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/README.md +3 -5
- data/lib/activitypub/types.rb +47 -0
- data/lib/activitypub/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfcd0189a94cb5ee758ef31409bfee306f70f56d6c4a13aca63dd0a26bc41f39
|
4
|
+
data.tar.gz: 5add381a4640f4e6b58748e67d342a105507ea09bea46c1e489dc45d9369362b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c966ce54df93f5953e943f2a22b99258ed9549ebd9646020dd3fb8306003ab3e6f7c911d7e98baa8d893abb2ffeee8fcc93af4c0fdbb35c4985280a7d961b1a
|
7
|
+
data.tar.gz: 8bb7a8405035bfac1c09c939c03a200734b60c2c3b7169b5d316c8e1e9fb668a65f5fe603fe5e30550f614e6b97d681da3bc13b188218d3073829d76f5daa289
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/README.md
CHANGED
@@ -6,15 +6,13 @@ ActivityPub/ActivityStream objects.
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
9
|
Install the gem and add to the application's Gemfile by executing:
|
12
10
|
|
13
|
-
$ bundle add
|
11
|
+
$ bundle add activitypub
|
14
12
|
|
15
13
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
14
|
|
17
|
-
$ gem install
|
15
|
+
$ gem install activitypub
|
18
16
|
|
19
17
|
## Usage
|
20
18
|
|
@@ -28,7 +26,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
28
26
|
|
29
27
|
## Contributing
|
30
28
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/vidarh/activitypub.
|
32
30
|
|
33
31
|
## License
|
34
32
|
|
data/lib/activitypub/types.rb
CHANGED
@@ -124,6 +124,49 @@ module ActivityPub
|
|
124
124
|
ap_attr :oneOf, :anyOf, :closed
|
125
125
|
end
|
126
126
|
|
127
|
+
# ## Actor Types
|
128
|
+
|
129
|
+
# NOTE: *NOT* an ActivityPub object type
|
130
|
+
# FIXME: Should probably not be possible to instantiate
|
131
|
+
# directly.
|
132
|
+
#
|
133
|
+
class Actor < Object
|
134
|
+
# Per https://www.w3.org/TR/activitypub/#actors
|
135
|
+
# Section 4.1
|
136
|
+
|
137
|
+
# MUST have:
|
138
|
+
ap_attr :inbox, :outbox
|
139
|
+
|
140
|
+
# SHOULD have:
|
141
|
+
ap_attr :following, :followers
|
142
|
+
|
143
|
+
# MAY have:
|
144
|
+
ap_attr :liked, :streams, :preferredUsername,
|
145
|
+
:endpoints
|
146
|
+
|
147
|
+
|
148
|
+
# Per https://docs-p.joinmastodon.org/spec/activitypub/#extensions
|
149
|
+
# These are extensions used by Mastodon for Actor types
|
150
|
+
ap_attr :publicKey, :featured, :featuredTags,
|
151
|
+
:discoverable, :suspended
|
152
|
+
end
|
153
|
+
|
154
|
+
# FIXME: Add "toot:Emoji
|
155
|
+
# FIXME: Add PropertyValue
|
156
|
+
|
157
|
+
class Application < Actor
|
158
|
+
end
|
159
|
+
|
160
|
+
class Group < Actor
|
161
|
+
end
|
162
|
+
|
163
|
+
class Person < Actor
|
164
|
+
end
|
165
|
+
|
166
|
+
class Service < Actor
|
167
|
+
end
|
168
|
+
|
169
|
+
|
127
170
|
# ## Object types
|
128
171
|
|
129
172
|
class Relationship < Object
|
@@ -140,6 +183,10 @@ module ActivityPub
|
|
140
183
|
end
|
141
184
|
|
142
185
|
class Image < Document
|
186
|
+
|
187
|
+
# Mastodon extension per
|
188
|
+
# https://docs-p.joinmastodon.org/spec/activitypub/#extensions
|
189
|
+
ap_attr :focalPoint, :blurhash
|
143
190
|
end
|
144
191
|
|
145
192
|
class Video < Document
|
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
|
+
version: 0.3.0
|
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-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -17,6 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- ".rspec"
|
20
21
|
- LICENSE.txt
|
21
22
|
- README.md
|
22
23
|
- Rakefile
|