{"id":19152372,"url":"https://github.com/wolfpack-digital/rails-template","last_synced_at":"2025-05-07T05:44:43.004Z","repository":{"id":38206800,"uuid":"158602794","full_name":"Wolfpack-Digital/rails-template","owner":"Wolfpack-Digital","description":"Ruby on Rails application template","archived":false,"fork":false,"pushed_at":"2025-04-16T09:22:35.000Z","size":309,"stargazers_count":5,"open_issues_count":6,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-16T12:26:06.620Z","etag":null,"topics":["rails","rails-template","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/Wolfpack-Digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-11-21T20:29:42.000Z","updated_at":"2025-04-16T09:22:37.000Z","dependencies_parsed_at":"2024-03-18T10:58:12.233Z","dependency_job_id":null,"html_url":"https://github.com/Wolfpack-Digital/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/Wolfpack-Digital%2Frails-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolfpack-Digital%2Frails-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolfpack-Digital%2Frails-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolfpack-Digital%2Frails-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wolfpack-Digital","download_url":"https://codeload.github.com/Wolfpack-Digital/rails-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249738800,"owners_count":21318504,"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":["rails","rails-template","ruby"],"created_at":"2024-11-09T08:17:35.629Z","updated_at":"2025-04-19T16:32:38.273Z","avatar_url":"https://github.com/Wolfpack-Digital.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wolfpack-digital/rails-template\n\n## Description\n\nRuby on Rails application template used by [Wolfpack-Digital][].\n\nFor older versions of Rails, use the following branches:\n\n* [Rails 5.2.x](https://github.com/Wolfpack-Digital/rails-template/tree/5.2.x)\n* [Rails 6.1.x](https://github.com/Wolfpack-Digital/rails-template/tree/6.1.x)\n\n## Requirements\n\nThis template currently works with:\n\n* Rails 7.0.x\n* PostgreSQL\n\nIf you need help setting up a Ruby development environment, check out [this guide](https://gorails.com/setup).\n\n## Installation\n\n*Optional.*\n\nTo make this the default Rails application template on your system, create a `~/.railsrc` file with these contents:\n\n```\n-d postgresql\n-m https://raw.githubusercontent.com/Wolfpack-Digital/rails-template/master/template.rb\n```\n\n## Usage\n\nThis template assumes you will store your project in a remote git repository (e.g. Bitbucket or GitHub) and that you will deploy to staging and production environments. It will prompt you for this information in order to pre-configure your app, so be ready to provide:\n\n1. The git URL of your (freshly created and empty) Bitbucket/GitHub repository\n2. The hostname of your staging server\n3. The hostname of your production server\n\nTo generate a Rails application using this template, pass the `-m` option to `rails new`, like this:\n\n```\nrails new blog \\\n  -d postgresql \\\n  -m https://raw.githubusercontent.com/Wolfpack-Digital/rails-template/master/template.rb\n```\n\n```\nrails new blog \\\n  -d postgresql \\\n  -m https://raw.githubusercontent.com/Wolfpack-Digital/rails-template/master/template.rb \\\n  --api\n```\n\n*Remember that options must go after the name of the application.* The only database supported by this template is `postgresql`.\n\nIf you’ve installed this template as your default (using `~/.railsrc` as described above), then all you have to do is run:\n\n```\nrails new blog\n```\n\n## What does it do?\n\nThe template will perform the following steps:\n\n1. Generate your application files and directories\n2. Ensure bundler is installed\n3. Create the development and test databases\n4. Commit everything to git\n5. Push the project to the remote git repository you specified\n\n## What is included?\n\n#### These gems are added to the standard Rails stack\n\n* Core\n    * [sidekiq][] – Redis-based job queue implementation for Active Job\n* Configuration\n    * [dotenv][] – in place of the Rails `secrets.yml`\n* Utilities\n    * [annotate][] – auto-generates schema documentation\n    * [amazing_print][] – try `ap` instead of `puts`\n    * [better_errors][] – useful error pages with interactive stack traces\n    * [letter_opener][] - open email in browser\n    * [overcommit][] - git hook manager\n    * [rubocop][] – enforces Ruby code style\n* Security\n    * [brakeman][] and [bundler-audit][] – detect security vulnerabilities\n* Testing\n    * [simplecov][] – code coverage reports\n    * [shoulda][] – shortcuts for common ActiveRecord tests\n\n#### Other tweaks that patch over some Rails shortcomings\n\n* A much-improved `bin/setup` script\n* Log rotation so that development and test Rails logs don’t grow out of control\n\n#### Plus lots of documentation for your project\n\n* `README.md`\n\n## How does it work?\n\nThis project works by hooking into the standard Rails [application templates][] system, with some caveats. The entry point is the [template.rb][] file in the root of this repository.\n\nNormally, Rails only allows a single file to be specified as an application template (i.e. using the `-m \u003cURL\u003e` option). To work around this limitation, the first step this template performs is a `git clone` of the `Wolfpack-Digital/rails-template` repository to a local temporary directory.\n\nThis temporary directory is then added to the `source_paths` of the Rails generator system, allowing all of its ERb templates and files to be referenced when the application template script is evaluated.\n\nRails generators are very lightly documented; what you’ll find is that most of the heavy lifting is done by [Thor][]. The most common methods used by this template are Thor’s `copy_file`, `template`, and `gsub_file`. You can dig into the well-organized and well-documented [Thor source code][thor] to learn more.\n\nInspired by [rails-template][]\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/Wolfpack-Digital/rails-template/blob/master/CONTRIBUTING.md)\n\n[Wolfpack-Digital]:http://wolfpack-digital.com\n[sidekiq]:http://sidekiq.org\n[dotenv]:https://github.com/bkeepers/dotenv\n[annotate]:https://github.com/ctran/annotate_models\n[amazing_print]:https://github.com/amazing-print/amazing_print\n[better_errors]:https://github.com/charliesome/better_errors\n[rubocop]:https://github.com/bbatsov/rubocop\n[brakeman]:https://github.com/presidentbeef/brakeman\n[bundler-audit]:https://github.com/rubysec/bundler-audit\n[shoulda]:https://github.com/thoughtbot/shoulda\n[simplecov]:https://github.com/colszowka/simplecov\n[application templates]:http://guides.rubyonrails.org/generators.html#application-templates\n[template.rb]: template.rb\n[thor]: https://github.com/erikhuda/thor\n[rails-template]: https://github.com/mattbrictson/rails-template\n[letter_opener]: https://github.com/ryanb/letter_opener\n[overcommit]: https://github.com/brigade/overcommit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfpack-digital%2Frails-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfpack-digital%2Frails-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfpack-digital%2Frails-template/lists"}