federails-moderation 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dbbf466d211154321036bf0349e04c88a283001ba423c56e747d1a2898611e0
4
- data.tar.gz: 9750cf970545d7e1ad89fb0f781d9fdddba4899605aee9f6795114cdd064ea17
3
+ metadata.gz: d5f8d2dd501b4ff7234867deb2ffdbf31d1d2ff24016272bea8f3e6f00f37f63
4
+ data.tar.gz: 565e41dbf4057c53ece759dc9f2bab3742dc24a66557556ec6eb40abfed6d4fb
5
5
  SHA512:
6
- metadata.gz: c2b9e1053164f060ed1450005ff124907862addcbd6d0fecc73249238d8a196028a55aa1012793bfd5561b3b68ff462e673d5964c9520ca2ef0b49548f21106d
7
- data.tar.gz: 52dc0d8ddf41e47a5122a39f3683134401d9976e799684ae1cbc8fafcb74575dd719544f8d970874e0555b07b9ee19528d926da5802960eac5c91eaca5eca23f
6
+ metadata.gz: 58de3d5a03f5283979650fd23c529243d69c0d928665e6821099b8132c44a8e31247fbc30806abaaf3851e9014a5dacd01bc901063c9ed3756699bd28306af68
7
+ data.tar.gz: 784a81b4107278ec491aa59adb2b2d8fa61944c64bfe45f4e7f8342d780cdf03efa01b5f0493441a2014eccd2d6a7b55fbac4c7e4c0a8f79cc6ae57aaf23048c
data/README.md CHANGED
@@ -1,96 +1,3 @@
1
1
  # Federails::Moderation
2
2
 
3
-
4
- ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/manyfold3d/federails-moderation/ci.yml)
5
- ![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/rubygems/federails-moderation)
6
-
7
- ![GitHub Release](https://img.shields.io/github/v/release/manyfold3d/federails-moderation)
8
- ![Gem Downloads (for latest version)](https://img.shields.io/gem/dtv/federails-moderation)
9
- ![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/rubygems/federails-moderation)
10
-
11
- A gem that provides moderation capabilities for [Federails](https://gitlab.com/experimentslabs/federails). It adds the following features:
12
-
13
- * Handle incoming `Flag` activities, normally used for reporting content to moderators
14
- * Block federation with particular servers
15
-
16
- ## Requirements
17
-
18
- * [Federails](https://gitlab.com/experimentslabs/federails) >= 0.8
19
- * Ruby >= 3.0
20
-
21
- ## Installation
22
- Add the gem to your Rails application:
23
-
24
- ```bash
25
- > bundle add "federails-moderation"
26
- ```
27
-
28
- Then install the database migrations:
29
-
30
- ```bash
31
- > bin/rails federails_moderation:install:migrations
32
- > bin/rails db:migrate
33
- ```
34
-
35
- ## Usage
36
-
37
- ### Reports
38
-
39
- When your application receives a `Flag` activitypub message, it will create a `Federails::Moderation::Report` record with the details.
40
-
41
- ```ruby
42
- # Find all unresolved reports
43
- reports = Federails::Moderation::Report.where(resolution: nil)
44
- r = reports.first
45
-
46
- # Reports can have a comment that was sent with them:
47
- puts r.content
48
- # "This message is spam"
49
-
50
- # It will be associated with the actor that sent it:
51
- puts r.actor.at_address
52
- # "@floppy@mastodon.me.uk"
53
-
54
- # Deal with the report in your app, then either:
55
- r.resolve!
56
- # or, you can ignore it
57
- r.ignore!
58
-
59
- ```
60
-
61
- You can receive a callback in your application when a new report is received, by providing a proc which will be called:
62
-
63
- ```
64
- Federails::Moderation.configure do |conf|
65
- conf.after_report_created = ->(report) { MyApp::MyReportHandler.call(report) }
66
- end
67
- ```
68
-
69
- ### Domain Blocks
70
-
71
- You can block domains that are abusive like so:
72
-
73
- ```
74
- Federails::Moderation::DomainBlock.create(domain: "spammer.com")
75
- ```
76
-
77
- Once the block is created, incoming messages from that domain, or from any actor on that domain, will be ignored. Also, outgoing messages to that domain will be dropped before being delivered.
78
-
79
- Actors from the blocked domain aren't currently auto-removed; this may be added in the future, but for now that's left up to your application.
80
-
81
- ## Contributing
82
-
83
- Bug reports and pull requests are welcome on GitHub at https://github.com/manyfold3d/federails-moderation. This project is intended to be a safe, welcoming space for collaboration; everyone interacting in the project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/manyfold3d/federails-moderation/blob/master/CODE_OF_CONDUCT.md).
84
-
85
- ## Support & Community
86
-
87
- For help, join the main [Federails matrix chat room](https://matrix.to/#/#federails:matrix.org).
88
-
89
- ## Acknowledgements
90
-
91
- This gem builds on top of [Federails](https://gitlab.com/experimentslabs/federails), by [Manuel Tancoigne](https://gitlab.com/mtancoigne).
92
-
93
- This gem was created as part of [Manyfold](https://manyfold.app), with funding from [NGI0 Entrust](https://nlnet.nl/entrust), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program.
94
-
95
- [<img src="https://nlnet.nl/logo/banner.png" alt="NLnet foundation logo" width="20%" />](https://nlnet.nl)
96
- [<img src="https://nlnet.nl/image/logos/NGI0_tag.svg" alt="NGI Zero Logo" width="20%" />](https://nlnet.nl/entrust)
3
+ This gem has changed name and is deprecated, please switch over to [fedipub-moderation](https://gitlab.com/fedipub/fedipub-moderation) instead.
@@ -1,5 +1,5 @@
1
1
  module Federails
2
2
  module Moderation
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: federails-moderation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-25 00:00:00.000000000 Z
11
+ date: 2026-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -64,16 +64,15 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.22'
67
+ version: '1.0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.22'
75
- description: Moderation additions for Federails; reporting, limit/suspend, server
76
- blocking, etc
74
+ version: '1.0'
75
+ description: "[DEPRECATED] renamed, use fedipub-moderation instead"
77
76
  email:
78
77
  - james@floppy.org.uk
79
78
  executables: []
@@ -107,7 +106,8 @@ metadata:
107
106
  homepage_uri: https://github.com/manyfold3d/federails-moderation
108
107
  source_code_uri: https://github.com/manyfold3d/federails-moderation
109
108
  changelog_uri: https://github.com/manyfold3d/federails-moderation/releases
110
- post_install_message:
109
+ post_install_message: federails and federails-moderation have been renamed; switch
110
+ to fedipub and fedipub-moderation instead for future updates
111
111
  rdoc_options: []
112
112
  require_paths:
113
113
  - lib
@@ -125,5 +125,5 @@ requirements: []
125
125
  rubygems_version: 3.5.22
126
126
  signing_key:
127
127
  specification_version: 4
128
- summary: Moderation additions for Federails.
128
+ summary: "[DEPRECATED] Moderation additions for Federails."
129
129
  test_files: []