Project

methodist

0.0
Low commit activity in last 3 years
There's a lot of open issues
No release in over a year
Methodist - a gem for Ruby on Rails created to stop chaos in your business logic. This gem adds generators to your rails application using some patterns: interactor, builder, observer and client. Just use `rails g <pattern> <new_class_name>`. Docs: https://github.com/QNester/methodist/wiki
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 6.1
~> 2.8.2
 Project Readme

Methodist

Build Status Maintainability Gitter

Methodist - a gem for Ruby on Rails created to stop chaos in your buisness logic. This gem adds generators to your rails application using some patterns:

  • Interactor: a class for doing some complex job step by step.
  • Observer: notifies one part of an application about changes in another part of an application.
  • Builder: is used to create an object with complex configuration (including your business logic, validation etc.)
  • Client: a class with implements methods for external services (databases, APIs and etc). For example, class called TelegramApiClient will implements methods for HTTP requests to telegram API.
  • Service: a class which encapsulates some business logic in semantic module. For example, class called NotificationService - implement methods for notifications. Or CacheService - implement methods for caching.

Installation

Add this line to your application's Gemfile:

gem 'methodist'

And then execute:

$ bundle

Or install it yourself:

$ gem install methodist

Usage

Just execute in a terminal

rails g <pattern_name> <generated_class>

where <pattern_name> is one of the patterns (observer, interactor, etc.)

About every Methodist pattern you can read here

Contributing

To contribute just:

  1. Create issue. Issue should contain information about goals of your future changes.
  2. Fork project.
  3. Create branch. The name of the branch should begin with the ID of your issue. Examle: ISSUE-205-create-new-pattern-generator.
  4. Make changes.
  5. Write tests.
  6. Make a commit. The name of the commit should begin with the ID of your issue. Examle: [ISSUE-205] Create new pattern generator.
  7. Push.
  8. Create a pull request to the develop branch.

License

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