Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugins architecture #438

Merged
merged 2 commits into from
Apr 25, 2016
Merged

Add plugins architecture #438

merged 2 commits into from
Apr 25, 2016

Conversation

jondeandres
Copy link
Contributor

The plugins architecture will allow us organize the support for the different frameworks and libraries in a smarter way.

The idea is having all the external projects plugins in lib/rollbar/plugins. The files there will be loaded if the environment satisfy the dependencies that every plugin will define.

One plugin is defined in this way:

Rollbar.plugins.define('Sidekiq') do
  dependency { defined?(Sidekiq) }

  executes do 
    # here comes all the loading stuff, inject modules, monkey patches, add middlewares etc...
  end
end

If the dependencies are not satisfied the plugin is not loaded. My intention is migrate all the support for all the libraries into different plugin files/directories and cleanup a little our gem structure.

@jondeandres jondeandres self-assigned this Apr 20, 2016
@jondeandres jondeandres changed the title [WIP] Add plugins architecture Add plugins architecture Apr 20, 2016
@jondeandres jondeandres force-pushed the plugins branch 6 times, most recently from c95697b to 3ac65be Compare April 25, 2016 10:16
@jondeandres jondeandres force-pushed the plugins branch 2 times, most recently from c29ecf9 to 1f5edc3 Compare April 25, 2016 11:04
The middlewares are still in lib/rollbar/middlewares, but everything is
now loaded from the plugins directory
@jondeandres jondeandres merged commit c85d1b7 into master Apr 25, 2016
@jondeandres jondeandres deleted the plugins branch April 25, 2016 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant