capistrano-new-relic 0.0.2 → 0.0.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 +8 -8
- data/lib/capistrano-new-relic.rb +12 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTU1ZDYyNTU1ZDMyMjkxMWRkYzU5OGY4YmMyZWYwNDU3OWI1YjZjMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzZmOWM5NGExYzE2YTIwZTc5YWFkOGY3OWRjZDgxNzc5MGYzMzVmYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTE1OTdiMDdjOTNhMjIxNjgyZTNjNmI1ODY0OTAyMzAyNjU1YzRlM2RjZmZj
|
10
|
+
Yzk5NjBhNDJlY2Y4NjZhMDViOTQ0ZTM3ZGUwNjc4Zjk3ZDZiNTVhY2VkNzYy
|
11
|
+
YzgyNjAxYWFiZDE5YWZkNjdlMjhkOTQwZTkwZjRjY2IwNDgyY2M=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTZlNTE1MGYyOTc4YjVjYzE1YzRjNGNmZTczNjNjMzExMDQ1NjkwOGZmNDI1
|
14
|
+
OTg3MzRkNzk5YjQwZmI4OTkyM2ZiOTFjYzk5NDE2Yzg2NTE0NWJmYzQ1YjY1
|
15
|
+
Zjc5NGJmMjgwNTUwNDlmYzUzNzgzNDQ2NjUwMDczYWVjZWI2Njk=
|
data/lib/capistrano-new-relic.rb
CHANGED
@@ -27,16 +27,19 @@ Capistrano::Configuration.instance.load do
|
|
27
27
|
current_rev = capture("cd #{latest_release}; git rev-parse HEAD").strip()
|
28
28
|
previous_rev = capture("cd #{previous_release}; git rev-parse HEAD").strip()
|
29
29
|
changelog = capture("cd #{latest_release}; git log --oneline #{previous_rev}..#{current_rev}")
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
-d "deployment[
|
35
|
-
-d "deployment[
|
36
|
-
-d "deployment[
|
37
|
-
|
38
|
-
|
30
|
+
tmp_file_name = current_rev + '-' + previous_rev + '-changelog'
|
31
|
+
File.open(tmp_file_name, 'w') { |file| file.write("deployment[changelog]=#{changelog}")}
|
32
|
+
run_locally %Q{\
|
33
|
+
curl -s -H "x-api-key:#{new_relic_api_key}"\
|
34
|
+
-d "deployment[app_name]=#{new_relic_app_name}"\
|
35
|
+
-d "deployment[description]=Deploy #{application}/#{branch} to #{deploy_env}"\
|
36
|
+
-d "deployment[user]=#{local_user} <#{local_user_email}>"\
|
37
|
+
-d "deployment[revision]=#{current_rev}"\
|
38
|
+
--data-binary @#{tmp_file_name}\
|
39
|
+
https://rpm.newrelic.com/deployments.xml\
|
40
|
+
>nul 2>&1\
|
39
41
|
}
|
42
|
+
File.unlink(tmp_file_name)
|
40
43
|
end
|
41
44
|
end
|
42
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-new-relic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gunnar Lium
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Capistrano recipe to notify New Relic after deploying code
|
14
14
|
email:
|