instrumental_agent 0.12.5 → 0.12.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/instrumental_agent.gemspec +1 -1
- data/lib/instrumental/agent.rb +10 -1
- data/lib/instrumental/version.rb +1 -1
- data/spec/agent_spec.rb +6 -1
- metadata +41 -19
- checksums.yaml +0 -7
data/CHANGELOG.md
CHANGED
data/instrumental_agent.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_development_dependency(%q<rake>, [">= 0"])
|
20
20
|
s.add_development_dependency(%q<rspec>, ["~> 2.0"])
|
21
21
|
s.add_development_dependency(%q<fuubar>, [">= 0"])
|
22
|
-
if RUBY_VERSION >= "1.
|
22
|
+
if RUBY_VERSION >= "1.9.2"
|
23
23
|
s.add_development_dependency(%q<guard>, [">= 0"])
|
24
24
|
s.add_development_dependency(%q<guard-rspec>, [">= 0"])
|
25
25
|
s.add_development_dependency(%q<growl>, [">= 0"])
|
data/lib/instrumental/agent.rb
CHANGED
@@ -13,6 +13,7 @@ module Instrumental
|
|
13
13
|
REPLY_TIMEOUT = 10
|
14
14
|
CONNECT_TIMEOUT = 20
|
15
15
|
EXIT_FLUSH_TIMEOUT = 5
|
16
|
+
HOSTNAME = Socket.gethostbyname(Socket.gethostname).first rescue Socket.gethostname
|
16
17
|
|
17
18
|
attr_accessor :host, :port, :synchronous, :queue
|
18
19
|
attr_reader :connection, :enabled
|
@@ -333,7 +334,15 @@ module Instrumental
|
|
333
334
|
@socket.connect Socket.pack_sockaddr_in(port, ipv4_address_for_host(host, port))
|
334
335
|
end
|
335
336
|
logger.info "connected to collector at #{host}:#{port}"
|
336
|
-
|
337
|
+
hello_options = {
|
338
|
+
"version" => "ruby/instrumental_agent/#{VERSION}",
|
339
|
+
"hostname" => HOSTNAME,
|
340
|
+
"pid" => Process.pid,
|
341
|
+
"runtime" => "#{RUBY_ENGINE}/#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}",
|
342
|
+
"platform" => RUBY_PLATFORM
|
343
|
+
}.to_a.flatten.map { |v| v.to_s.gsub(/\s+/, "_") }.join(" ")
|
344
|
+
|
345
|
+
send_with_reply_timeout "hello #{hello_options}"
|
337
346
|
send_with_reply_timeout "authenticate #{@api_key}"
|
338
347
|
@failures = 0
|
339
348
|
loop do
|
data/lib/instrumental/version.rb
CHANGED
data/spec/agent_spec.rb
CHANGED
@@ -82,7 +82,12 @@ describe Instrumental::Agent, "enabled" do
|
|
82
82
|
it "should announce itself, and include version" do
|
83
83
|
@agent.increment("test.foo")
|
84
84
|
wait
|
85
|
-
@server.commands[0].should =~ /hello
|
85
|
+
@server.commands[0].should =~ /hello .*/
|
86
|
+
@server.commands[0].should =~ / version /
|
87
|
+
@server.commands[0].should =~ / hostname /
|
88
|
+
@server.commands[0].should =~ / pid /
|
89
|
+
@server.commands[0].should =~ / runtime /
|
90
|
+
@server.commands[0].should =~ / platform /
|
86
91
|
end
|
87
92
|
|
88
93
|
it "should authenticate using the token" do
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instrumental_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.6
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Elijah Miller
|
@@ -11,25 +12,28 @@ authors:
|
|
11
12
|
autorequire:
|
12
13
|
bindir: bin
|
13
14
|
cert_chain: []
|
14
|
-
date:
|
15
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
15
16
|
dependencies:
|
16
17
|
- !ruby/object:Gem::Dependency
|
17
18
|
name: rake
|
18
19
|
requirement: !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
19
21
|
requirements:
|
20
|
-
- - '>='
|
22
|
+
- - ! '>='
|
21
23
|
- !ruby/object:Gem::Version
|
22
24
|
version: '0'
|
23
25
|
type: :development
|
24
26
|
prerelease: false
|
25
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
26
29
|
requirements:
|
27
|
-
- - '>='
|
30
|
+
- - ! '>='
|
28
31
|
- !ruby/object:Gem::Version
|
29
32
|
version: '0'
|
30
33
|
- !ruby/object:Gem::Dependency
|
31
34
|
name: rspec
|
32
35
|
requirement: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
33
37
|
requirements:
|
34
38
|
- - ~>
|
35
39
|
- !ruby/object:Gem::Version
|
@@ -37,6 +41,7 @@ dependencies:
|
|
37
41
|
type: :development
|
38
42
|
prerelease: false
|
39
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
40
45
|
requirements:
|
41
46
|
- - ~>
|
42
47
|
- !ruby/object:Gem::Version
|
@@ -44,71 +49,81 @@ dependencies:
|
|
44
49
|
- !ruby/object:Gem::Dependency
|
45
50
|
name: fuubar
|
46
51
|
requirement: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
47
53
|
requirements:
|
48
|
-
- - '>='
|
54
|
+
- - ! '>='
|
49
55
|
- !ruby/object:Gem::Version
|
50
56
|
version: '0'
|
51
57
|
type: :development
|
52
58
|
prerelease: false
|
53
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
54
61
|
requirements:
|
55
|
-
- - '>='
|
62
|
+
- - ! '>='
|
56
63
|
- !ruby/object:Gem::Version
|
57
64
|
version: '0'
|
58
65
|
- !ruby/object:Gem::Dependency
|
59
66
|
name: guard
|
60
67
|
requirement: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
61
69
|
requirements:
|
62
|
-
- - '>='
|
70
|
+
- - ! '>='
|
63
71
|
- !ruby/object:Gem::Version
|
64
72
|
version: '0'
|
65
73
|
type: :development
|
66
74
|
prerelease: false
|
67
75
|
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
68
77
|
requirements:
|
69
|
-
- - '>='
|
78
|
+
- - ! '>='
|
70
79
|
- !ruby/object:Gem::Version
|
71
80
|
version: '0'
|
72
81
|
- !ruby/object:Gem::Dependency
|
73
82
|
name: guard-rspec
|
74
83
|
requirement: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
75
85
|
requirements:
|
76
|
-
- - '>='
|
86
|
+
- - ! '>='
|
77
87
|
- !ruby/object:Gem::Version
|
78
88
|
version: '0'
|
79
89
|
type: :development
|
80
90
|
prerelease: false
|
81
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
82
93
|
requirements:
|
83
|
-
- - '>='
|
94
|
+
- - ! '>='
|
84
95
|
- !ruby/object:Gem::Version
|
85
96
|
version: '0'
|
86
97
|
- !ruby/object:Gem::Dependency
|
87
98
|
name: growl
|
88
99
|
requirement: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
89
101
|
requirements:
|
90
|
-
- - '>='
|
102
|
+
- - ! '>='
|
91
103
|
- !ruby/object:Gem::Version
|
92
104
|
version: '0'
|
93
105
|
type: :development
|
94
106
|
prerelease: false
|
95
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
96
109
|
requirements:
|
97
|
-
- - '>='
|
110
|
+
- - ! '>='
|
98
111
|
- !ruby/object:Gem::Version
|
99
112
|
version: '0'
|
100
113
|
- !ruby/object:Gem::Dependency
|
101
114
|
name: rb-fsevent
|
102
115
|
requirement: !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
103
117
|
requirements:
|
104
|
-
- - '>='
|
118
|
+
- - ! '>='
|
105
119
|
- !ruby/object:Gem::Version
|
106
120
|
version: '0'
|
107
121
|
type: :development
|
108
122
|
prerelease: false
|
109
123
|
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
110
125
|
requirements:
|
111
|
-
- - '>='
|
126
|
+
- - ! '>='
|
112
127
|
- !ruby/object:Gem::Version
|
113
128
|
version: '0'
|
114
129
|
description: Track anything.
|
@@ -139,26 +154,33 @@ files:
|
|
139
154
|
homepage: http://github.com/fastestforward/instrumental_agent
|
140
155
|
licenses:
|
141
156
|
- MIT
|
142
|
-
metadata: {}
|
143
157
|
post_install_message:
|
144
158
|
rdoc_options: []
|
145
159
|
require_paths:
|
146
160
|
- lib
|
147
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
148
163
|
requirements:
|
149
|
-
- - '>='
|
164
|
+
- - ! '>='
|
150
165
|
- !ruby/object:Gem::Version
|
151
166
|
version: '0'
|
167
|
+
segments:
|
168
|
+
- 0
|
169
|
+
hash: 3923760126860057892
|
152
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
153
172
|
requirements:
|
154
|
-
- - '>='
|
173
|
+
- - ! '>='
|
155
174
|
- !ruby/object:Gem::Version
|
156
175
|
version: '0'
|
176
|
+
segments:
|
177
|
+
- 0
|
178
|
+
hash: 3923760126860057892
|
157
179
|
requirements: []
|
158
180
|
rubyforge_project:
|
159
|
-
rubygems_version:
|
181
|
+
rubygems_version: 1.8.23
|
160
182
|
signing_key:
|
161
|
-
specification_version:
|
183
|
+
specification_version: 3
|
162
184
|
summary: Agent for reporting data to instrumentalapp.com
|
163
185
|
test_files:
|
164
186
|
- spec/agent_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 779ead6e56ce501d17a3b1815c99824eef288364
|
4
|
-
data.tar.gz: eb44e872f1d23d3875be7fdb03f7ad4ed3ec9a5b
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 3ea9054ae4693f939eb67437fdfcc36a9cc5f72db292ec78ce6efeceb58a9a6fb574f4623fb206b5b879268f1a599599cca93dc6157f0901b32a414d6fc4ae12
|
7
|
-
data.tar.gz: 30d73879f2040dcd1348b790ebe62ed916f31d7a33dc6ebd686c91dbd2ffc461d2677c9e809079a14b34bbeae3cae881eb7006de2b839c725f612252d0403ab6
|