{"id":21509249,"url":"https://github.com/mark24code/sinatra-mock-template","last_synced_at":"2025-03-17T15:14:52.462Z","repository":{"id":82887436,"uuid":"364816951","full_name":"Mark24Code/sinatra-mock-template","owner":"Mark24Code","description":"Micro Mock Server","archived":false,"fork":false,"pushed_at":"2021-05-28T08:07:50.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T01:08:20.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Mark24Code.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-06T07:07:44.000Z","updated_at":"2021-07-09T04:08:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f9deb8f-2702-4d29-b1e8-daac63aa8fa3","html_url":"https://github.com/Mark24Code/sinatra-mock-template","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/Mark24Code%2Fsinatra-mock-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark24Code%2Fsinatra-mock-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark24Code%2Fsinatra-mock-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark24Code%2Fsinatra-mock-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mark24Code","download_url":"https://codeload.github.com/Mark24Code/sinatra-mock-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056424,"owners_count":20390719,"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-11-23T21:22:34.646Z","updated_at":"2025-03-17T15:14:52.433Z","avatar_url":"https://github.com/Mark24Code.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sinatra Mock template\n\nRestful JSON Mock Server\n(Sinatra + Mock + JSON API + Faker + CORS)\n\n# prepare\n\n## install\n\n* Make sure you have bundler\n\ninstall bundle\n\nrun `gem install bundler`\n\n* Install dependency gems\n\nenter project directory\n\nrun `bundle install`\n\n\n* Run mock server\n\nrun `bundle exec rake`\n\n* Add mock files\n\nenter `mocks/` ,create  `xxx.mock.rb`\n\n\nwhen you can edit your mock ruby script.\n\nmake sure `require \"sinatra\"` was code on top of script file.\n\n\n```ruby\nget '/' do\n  # just return the response object\n  {\n    content: \"hello world\",\n  }\nend\n\n\npost '/user' do\n  {\n    content: \"hello world\",\n  }\nend\n```\n\nthe app will collect all pattern like `xxx.mock.rb` into routers. \n\nwhen you change file, it will hotreload.\n\n\n\nenjoy~","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark24code%2Fsinatra-mock-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmark24code%2Fsinatra-mock-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark24code%2Fsinatra-mock-template/lists"}