No commit activity in last 3 years
No release in over 3 years
Sbidu generators rails engine with useful helpers and bootstrap based UI modules
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.4.3, ~> 2.4.4
>= 1.4.1, ~> 1.6.0
>= 4.4.0, ~> 4.8.0
~> 0.4.4
>= 0.11.0, ~> 0.11.3

Runtime

~> 5.1.4
 Project Readme

Sbidu Generators

Use the generators provided by Sbidu to create sbidu applications fast.

Create a Rails App

In order to use the generator you need to first create a blank rails application to run this generator

rails new demo-site.com -T -d mysql --skip-bundle
cd demo-site.com

Add sbidu_generators to Gemfile

Add this line to your application's Gemfile:

gem 'sbidu_generators'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sbidu_generators

Setup Generator

Run the generator script for setup

This will add necessary files like .gitignore, Dockerfile, docker-compose.yml, database.yml template etc to the current project

The only argument it requires is the application name.

$ rails g sbidu_generators:setup demo-site.com

It will also mount the required engines (pattana, usman & dhatu) to the config/routes.rb

Rails.application.routes.draw do
  mount Pattana::Engine => "/"
  mount Usman::Engine => "/"
  mount Dhatu::Engine => "/"
end

Do bundle again as the above command had changed the Gemfile. You might want to delete Gemfile.lock if you run into errors like compatible issues

$ rm Gemfile.lock
$ bundle

Create Database, Copy and Run Migrations

rails railties:install:migrations
rails db:create db:migrate
rails db:migrate RAILS_ENV=test

Import Data

bundle exec rails import:data:all

You can also insert some dummy data (seed data) if you want.

bundle exec rails import:data:dummy:all

License

The gem is available as open source under the terms of the MIT License.

Setup.sh

Alternatevely you could make use of the shell script to run all these and create a rails application ready to launch with minimal template.

You need to download the setup.sh from this repository to your working directory

Then make it executable

$ chmod +x setup.sh

Run the script to create a sbidu rails app where app_name.com is the domain name (a convention followed at sbidu)

$ ./setup.sh app_name.com

Go to the app directory

$ cd app_name.com

Run the generator to copy all website related scripts

$ rails g sbidu_generators:website app_name.com