{"id":18961315,"url":"https://github.com/gregkrsak/gk-application","last_synced_at":"2026-04-01T12:30:19.564Z","repository":{"id":14831841,"uuid":"17554645","full_name":"gregkrsak/gk-application","owner":"gregkrsak","description":"A simple state machine framework for creating applications in Ruby. Installable via RubyGems.","archived":false,"fork":false,"pushed_at":"2015-04-09T19:28:31.000Z","size":164,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-18T07:57:17.201Z","etag":null,"topics":["ruby","state-machine"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregkrsak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-09T00:47:47.000Z","updated_at":"2018-01-26T23:27:21.000Z","dependencies_parsed_at":"2022-09-22T14:25:34.372Z","dependency_job_id":null,"html_url":"https://github.com/gregkrsak/gk-application","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkrsak%2Fgk-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkrsak%2Fgk-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkrsak%2Fgk-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkrsak%2Fgk-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregkrsak","download_url":"https://codeload.github.com/gregkrsak/gk-application/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239958284,"owners_count":19724925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby","state-machine"],"created_at":"2024-11-08T14:12:18.044Z","updated_at":"2026-04-01T12:30:19.486Z","avatar_url":"https://github.com/gregkrsak.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Gem: gk-application\n===================\n\n[![Gem Version](https://badge.fury.io/rb/gk-application.svg)](http://badge.fury.io/rb/gk-application)\n\nA simple framework for creating applications in Ruby\n----------------------------------------------------\n\nAn instance of ```GK::Application``` allows you to easily mange your Ruby application's state, with minimal fuss. Supported states are ```:starting```, ```:running```, ```:stopping``` and ```:stopped```.\n\nInstall with gem\n----------------\n\nQuick installation with ```gem```:\n\n```bash\ngem install gk-application\n```\n\nGet started with a new project\n------------------------------\n\nNeed a project template? No problem:\n\n```bash\nruby -e 'require \"rubygems\"; require \"gk-application\"' -e 'GK::Application.new.project'\n```\n\nOr using ```irb```:\n\n```\n$ irb\nirb(main):001:0\u003e require 'rubygems'\n=\u003e true\nirb(main):002:0\u003e require 'gk-application'\n=\u003e true\nirb(main):003:0\u003e GK::Application.new.project\n=\u003e nil\nirb(main):004:0\u003e quit\n```\n\nAnd you'll have a brand-new ```my_app.rb``` ready to go in the current folder!\n\nHere's what an application looks like\n-------------------------------------\n\n```ruby\n#!/usr/bin/env ruby\n\nrequire 'gk-application'\n\n\nmy_app = GK::Application.new\n\n\nmy_app.on_starting = proc {\n  puts 'Starting.'\n  my_app.state = :running\n}\n\nmy_app.on_running = proc {\n  puts 'Running.'\n  my_app.state = :stopping\n}\n\nmy_app.on_stopping = proc {\n  puts 'Stopping.'\n  my_app.state = :stopped\n}\n\nmy_app.on_stopped = proc {\n  puts 'Stopped.'\n}\n\n\nmy_app.state = :starting\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregkrsak%2Fgk-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregkrsak%2Fgk-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregkrsak%2Fgk-application/lists"}