Skip to content

Commit

Permalink
airbrake-ruby: delete deprecated #create_deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylo committed Feb 21, 2019
1 parent ce6badb commit 23a329b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Airbrake Ruby Changelog

### master

### [v4.0.0][v4.0.0]

* Renamed `Airbrake.create_deploy` to `Airbrake.notify_deploy`

* Reduced clutter of `DeployNotifier` and `PerformanceNotifier` when
`inspect`ing ([#423](https://github.com/airbrake/airbrake-ruby/pull/423))
* Deprecated `Airbrake.create_deploy` in favour of `Airbrake.notify_deploy`
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Key features
* Support for code hunks (lines of code surrounding each backtrace frame)<sup>[[link](#code_hunks)]</sup>
* Ability to add context to reported exceptions<sup>[[link](#airbrakemerge_context)]</sup>
* Dependency tracking<sup>[[link](#airbrakefiltersdependencyfilter)]</sup>
* Automatic and manual deploy tracking <sup>[[link](#airbrakecreate_deploy)]</sup>
* Automatic and manual deploy tracking <sup>[[link](#airbrakenotify_deploy)]</sup>
* Performance monitoring for web applications (route statistics, SQL queries) <sup>[[link](#performance_stats)]</sup>
* Last but not least, we follow semantic versioning 2.0.0<sup>[[link][semver2]]</sup>

Expand Down Expand Up @@ -718,12 +718,12 @@ at_exit do
end
```

#### Airbrake.create_deploy
#### Airbrake.notify_deploy

Notifies Airbrake of a new deploy. Accepts a Hash with the following params:

```ruby
Airbrake.create_deploy(
Airbrake.notify_deploy(
environment: 'development',
username: 'john',
repository: 'https://github.com/airbrake/airbrake-ruby',
Expand Down
13 changes: 1 addition & 12 deletions lib/airbrake-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def delete_filter(_filter_class); end
#
# @since v3.2.0
class NilDeployNotifier
# @see Airbrake.create_deploy
# @see Airbrake.notify_deploy
def notify(_deploy_info); end
end

Expand Down Expand Up @@ -392,17 +392,6 @@ def notify_deploy(deploy_info)
@deploy_notifiers[:default].notify(deploy_info)
end

# @see notify_deploy
def create_deploy(deploy_info)
loc = caller_locations(1..1).first
signature = "#{self}##{__method__}"
warn(
"#{loc.path}:#{loc.lineno}: warning: #{signature} is deprecated. Call " \
"#{self}#notify_deploy instead"
)
notify_deploy(deploy_info)
end

# Merges +context+ with the current context.
#
# The context will be attached to the notice object upon a notify call and
Expand Down
2 changes: 1 addition & 1 deletion lib/airbrake-ruby/deploy_notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(config)
@sender = SyncSender.new(@config)
end

# @see Airbrake.create_deploy
# @see Airbrake.notify_deploy
def notify(deploy_info, promise = Airbrake::Promise.new)
if @config.ignored_environment?
return promise.reject("The '#{@config.environment}' environment is ignored")
Expand Down

0 comments on commit 23a329b

Please sign in to comment.