platanus / potassium

A Rails application generator by Platanus, inspired by Suspenders
MIT License
232 stars 17 forks source link

Potassium Circle CI

A Rails application generator from Platanus, inspired by Suspenders.

Installation

You have to install Potassium globally:

$ gem install potassium

Usage

Starting a new project from scratch

Use the potassium create command to create a new project:

$ potassium create <project-name>

Please note:

  1. Potassium will perform a version check before running to ensure that you are using the latest potassium.
  2. If you feel that it's too slow, you may need to update rubygems: gem update --system.
  3. Potassium uses node under the hood, so a check will also be performed to ensure you are running the supported version.

Platanus Configutarion

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:

  1. database: 'postgresql'
  2. local: 'es-CL'
  3. email_service: 'sendgrid'
  4. devise: true
  5. devise-user-model: true
  6. admin: true
  7. vue_admin: true
  8. pundit: true
  9. api: true
  10. storage: 'shrine'
  11. heroku: true
  12. background_processor: true
  13. draper: true
  14. schedule: true
  15. sentry: true
  16. front_end_vite: true
  17. google_tag_manager: true
  18. test: true
  19. spring: true

The remaining question will be asked as usual.

Running from Repository

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.

Adding recipes to an existing project

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

What's inside Potassium?

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:

API support

The optional API support includes:

Heroku

When you choose to deploy to heroku a few extra things are added for the project.

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

You'll need to manually

Continuous Integration

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

ReviewDog

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.

Development Tools

Creating a new Test project from scratch

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:

Publishing

On master branch.

  1. Change VERSION in lib/potassium/version.rb
  2. Change Unreleased title to current version in CHANGELOG.md
  3. Commit new release. For example: Releasing v6.3.0
  4. Create tag. For example: git tag v6.3.0
  5. Push tag: git push origin v6.3.0

Contributing

If you want to add functionality please go to the contributing

Credits

Thank you contributors!

Platanus

potassium is maintained by platanus.

License

Potassium is © 2014 Platanus, SPA. It is free software and may be redistributed under the terms specified in the LICENSE file.