{"id":13484466,"url":"https://github.com/carbonfive/raygun","last_synced_at":"2025-04-12T18:46:31.960Z","repository":{"id":4553605,"uuid":"5694480","full_name":"carbonfive/raygun","owner":"carbonfive","description":"Rails application generator that builds applications with the common customization stuff already done.","archived":false,"fork":false,"pushed_at":"2024-02-26T17:36:44.000Z","size":715,"stargazers_count":212,"open_issues_count":8,"forks_count":34,"subscribers_count":72,"default_branch":"main","last_synced_at":"2025-04-03T20:13:03.674Z","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/carbonfive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2012-09-05T22:27:28.000Z","updated_at":"2025-01-11T05:58:36.000Z","dependencies_parsed_at":"2024-05-01T13:19:56.006Z","dependency_job_id":"bd9fb53e-d49c-42ca-b365-841362084f35","html_url":"https://github.com/carbonfive/raygun","commit_stats":{"total_commits":428,"total_committers":27,"mean_commits":"15.851851851851851","dds":"0.18457943925233644","last_synced_commit":"4d20fb467635d5ad39e2b4001042d9e8bf0a6831"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fraygun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fraygun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fraygun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carbonfive%2Fraygun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carbonfive","download_url":"https://codeload.github.com/carbonfive/raygun/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617572,"owners_count":21134195,"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-07-31T17:01:24.864Z","updated_at":"2025-04-12T18:46:31.918Z","avatar_url":"https://github.com/carbonfive.png","language":"Ruby","readme":"[![Gem Version](https://badge.fury.io/rb/raygun.svg)](http://badge.fury.io/rb/raygun)\n\u003cimg src=\"marvin.png\" align=\"right\"/\u003e\n\n# Raygun\n\nRails application generator that builds a new project skeleton configured with Carbon Five preferences and\nbest practices baked right in. Spend less time configuring and more building cool features.\n\nRaygun generates Rails projects by copying this [sample app](https://github.com/carbonfive/raygun-rails)\nand massaging it gently into shape.\n\nAlternatively, Raygun allows you to specify your own prototype instead of the default sample app. See below\nfor details.\n\nMajor tools/libraries:\n\n* Rails\n* PostgreSQL\n* Slim\n* Sass\n* RSpec and Capybara\n* Factory Bot\n* SimpleCov\n* And many tweaks, patterns and common recipes (see [raygun-rails](https://github.com/carbonfive/raygun-rails) for all\nthe details).\n\nRaygun includes generator templates for controllers, views, and specs so that generated code follows best\npractices. For example, rspec specs use factory bot when appropriate.\n\nInspired by Xavier Shay work at Square and ThoughtBot's Suspenders. Thanks!\n\n## Projects Goals\n\nRaygun...\n\n* Generates a new rails application that's ready for immediate feature development.\n* Generates an application that has best practices that apply to most projects baked in.\n* Generates an application that includes specs for all built in functionality.\n* Is a forum for discussing what should or should not be included as part of a standard stack.\n\n## Installation\n\n    $ gem install raygun\n\n## Prerequisites\n\nTo generate an application, you only need the Raygun gem and network connectivity.\n\nTo run your new application's specs or fire up its server, you'll need to meet these requirements.\n\n* PostgreSQL with superuser 'postgres' with no password (`createuser -s postgres`)\n\nThe generated app will be configured to use the ruby version that was used to invoke Raygun. If you're using\nanother ruby, just change the `Gemfile` and `.ruby-version` as necessary.\n\n## Usage\n\n```bash\n$ raygun your-project\n```\n\nOnce your project is baked out, you can easily kick the wheels. Be sure that you have the prerequisites\ncovered (see above).\n\n```bash\n$ cd your-project\n$ bin/setup\n\n# Run the specs, they should all pass\n$ bin/rake\n\n# Fire up the app and open it in a browser\n$ yarn start\n$ open http://localhost:3000\n```\n\n## Next Steps\n\n### React\n\nTo add React, just run this generator:\n\n```bash\n$ bundle exec rails webpacker:install:react\n```\n\nYou can use JSX in your `app/javascript` sources and the `react_component` helper in your Rails views. Your React code\nwill be packaged and deployed automatically with the rest of your app, and you can test it end-to-end with Capybara,\njust like other Rails apps. See the [webpacker-react](https://github.com/renchap/webpacker-react) README for more\ninformation.\n\n\u003e :bulb: Check out [spraygun-react](https://github.com/carbonfive/spraygun-react) for eslint and stylelint configurations that can work for React projects.\n\n### React with Typescript\n\nTo add React with Typescript, run the React generator listed above, and then add Typescript:\n\n```bash\n$ bundle exec rails webpacker:install:typescript\n```\n\nDon't forget to rename any files containing JSX to `.tsx`.\n\nFor more information, see the [webpacker Typescript docs](https://github.com/rails/webpacker/blob/master/docs/typescript.md).\n\n### Bootstrap\n\nAs you'll notice, the project comes with enough CSS (SCSS, actually) to establish some patterns.  If you\nneed more of a framework, here are instructions on how to add Bootstrap to your new project.\n\n```bash\n$ yarn add bootstrap\n$ rails generate simple_form:install --bootstrap\n\n# Answer Yes to the question about overwriting your existing `config/initializers/simple_form.rb`\n```\n\nThis generates an initializer and scaffold files for Rails view scaffolding.\n\nAdd Bootstrap imports to the top your `application.scss`\n\n```css\n// application.scss\n@import \"~bootstrap/scss/_functions\";\n@import \"~bootstrap/scss/_variables\";\n\n...\n```\n\nNow you've got Bootstrap in the application.\n\nWe include `simple_form` in the project by default.  For more information about using Bootstrap styling\non `simple_form` forms, check out the documentation here http://simple-form-bootstrap.plataformatec.com.br/documentation\n\n\n## Using a Custom Project Template\n\nThe default is to use the project at [carbonfive/raygun-rails](https://github.com/carbonfive/raygun-rails) as a\nstarting point. You can use another repo as the project template with the `-p` command line option.\n\nIf you invoke raygun with the `-p` option, you can specify your own github repository.\n\n    $ raygun -p githubid/repo your-project\n\nOr\n\n    $ raygun -p githubid/repo#some-template-branch your-project\n\nThe repository must:\n\nNot have any binary files. Raygun runs a 'sed' command on all files, which will fail on binaries, such as jar files.\n\nIf you are not planning to pull the prototype repository by branch, it must also have a tag. Raygun will choose the\n\"greatest\" tag and downloads the repository as of that tag.\n\nIf your project template requires a minimum version of Raygun, include the version in a file called\n`.raygun-version` at the root. Raygun will make sure it's new enough for your repo.\n\n## Internal Mechanics\n\nRaygun fetches the greatest tag from the [carbonfive/raygun-rails](https://github.com/carbonfive/raygun-rails)\nrepo, unless it already has it cached in `~/.raygun`, extracts the contents of the tarball, and runs a series of\nsearch-and-replaces on the code to customize it accordingly.\n\nThis approach is fast, simple, and makes developmentn on Raygun very easy: make changes to the application\nprototype (which is a valid rails app) and tag them when they should be used for new applications.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n### Development\n\nTo set up your local environment, run:\n\n    $ bin/setup\n\nTo run tests and rubocop checks:\n\n    $ bundle exec rake\n\nTo generate an example app using your local development version of Raygun:\n\n    $ bin/raygun tmp/example_app\n\n## Changes\n\n[View the Change Log](https://github.com/carbonfive/raygun/tree/main/CHANGES.md)\n","funding_links":[],"categories":["Rails Application Generators","Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbonfive%2Fraygun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarbonfive%2Fraygun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbonfive%2Fraygun/lists"}