capistrano-graphite 0.1.2 → 0.2.0
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 +3 -3
- data/capistrano-graphite.gemspec +2 -2
- data/lib/capistrano/graphite/version.rb +1 -1
- data/lib/capistrano/graphite.rb +7 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 512c233bfce7e7036369cb49ecb2d46213bd649f
|
4
|
+
data.tar.gz: 6c3f94242c0c73749664c5b0eee45e0488a01d17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c38dfb78e037082feabc4b35e81d2885b9eabf6f6f858527f4d1dbf3c3f7e5ad5f3dd2ad65a9c834d247843dcbbd8a7aa83cb2c174f90ddfc437c5d86f6a6168
|
7
|
+
data.tar.gz: 9c82781ebabcdf39ef5807ba2cf634a94dff97984009fb4874c3f964aac1bd5616bcb211aca24065abf72b246486f55eccb0b4b37e1bd60d988f47e945836138
|
data/README.md
CHANGED
@@ -35,13 +35,13 @@ Add the following line to your ```Capfile```.
|
|
35
35
|
require "capistrano/graphite"
|
36
36
|
|
37
37
|
### Configurable options
|
38
|
-
Path to your graphite instance
|
38
|
+
Path to your graphite instance. Port and user:password are optional.
|
39
39
|
|
40
|
-
set :graphite_url, "http://example.com:8000/events/"
|
40
|
+
set: :graphite_url, "http://user:password@example.com:8000/events/"
|
41
41
|
|
42
42
|
Disable sending events for a particular stage by setting the following to 0
|
43
43
|
|
44
|
-
set :graphite_enable_events, 0
|
44
|
+
set :graphite_enable_events, 0 # This is set to 1 by default
|
45
45
|
|
46
46
|
### Test that it's working
|
47
47
|
You can run the following on it's own assuming you have configured the graphite url
|
data/capistrano-graphite.gemspec
CHANGED
@@ -11,8 +11,8 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = %q{A gem for pushing graphite events via capistrano v3
|
12
12
|
deployment}
|
13
13
|
spec.description = %q{This gem plugs into the deploy task in capistrano to
|
14
|
-
help provide visibility
|
15
|
-
|
14
|
+
help provide visibility into when deployments and
|
15
|
+
rollbacks occured.}
|
16
16
|
spec.homepage = "https://github.com/scottsuch/capistrano-graphite"
|
17
17
|
spec.license = "MIT"
|
18
18
|
|
data/lib/capistrano/graphite.rb
CHANGED
@@ -14,14 +14,18 @@ class GraphiteInterface
|
|
14
14
|
else
|
15
15
|
warn "Not sending an event: graphite_enable_events was assigned an "\
|
16
16
|
"invalid value."
|
17
|
-
return
|
17
|
+
return 0
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.post_event(action)
|
22
22
|
uri = URI::parse("#{fetch(:graphite_url)}")
|
23
|
-
Net::HTTP.
|
24
|
-
|
23
|
+
req = Net::HTTP::Post.new(uri.path)
|
24
|
+
req.basic_auth(uri.user, uri.password) if uri.user
|
25
|
+
req.body = "{\"what\": \"#{action} #{fetch(:application)} in #{fetch(:stage)}\", \"tags\": \"#{fetch(:application)},#{fetch(:stage)},#{release_timestamp},#{action}\", \"data\": \"#{fetch(:local_user)}\"}"
|
26
|
+
|
27
|
+
Net::HTTP.start(uri.host, uri.port) do |http|
|
28
|
+
http.request(req)
|
25
29
|
end
|
26
30
|
end
|
27
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-graphite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- scottsuch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,8 +54,8 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
description: |-
|
56
56
|
This gem plugs into the deploy task in capistrano to
|
57
|
-
help provide visibility
|
58
|
-
|
57
|
+
help provide visibility into when deployments and
|
58
|
+
rollbacks occured.
|
59
59
|
email:
|
60
60
|
- sgorsuch@gmail.com
|
61
61
|
executables: []
|