StandardRB

This commit is contained in:
2024-02-21 21:48:44 +11:00
parent 0a14ae1204
commit 6f663722ab
37 changed files with 43 additions and 41 deletions

View File

@@ -9,6 +9,5 @@ module Adamantium
slice :main, at: "/"
slice :admin, at: "/admin"
slice :micropub, at: "/micropub"
end
end

View File

@@ -9,7 +9,7 @@ module Adamantium
youtube.com
bsky.app
bsky.social
github.com]
github.com].freeze
def call(content)
links = URI::DEFAULT_PARSER.extract(content)

View File

@@ -8,7 +8,7 @@ module Adamantium
return cached_content if cached_content
rendered_content = content_proc.()
rendered_content = content_proc.call
data = JSON.generate(expire: expiry.to_i, content: rendered_content)

View File

@@ -3,6 +3,5 @@
module Main
class Action < Adamantium::Action
end
end

View File

@@ -1,4 +1,3 @@
module Main
class Routes < Hanami::Routes
root to: "site.home"
@@ -52,4 +51,4 @@ module Main
redirect "deploying-a-hanami-app-to-fly-io", to: "/post/deploying-a-hanami-20-app-to-flyio"
redirect "deploying-a-hanami-app-to-fly-io/", to: "/post/deploying-a-hanami-20-app-to-flyio"
end
end
end

View File

@@ -1,5 +1,5 @@
# xml.instruct! "xml-stylesheet", {href: "/assets/style.xslt", type: "text/xsl"}
xml.opml("xmlns:frss" => "https://freshrss.org/opml", version: "2.0") do
xml.opml("xmlns:frss" => "https://freshrss.org/opml", :version => "2.0") do
xml.head do |head|
head.title "Daniel Nitsikopoulos's RSS subscriptions"
head.link "https://dnitza.com/blogroll/opml"

View File

@@ -1,8 +1,7 @@
module Main
module Views
module Blogroll
class Index< Main::View
class Index < Main::View
end
end
end

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Blogroll
class List< Main::View
class List < Main::View
config.layout = false
include Deps[blogroll_list: "queries.blogroll.index"]
@@ -13,7 +13,7 @@ module Main
url: feed["url"],
html_url: feed["htmlUrl"],
icon: feed["iconUrl"],
categories: feed["categories"].map {|cat| cat["label"]}
categories: feed["categories"].map { |cat| cat["label"] }
}
end
end

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Blogroll
class Opml< Main::View
class Opml < Main::View
include Deps[blogroll_list: "queries.blogroll.index"]
expose :blogroll do |blogroll_result|
@@ -11,7 +11,7 @@ module Main
url: feed["url"],
html_url: feed["htmlUrl"],
icon: feed["iconUrl"],
categories: feed["categories"].map {|cat| cat["label"]}
categories: feed["categories"].map { |cat| cat["label"] }
}
end
end

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Bookmarks
class Index< Main::View
class Index < Main::View
include Deps["repos.post_repo"]
expose :bookmarks do |query:|
@@ -10,6 +10,12 @@ module Main
end
end
expose :bookmarks_by_tag do
post_repo.bookmark_listing(query: query).map do |bookmark|
Decorators::Bookmarks::Decorator.new bookmark
end
end
expose :q do |query:|
query
end

View File

@@ -3,7 +3,7 @@ require "ogpr"
module Main
module Views
module Bookmarks
class Metadata< Main::View
class Metadata < Main::View
include Deps["repos.post_repo"]
config.layout = nil

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Bookmarks
class Show< Main::View
class Show < Main::View
include Deps["repos.post_repo"]
expose :bookmark do |slug:|

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Books
class Index< Main::View
class Index < Main::View
include Deps["repos.post_repo"]
private_expose :books do

View File

@@ -1,6 +1,6 @@
module Main
module Views
class Error< Main::View
class Error < Main::View
end
end
end

View File

@@ -3,7 +3,7 @@ require "builder"
module Main
module Views
module Feeds
class Rss< Main::View
class Rss < Main::View
include Deps["repos.post_repo"]
expose :posts do

View File

@@ -3,7 +3,7 @@ require "builder"
module Main
module Views
module Feeds
class StatusesRss< Main::View
class StatusesRss < Main::View
include Deps["repos.post_repo"]
expose :posts do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module More
class Index< Main::View
class Index < Main::View
end
end
end

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Movies
class Index< Main::View
class Index < Main::View
include Deps["repos.movie_repo"]
expose :movies do

View File

@@ -1,6 +1,6 @@
module Main
module Views
class NotFound< Main::View
class NotFound < Main::View
end
end
end

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Pages
class Show< Main::View
class Show < Main::View
include Deps["repos.page_repo", renderer: "renderers.markdown"]
expose :page_content do |page|

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Photos
class Index< Main::View
class Index < Main::View
include Deps["repos.post_repo"]
expose :photos do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Places
class Index< Main::View
class Index < Main::View
include Deps["repos.post_repo"]
expose :places do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Places
class MapPage< Main::View
class MapPage < Main::View
include Deps["repos.post_repo"]
config.layout = "map"

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Podcasts
class Index< Main::View
class Index < Main::View
include Deps["repos.podcast_repo", "repos.podcast_scrobble_repo"]
expose :podcasts do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Posts
class Archive< Main::View
class Archive < Main::View
include Deps["repos.post_repo"]
expose :year do |year:|

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Posts
class Index< Main::View
class Index < Main::View
include Deps["repos.post_repo"]
expose :posts do |post_query|

View File

@@ -3,7 +3,7 @@ require "time_math"
module Main
module Views
module Posts
class Show< Main::View
class Show < Main::View
include Deps["repos.post_repo", "repos.movie_repo"]
expose :post do |slug:|

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Posts
class TopTracks< Main::View
class TopTracks < Main::View
config.layout = false
expose :name do |track:|

View File

@@ -1,7 +1,7 @@
module Main
module Views
module RecentlyPlayed
class Index< Main::View
class Index < Main::View
config.layout = false
include Deps["queries.posts.recently_played"]

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Site
class Home< Main::View
class Home < Main::View
include Deps["repos.post_repo", renderer: "renderers.markdown"]
expose :home_content do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Statuses
class Index< Main::View
class Index < Main::View
include Deps["repos.post_repo"]
expose :posts do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Tags
class Index< Main::View
class Index < Main::View
include Deps["repos.tag_repo"]
expose :tag_groups do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Tags
class Show< Main::View
class Show < Main::View
include Deps[
"repos.post_tag_repo",
"repos.tag_repo"

View File

@@ -3,7 +3,7 @@ require "time_math"
module Main
module Views
module Timemachine
class Show< Main::View
class Show < Main::View
include Deps[
"repos.post_repo",
"repos.movie_repo",

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Trips
class Index< Main::View
class Index < Main::View
include Deps["repos.trip_repo"]
expose :trip_years do

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Trips
class Show< Main::View
class Show < Main::View
include Deps[
"repos.trip_repo"
]

View File

@@ -1,7 +1,7 @@
module Main
module Views
module Workouts
class Index< Main::View
class Index < Main::View
include Deps["repos.workout_repo"]
expose :workouts_by_year do