{"id":13395074,"url":"https://github.com/nickjj/orats","last_synced_at":"2025-03-13T20:31:52.781Z","repository":{"id":13887306,"uuid":"16585506","full_name":"nickjj/orats","owner":"nickjj","description":"Opinionated rails application templates.","archived":true,"fork":false,"pushed_at":"2020-12-22T21:25:12.000Z","size":663,"stargazers_count":661,"open_issues_count":0,"forks_count":54,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-07T18:12:00.608Z","etag":null,"topics":["docker","docker-compose","rails","ruby"],"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/nickjj.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-06T16:31:35.000Z","updated_at":"2025-02-27T21:07:27.000Z","dependencies_parsed_at":"2022-08-23T14:50:43.219Z","dependency_job_id":null,"html_url":"https://github.com/nickjj/orats","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Forats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Forats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Forats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjj%2Forats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickjj","download_url":"https://codeload.github.com/nickjj/orats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243478285,"owners_count":20297228,"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":["docker","docker-compose","rails","ruby"],"created_at":"2024-07-30T17:01:41.121Z","updated_at":"2025-03-13T20:31:52.172Z","avatar_url":"https://github.com/nickjj.png","language":"Ruby","readme":"## This project has been deprecated in favor of [docker-rails-example](http://github.com/nickjj/docker-rails-example)\n\nOrats was a fun project that started as an elaborate [Rails application\ntemplate](https://github.com/nickjj/orats/blob/def543bf50fc7d081919fc4f8096a9fde2b161ac/lib/orats/templates/base.rb#L517-L546)\nthat eventually shifted into being a pre-configured app where Orats itself was\na CLI tool to help personalize things like your app's name.\n\nThe initial release came out all the way back in [February\n2014](https://github.com/nickjj/orats/releases/tag/v0.1.0).\n\nIt feels like it's time for a fresh start because moving forward I like the\nidea of having a pre-configured application that has a few opinions baked in,\nsuch as using Docker and more. That kind of means that orats as a name doesn't\nmake sense since it's technically no longer a Rails application template.\n\nWith that said, I've started a new repo at\n[docker-rails-example](http://github.com/nickjj/docker-rails-example) that\npicks up where orats left off while keeping everything current. As Rails\ncontinues to get updated this new repo will get updated too.\n\nThank you for using orats (and now this new repo)! Also, huge shout out to\nanyone who contributed to orats. Your efforts will not be forgotten. This repo\nis now archived which means it will remain available in read-only mode but not\ndeleted.\n\n---\n\n[![Gem Version](https://badge.fury.io/rb/orats.svg)](http://badge.fury.io/rb/orats)\n\n## What is orats?\n\nIt stands for opinionated rails application templates.\n\nThe goal is to provide you an excellent base application that you can use on\nyour next Rails project.\n\nYou're meant to generate a project using orats and then build your custom\napplication on top of it.\n\nIt also happens to use Docker so that your app can be ran on any major\nplatform -- even without needing Ruby installed.\n\nIf you want to learn about Docker specifically then I recommend checking out\n[Dive Into Docker: The Complete Docker Course for Developers](https://diveintodocker.com/courses/dive-into-docker?utm_source=orats\u0026utm_medium=github\u0026utm_campaign=readmetop).\n\n## What versions are you targeting?\n\n#### Ruby 2.5+\n\n#### Rails 5.2+\n\n#### Docker 1.11+ / Docker Compose API v2+\n\n## Contents\n- [Installation](#installation)\n- [Commands](#commands)\n    - [New](#new)\n        - [Try it](#try-the-new-command)\n    - [Templates](#templates)\n        - [Try it](#try-the-templates-command)\n- [Available templates](#available-templates)\n    - [Base](#base)\n- [FAQ](#faq)\n    - [How can I learn about the Docker specific aspects of the project?](#how-can-i-learn-about-the-docker-specific-aspects-of-the-project)\n    - [What do I do after I generate the application?](#what-do-i-do-after-i-generate-the-application)\n    - [What's the bare minimum to get things running?](#whats-the-bare-minimum-to-get-things-running)\n    - [Do I need to install orats to use the base app?](#do-i-need-to-install-orats-to-use-the-base-app)\n\n## Installation\n\n`gem install orats`\n\nOr if you already have orats then run `gem update orats` to upgrade to the\nlatest version.\n\nIf you don't have Ruby installed, then you can\n[generate an app easily with bash](#do-i-need-to-install-orats-to-use-the-base-app).\n\n## Commands\n\nTo get the details of each command then please run `orats help` from the\nterminal. Here's a high level overview:\n\n### New\n\nThe new command generates a new orats app, which is just a Rails app in the end.\n\nCurrently there is only 1 template, which is the \"base\" template but others may\nbe added in the future.\n\n#### Try the new command\n\n`orats new myproject`\n\n### Templates\n\nReturn a list of available templates to choose from.\n\n#### Try the templates command\n\n`orats templates`\n\n## Available templates\n\n### Base\n\nThis is the starter template that every other template will be based upon. I\nfeel like when I make a new project, 95% of the time it includes these features\nand when I do not want a specific thing it is much quicker to remove it than\nadd it.\n\n#### Main changes vs a fresh Rails project\n\n- **Core changes**:\n    - Use `postgres` as the primary SQL database\n    - Use `redis` as the cache backend\n    - Use `sidekiq` as a background worker through Active Job\n    - Use a standalone Action Cable server\n    - jQuery is installed with `jquery-rails`\n    - Capybara is commented out in the `Gemfile`\n    - Bootsnap and Credentials are disabled\n- **Features**:\n    - Add a `pages` controller with `home` action\n- **Config**:\n    - Extract a bunch of configuration settings to environment variables\n    - Rewrite the `database.yml` and `secrets.yml` files\n    - Add a staging environment\n    - **Development mode only**:\n        - Use `rack mini profiler` for profiling / analysis\n    - **Production mode only**:\n        - Add popular file types to the assets pre-compile list\n    - Log to STDOUT so that Docker can consume and deal with log entries\n    - Change validation errors to output in-line on each element instead of a big list\n- **Helpers**:\n    - `title`, `meta_description`, `heading` to easily set those values per view\n    - `humanize_boolean` to convert true / false into Yes / No\n    - `css_for_boolean` to convert true / false into a css class success / danger\n- **Views**:\n    - Use `scss` and `javascript`\n    - Use `bootstrap 3.x` and `font-awesome 4.x`\n    - Add a minimal and modern layout file\n    - Conditionally load `html5shiv`, `json3` and `respondjs` for IE \u003c 9 support\n    - **Partials**:\n        - Add navigation\n        - Add flash message\n        - Add footer\n        - Add Google Analytics\n\n## FAQ\n\n#### How can I learn about the Docker specific aspects of the project?\n\nCheck out the blog post\n[Dockerize a Rails 5, Postgres, Redis, Sidekiq and Action Cable Application](http://nickjanetakis.com/blog/dockerize-a-rails-5-postgres-redis-sidekiq-action-cable-app-with-docker-compose).\n\nAnother option is to take my [Dive Into Docker course](https://diveintodocker.com/courses/dive-into-docker?utm_source=orats\u0026utm_medium=github\u0026utm_campaign=readmebottom).\n\n#### What do I do after I generate the application?\n\nStart by reading the above blog post, because the Docker blog post explains\nhow you can run the project. It also goes over a few Docker related caveats\nthat may hang you up if you're not already familiar with Docker.\n\nAfter that, just dive into the project's source code and write your awesome app!\n\n#### What's the bare minimum to get things running?\n\nIf you don't feel like reading the blog post, this is the bare minimum to get\neverything up and running -- assuming you have Docker and Docker Compose installed.\n\n```sh\n# 1) Read the .env file carefully and change any user specific settings, such\n#    as e-mail credentials and platform specific settings (check the comments).\n#\n# 2) Build and run the project with Docker Compose\ndocker-compose up --build\n#\n# 3) Reset and Migrate the database (run this in a 2nd Docker-enabled terminal)\n# OSX / Windows users can skip adding the --user \"$(id -u):$(id -g)\" flag\ndocker-compose exec --user \"$(id -u):$(id -g)\" website rails db:reset\ndocker-compose exec --user \"$(id -u):$(id -g)\" website rails db:migrate\n#\n# 4a) Running Docker natively? Visit http://localhost:3000\n# 4b) Running Docker with the Toolbox? Visit http://192.168.99.100:3000\n#     (you may need to replace 192.168.99.100 with your Docker machine IP)\n```\n\n#### Do I need to install orats to use the base app?\n\nNot really. The base application is already generated and you can view it\n[directly in this repo](https://github.com/nickjj/orats/tree/master/lib/orats/templates/base).\n\nThe main benefit of the orats gem is that it will do a recursive find / replace\non a few strings to personalize the project for your project's name. It will\nalso make it easy to pick different templates when they are available.\n\nYou could easily do this yourself if you don't have Ruby installed on your work\nstation. The 3 strings you'll want to replace are:\n\n- `OratsBase` (used as class names and in the generated home page)\n- `orats_base` (used for a number of Rails specific prefixes and more)\n- `VERSION` (used to set the current orats version in the generated home page)\n\nYou could whip up a simple bash script to do this, such as:\n\n```sh\n# Clone this repo to a directory of your choosing.\ngit clone https://github.com/nickjj/orats /tmp/orats\n\n# Copy the base project to a directory of your choosing.\ncp -r /tmp/orats/lib/orats/templates/base /tmp/foo_bar\n\n# Swap a few custom values into the base project.\nfind /tmp/foo_bar -type f -exec sed -i -e 's/OratsBase/FooBar/g' {} \\;\nfind /tmp/foo_bar -type f -exec sed -i -e 's/orats_base/foo_bar/g' {} \\;\nfind /tmp/foo_bar -type f -exec sed -i -e 's/VERSION/5.2.0/g' {} \\;\n\n# Rename the example .env file since `.env` is git ignored.\nmv /tmp/foo_bar/.env.example /tmp/foo_bar/.env\n\n# Clean up the cloned directory.\nrm -rf /tmp/orats\n```\n","funding_links":[],"categories":["Rails Application Generators","Ruby","ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjj%2Forats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickjj%2Forats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjj%2Forats/lists"}