toottown 0.2.0 → 0.2.2
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/bin/rake +27 -0
- data/lib/toottown/models/comment.rb +1 -0
- data/lib/toottown/models/mastodon_connection.rb +1 -0
- data/lib/toottown/routes.rb +1 -1
- data/lib/toottown/version.rb +1 -1
- data/lib/toottown.rb +1 -5
- data/package-lock.json +13 -0
- data/package.json +1 -1
- metadata +5 -10
- data/bridgetown.automation.rb +0 -51
- data/components/toottown/layout_help.liquid +0 -1
- data/components/toottown/plugin_component.rb +0 -17
- data/content/toottown/example_page.md +0 -8
- data/content/toottown/train-on-rails.jpeg +0 -0
- data/layouts/toottown/layout.html +0 -9
- data/lib/toottown/builder.rb +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c757499a2c00599e918180f088bad022e41644ada670d9e4d26390f170927cfe
|
|
4
|
+
data.tar.gz: bd5fd1d17094fba8ea8a1ff230474e5354f6b2fc711bc9e2cffb7483e359afba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15dbbe8108dbfd706911eec240d870a063c0d9544f7f5becb1a4ae39ccc4c4490bd8691bff92105c51eea54e18b59b47a17fbcaba904a5452bc9067651d0fea0
|
|
7
|
+
data.tar.gz: 383214d00ca9ebf05cbe7ae616be21bcfa36e4cbefb7d0ddc15ace590d09c0e1986025721d9b4eb0b3f8e35a462eddb77a2668178184b2306e6dfe8335efb90d
|
data/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
- ...
|
|
11
11
|
|
|
12
|
+
## [0.2.2] - 2026-10-14
|
|
13
|
+
|
|
14
|
+
- Clean up messy files, fix syntax bug
|
|
15
|
+
|
|
16
|
+
## [0.2.1] - 2025-11-15
|
|
17
|
+
|
|
18
|
+
- Remove lazy `blank?` usage…Active Support free!
|
|
19
|
+
|
|
12
20
|
## [0.2.0] - 2025-10-07
|
|
13
21
|
|
|
14
22
|
- Migrate project to Codeberg
|
data/Gemfile.lock
CHANGED
data/bin/rake
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
+
|
|
15
|
+
if File.file?(bundle_binstub)
|
|
16
|
+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
|
|
17
|
+
load(bundle_binstub)
|
|
18
|
+
else
|
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
require "rubygems"
|
|
25
|
+
require "bundler/setup"
|
|
26
|
+
|
|
27
|
+
load Gem.bin_path("rake", "rake")
|
data/lib/toottown/routes.rb
CHANGED
|
@@ -26,7 +26,7 @@ module Toottown
|
|
|
26
26
|
conn = Toottown::Models::MastodonConnection.new(instance_url: bridgetown_site.config.toottown.instance_url, access_token: bridgetown_site.config.toottown.access_token)
|
|
27
27
|
|
|
28
28
|
r.on "comments" do
|
|
29
|
-
next (response.status = 400; "Missing URL Parameter")
|
|
29
|
+
next (response.status = 400; "Missing URL Parameter") unless params.key?(:url)
|
|
30
30
|
|
|
31
31
|
url = limit_url.(params[:url])
|
|
32
32
|
|
data/lib/toottown/version.rb
CHANGED
data/lib/toottown.rb
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "bridgetown"
|
|
4
|
-
require "toottown/builder"
|
|
5
4
|
|
|
6
5
|
# @param config [Bridgetown::Configuration::ConfigurationDSL]
|
|
7
6
|
Bridgetown.initializer :toottown do |
|
|
@@ -18,7 +17,7 @@ Bridgetown.initializer :toottown do |
|
|
|
18
17
|
config.toottown.minutes_to_cache ||= minutes_to_cache
|
|
19
18
|
config.toottown.comments_hashtag ||= comments_hashtag
|
|
20
19
|
|
|
21
|
-
if instance_url.
|
|
20
|
+
if instance_url.nil? || access_token.nil?
|
|
22
21
|
Bridgetown.logger.warn "Toottown", "No instance URL or access token provided"
|
|
23
22
|
else
|
|
24
23
|
config.only :server do
|
|
@@ -32,7 +31,4 @@ Bridgetown.initializer :toottown do |
|
|
|
32
31
|
require "toottown/routes"
|
|
33
32
|
end
|
|
34
33
|
end
|
|
35
|
-
|
|
36
|
-
# Register your builder:
|
|
37
|
-
config.builder Toottown::Builder
|
|
38
34
|
end
|
data/package-lock.json
ADDED
data/package.json
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: toottown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jared White
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-10-15 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bridgetown
|
|
@@ -121,26 +121,21 @@ files:
|
|
|
121
121
|
- LICENSE.txt
|
|
122
122
|
- README.md
|
|
123
123
|
- Rakefile
|
|
124
|
-
-
|
|
125
|
-
- components/toottown/layout_help.liquid
|
|
126
|
-
- components/toottown/plugin_component.rb
|
|
127
|
-
- content/toottown/example_page.md
|
|
128
|
-
- content/toottown/train-on-rails.jpeg
|
|
129
|
-
- layouts/toottown/layout.html
|
|
124
|
+
- bin/rake
|
|
130
125
|
- lib/toottown.rb
|
|
131
|
-
- lib/toottown/builder.rb
|
|
132
126
|
- lib/toottown/models/comment.css
|
|
133
127
|
- lib/toottown/models/comment.rb
|
|
134
128
|
- lib/toottown/models/mastodon_connection.rb
|
|
135
129
|
- lib/toottown/routes.rb
|
|
136
130
|
- lib/toottown/version.rb
|
|
131
|
+
- package-lock.json
|
|
137
132
|
- package.json
|
|
138
133
|
- toottown.gemspec
|
|
139
134
|
homepage: https://codeberg.org/jaredwhite/toottown
|
|
140
135
|
licenses:
|
|
141
136
|
- MIT
|
|
142
137
|
metadata:
|
|
143
|
-
npm_add: toottown@0.2.
|
|
138
|
+
npm_add: toottown@0.2.2
|
|
144
139
|
rdoc_options: []
|
|
145
140
|
require_paths:
|
|
146
141
|
- lib
|
data/bridgetown.automation.rb
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# If your plugin requires a lot of steps to get set up, consider writing an automation to help guide users.
|
|
2
|
-
# You could set up and configure all sorts of things, for example:
|
|
3
|
-
#
|
|
4
|
-
# add_gem("my_plugin")
|
|
5
|
-
#
|
|
6
|
-
# add_yarn_for_gem("my_plugin")
|
|
7
|
-
#
|
|
8
|
-
# add_initializer :"my_plugin" do
|
|
9
|
-
# <<~RUBY
|
|
10
|
-
# do
|
|
11
|
-
# some_config_key 12345
|
|
12
|
-
# end
|
|
13
|
-
# RUBY
|
|
14
|
-
# end
|
|
15
|
-
#
|
|
16
|
-
# create_builder "my_nifty_builder.rb" do
|
|
17
|
-
# <<~RUBY
|
|
18
|
-
# class MyNeatBuilder < SiteBuilder
|
|
19
|
-
# def build
|
|
20
|
-
# puts MyPlugin.hello
|
|
21
|
-
# end
|
|
22
|
-
# end
|
|
23
|
-
# RUBY
|
|
24
|
-
# end
|
|
25
|
-
#
|
|
26
|
-
# javascript_import do
|
|
27
|
-
# <<~JS
|
|
28
|
-
# import { MyPlugin } from "my_plugin"
|
|
29
|
-
# JS
|
|
30
|
-
# end
|
|
31
|
-
#
|
|
32
|
-
# javascript_import 'import "my_plugin/frontend/styles/index.css"'
|
|
33
|
-
#
|
|
34
|
-
# create_file "src/_data/plugin_data.yml" do
|
|
35
|
-
# <<~YAML
|
|
36
|
-
# data:
|
|
37
|
-
# goes: here
|
|
38
|
-
# YAML
|
|
39
|
-
# end
|
|
40
|
-
#
|
|
41
|
-
# color = ask("What's your favorite color?")
|
|
42
|
-
#
|
|
43
|
-
# append_to_file "bridgetown.config.yml" do
|
|
44
|
-
# <<~YAML
|
|
45
|
-
#
|
|
46
|
-
# my_plugin:
|
|
47
|
-
# favorite_color: #{color}
|
|
48
|
-
# YAML
|
|
49
|
-
# end
|
|
50
|
-
#
|
|
51
|
-
# Read the Automations documentation: https://www.bridgetownrb.com/docs/automations
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>Just use <code>layout: toottown/layout</code> in your page's front matter.</p>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# rubocop:disable all
|
|
2
|
-
module Toottown
|
|
3
|
-
class PluginComponent < Bridgetown::Component
|
|
4
|
-
def initialize(hi:)
|
|
5
|
-
@hi = hi
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
# You can remove this and add an ERB, Serbea, etc. template file…or you can
|
|
9
|
-
# use something like Phlex if you're feeling adventurous!
|
|
10
|
-
def template
|
|
11
|
-
<<~HTML
|
|
12
|
-
Well hello there #{hi}!
|
|
13
|
-
HTML
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
# rubocop:enable all
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
layout: default
|
|
3
|
-
title: Example Page
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
If all goes well, this page will be accessible as [`{{ resource.data.relative_url }}`]({{ resource.data.relative_url }}), and you will see a photo of a train:
|
|
7
|
-
|
|
8
|
-

|
|
Binary file
|