{"id":13878471,"url":"https://github.com/wolfgangrittner/keepgoing","last_synced_at":"2025-07-16T14:32:13.427Z","repository":{"id":57678408,"uuid":"490639979","full_name":"wolfgangrittner/keepgoing","owner":"wolfgangrittner","description":"keepgoing uses guard to auto-run your single-file Ruby script on changes.","archived":false,"fork":false,"pushed_at":"2023-03-23T08:38:13.000Z","size":26,"stargazers_count":28,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-06T01:47:21.951Z","etag":null,"topics":["repl","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wolfgangrittner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-05-10T10:01:54.000Z","updated_at":"2024-04-08T14:53:39.000Z","dependencies_parsed_at":"2022-09-14T03:22:25.253Z","dependency_job_id":null,"html_url":"https://github.com/wolfgangrittner/keepgoing","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfgangrittner%2Fkeepgoing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfgangrittner%2Fkeepgoing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfgangrittner%2Fkeepgoing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfgangrittner%2Fkeepgoing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfgangrittner","download_url":"https://codeload.github.com/wolfgangrittner/keepgoing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226138849,"owners_count":17579496,"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":["repl","ruby"],"created_at":"2024-08-06T08:01:50.926Z","updated_at":"2024-11-24T07:31:03.847Z","avatar_url":"https://github.com/wolfgangrittner.png","language":"Ruby","readme":"# Keepgoing\n\nhttps://user-images.githubusercontent.com/467114/168008226-333aeec1-2318-42c1-876b-33096f5010f0.mp4\n\nkeepgoing uses [guard](https://github.com/guard/guard) to tighten the feedback loop on your single-file Ruby script that uses [bundler/inline](https://bundler.io/guides/bundler_in_a_single_file_ruby_script.html).  \nWhen added as a gem to your script, it will run your script once when started like you are used to, but it won't exit and rather keep it going and re-run it every time you modify your script. You keep tinkering and once you save your script runs again and you 💥 immediately see the result 🤯.\n\n## bundler/inline\nWhen trying out things with Ruby, and maybe a new Ruby gem or [even full blown Rails](https://christoph.luppri.ch/single-file-rails-applications-for-fun-and-bug-reporting), an awesome way to do this is using \"bundler/inline\".  \nIt allows you to put a whole application including a \"gemfile\" into a single-file Ruby script, which gives you a quick feedback loop and allows you to share the whole thing as one self-contained file.\n\n## automate \u003e manual\nIt would be great if we could tighten things up even more and supercharge the feedback loop by combining bundler/inline with guard auto-run.  \nI was wondering if guard could be inlined into that single-file Ruby script as well, and set up to execute that single file whenever it changed. This would allow us to start things up once, then keep editing and see results immediately.  \nTurns out you can, meet keepgoing!\n\n\n## Usage\n\nExample Ruby single-file script:\n```ruby:test.rb\nrequire \"bundler/inline\"\n\ngemfile do\n  source \"https://rubygems.org\"\n  gem \"keepgoing\"\nend\n\nputs \"Woohoo\"\n```\n\nWhen you run this script in a terminal with `ruby test.rb`, it will execute like it would without keepgoing, printing out \"Woohoo\".  \nBut you'll notice it won't exit back to your terminal prompt. If you go back to your editor and change something, say add another `puts` and save, you'll notice it gets executed again and you see the results of your edit right away.\n\n### long-running or blocking scripts\nIf your script has not finished running until you save the next time, whatever it is still doing will be stopped and it will be forced to exit, so keepgoing can run it again with your latest changes.  \nThis could be either great, because it allows you to use keepgoing even for things that run something blocking (like a web server that's waiting for requests), or it could be unexpected if keepgoing terminates something that is just taking a long time to finish processing.  \nAnyway, be aware that when you save, your script will be restarted, no matter what.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\n\nTo install this gem onto your local machine, run `bin/rake install`. To release a new version, update the version number in `version.rb`, and then run `bin/rake release`, which will create a git tag for the version, push git commits and the created tag, 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/wolfgangrittner/keepgoing. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/wolfgangrittner/keepgoing/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Keepgoing project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/wolfgangrittner/keepgoing/blob/main/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfgangrittner%2Fkeepgoing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfgangrittner%2Fkeepgoing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfgangrittner%2Fkeepgoing/lists"}