• Stars
    star
    229
  • Rank 168,085 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Rails application generator by Platanus, inspired by Suspenders

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:

  • dotenv for loading environmental variables in development
  • Yarn for frontend assets packages
  • EditorConfig for keeping all our editor configurations the same
  • pry and pry-byebug for a less painful debugging experience
  • RSpec for unit and integration testing
  • FactoryBot for test factories
  • Guard for continuous testing and other watch-related tasks
  • AWS-SDK for file uploads, sdks, etc and because we use AWS
  • Puma to serve HTTP requests
  • Rack Timeout to abort requests that are taking too long
  • Tzinfo-Data for updating timezone information
  • Faker for creating development data
  • Scout for monitoring performance
  • Mjml for mails style
  • Bullet to identify eager loading (N+1 queries)

The following optional integrations are also added:

A few more things are added to the project:

  • A low database connection pool limit
  • Setup continuous integration in CircleCI to run tests
  • A bin/setup script to setup things on a newly cloned project
  • A bin/cibuild script to run continuous integration build on CI
  • A db:fake_data:load rake task to load fake data for development

API support

The optional API support includes:

Heroku

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

  • Adds a Procfile to define the processes to run in heroku
  • Setup continuous integration using docker and herokuish to maintain better parity between testing and production environments
  • Adds a 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
  • Adds a .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

  • Creates a staging and production applications
  • Creates a pipeline and assign the above application to the staging and production stages
  • Setup initial configuration variables
  • Set the application buildpack to the multi-buildpack

You'll need to manually

  • Connect the pipeline with the github repository
  • Assign a branch to each stage for auto deployments
  • Enable deploy after CI pass

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:

  • Will drop any existent database of the test app
  • Will remove the directory containing a previous version of the test app

It's important to remember that bin/potassium_test create:

  • Does not receive an app_path param. It always creates the test project inside /tmp/dummy_app
  • Can receive the same options as potassium create
  • Runs with options with a default value. This is to avoid the "asking part" of the creation process. You need to enable what you want to test like this: $ bin/potassium_test create --clockwork

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.

More Repositories

1

angular-restmod

Rails inspired REST-API ORM for Angular
JavaScript
1,184
star
2

activeadmin_addons

Extends ActiveAdmin to enable a set of great optional UX improving add-ons
Ruby
731
star
3

pincers

Web automation DSL on top of webdriver (and nokogiri)
Ruby
90
star
4

capistrano3-nginx

Ruby
79
star
5

capistrano-bower

Ruby
59
star
6

angular-rut

JavaScript
57
star
7

capistrano3-delayed-job

Ruby
50
star
8

power_api

Set of other gems and configurations designed to build incredible APIs
Ruby
45
star
9

activeadmin_jobs

It's a Rails engine that allows you to play nice with Active Job in Active Admin providing user feedback
Ruby
33
star
10

vue-dni

Collection of utilities to check and format RUT (Chilean DNI) for Vue
JavaScript
30
star
11

la-guia

Guia para todos los acuerdos y reglas en platanus
30
star
12

ng2-rut

Angular 2 library with several components to handle Chilean RUT validation, cleaning and formatting.
TypeScript
29
star
13

capistrano-lets-encrypt

Ruby
29
star
14

power-types

Rails pattern enforcing types used by the Platanus team
Ruby
27
star
15

guides

guides!
HTML
27
star
16

fastlane-cordova

Ruby
26
star
17

terraform-provider-rancher

Go
25
star
18

crabfarm-gem

Crabfarm crawler creation framework
JavaScript
21
star
19

negroku

Opinionated collection of recipes for capistrano.
Ruby
19
star
20

rut-helpers

Simple helpers to validate and format strings to RUT (Chilean DNI)
JavaScript
19
star
21

active_job_log

Rails engine to register jobs history, adding: job state, error feedback, duration, etc.
Ruby
17
star
22

job_notifier

Rails engine to persist job results and notify job status changes
Ruby
16
star
23

ledgerizer

A double-entry accounting system for Rails applications
Ruby
16
star
24

human_attributes

Gem to generate human readable ActiveRecord attributes
Ruby
14
star
25

angular-validate

Angular validation framework
JavaScript
13
star
26

crabtrap

an http proxy that can capture and replay requests
JavaScript
13
star
27

angular-push

Dead-easy push notifications for Cordova Angular apps
JavaScript
12
star
28

open-legal-source

Documentos legales abiertos para lograr una cooperación en el área jurídica
11
star
29

admin-invitable

Gem to use devise invitable with ActiveAdmin.
Ruby
10
star
30

angular-pretty-load

JavaScript
8
star
31

angular-keep-values

Keep your input values in your ngModels.
JavaScript
8
star
32

fonts

Las fonts que usamos en Platanus
CSS
8
star
33

bank-api-gem

Ruby
7
star
34

cavendish

A React Native + Expo project generator by Platanus
Ruby
7
star
35

