Code Monkey home page Code Monkey logo

boring_generators's Introduction

Boring Generators

Gem GitHub Workflow Status

Have you ever started a new adventure/hobby project of your and instead of spending time in solving the actual problem statement with the website ended up configuring the application and put a lot of effort into it. Yeah, We felt that too. Boring generator tries to resolve the painful same redundant configuration you do in every application by adding generators to easily configure it.

Check out the generator we support right now. We are planning to add support to most of the mostly used and required gems. We are open to any idea of yours, feel free to raise a discussion by opening up an issue or try contributing.

Installation

Add this line to your application's Gemfile:

gem 'boring_generators'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install boring_generators

And then you can use it this way:

$ boring generate boring:simple_form:install --css_framework=<css_framework>
$ boring g boring:pry:install

To see options provided by each generator with their descriptions and accepted values, you can hit the following command for example:

$ boring generate boring:simple_form:install --help

Usage

The boring generator introduces following generators:

  • Install Tailwind CSS: rails generate boring:tailwind:install
  • Install Bootstrap: rails generate boring:bootstrap:install
  • Install JQuery: rails generate boring:jquery:install
  • Install FontAwesome via Yarn: rails generate boring:font_awesome:yarn:install
  • Install FontAwesome via RubyGems: rails generate boring:font_awesome:ruby_gem:install
  • Install Bullet: rails generate boring:bullet:install
  • Install Audit gems(bundler-audit, ruby_audit): rails generate boring:audit:install
  • Install Pry gems for easy debugging: rails generate boring:pry:install
  • Install Active Storage for Google Cloud Service: rails generate boring:active_storage:google:install
  • Install Active Storage for AWS: rails generate boring:active_storage:aws:install
  • Install Active Storage for Azure: rails generate boring:active_storage:azure:install
  • Install CircleCI: rails generate boring:ci:circleci:install --repository_name=<name> --ruby_version=<version>
  • Install GitHub Actions: rails generate boring:ci:github_action:install --repository_name=<name> --ruby_version=<version>
  • Install Travis CI: rails generate boring:ci:travisci:install --ruby_version=<version>
  • Install Rubocop: rails generate boring:rubocop:install --ruby_version=<version> --test_gem=<test_framework_name>
  • Build Favicon: rails generate boring:favicon:build --application_name=<application_name> --favico_letter=<favico_letter> --primary_color=<color>
  • Install Pundit: rails generate boring:pundit:install
  • Install GraphQL: rails generate boring:graphql:install
  • Install SimpleForm: rails generate boring:simple_form:install --css_framework=<css_framework>
  • Install Devise: rails generate boring:devise:install
  • Install Devise Facebook Omniauth: rails generate boring:oauth:facebook:install
  • Install Devise GitHub Omniauth: rails generate boring:oauth:github:install
  • Install Devise Google Omniauth: rails generate boring:oauth:google:install
  • Install Devise Twitter Omniauth: rails generate boring:oauth:twitter:install
  • Install Twilio: rails generate boring:twilio:install
  • Install Ahoy: rails generate boring:ahoy:install
  • Install Stripe: rails generate boring:payments:stripe:install
  • Install Stimulus: rails generate boring:stimulus:install
  • Install Rails Admin: rails generate boring:rails_admin:install
  • Install Paper Trail: rails generate boring:paper_trail:install
  • Install Flipper: rails generate boring:flipper:install
  • Install RSpec: rails generate boring:rspec:install
  • Install FactoryBot: rails generate boring:factory_bot:install
  • Install Faker: rails generate boring:faker:install
  • Install Overcommit with RuboCop: rails generate boring:overcommit:pre_commit:rubocop:install
  • Install Letter Opener: rails generate boring:letter_opener:install
  • Install Whenever: rails generate boring:whenever:install
  • Install Rswag: rails generate boring:rswag:install --rails_port=<rails_app_port> --authentication_type=<api_authentication_type> --skip_api_authentication=<skip_api_authentication> --api_authentication_options=<api_authentication_options> --enable_swagger_ui_authentication=<enable_swagger_ui_authentication>
  • Install Webmock: rails generate boring:webmock:install --app_test_framework=<test_framework>
  • Install Rack Mini Profiler: rails generate boring:rack_mini_profiler:install

Screencasts

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

You can also run specific test cases using following commands:

bundle exec ruby -w -Itest test/generators/tailwind_install_generator_test.rb

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/abhaynikam/boring_generators. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Changelog

Boring Generators changelog is available here.

License

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

Code of Conduct

Everyone interacting in the BoringGenerators project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

boring_generators's People

Contributors

abhaynikam avatar adilrt avatar citronak avatar coolprobn avatar dependabot[bot] avatar jamesglover avatar luathn avatar mausamp avatar yshmarov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boring_generators's Issues

Make generators idempotent

Sometimes generators can fail but when running the same generator again, we end up with multiple entries of same Gem in the Gemfile or same configurations as well.

It would be great if we could make generators idempotent so subsequent invocation don't change things that was already installed on previous run.

I am open to tackling this and looking for discussions first on what you think @abhaynikam

Unable to add Tailwind in Rails 5.1.x project

Using command from readme file for install TailWind CSS fails in rails project 5.1.6

Tried on a sample project

Initailizing tailwind configuration
         run  yarn tailwindcss init --full from "."
yarn run v1.22.4
$ /Users/sgrover/projects/side_projects/twitter_clone_rails/node_modules/.bin/tailwindcss init --full
internal/modules/cjs/loader.js:1088
  throw err;
  ^

Error: Cannot find module 'autoprefixer'

callback after oAuth

after installing omniauth it would maybe make sence to add a hint for the callback url:

/users/auth/github/callback

add default navigation links to devise

something like this to go into application.html.erb before yield. What do you think?

<% if current_user %>
  <%= link_to current_user.email, edit_user_registration_path %>
  <%= link_to "Log out", destroy_user_session_path, method: :delete %>
<% else %>
  <%= link_to "Log in", new_user_session_path %>
  <%= link_to "Register", new_user_registration_path %>
<% end %>

Generator Request: PostHog

I've started using posthog.com for capturing ui events, feature flags, a/b testing, and surveys. Would love to have a good default generator for posthog configuration.

Improvement: ability to use Gemfile ruby version

I think it would be nice to be able to set ruby version for templates in the following order:

  • --ruby_version=<version>
  • Gemfile ruby version (ruby '2.6.6')
  • default ruby version as set in the script

I can add this by myself, if you wish.

Provide some .env file for secrets

We should encourage people to store credentials outside the codebase.
Currently there are i.e. github credentials stored as plain text in config/github

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.