Project

sujiko

0.0
The project is in a healthy, maintained state
Sujiko is a joke / toy Ruby gem: a small TCP server for local development, not for serious or production use. It serves one page: a venue floor plan where a meetup point is shown. Open GET / with optional query parameters shape, x, and y—the same contract as a Rails Spots-style app and iOS: shape selects the room (e.g. roomA, with normalization to internal ids like room_a); x and y are normalized coordinates from 0.0 to 1.0 (top-left of the white floor, independent of device pixels). Use it to preview map UI and to build or verify share URLs (Safari, copy, etc.) before deploying.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Sujiko

当然ジョーク用(お遊び)の gem です
This is a joke / toy gem — for fun and local experiments, not for production use.

A local development server for a venue meetup map: one GET / page with optional query parameters shape, x, and y (same rules as a Rails SpotsController-style app and the iOS URL builder). Normalized coordinates 0.01.0 with the top-left of the white floor as origin; shape picks the room (e.g. roomAroom_a after normalization). The server listens on 127.0.0.1 and, on macOS, opens your default browser on startup.

Example: http://127.0.0.1:4567/?shape=roomA&x=0.3&y=0.4

Installation

With Bundler, add to your Gemfile:

bundle add sujiko

Without Bundler:

gem install sujiko

Usage

CLI

sujiko                    # default port 4567
sujiko 3000              # custom port

--public-origin / -o sets the origin (scheme, host, optional non-default port only—no path, query, or userinfo) for copied “meetup” URLs. If omitted, the page uses the browser’s current location.origin, same as before.

From a cloned repository:

bundle exec sujiko
Environment Effect
SUJIKO_NO_BROWSER If set, the server does not open a browser on startup.

GET / query parameters

Name Meaning
shape Venue id (e.g. roomA); normalized server-side to internal ids like room_a / room_b / room_c / room_main.
x, y Normalized position on the white floor, each 0.01.0 (clamped; parse failures fall back to 0.5).

The page reads these from the URL on load; use Copy in the UI to get a ?shape&x&y link you can open in Safari or share. The copied URL’s origin follows --public-origin when the server was started with it; otherwise it matches the page you are viewing.

Programmatically

require "sujiko"

Sujiko::Server.start
Sujiko::Server.start(port: 8080)

Press Ctrl-C to stop the server.

Development

After checkout, run bin/setup to install dependencies. Use bin/console for an interactive session.

bundle exec rake install installs the gem locally. To release, bump the version in lib/sujiko/version.rb and run bundle exec rake release (creates a git tag, pushes commits, uploads the .gem to rubygems.org).

Contributing

Bug reports and pull requests are welcome on GitHub: https://github.com/tutuitakumi/sujiko

License

The gem is available as open source under the terms of the MIT License.