From 23a329b42437a02ba485cbc6f6dba93d1c95b838 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Thu, 21 Feb 2019 20:29:08 +0200 Subject: [PATCH] airbrake-ruby: delete deprecated #create_deploy --- CHANGELOG.md | 4 ++++ README.md | 6 +++--- lib/airbrake-ruby.rb | 13 +------------ lib/airbrake-ruby/deploy_notifier.rb | 2 +- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 587ce4bf..976fe42c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/README.md b/README.md index 4e2814c2..4de82ea8 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Key features * Support for code hunks (lines of code surrounding each backtrace frame)[[link](#code_hunks)] * Ability to add context to reported exceptions[[link](#airbrakemerge_context)] * Dependency tracking[[link](#airbrakefiltersdependencyfilter)] -* Automatic and manual deploy tracking [[link](#airbrakecreate_deploy)] +* Automatic and manual deploy tracking [[link](#airbrakenotify_deploy)] * Performance monitoring for web applications (route statistics, SQL queries) [[link](#performance_stats)] * Last but not least, we follow semantic versioning 2.0.0[[link][semver2]] @@ -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', diff --git a/lib/airbrake-ruby.rb b/lib/airbrake-ruby.rb index 8041b179..71185177 100644 --- a/lib/airbrake-ruby.rb +++ b/lib/airbrake-ruby.rb @@ -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 @@ -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 diff --git a/lib/airbrake-ruby/deploy_notifier.rb b/lib/airbrake-ruby/deploy_notifier.rb index 2637fdaf..10623213 100644 --- a/lib/airbrake-ruby/deploy_notifier.rb +++ b/lib/airbrake-ruby/deploy_notifier.rb @@ -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")