envato/pagerduty — pull request #19 by orien (2014-05-22 12:39:53+00:00)
Title: Realign to the PagerDuty event API

### Value Add

See: http://developer.pagerduty.com/documentation/integration/events

- We can now send `client` and `client_url` attributes with the [trigger](http://developer.pagerduty.com/documentation/integration/events/trigger) event type.

```ruby
pagerduty.trigger(
"incident description",
:incident_key => "my unique incident identifier",
:client => "server in trouble",
:client_url => "http://sever.in.trouble",
:details => { my: "extra details" },
)
```
- We are not required to send a `description` attribute with the [acknowledge](http://developer.pagerduty.com/documentation/integration/events/acknowledge) and [resolve](http://developer.pagerduty.com/documentation/integration/events/resolve) event types.

```ruby
pagerduty_incident.acknowledge
pagerduty_incident.resolve
```

### Breaking Change?!

This PR breaks API backwards compatibility in two minor ways:
- `Pagerduty` class initialiser no longer accepts an `incident_key`.
- `Pagerduty#trigger` arguments have changed to accept all available options rather than just details. To send details of the incident what used to be:

```ruby
pagerduty.trigger("desc", :key => "value")
```
is now:

```ruby
pagerduty.trigger("desc", :details => { :key => "value" })
```

### v2.0.0

Incrementing the major version number to communicate possible upgrade issues.