mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 12:36:22 +00:00
Merge branch 'rails' of 0xacab.org:sutty/sutty into issue-15068
This commit is contained in:
commit
1f2b0fac11
6 changed files with 8 additions and 12 deletions
1
Gemfile
1
Gemfile
|
@ -79,6 +79,7 @@ gem 'webpacker'
|
||||||
gem 'yaml_db', git: 'https://0xacab.org/sutty/yaml_db.git'
|
gem 'yaml_db', git: 'https://0xacab.org/sutty/yaml_db.git'
|
||||||
gem 'kaminari'
|
gem 'kaminari'
|
||||||
gem 'device_detector'
|
gem 'device_detector'
|
||||||
|
gem 'htmlbeautifier'
|
||||||
gem 'dry-schema'
|
gem 'dry-schema'
|
||||||
gem 'rubanok'
|
gem 'rubanok'
|
||||||
|
|
||||||
|
|
|
@ -269,6 +269,7 @@ GEM
|
||||||
hiredis (0.6.3-x86_64-linux-musl)
|
hiredis (0.6.3-x86_64-linux-musl)
|
||||||
hiredis-client (0.14.1-x86_64-linux-musl)
|
hiredis-client (0.14.1-x86_64-linux-musl)
|
||||||
redis-client (= 0.14.1)
|
redis-client (= 0.14.1)
|
||||||
|
htmlbeautifier (1.4.2)
|
||||||
http_parser.rb (0.8.0-x86_64-linux-musl)
|
http_parser.rb (0.8.0-x86_64-linux-musl)
|
||||||
httparty (0.21.0)
|
httparty (0.21.0)
|
||||||
mini_mime (>= 1.0.0)
|
mini_mime (>= 1.0.0)
|
||||||
|
@ -659,6 +660,7 @@ DEPENDENCIES
|
||||||
hamlit-rails
|
hamlit-rails
|
||||||
hiredis
|
hiredis
|
||||||
hiredis-client
|
hiredis-client
|
||||||
|
htmlbeautifier
|
||||||
httparty
|
httparty
|
||||||
icalendar
|
icalendar
|
||||||
image_processing
|
image_processing
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'htmlbeautifier'
|
||||||
|
|
||||||
# Se encarga del contenido del artículo y quizás otros campos que
|
# Se encarga del contenido del artículo y quizás otros campos que
|
||||||
# requieran texto largo.
|
# requieran texto largo.
|
||||||
class MetadataContent < MetadataTemplate
|
class MetadataContent < MetadataTemplate
|
||||||
|
@ -86,7 +88,7 @@ class MetadataContent < MetadataTemplate
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
html.to_s.html_safe
|
HtmlBeautifier.beautify(html.to_s).html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
# Limpia estilos en base a una lista de permitidos
|
# Limpia estilos en base a una lista de permitidos
|
||||||
|
|
|
@ -12,7 +12,7 @@ class CreateFediblocks < ActiveRecord::Migration[6.1]
|
||||||
t.string :url, null: false
|
t.string :url, null: false
|
||||||
t.string :download_url, null: false
|
t.string :download_url, null: false
|
||||||
t.string :format, null: false
|
t.string :format, null: false
|
||||||
t.jsonb :instances, default: []
|
t.jsonb :hostnames, default: []
|
||||||
end
|
end
|
||||||
|
|
||||||
YAML.safe_load(File.read('db/seeds/activity_pub/fediblocks.yml')).each do |fediblock|
|
YAML.safe_load(File.read('db/seeds/activity_pub/fediblocks.yml')).each do |fediblock|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
# Cambia el nombre de la columna para que podamos obtener todas las
|
|
||||||
# instancias de un fediblock
|
|
||||||
class RenameFediblockInstancesToHostnames < ActiveRecord::Migration[6.1]
|
|
||||||
def change
|
|
||||||
rename_column :activity_pub_fediblocks, :instances, :hostnames
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -6,7 +6,7 @@
|
||||||
id: "9046789a-5de8-4b16-beed-796060f8f3cc"
|
id: "9046789a-5de8-4b16-beed-796060f8f3cc"
|
||||||
- title: "Oliphant Tier 0"
|
- title: "Oliphant Tier 0"
|
||||||
url: "https://writer.oliphant.social/oliphant/the-oliphant-social-blocklist"
|
url: "https://writer.oliphant.social/oliphant/the-oliphant-social-blocklist"
|
||||||
download_url: "https://codeberg.org/oliphant/blocklists/raw/branch/main/blocklists/mastodon/tier0.csv"
|
download_url: "https://codeberg.org/oliphant/blocklists/raw/branch/main/blocklists/mastodon/seirdy-tier0.csv"
|
||||||
format: "mastodon"
|
format: "mastodon"
|
||||||
id: "fc1efcb8-7e68-4a76-ae9e-0c447752b12b"
|
id: "fc1efcb8-7e68-4a76-ae9e-0c447752b12b"
|
||||||
- title: "The Bad Space (90%)"
|
- title: "The Bad Space (90%)"
|
||||||
|
|
Loading…
Reference in a new issue