capistrano-newrelic 0.0.2 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 723fc95d6a7cec329f472b25d96d8fa9b03edb1d
4
- data.tar.gz: d39fd429989885c87d2c5da4a5e6e0413f1bc2f8
3
+ metadata.gz: f671e500e6119b40f92a3c5b45716302689adff7
4
+ data.tar.gz: c4b606d0ce5165b24064326d4f9a93e0022827d6
5
5
  SHA512:
6
- metadata.gz: c9deae636da50d44bc443149282fa749506edb4679680bf991f7779d459ce5f3cc332bef7ae443da03db07c12e13527a6c19bc2684ed1c19b4e69bef684d4377
7
- data.tar.gz: c8a452f129c452957af276c30061023c6885dfcddd7e710d95573d835939e9540c2b42209ea35097e938f7e07139ac96a887c50bcefd07fe7a55245d13aac68a
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
- Mandatory options:
29
- :newrelic_license_key
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
 
@@ -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.0'
19
+ spec.add_dependency 'capistrano', '~> 3.0'
20
20
  spec.add_dependency 'newrelic_rpm'
21
21
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module NewRelic
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.6'
4
4
  end
5
5
  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
- :appname => fetch(:newrelic_appname),
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.2
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: 2013-11-28 00:00:00.000000000 Z
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.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.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: []