bugsnag 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/bugsnag/capistrano.rb +4 -44
- data/lib/bugsnag/capistrano2.rb +46 -0
- data/lib/bugsnag/tasks/bugsnag.cap +36 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cbe4f096526d18bbfafafd15dc5eb3b6c7e76f0
|
4
|
+
data.tar.gz: cb801188b39389b33a156f40255e202b42b78674
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cd43a3ee6e5380335e898a8096f942032e8bb334d485ca09f12a4af65699fa98f0662c654fa480164be08afa5a47d63e8339248854474ce118068c4fcf65675
|
7
|
+
data.tar.gz: a78671e0159c2cf9ff863cf43d08d5d99bc8d1f98c505a67d8820d1a6fac385c299c685e913583a9382b1d83f369fe6db306e406e7751c9c7f8f80138eb533c1
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.
|
1
|
+
1.8.3
|
data/lib/bugsnag/capistrano.rb
CHANGED
@@ -1,48 +1,8 @@
|
|
1
1
|
require "httparty"
|
2
2
|
require "multi_json"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
def self.load_into(configuration)
|
9
|
-
configuration.load do
|
10
|
-
after "deploy", "bugsnag:deploy"
|
11
|
-
after "deploy:migrations", "bugsnag:deploy"
|
12
|
-
|
13
|
-
namespace :bugsnag do
|
14
|
-
desc "Notify Bugsnag that new production code has been deployed"
|
15
|
-
task :deploy, :except => { :no_release => true }, :on_error => :continue do
|
16
|
-
# Build the rake command
|
17
|
-
rake = fetch(:rake, "rake")
|
18
|
-
rails_env = fetch(:rails_env, "production")
|
19
|
-
bugsnag_env = fetch(:bugsnag_env, rails_env)
|
20
|
-
rake_command = "cd '#{current_path}' && RAILS_ENV=#{rails_env} #{rake} bugsnag:deploy"
|
21
|
-
|
22
|
-
# Build the new environment to pass through to rake
|
23
|
-
new_env = {
|
24
|
-
"BUGSNAG_RELEASE_STAGE" => bugsnag_env,
|
25
|
-
"BUGSNAG_REVISION" => fetch(:current_revision, nil),
|
26
|
-
"BUGSNAG_REPOSITORY" => fetch(:repository, nil),
|
27
|
-
"BUGSNAG_BRANCH" => fetch(:branch, nil)
|
28
|
-
}.reject { |_, v| v.nil? }
|
29
|
-
|
30
|
-
# Pass through any existing env variables
|
31
|
-
ALLOWED_ENV_SETTINGS.each { |opt| new_env[opt] = ENV[opt] if ENV[opt] }
|
32
|
-
|
33
|
-
# Append the env to the rake command
|
34
|
-
rake_command << " #{new_env.map{|k,v| "#{k}=#{v}"}.join(" ")}"
|
35
|
-
|
36
|
-
# Run the rake command (only on one server)
|
37
|
-
run(rake_command, :once => true)
|
38
|
-
|
39
|
-
logger.info "Bugsnag deploy notification complete."
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
4
|
+
if defined?(Capistrano::VERSION) && Gem::Version.new(Capistrano::VERSION).release >= Gem::Version.new('3.0.0')
|
5
|
+
load File.expand_path('../tasks/bugsnag.cap', __FILE__)
|
6
|
+
else
|
7
|
+
require_relative 'capistrano2'
|
45
8
|
end
|
46
|
-
|
47
|
-
Bugsnag::Capistrano.load_into(Capistrano::Configuration.instance) if Capistrano::Configuration.instance
|
48
|
-
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Bugsnag
|
2
|
+
module Capistrano
|
3
|
+
ALLOWED_ENV_SETTINGS = %w{BUGSNAG_RELEASE_STAGE BUGSNAG_REPOSITORY BUGSNAG_REVISION BUGSNAG_BRANCH BUGSNAG_API_KEY BUGSNAG_APP_VERSION}
|
4
|
+
|
5
|
+
def self.load_into(configuration)
|
6
|
+
configuration.load do
|
7
|
+
after "deploy", "bugsnag:deploy"
|
8
|
+
after "deploy:migrations", "bugsnag:deploy"
|
9
|
+
|
10
|
+
namespace :bugsnag do
|
11
|
+
desc "Notify Bugsnag that new production code has been deployed"
|
12
|
+
task :deploy, :except => { :no_release => true }, :on_error => :continue do
|
13
|
+
# Build the rake command
|
14
|
+
rake = fetch(:rake, "rake")
|
15
|
+
rails_env = fetch(:rails_env, "production")
|
16
|
+
bugsnag_env = fetch(:bugsnag_env, rails_env)
|
17
|
+
rake_command = "cd '#{current_path}' && RAILS_ENV=#{rails_env} #{rake} bugsnag:deploy"
|
18
|
+
|
19
|
+
# Build the new environment to pass through to rake
|
20
|
+
new_env = {
|
21
|
+
"BUGSNAG_RELEASE_STAGE" => bugsnag_env,
|
22
|
+
"BUGSNAG_REVISION" => fetch(:current_revision, nil),
|
23
|
+
"BUGSNAG_REPOSITORY" => fetch(:repository, nil),
|
24
|
+
"BUGSNAG_BRANCH" => fetch(:branch, nil),
|
25
|
+
"BUGSNAG_API_KEY" => fetch(:bugsnag_api_key, nil)
|
26
|
+
}.reject { |_, v| v.nil? }
|
27
|
+
|
28
|
+
# Pass through any existing env variables
|
29
|
+
ALLOWED_ENV_SETTINGS.each { |opt| new_env[opt] = ENV[opt] if ENV[opt] }
|
30
|
+
|
31
|
+
# Append the env to the rake command
|
32
|
+
rake_command << " #{new_env.map{|k,v| "#{k}=#{v}"}.join(" ")}"
|
33
|
+
|
34
|
+
# Run the rake command (only on one server)
|
35
|
+
run(rake_command, :once => true)
|
36
|
+
|
37
|
+
logger.info "Bugsnag deploy notification complete."
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
Bugsnag::Capistrano.load_into(Capistrano::Configuration.instance) if Capistrano::Configuration.instance
|
46
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
ALLOWED_ENV_SETTINGS = %w{BUGSNAG_RELEASE_STAGE BUGSNAG_REPOSITORY BUGSNAG_REVISION BUGSNAG_BRANCH BUGSNAG_API_KEY BUGSNAG_APP_VERSION}
|
2
|
+
namespace :bugsnag do
|
3
|
+
desc "Notify Bugsnag that new production code has been deployed"
|
4
|
+
task :deploy do
|
5
|
+
on :primary, reject: ->(h) { h.properties.no_release }, on_error: :continue do
|
6
|
+
# Build the rake command
|
7
|
+
rake = fetch(:rake, "rake")
|
8
|
+
rails_env = fetch(:rails_env, "production")
|
9
|
+
bugsnag_env = fetch(:bugsnag_env, rails_env)
|
10
|
+
rake_command = "cd '#{current_path}' && RAILS_ENV=#{rails_env} #{rake} bugsnag:deploy"
|
11
|
+
|
12
|
+
# Build the new environment to pass through to rake
|
13
|
+
new_env = {
|
14
|
+
"BUGSNAG_RELEASE_STAGE" => bugsnag_env,
|
15
|
+
"BUGSNAG_REVISION" => fetch(:current_revision, nil),
|
16
|
+
"BUGSNAG_REPOSITORY" => fetch(:repository, nil),
|
17
|
+
"BUGSNAG_BRANCH" => fetch(:branch, nil),
|
18
|
+
"BUGSNAG_API_KEY" => fetch(:bugsnag_api_key, nil)
|
19
|
+
}.reject { |_, v| v.nil? }
|
20
|
+
|
21
|
+
# Pass through any existing env variables
|
22
|
+
ALLOWED_ENV_SETTINGS.each { |opt| new_env[opt] = ENV[opt] if ENV[opt] }
|
23
|
+
|
24
|
+
# Append the env to the rake command
|
25
|
+
rake_command << " #{new_env.map{|k,v| "#{k}=#{v}"}.join(" ")}"
|
26
|
+
|
27
|
+
# Run the rake command (only on one server)
|
28
|
+
run(rake_command, :once => true)
|
29
|
+
|
30
|
+
logger.info "Bugsnag deploy notification complete."
|
31
|
+
end
|
32
|
+
|
33
|
+
after "deploy", "bugsnag:deploy"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
# vi:ft=ruby
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- bugsnag.gemspec
|
108
108
|
- lib/bugsnag.rb
|
109
109
|
- lib/bugsnag/capistrano.rb
|
110
|
+
- lib/bugsnag/capistrano2.rb
|
110
111
|
- lib/bugsnag/configuration.rb
|
111
112
|
- lib/bugsnag/delay/resque.rb
|
112
113
|
- lib/bugsnag/helpers.rb
|
@@ -129,6 +130,7 @@ files:
|
|
129
130
|
- lib/bugsnag/resque.rb
|
130
131
|
- lib/bugsnag/sidekiq.rb
|
131
132
|
- lib/bugsnag/tasks.rb
|
133
|
+
- lib/bugsnag/tasks/bugsnag.cap
|
132
134
|
- lib/bugsnag/tasks/bugsnag.rake
|
133
135
|
- lib/bugsnag/version.rb
|
134
136
|
- lib/generators/bugsnag/bugsnag_generator.rb
|
@@ -163,3 +165,4 @@ signing_key:
|
|
163
165
|
specification_version: 4
|
164
166
|
summary: Ruby notifier for bugsnag.com
|
165
167
|
test_files: []
|
168
|
+
has_rdoc:
|