๐Ÿ’พ Archived View for gem.graypegg.com โ€บ gor captured on 2024-02-05 at 09:13:03. Gemini links have been rewritten to link to archived content

View Raw

More Information

โฌ…๏ธ Previous capture (2023-12-28)

โžก๏ธ Next capture (2024-03-21)

๐Ÿšง View Differences

-=-=-=-=-=-=-

๐ŸŽ Gray's Space

Gemini on Rails

So I've built out a little Ruby framework for the Gemini protocol. It's serving this site you're on now! I'll prove it, the time is 2024-02-05 14:13:03 +0000 and the current scope is GORController. (Values included in a template, how very Web1.0!) It's quite simple at the moment, with basically just controllers for responding to 'get' (no query string) and 'answer' (with query string) requests in a rails-y looking syntax.

Repo

This is the only repo currently. It's just my gemini capsule. This will change in the future with a more clean slate to start from.

github

Internals

.

โ”œโ”€โ”€ app/

โ”‚ โ”œโ”€โ”€ persistent/

โ”‚ โ”‚ โ”œโ”€โ”€ # Objects instantiated at server start up,

โ”‚ โ”‚ โ”œโ”€โ”€ # and persist between connections

โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ’Ž hit_counter.rb

โ”‚ โ”‚

โ”‚ โ”œโ”€โ”€ # Controllers are included here, they cannot be nested

โ”‚ โ”œโ”€โ”€ ๐Ÿ’Ž gor_controller.rb

โ”‚ โ”œโ”€โ”€ ๐Ÿ’Ž guestbook_controller.rb

โ”‚ โ””โ”€โ”€ ๐Ÿ’Ž home_page_controller.rb

โ”‚

โ”œโ”€โ”€ config/

โ”‚ โ”œโ”€โ”€ # Some configuration files

โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ robots.txt

โ”‚ โ”œโ”€โ”€ ๐Ÿ’Ž routes.rb

โ”‚ โ””โ”€โ”€ ๐Ÿ’Ž tls.rb

โ”‚

โ”œโ”€โ”€ framework/

โ”‚ โ””โ”€โ”€ ... guts in here ...

โ”‚

โ””โ”€โ”€ ๐Ÿงพ persistent.csv

โ”œ # A tab-seperated file. There's an abstraction for writing

โ”” # to this file in the Persistent class.

Docs

/app

Persistents

Controllers

Other

Connections