{"id":16019625,"url":"https://github.com/iboard/rappgem","last_synced_at":"2025-04-05T03:25:14.449Z","repository":{"id":16906221,"uuid":"19667228","full_name":"iboard/rappgem","owner":"iboard","description":"A ruby base application architecture (a conceptional example)","archived":false,"fork":false,"pushed_at":"2014-09-17T09:13:08.000Z","size":360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T08:08:48.712Z","etag":null,"topics":[],"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/iboard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-11T13:46:19.000Z","updated_at":"2014-09-17T09:13:08.000Z","dependencies_parsed_at":"2022-08-26T16:30:27.833Z","dependency_job_id":null,"html_url":"https://github.com/iboard/rappgem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Frappgem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Frappgem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Frappgem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iboard%2Frappgem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iboard","download_url":"https://codeload.github.com/iboard/rappgem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247283483,"owners_count":20913581,"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":[],"created_at":"2024-10-08T17:04:57.300Z","updated_at":"2025-04-05T03:25:14.422Z","avatar_url":"https://github.com/iboard.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rappgem – Ruby Application Gem\n\nThe gem gives you a clean application-structure for any ruby\napplication. You may use it for a gem, a command-line-app, a\nsinatra-app, and even for your rails-app.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'rappgem'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rappgem\n\n\n## Usage\n\n### Examples\n\n#### Simple\n\n    class MyApp \u003c BaseApplication\n      def run *_opts\n        puts \"Hello World\" if has_arg?(\"-v\")\n      end\n    end\n\n    app = ApplicationFactory.app( MyApp.intance, \"-v\" )\n    app.run #=\u003e \"Hello World\"\n\n#### Complete with individual Usecase\n\n    # implementing your own usecases\n    class MyUsecase \u003c Usecase\n      def response\n        # do something with @request\n        Response.new(message:\"...build your response...\")\n      end\n    end\n\n    # instantiate the application\n    app = ApplicationFactory.app( BaseApplication.instance )\n\n    # build the request\n    request = app.build_request( self, :command_name, params)\n\n    # and handle the request with your usecase\n    response = app.handle_request( req ) do\n      MyUsecase.new( req )\n    end\n\n    response.message # =\u003e \"...build your response...\"\n\n\nSee `spec/app/application_factory_spec.rb` and any other spec-file for\ndetails.\n\n## Sinatra Example\n\nThere is an example of a basic Sinatra-applicaton using Rappgem.\nYou can run the test-suite of this app by\n\n    rake sinatra\n\nTo run the application\n\n    cd examples/sinatra\n    ruby app.rb\n\nVisit \"http://0.0.0.0:4567\" while the app is running.\nPress Ctrl+C to stop the server-app.\n\n\n## TODO\n\nThis gem has not been finished yet. Next steps are:\n\n  * Implement a command-queue for BaseApplication and TerminalApplication\n  * Implement a Terminal-Example\n  * Implement a RAILS-Example\n\n### Use Terminal Application with _irb_\n\n     $ irb -Ilib\n     ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]\n     irb(main):001:0\u003e require \"rappgem\"\n     true\n     irb(main):002:0\u003e include Rappgem\n     Object\n     irb(main):003:0\u003e app = ApplicationFactory.app( TerminalApplication.instance )\n     #\u003cRappgem::Application::TerminalApplication:0x000001018a0d70 @args=[]\u003e\n     irb(main):004:0\u003e app.run\n     \u003eping pong\n     pong\n     \u003edate\n     2014-05-13 21:56:48 +0200\n     \u003equit\n     Rappgem::Application::TerminalApplication::\u003c2160395960\u003e Args: []\n     nil\n\n### Draft how a TerminalApplication could work\n\n![Image 1: Terminal Application - Draft](http://dav.iboard.cc/container/rappgem/Img001-terminal-application.jpg)\n\n### The idea behind\n\n[Jim Weirich Talk](http://www.youtube.com/embed/tg5RFeSfBM4)\n\n\u003cdiv\u003e\u003ciframe width=\"560\" height=\"315\"\n    src=\"//www.youtube.com/embed/tg5RFeSfBM4\"\n    frameborder=\"0\" allowfullscreen\u003e\n  \u003c/iframe\u003e\n\u003c/div\u003e\n\n## Development\n\n### rake – TDD\n\nrun `rake` to run all tests. The output of the tests will give\nyou a glue what `Rappgem` is doing.\n\n\n### YARD – documentation\n\nrun `yard \u0026\u0026 open doc/index.html` to generate and open the documentation\nin your browser.\n\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/rappgem/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiboard%2Frappgem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiboard%2Frappgem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiboard%2Frappgem/lists"}