A Rails application generator by Platanus, inspired by Suspenders
A Rails application generator from Platanus, inspired by Suspenders.
You have to install Potassium globally:
$ gem install potassium
Use the potassium create
command to create a new project:
$ potassium create <project-name>
Please note:
- Potassium will perform a version check before running to ensure that you are using the latest potassium.
- If you feel that it’s too slow, you may need to update rubygems:
gem update --system
.- Potassium uses node under the hood, so a check will also be performed to ensure you are running the supported version.
In case you want to use the Platanus Configuration you should use the following command:
$ potassium create <project-name> --platanus-config
This will create a project with the following configuration:
database
: 'postgresql'
local
: 'es-CL'
email_service
: 'sendgrid'
devise
: true
devise-user-model
: true
admin
: true
vue_admin
: true
pundit
: true
api
: true
storage
: 'shrine'
heroku
: true
background_processor
: true
draper
: true
schedule
: true
sentry
: true
front_end_vite
: true
google_tag_manager
: true
test
: true
spring
: true
The remaining question will be asked as usual.
If you cloned this repository and are running the gem using the bin script (potassium/bin/potassium create
), take careful note of the gem versions that are used. Sometimes the local Rails version is used instead of the one specified in the gemspec. Remove your local Gemfile.lock after pulling from the repository to help prevent these issues.
Use the potassium install
command to add a recipe to a project:
$ potassium install devise
You can force an already installed recipe by passing the --force
argument
$ potassium install devise --force
You can run the command on its own to view all the available recipes and select one:
$ potassium install
Potassium Rails apps includes the following gems and technologies:
The following optional integrations are also added:
A few more things are added to the project:
bin/setup
script to setup things on a newly cloned projectbin/cibuild
script to run continuous integration build on CIdb:fake_data:load
rake task to load fake data for developmentThe optional API support includes:
When you choose to deploy to heroku a few extra things are added for the project.
bin/release
file with the release phase script to run specific tasks before the app is deployed completely, for example rails db:migrate:with_data
.buildpacks
file with the default buildpacks to use. It use the following buildpacks:index | buildpack | description |
---|---|---|
1. | nodejs | to support javascript package management with yarn and webpack based asset compiling |
2. | ruby-version | to support the use of .ruby-version file to instruct heroku which ruby version to use |
3. | ruby | the base buildpack to run ruby applications |
Also the heroku applications are created
staging
and production
applicationsstaging
production
stagesYou’ll need to manually
In order to CicleCI start building the project on each push you need tell circle ci.
Go to https://circleci.com/add-projects, choose the repository from the list and hit
Build Project
In order to enable code linting via CircleCI and ReviewDog, you need to activate the Only build pull requests option under the Advanced settings
section for your project.
This is useful when you are adding new recipes to Potassium, and you want to use the potassium create
command, to check the new functionality without pain.
To achieve this you need to run, In the Potassium’s root path, the bin/potassium_test create
instead of potassium create
command.
This command, will do the same as potassium create
but first:
It’s important to remember that bin/potassium_test create
:
app_path
param. It always creates the test project inside /tmp/dummy_app
potassium create
$ bin/potassium_test create --clockwork
On master branch.
VERSION
in lib/potassium/version.rb
Unreleased
title to current version in CHANGELOG.md
Releasing v6.3.0
git tag v6.3.0
git push origin v6.3.0
If you want to add functionality please go to
the contributing
Thank you contributors!
potassium is maintained by platanus.
Potassium is © 2014 Platanus, SPA. It is free software and may be redistributed under the terms specified in the LICENSE file.