{"id":15048394,"url":"https://github.com/github/yard-sinatra","last_synced_at":"2025-10-04T08:31:39.130Z","repository":{"id":3990226,"uuid":"5086569","full_name":"github/yard-sinatra","owner":"github","description":"Display sinatra routes in yard documentation.","archived":true,"fork":true,"pushed_at":"2015-02-14T23:02:01.000Z","size":247,"stargazers_count":5,"open_issues_count":0,"forks_count":7,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-09-29T00:21:35.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"rkh/yard-sinatra","license":"ncsa","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.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":"2012-07-17T19:04:27.000Z","updated_at":"2024-07-31T03:21:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/github/yard-sinatra","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/github%2Fyard-sinatra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fyard-sinatra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fyard-sinatra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fyard-sinatra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/yard-sinatra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235232694,"owners_count":18957057,"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-09-24T21:11:22.348Z","updated_at":"2025-10-04T08:31:38.755Z","avatar_url":"https://github.com/github.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"**NOTE: This is an archived fork and is no longer supported or updated by GitHub. If you wish to continue to develop this code yourself, we recommend you fork it.**\n\nYARD::Sinatra\n=============\n\nThis plugin adds [Sinatra](http://sinatrarb.com) routes to [YARD](http://yardoc.org/) output.\n\nUsage\n-----\n\nInstall via rubygems:\n\n    gem install yard-sinatra\n\nAdd comments to your routes (well, that's optional):\n\n    require \"sinatra/base\"\n    require \"user\"\n    \n    class ExampleApp \u003c Sinatra::Base\n    \n      # Settings for a given user\n      #\n      # @param [User] some user\n      # @return [Hash] settings for that user\n      def settings(some_user)\n        raise NotImplementedMethod\n      end\n      \n      # Displays a settings page for the current user\n      #\n      # @see ExampleApp#settings\n      get \"/settings\" do\n        haml :settings, {}, :settings =\u003e settings(current_user)\n      end\n      \n      # Error 404 Page Not Found\n      not_found do\n        haml :'404'\n      end\n    \n    end\n\nThe you're ready to go:\n\n    yardoc example_app.rb\n\nYARD will automatically detect the yard-sinatra plugin and load it.\n\nOther use cases\n---------------\n\nAs with yard, this can be used for other means besides documentation.\nFor instance, you might want a list of all routes defined in a given list of files without executing those files:\n\n    require \"yard/sinatra\"\n    YARD::Registry.load Dir.glob(\"lib/**/*.rb\")\n    YARD::Sinatra.routes.each do |route|\n      puts route.http_verb, route.http_path, route.file, route.docstring\n    end\n\nThanks\n------\n\n* Ryan Sobol for implementing `not_found` documentation.\n* Loren Segal for making it seamlessly work as YARD plugin.\n  Well, and for YARD.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fyard-sinatra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fyard-sinatra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fyard-sinatra/lists"}