{"id":13878480,"url":"https://github.com/fastruby/rails-template","last_synced_at":"2025-04-29T22:31:14.649Z","repository":{"id":45537059,"uuid":"261859081","full_name":"fastruby/rails-template","owner":"fastruby","description":"Rails Application Template for Ombulabs projects","archived":false,"fork":false,"pushed_at":"2021-12-09T19:19:26.000Z","size":79,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-05T20:05:23.695Z","etag":null,"topics":["ombulabs","ombulabs-styleguide","overcommit","rails-template","rubocop"],"latest_commit_sha":null,"homepage":null,"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/fastruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2020-05-06T19:28:05.000Z","updated_at":"2022-06-07T09:32:23.000Z","dependencies_parsed_at":"2022-08-28T01:14:14.847Z","dependency_job_id":null,"html_url":"https://github.com/fastruby/rails-template","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/fastruby%2Frails-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastruby%2Frails-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastruby%2Frails-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastruby%2Frails-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastruby","download_url":"https://codeload.github.com/fastruby/rails-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251593021,"owners_count":21614459,"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":["ombulabs","ombulabs-styleguide","overcommit","rails-template","rubocop"],"created_at":"2024-08-06T08:01:51.175Z","updated_at":"2025-04-29T22:31:14.185Z","avatar_url":"https://github.com/fastruby.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"This includes scripts, templates and links to setup a Rails project.\n\n## Requirements\n\nFor newer Rails applications, the default JS assets manager is Webpack (through the Webpacker gem), so any modern Rails app requires [Yarn](https://classic.yarnpkg.com/en/docs/install) as a dependency.\n\n# Usage\n\nThis project provides an `rc` file that you can use when creating new rails projects with some defaults. If you put the `.railsrc` file in your HOME directory, you can simply run the `rails new` command and it will use that file's content:\n\n```\nrails new projectname\n```\n\nIf you want to put the `rc` file somewhere else and with another name, you can use the `--rc=path` option to target that file:\n\n```\nrails new projectname --rc=/some/path/to/myrailsrc\n```\n\n### Notes\n\n- You can use any standard `rails new` command options (run `rails new --help` for details)\n- You can still override the options defined in the `.railsrc` file. If, for example, you want to use MySQL, you can still do `rails new some_project --database=mysql` that will override the default\n- The `rc` file can be ignored completely using the option `--no-rc` in case you want to ignore all the defaults for a given project (`rails new some_project --no-rc`)\n\n# .railsrc\n\nThe file includes default options that will be used when creating a new rails app. These options cannot be handled by a Rails Application Template, both the RC file and the template are needed. Each option goes in a new line.\n\n### What it Does\n\nThis file contains these lines:\n\n```\n--skip-bundle # don't run bundle, we want to modify the gemfile first\n--skip-test # skip minitest gem setup, we are using rspec\n--skip-turbolinks # don't add Turbolinks gem to the project\n--database=postgresql # use postgres instead of sqlite\n--skip-webpack-install # skip webpacker install, we want to run this in a particular order\n-m https://raw.githubusercontent.com/ombulabs/rails-template/main/template.rb # use the template.rb file from this repo\n```\n\n### Downloading the File\n\nYou can download the file manually or run this cURL command that will download the file into your HOME dir:\n\n```\ncurl -o ~/.railsrc https://raw.githubusercontent.com/fastruby/rails-template/main/.railsrc\n```\n\n\n# template.rb\n\nThis file is a [Rails Application Template](https://guides.rubyonrails.org/rails_application_templates.html) so we can configure how `rails new` behaves.\n\n### Usage\n\nThis file is referenced in the `.railsrc` file so it's used by default in that case. If you are not using the `.railsrc` file but still want to use the template, use this option when creating a new Rails project:\n\n```\nrails new PROJECT_NAME -m https://raw.githubusercontent.com/fastruby/rails-template/main/template.rb\n```\n\n### What it Does\n\nThis file sets a few gems and tools, and configure them:\n- [ombulabs-styleguide](https://github.com/ombulabs/styleguide)\n- [rspec](https://relishapp.com/rspec) (via rspec-rails)\n- [factory_bot](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md)\n- [simplecov](https://github.com/colszowka/simplecov)\n- [dotenv](https://github.com/bkeepers/dotenv) (via dotenv-rails)\n- [pagy](https://github.com/ddnexus/pagy)\n- [rubocop (with standardrb config)](https://github.com/testdouble/standard)\n- [rubocop-ombu_labs](https://github.com/fastruby/rubocop-ombu_labs)\n- [reek](https://github.com/troessner/reek)\n- [overcommit](https://github.com/sds/overcommit)\n- [StandardJS](https://github.com/standard/standard)\n\nEach line (or group of lines) have a comment in that file explaining its purpose.\n\nAs a summary, it sets gems related to the styleguide, for tests, for linters and code quality and modifies config files.\n\n# Notes on Overcommit (git pre-commit hooks)\n\nWe don't want the linters to run for all the rails generated files (many of them won't pass the linter's checks but we don't want to modify internal files), so you can commit all the files before running the bin/setup script (overcommit won't be installed yet) or, if already run, you should disable it for the initial commit. To do so run:\n\n```bash\nOVERCOMMIT_DISABLE=1 git commit -a -m \"Initial commit\"\n```\n\n# More Resources\n\n- Standard code editor integration: https://github.com/testdouble/standard/wiki\n\n# TODO\n\n- Maybe move the script to setup the Mac environment to this repository? That script should take care of setting up rvm, ruby version, and could also copy the `.railsrc` file in the HOME dir\n- Add `next_rails` gem and config for current and master?\n- Maybe ask to select between ombulabs-styleguide, fastruby-styleguide or no styleguide\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/fastruby/rails-template](https://github.com/fastruby/rails-template). 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\nWhen Submitting a Pull Request:\n\n* If your PR closes any open GitHub issues, please include `Closes #XXXX` in your comment\n\n* Please include a summary of the change and which issue is fixed or which feature is introduced.\n\n* If changes to the behavior are made, clearly describe what changes.\n\n* If changes to the UI are made, please include screenshots of the before and after.\n\n\n## Code of Conduct\n\nEveryone interacting in the `rails-template` project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastruby%2Frails-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastruby%2Frails-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastruby%2Frails-template/lists"}