capistrano-newrelic 0.0.2 → 0.0.6
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/README.md +9 -4
- data/capistrano-newrelic.gemspec +3 -3
- data/lib/capistrano/newrelic/version.rb +1 -1
- data/lib/capistrano/tasks/newrelic.cap +12 -10
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f671e500e6119b40f92a3c5b45716302689adff7
|
4
|
+
data.tar.gz: c4b606d0ce5165b24064326d4f9a93e0022827d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 924deae3e2ca372a5d973ffe721c5172b623760711f0e90692806994f0f80907f3fd50cc744e60d131f4fdf4c7246968174090e1b6bd19332da0f9a768407bf4
|
7
|
+
data.tar.gz: 5bb08a867a597af16b91d9227eaf46028ebeb3342089fa591a632ec5b4a96e3eb2cab44b3ebc18fd7020a0ba09268e7f69657a0bf3e23680da5467c4928faa47
|
data/README.md
CHANGED
@@ -20,13 +20,18 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
require 'capistrano/newrelic'
|
22
22
|
|
23
|
+
License key and application name are retrieved from newrelic.yml.
|
23
24
|
|
24
25
|
Configurable options, shown here with defaults:
|
25
|
-
set :newrelic_env, fetch(:rack_env, fetch(:rails_env, 'production'))
|
26
|
-
set :newrelic_appname, fetch(:application)
|
27
26
|
|
28
|
-
|
29
|
-
:
|
27
|
+
# New Relic environment to deploy to. Sets config based on section of newrelic.yml
|
28
|
+
set :newrelic_env, fetch(:stage, fetch(:rack_env, fetch(:rails_env, 'production')))
|
29
|
+
# Deployment changelog
|
30
|
+
set :newrelic_changelog, ""
|
31
|
+
# Deployment description
|
32
|
+
set :newrelic_desc, ""
|
33
|
+
# Deploy user if set will be used instead of the VCS user.
|
34
|
+
set :newrelic_deploy_user
|
30
35
|
|
31
36
|
## Contributing
|
32
37
|
|
data/capistrano-newrelic.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'capistrano/newrelic/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'capistrano-newrelic'
|
8
8
|
spec.version = Capistrano::NewRelic::VERSION
|
9
|
-
spec.authors = ['Abdelkader Boudih']
|
10
|
-
spec.email = ['terminale@gmail.com']
|
9
|
+
spec.authors = ['Abdelkader Boudih', 'Jay Chung', 'James Kahn']
|
10
|
+
spec.email = ['terminale@gmail.com', 'woosubc@gmail.com', 'james@liet.net']
|
11
11
|
spec.description = %q{New Relic integration for Capistrano 3}
|
12
12
|
spec.summary = %q{New Relic integration for Capistrano}
|
13
13
|
spec.homepage = 'https://github.com/seuros/capistrano-newrelic'
|
@@ -16,6 +16,6 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
|
-
spec.add_dependency 'capistrano', '~> 3.0
|
19
|
+
spec.add_dependency 'capistrano', '~> 3.0'
|
20
20
|
spec.add_dependency 'newrelic_rpm'
|
21
21
|
end
|
@@ -4,8 +4,7 @@ end
|
|
4
4
|
|
5
5
|
namespace :load do
|
6
6
|
task :defaults do
|
7
|
-
set :newrelic_env, fetch(:rack_env, fetch(:rails_env, 'production'))
|
8
|
-
set :newrelic_appname, fetch(:application)
|
7
|
+
set :newrelic_env, fetch(:stage, fetch(:rack_env, fetch(:rails_env, 'production')))
|
9
8
|
end
|
10
9
|
end
|
11
10
|
|
@@ -14,25 +13,28 @@ namespace :newrelic do
|
|
14
13
|
task :notice_deployment do
|
15
14
|
set :newrelic_appname, fetch(:application)
|
16
15
|
run_locally do
|
17
|
-
|
18
16
|
deploy_options = {
|
19
17
|
:environment => fetch(:newrelic_env),
|
20
18
|
:revision => release_timestamp.strip,
|
21
19
|
:changelog => fetch(:newrelic_changelog),
|
22
20
|
:description => fetch(:newrelic_desc),
|
23
|
-
:
|
24
|
-
:user => capture ('git config user.name').strip,
|
25
|
-
:license_key => fetch(:newrelic_license_key)
|
21
|
+
:user => fetch(:newrelic_deploy_user)
|
26
22
|
}
|
27
23
|
|
24
|
+
if deploy_options[:user].nil?
|
25
|
+
case fetch(:scm)
|
26
|
+
when :git
|
27
|
+
git_user = capture('git config user.name', raise_on_non_zero_exit: false).strip
|
28
|
+
deploy_options[:user] = git_user unless git_user.empty?
|
29
|
+
else
|
30
|
+
debug '[Capistrano-newrelic] : Unsupported SCM , user not set. Please set :newrelic_deploy_user'
|
31
|
+
end
|
32
|
+
end
|
28
33
|
|
29
34
|
debug "Uploading deployment to New Relic"
|
30
35
|
deployment = NewRelic::Cli::Deployments.new deploy_options
|
31
36
|
deployment.run
|
32
37
|
info "Uploaded deployment information to New Relic"
|
33
38
|
end
|
34
|
-
|
35
39
|
end
|
36
|
-
|
37
|
-
|
38
|
-
end
|
40
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-newrelic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
8
|
+
- Jay Chung
|
9
|
+
- James Kahn
|
8
10
|
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date:
|
13
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: capistrano
|
@@ -16,14 +18,14 @@ dependencies:
|
|
16
18
|
requirements:
|
17
19
|
- - "~>"
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0
|
21
|
+
version: '3.0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
requirements:
|
24
26
|
- - "~>"
|
25
27
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0
|
28
|
+
version: '3.0'
|
27
29
|
- !ruby/object:Gem::Dependency
|
28
30
|
name: newrelic_rpm
|
29
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -41,6 +43,8 @@ dependencies:
|
|
41
43
|
description: New Relic integration for Capistrano 3
|
42
44
|
email:
|
43
45
|
- terminale@gmail.com
|
46
|
+
- woosubc@gmail.com
|
47
|
+
- james@liet.net
|
44
48
|
executables: []
|
45
49
|
extensions: []
|
46
50
|
extra_rdoc_files: []
|