Legacy HTTP webhooks extension for Spree Commerce, an open source e-commerce platform built with Ruby on Rails.
This extension provides the legacy callback-based webhook system for Spree. We recommend migrating to the new event-based webhooks available in spree_api as they offer much better performance, scalability and Admin UI.
-
Add this extension to your Gemfile:
gem 'spree_legacy_webhooks'
-
Install the gem:
bundle install
-
Run the install generator:
bundle exec rails g spree_legacy_webhooks:install -
Restart your server
You can disable webhook dispatching temporarily using:
Spree::LegacyWebhooks.disable_webhooks do
# Your code here - no webhooks will be fired
endOr set it globally:
Spree::LegacyWebhooks.disabled = true-
Create a dummy app:
bundle update bundle exec rake test_app -
Add your new code
-
Run tests:
bundle exec rspec
When testing your application's integration with this extension you may use its factories. Simply add this require statement to your spec_helper:
require 'spree_legacy_webhooks/factories'bundle exec gem bump -p -t
bundle exec gem releaseFor more options please see gem-release README
If you'd like to contribute, please take a look at the instructions for installing dependencies and crafting a good pull request.
Spree Legacy Webhooks is released under the AGPL-3.0 License.