banano

Vue Component Library
Vue
7
star
36

legacy_migration

A rails tool to migrate old (and maybe crappy) databases into new ones
Ruby
7
star
37

blog

Jekyll based blog
CSS
7
star
38

dialers

Api Wrappers for Ruby
Ruby
7
star
39

cangrejo-gem

Crabfarm ruby client
Ruby
6
star
40

elastic-rails

Elasticsearch integration for Ruby on Rails
Ruby
6
star
41

our-boxen

Ruby
6
star
42

lacatan

Ruby
6
star
43

bitrise-step-fastlane-match

Go
5
star
44

froggo

Ruby
5
star
45

angular-rope

Angular Promise Chaining
JavaScript
5
star
46

punto_pagos_rails

Ruby
5
star
47

rails_pallet

Rails engine to save paperclip attachments asynchronously
Ruby
5
star
48

queue-it

Ruby
5
star
49

cordova-plugin-flavors

JavaScript
5
star
50

cordova-gigya

Cordova plugin that handles Gigya integration for mobile (iOS and Android) apps.
Objective-C
4
star
51

metagem

Metagem generates the structure and configuration necessary to have plugins (gems and engines) inside your Rails project.
Ruby
4
star
52

banco-santander-empresas-crawler

A crabfarm.io scraper for Banco Santander
Ruby
4
star
53

surbtc-bitbar-plugin

A Bitbar plugin that shows SurBTC cryptocurrency prices and volume.
Shell
4
star
54

angular-auth

JavaScript
4
star
55

parxer

ruby gem with a nice DSL to parse xls, xlsx and csv files.
Ruby
3
star
56

restspec

REST test api framework built in top of RSpec for robust and mantainable api tests
Ruby
3
star
57

capistrano-nodenv

Ruby
3
star
58

open-source-latam

Lista de herramientas open source hechas en Latinoamércia
CSS
3
star
59

gift-recommender

Recommendation engine/service for the gifting app
Python
3
star
60

agent-contract

Agent Representation Ethereum Contract
JavaScript
3
star
61

platanews-ghost-theme

SCSS
3
star
62

gemaker

CLI to simplify Platanus gems creation
HTML
3
star
63

generator-platanus-ionic

Yeoman generator for Ionic projects in Platanus.
JavaScript
3
star
64

send_grid_mailer

Action Mailer adapter for using SendGrid
Ruby
3
star
65

paperclip_attributes

Rails Engine built on top of Paperclip gem to add extra attributes to your attachments
Ruby
3
star
66

heroku-buildpack-ruby-version

Shell
3
star
67

local_resource

Rails engine to treat external resources as if they were local
Ruby
3
star
68

heroku-stage

Ruby
2
star
69

rubocop-platanus

A RuboCop extension for enforcing Platanus best practices and code style.
Ruby
2
star
70

surbtc_dashboard

SurBTC Dashing Dashboard
JavaScript
2
star
71

power_client

Ruby
2
star
72

web-replay-chrome

WebReplay file generator for chrome
JavaScript
2
star
73

lightning-prometheus-exporter

Go
2
star
74

docker-ruby

Dockerfile
2
star
75

camaron

Crabfarm nodejs client
JavaScript
2
star
76

lita_time_tracker

Get time tracking information in your Slack
Ruby
2
star
77

heroku-buildpack-bower

Shell
2
star
78

platanus-rails

Platanus Ruby/Rails Toolbelt
Ruby
2
star
79

docker-rails

2
star
80

openface-api

Openface service for platanus proyects
Python
2
star
81

jspm-on-rails

Ruby
2
star
82

hound-cli

Ruby
2
star
83

ionic-contact-picker

JavaScript
2
star
84

capistrano-route53

Ruby
2
star
85

bitsplit-mobile

JavaScript
2
star
86

angular-doc-preview

directive that allows you to show a file preview from a given url
JavaScript
2
star
87

docker-rbenv

1
star
88

simple-restmod-demo

A simple demo to show how to include angular-restmod on a project.
JavaScript
1
star
89

angular-pallet-bundle

Wrapper directive of: platanus angular-upload, angular-progress and angular-doc-preview
JavaScript
1
star
90

geo-app-demo

Demo app to manage spatial data
Ruby
1
star
91

selenium_surfer

Selenium surfer robots!
Ruby
1
star
92

angular-form-utils

Couple of helpers that help handling form states
JavaScript
1
star
93

puppet-toggl

Shell
1
star
94

ham-mobile

Ham 📱
TypeScript
1
star
95

banco-chile-empresas-crawler

A crabfarm.io scraper for Banco de Chile
HTML
1
star
96

babel-react-dashboard

JavaScript
1
star
97

starting-ionic-template

Java
1
star
98

angular-skip-filter

JavaScript
1
star
99

bencinachile

C#
1
star
100

37s_cookbooks

Chef Cookbooks in use at 37signals
Ruby
1
star