{"id":15600730,"url":"https://github.com/habu-kagumba/rapid_runty","last_synced_at":"2025-07-01T22:03:53.109Z","repository":{"id":86732798,"uuid":"65015744","full_name":"Habu-Kagumba/rapid_runty","owner":"Habu-Kagumba","description":"A minimal web framework to get web project up and running in seconds.","archived":false,"fork":false,"pushed_at":"2020-03-13T22:16:53.000Z","size":70,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T22:02:37.875Z","etag":null,"topics":["rack","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Habu-Kagumba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-05T12:09:06.000Z","updated_at":"2023-02-21T06:02:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"88b1a348-6189-4f6c-8e3b-c45d21bd8439","html_url":"https://github.com/Habu-Kagumba/rapid_runty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Habu-Kagumba/rapid_runty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habu-Kagumba%2Frapid_runty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habu-Kagumba%2Frapid_runty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habu-Kagumba%2Frapid_runty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habu-Kagumba%2Frapid_runty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Habu-Kagumba","download_url":"https://codeload.github.com/Habu-Kagumba/rapid_runty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Habu-Kagumba%2Frapid_runty/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263041886,"owners_count":23404457,"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":["rack","ruby"],"created_at":"2024-10-03T02:05:47.666Z","updated_at":"2025-07-01T22:03:53.071Z","avatar_url":"https://github.com/Habu-Kagumba.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align:center;\"\u003e\n\u003ca href=\"http://bukly.herokuapp.com\"\u003e\u003cimg src=\"http://res.cloudinary.com/habu-kagumba/image/upload/v1470398003/rapid_runty_dpkdaq.svg\" alt=\"Rapid Runty\" width=\"200\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\n# Rapid Runty\n\n[![Gem Version](https://badge.fury.io/rb/rapid_runty.svg)](https://badge.fury.io/rb/rapid_runty) [![Dependency Status](https://gemnasium.com/badges/github.com/Habu-Kagumba/rapid_runty.svg)](https://gemnasium.com/github.com/Habu-Kagumba/rapid_runty) [![Codeship Status for Habu-Kagumba/rapid_runty](https://codeship.com/projects/c6f3c4d0-3efd-0134-9b91-6a8ca46930c1/status?branch=master) ](https://codeship.com/projects/167383) [![Coverage Status](https://coveralls.io/repos/github/Habu-Kagumba/rapid_runty/badge.svg?branch=master)](https://coveralls.io/github/Habu-Kagumba/rapid_runty?branch=master) [![codebeat badge](https://codebeat.co/badges/e5fef576-c696-4d14-9ca0-2ace5b758642)](https://codebeat.co/projects/github-com-habu-kagumba-rapid_runty) [![Inline docs](http://inch-ci.org/github/Habu-Kagumba/rapid_runty.svg?branch=master\u0026style=flat-square)](http://inch-ci.org/github/Habu-Kagumba/rapid_runty)\n\n**Rapid Runty** is a minimal web framework to get your web project up and running in seconds.\n\n## Dependencies\n\n1. [Ruby](https://github.com/rbenv/rbenv)\n2. [SQlite3](https://github.com/sparklemotion/sqlite3-ruby)\n3. [Bundler](https://github.com/bundler/bundler)\n4. [Rack](https://github.com/rack/rack)\n6. [Rspec](https://github.com/rspec/rspec)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rapid_runty'\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install rapid_runty\n```\n\n## Usage\n\nYou application structure should be as follows:\n\n```bash\n.\n├── Gemfile\n├── app\n│   ├── controllers\n│   ├── models\n│   └── views\n│       └── layouts\n│           └── application.html.haml\n├── config\n│   ├── application.rb\n│   └── routes.rb\n├── config.ru\n└── db\n```\n\n### Hacking\n\nStart by defining an `Application` class that inherits from `RapidRunty::Application`.\n\n```ruby\nrequire 'rapid_runty'\n\n$LOAD_PATH \u003c\u003c File.join(File.dirname(__FILE__), '..', 'app', 'controllers')\n$LOAD_PATH \u003c\u003c File.join(File.dirname(__FILE__), '..', 'app', 'models')\n\nmodule TodoList\n  class TodoApplication \u003c RapidRunty::Application\n  end\nend\n```\n\n#### Configuration\n\nYou need to define the `ROOT_DIR` in the `config.ru` file. e.g.\n\n```ruby\nrequire_relative './config/application'\nROOT_DIR = __dir__\n\nuse Rack::MethodOverride # masks put and delete methods requests as post requests\n\nrun TodoListApplication\n```\n\n#### Routes\n\nDefine your application routes.\n\n```ruby\nTodoApplication.routes.draw do\n  root \"todo#index\"\n  get \"/todo\", to: \"todo#index\"\n  get \"/todo/new\", to: \"todo#new\"\n  get \"/todo/:id\", to: \"todo#show\"\n  get \"/todo/:id/edit\", to: \"todo#edit\"\n  post \"/todo\", to: \"todo#create\"\n  put \"/todo/:id\", to: \"todo#update\"\n  delete \"/todo/:id\", to: \"todo#destroy\"\nend\n```\n\nAdd the route file to the config file\n\n```ruby\n[...]\nrequire_relative './config/routes'\n[...]\n```\n\n#### Models\n\nDefine your models in the `app/models` directory.\n\n```ruby\nclass Todo \u003c RapidRunty::Model::Base\n  to_table :todos\n  property :id, type: :integer, primary_key: true\n  property :title, type: :text, nullable: false\n  property :body, type: :text, nullable: false\n  property :created_at, type: :text, nullable: false\n  create_table\nend\n```\n\n#### Controllers\n\nDefines your controllers in the `app/controllers` directory.\n\n```ruby\nclass TodosController \u003c RapidRunty::BaseController\n  def index\n    @todos = Todo.all\n  end\n\n  def show\n    @todo = Todo.find(params['id'])\n  end\n\n  def new\n  end\n\n  def create\n    todo = Todo.new\n    todo.title = params['title']\n    todo.body = params['body']\n    todo.created_at = Time.now.to_s\n    todo.save\n\n    redirect_to '/todos'\n  end\n\n  def edit\n    @todo = Todo.find(params['id'])\n  end\n\n  def update\n    todo = Todo.find(params['id'])\n    todo.title = params['title']\n    todo.body = params['body']\n    todo.save\n\n    redirect_to \"/todos/#{todo.id}\"\n  end\n\n  def destroy\n    todo = Todo.find(params['id'])\n    todo.destroy\n\n    redirect_to '/todos'\n  end\nend\n```\n\n#### Views\n\nThis are the last piece to make the framework work.\n\nYou need to define the layout file located at `app/views/layouts/application.html.haml`.\n\n```haml\n!!!\n%html{:lang =\u003e 'en'}\n  %head\n    %meta{:content =\u003e 'text/html; charset=UTF-8', 'http-equiv' =\u003e 'Content-Type'}/\n    %meta{:charset =\u003e 'UTF-8'}/\n    %title Todo Application\n  %body\n    = yield\n```\n\n#### Running the application\n\nTo run the application, run from you the root of your application,\n\n```bash\n$ rackup\n```\n\n## Tests\n\nTo run the tests, run this command from the root of your application,\n\n```bash\n$ rspec -fd\n```\n\n## Limitations\n\n- **TODO** - Generate application files with rake command.\n- **TODO** - Support model relationships.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Habu-Kagumba/rapid_runty. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhabu-kagumba%2Frapid_runty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhabu-kagumba%2Frapid_runty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhabu-kagumba%2Frapid_runty/lists"}