Sha256: 5087b6964a2094e7f5a8e2278e3be02b47ad268b4907609f1e5c523263f55ca5

Contents?: true

Size: 628 Bytes

Versions: 10

Compression:

Stored size: 628 Bytes

Contents

# Capistrano tasks for notifying Opbeat of deploys
namespace :opbeat do
  desc "Notify Opbeat of a new deploy."
  task :deployment do
    if defined?(Rails.root)
      initializer_file = Rails.root.join('config', 'initializers','opbeat.rb')

      if initializer_file.exist?
        load initializer_file
      else
        Rake::Task[:environment].invoke
      end
    end
    rev = ENV['REV']

    unless rev
      puts "No revision given. Set environment variable REV."
    else
      data = {'rev' => ENV['REV'], 'branch' => ENV['BRANCH'], 'status' => 'completed'}
      Opbeat::client.send_release(data)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
opbeat-1.1.0 lib/opbeat/tasks.rb
opbeat-1.0.0 lib/opbeat/tasks.rb
opbeat-0.9.2 lib/opbeat/tasks.rb
opbeat-0.9.1 lib/opbeat/tasks.rb
opbeat-0.9.0 lib/opbeat/tasks.rb
opbeat-0.8.0 lib/opbeat/tasks.rb
opbeat-0.7.1 lib/opbeat/tasks.rb
opbeat-0.7.0 lib/opbeat/tasks.rb
opbeat-0.6.1 lib/opbeat/tasks.rb
opbeat-0.6.0 lib/opbeat/tasks.rb