ember-cli-deploy-pusher v0.1.0
ember-cli-deploy-pusher 
An ember-cli-deploy plugin to notify Pusher of successful hook executions in your deploy pipeline.
What is an ember-cli-deploy plugin?
A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.
For more information on what plugins are and how they work, please refer to the Plugin Documentation.
Quick Start
- Install this plugin:
 
$ ember install ember-cli-deploy-pusher- Place the following configuration into 
config/deploy.js: 
ENV.pusher = {
  appId: '<your pusher app id>',
  key: '<your pusher key>',
  secret: '<your pusher secret>'
};- Run the pipeline
 
ember deployAlternatively, you can pass in a pusherClient instance rather than specifying appId, key, and secret:
var Pusher = require('pusher');
ENV.pusher = {
  pusherClient: new Pusher({ /* ... */ });
};ember-cli-deploy Hooks Implemented
For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.
configure
The following hooks can be used for Pusher notifications:
willDeploywillDeploywillBuildbuilddidBuildwillPreparepreparedidPreparewillUploaduploaddidUploadwillActivateactivatedidActivatedidDeployteardownfetchRevisionsdisplayRevisionsdidFail
Note that, by default, this plugin does nothing. You must override any of the above hooks in your config/deploy.js file to actually send notifications.
Example:
var RSVP = require('rsvp');
ENV.pusher = {
  didActivate: function(/* context */) {
    return function(pusher) {
      var trigger = RSVP.denodeify(pusher.trigger.bind(pusher));
      return trigger('my-channel', 'my-event', { some: 'data' });
    };
  }
};The above triggers a my-event event in the my-channel channel, with a data payload of {"some": "data"} whenever the deploy:activate command completes successfully. Note that your hooks should return a function which takes a single argument, the Pusher client instance.
9 years ago