appsignal 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/agent.yml +35 -35
- data/lib/appsignal/cli/install.rb +1 -13
- data/lib/appsignal/config.rb +7 -33
- data/lib/appsignal/transaction.rb +1 -20
- data/lib/appsignal/version.rb +1 -1
- data/resources/appsignal.yml.erb +0 -5
- data/spec/lib/appsignal/cli/install_spec.rb +0 -33
- data/spec/lib/appsignal/config_spec.rb +0 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94769b5fa8923878f0bf0b9aa6cee8eb4369b59a
|
4
|
+
data.tar.gz: 73b22d4abec0b901146828b0260fe2b78af87fec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55e2d6076ab03a05c1f99a675cf295da6f58e1f79d59e7c059f541a365c6e99274ee168d528ac3196f451cebd608c462f0b00c324ef7906aac6caa928ea66467
|
7
|
+
data.tar.gz: 5a449893cff0d75f63cfc9969f4e7f2720f1031d1ad431c478748a4a9b549389052373a525654184b51337fca0559fcc5efa1d431df84586ae6524850653df71
|
data/CHANGELOG.md
CHANGED
data/ext/agent.yml
CHANGED
@@ -1,64 +1,64 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: e509c90
|
3
3
|
triples:
|
4
4
|
x86_64-darwin:
|
5
5
|
static:
|
6
|
-
checksum:
|
7
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
6
|
+
checksum: f80f79f80afee3bdfb5f09f58503e6912fe14b74311baf07ac4f888f645e1b0d
|
7
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-darwin-all-static.tar.gz
|
8
8
|
dynamic:
|
9
|
-
checksum:
|
10
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
9
|
+
checksum: 934b6dbc77e706475dc564ec1fee87d6b97ada27233cfb4a92abaa42cc8f06ed
|
10
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-darwin-all-dynamic.tar.gz
|
11
11
|
universal-darwin:
|
12
12
|
static:
|
13
|
-
checksum:
|
14
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
13
|
+
checksum: f80f79f80afee3bdfb5f09f58503e6912fe14b74311baf07ac4f888f645e1b0d
|
14
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-darwin-all-static.tar.gz
|
15
15
|
dynamic:
|
16
|
-
checksum:
|
17
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
16
|
+
checksum: 934b6dbc77e706475dc564ec1fee87d6b97ada27233cfb4a92abaa42cc8f06ed
|
17
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-darwin-all-dynamic.tar.gz
|
18
18
|
i686-linux:
|
19
19
|
static:
|
20
|
-
checksum:
|
21
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
20
|
+
checksum: 8f93646fe4d9769d7f132d7bd2fae4ef48cd12daff341b58e142ac4a29ff3cd0
|
21
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-i686-linux-all-static.tar.gz
|
22
22
|
dynamic:
|
23
|
-
checksum:
|
24
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
23
|
+
checksum: 4e5ef5e2432ec5c0fc895d1cf97ee2d0e990e45c63369c2cd0c6bf4dbed621f8
|
24
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-i686-linux-all-dynamic.tar.gz
|
25
25
|
x86-linux:
|
26
26
|
static:
|
27
|
-
checksum:
|
28
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
27
|
+
checksum: 8f93646fe4d9769d7f132d7bd2fae4ef48cd12daff341b58e142ac4a29ff3cd0
|
28
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-i686-linux-all-static.tar.gz
|
29
29
|
dynamic:
|
30
|
-
checksum:
|
31
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
30
|
+
checksum: 4e5ef5e2432ec5c0fc895d1cf97ee2d0e990e45c63369c2cd0c6bf4dbed621f8
|
31
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-i686-linux-all-dynamic.tar.gz
|
32
32
|
i686-linux-musl:
|
33
33
|
static:
|
34
|
-
checksum:
|
35
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
34
|
+
checksum: 460de28c80c8e892ed7b21e9e2c8fe14027a4de36145735c09df393904aac90b
|
35
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-i686-linux-musl-all-static.tar.gz
|
36
36
|
x86-linux-musl:
|
37
37
|
static:
|
38
|
-
checksum:
|
39
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
38
|
+
checksum: 460de28c80c8e892ed7b21e9e2c8fe14027a4de36145735c09df393904aac90b
|
39
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-i686-linux-musl-all-static.tar.gz
|
40
40
|
x86_64-linux:
|
41
41
|
static:
|
42
|
-
checksum:
|
43
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
42
|
+
checksum: 0de52c7fee6e651441ff11384e25e8d5c72065e7f99997ff32babd15d7ca2317
|
43
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-linux-all-static.tar.gz
|
44
44
|
dynamic:
|
45
|
-
checksum:
|
46
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
45
|
+
checksum: 10874a13d8523de6d178b55e79ec3ff4a0c0f0e7a34c96d3731c382bcdb0ea1e
|
46
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-linux-all-dynamic.tar.gz
|
47
47
|
x86_64-linux-musl:
|
48
48
|
static:
|
49
|
-
checksum:
|
50
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
49
|
+
checksum: c49e094d2a9894c98538e11aa7e519619e08daf30d7b7ae4d38e10bb44e14084
|
50
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-linux-musl-all-static.tar.gz
|
51
51
|
x86_64-freebsd:
|
52
52
|
static:
|
53
|
-
checksum:
|
54
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
53
|
+
checksum: ad939a8919edfab55a442faebaf6095584a690e4b6a08a288ac7630b2069799c
|
54
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-freebsd-all-static.tar.gz
|
55
55
|
dynamic:
|
56
|
-
checksum:
|
57
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
56
|
+
checksum: 3027b9ecb3e839b93ac5c692a2a5b8c1c2cda57c2aaf35f912156d17015a0485
|
57
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
58
58
|
amd64-freebsd:
|
59
59
|
static:
|
60
|
-
checksum:
|
61
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
60
|
+
checksum: ad939a8919edfab55a442faebaf6095584a690e4b6a08a288ac7630b2069799c
|
61
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-freebsd-all-static.tar.gz
|
62
62
|
dynamic:
|
63
|
-
checksum:
|
64
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
63
|
+
checksum: 3027b9ecb3e839b93ac5c692a2a5b8c1c2cda57c2aaf35f912156d17015a0485
|
64
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/e509c90/appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
@@ -164,7 +164,7 @@ module Appsignal
|
|
164
164
|
puts "How do you want to configure AppSignal?"
|
165
165
|
puts " (1) a config file"
|
166
166
|
puts " (2) environment variables"
|
167
|
-
loop do
|
167
|
+
loop do
|
168
168
|
print " Choose (1/2): "
|
169
169
|
case ask_for_input
|
170
170
|
when "1"
|
@@ -176,7 +176,6 @@ module Appsignal
|
|
176
176
|
write_config_file(
|
177
177
|
:push_api_key => config[:push_api_key],
|
178
178
|
:app_name => config[:name],
|
179
|
-
:request_headers => multiline_request_headers,
|
180
179
|
:environments => environments
|
181
180
|
)
|
182
181
|
puts
|
@@ -192,7 +191,6 @@ module Appsignal
|
|
192
191
|
if name_overwritten
|
193
192
|
puts " export APPSIGNAL_APP_NAME=#{config[:name]}"
|
194
193
|
end
|
195
|
-
puts " export APPSIGNAL_REQUEST_HEADERS=#{single_line_request_headers}"
|
196
194
|
puts
|
197
195
|
puts " See the documentation for more configuration options:"
|
198
196
|
puts " http://docs.appsignal.com/gem-settings/configuration.html"
|
@@ -275,16 +273,6 @@ module Appsignal
|
|
275
273
|
def new_config
|
276
274
|
Appsignal::Config.new(Dir.pwd, "")
|
277
275
|
end
|
278
|
-
|
279
|
-
def multiline_request_headers
|
280
|
-
Appsignal::Config::SUGGESTED_REQUEST_HEADERS.map do |row|
|
281
|
-
row.map(&:inspect).join(", ")
|
282
|
-
end.join(",\n ")
|
283
|
-
end
|
284
|
-
|
285
|
-
def single_line_request_headers
|
286
|
-
Appsignal::Config::SUGGESTED_REQUEST_HEADERS.flatten.join(",")
|
287
|
-
end
|
288
276
|
end
|
289
277
|
end
|
290
278
|
end
|
data/lib/appsignal/config.rb
CHANGED
@@ -17,6 +17,13 @@ module Appsignal
|
|
17
17
|
:filter_parameters => [],
|
18
18
|
:filter_session_data => [],
|
19
19
|
:send_params => true,
|
20
|
+
:request_headers => %w[
|
21
|
+
HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING
|
22
|
+
HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_CONNECTION
|
23
|
+
CONTENT_LENGTH PATH_INFO HTTP_RANGE
|
24
|
+
REQUEST_METHOD REQUEST_URI SERVER_NAME SERVER_PORT
|
25
|
+
SERVER_PROTOCOL
|
26
|
+
],
|
20
27
|
:endpoint => "https://push.appsignal.com",
|
21
28
|
:instrument_net_http => true,
|
22
29
|
:instrument_redis => true,
|
@@ -67,14 +74,6 @@ module Appsignal
|
|
67
74
|
"APPSIGNAL_REQUEST_HEADERS" => :request_headers,
|
68
75
|
"APP_REVISION" => :revision
|
69
76
|
}.freeze
|
70
|
-
# Formatted in two-dimensional array for easy printing
|
71
|
-
SUGGESTED_REQUEST_HEADERS = [
|
72
|
-
%w[HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING],
|
73
|
-
%w[HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_CONNECTION],
|
74
|
-
%w[CONTENT_LENGTH PATH_INFO HTTP_RANGE],
|
75
|
-
%w[REQUEST_METHOD REQUEST_URI SERVER_NAME SERVER_PORT],
|
76
|
-
%w[SERVER_PROTOCOL]
|
77
|
-
].freeze
|
78
77
|
|
79
78
|
# Mapping of old and deprecated AppSignal configuration keys
|
80
79
|
DEPRECATED_CONFIG_KEY_MAPPING = {
|
@@ -197,35 +196,10 @@ module Appsignal
|
|
197
196
|
@valid = false
|
198
197
|
@logger.error "Push api key not set after loading config"
|
199
198
|
end
|
200
|
-
|
201
|
-
check_if_request_headers_option_is_set
|
202
199
|
end
|
203
200
|
|
204
201
|
private
|
205
202
|
|
206
|
-
def check_if_request_headers_option_is_set
|
207
|
-
return unless valid?
|
208
|
-
return if config_hash.key?(:request_headers) || env == "test"
|
209
|
-
|
210
|
-
multi_line_request_headers = SUGGESTED_REQUEST_HEADERS.map do |row|
|
211
|
-
row.map(&:inspect).join(", ")
|
212
|
-
end.join(",\n ")
|
213
|
-
single_line_request_headers = SUGGESTED_REQUEST_HEADERS.flatten.join(",")
|
214
|
-
|
215
|
-
puts "Warning: The `request_headers` config option was not set " \
|
216
|
-
" in the AppSignal configuration, falling back to the default list. " \
|
217
|
-
"Please explicitly list response headers to send to AppSignal in " \
|
218
|
-
"config/appsignal.yml:\n\n" \
|
219
|
-
" request_headers: [\n" \
|
220
|
-
" #{multi_line_request_headers}\n" \
|
221
|
-
"]\n\n" \
|
222
|
-
"Or set the APPSIGNAL_REQUEST_HEADERS environment variable:\n\n"\
|
223
|
-
" $ export APPSIGNAL_REQUEST_HEADERS=" \
|
224
|
-
"\"#{single_line_request_headers}\"\n\n" \
|
225
|
-
"Please check https://github.com/appsignal/appsignal-ruby/pull/406 " \
|
226
|
-
"for more information on this change."
|
227
|
-
end
|
228
|
-
|
229
203
|
def config_file
|
230
204
|
@config_file ||=
|
231
205
|
root_path.nil? ? nil : File.join(root_path, "config", "appsignal.yml")
|
@@ -10,21 +10,6 @@ module Appsignal
|
|
10
10
|
FRONTEND = "frontend".freeze
|
11
11
|
BLANK = "".freeze
|
12
12
|
|
13
|
-
# Based on what Rails uses + some variables we'd like to show
|
14
|
-
FALLBACK_REQUEST_HEADERS = %w[
|
15
|
-
CONTENT_LENGTH AUTH_TYPE GATEWAY_INTERFACE
|
16
|
-
PATH_TRANSLATED REMOTE_HOST REMOTE_IDENT REMOTE_USER REMOTE_ADDR
|
17
|
-
REQUEST_METHOD SERVER_NAME SERVER_PORT SERVER_PROTOCOL REQUEST_URI
|
18
|
-
PATH_INFO
|
19
|
-
|
20
|
-
HTTP_X_REQUEST_START HTTP_X_MIDDLEWARE_START HTTP_X_QUEUE_START
|
21
|
-
HTTP_X_QUEUE_TIME HTTP_X_HEROKU_QUEUE_WAIT_TIME HTTP_X_APPLICATION_START
|
22
|
-
HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE
|
23
|
-
HTTP_CACHE_CONTROL HTTP_CONNECTION HTTP_USER_AGENT HTTP_FROM
|
24
|
-
HTTP_NEGOTIATE HTTP_PRAGMA HTTP_REFERER HTTP_X_FORWARDED_FOR
|
25
|
-
HTTP_CLIENT_IP HTTP_RANGE
|
26
|
-
].freeze
|
27
|
-
|
28
13
|
class << self
|
29
14
|
def create(id, namespace, request, options = {})
|
30
15
|
# Allow middleware to force a new transaction
|
@@ -405,9 +390,6 @@ module Appsignal
|
|
405
390
|
# The environment of a transaction can contain a lot of information, not
|
406
391
|
# all of it useful for debugging.
|
407
392
|
#
|
408
|
-
# Only the values from the keys specified in {FALLBACK_REQUEST_HEADERS} are
|
409
|
-
# returned.
|
410
|
-
#
|
411
393
|
# @return [nil] if no environment is present.
|
412
394
|
# @return [Hash<String, Object>]
|
413
395
|
def sanitized_environment
|
@@ -415,8 +397,7 @@ module Appsignal
|
|
415
397
|
return if env.empty?
|
416
398
|
|
417
399
|
{}.tap do |out|
|
418
|
-
|
419
|
-
FALLBACK_REQUEST_HEADERS).each do |key|
|
400
|
+
Appsignal.config[:request_headers].each do |key|
|
420
401
|
out[key] = env[key] if env[key]
|
421
402
|
end
|
422
403
|
end
|
data/lib/appsignal/version.rb
CHANGED
data/resources/appsignal.yml.erb
CHANGED
@@ -6,11 +6,6 @@ default: &defaults
|
|
6
6
|
# Your app's name
|
7
7
|
name: "<%= app_name %>"
|
8
8
|
|
9
|
-
# Request headers that should be recorded per sample
|
10
|
-
request_headers: [
|
11
|
-
<%= request_headers %>
|
12
|
-
]
|
13
|
-
|
14
9
|
# Actions that should not be monitored by AppSignal
|
15
10
|
# ignore_actions:
|
16
11
|
# - ApplicationController#isup
|
@@ -39,16 +39,6 @@ describe Appsignal::CLI::Install do
|
|
39
39
|
actual.include?("export APPSIGNAL_APP_NAME=#{name}")
|
40
40
|
end
|
41
41
|
end
|
42
|
-
define :include_env_request_headers do
|
43
|
-
match do |actual|
|
44
|
-
actual.include?(
|
45
|
-
"export APPSIGNAL_REQUEST_HEADERS=HTTP_ACCEPT,HTTP_ACCEPT_CHARSET," \
|
46
|
-
"HTTP_ACCEPT_ENCODING,HTTP_ACCEPT_LANGUAGE,HTTP_CACHE_CONTROL," \
|
47
|
-
"HTTP_CONNECTION,CONTENT_LENGTH,PATH_INFO,HTTP_RANGE," \
|
48
|
-
"REQUEST_METHOD,REQUEST_URI,SERVER_NAME,SERVER_PORT,SERVER_PROTOCOL"
|
49
|
-
)
|
50
|
-
end
|
51
|
-
end
|
52
42
|
|
53
43
|
define :configure_app_name do |name|
|
54
44
|
match do |file_contents|
|
@@ -60,17 +50,6 @@ describe Appsignal::CLI::Install do
|
|
60
50
|
file_contents =~ /^ push_api_key: "#{key}"/
|
61
51
|
end
|
62
52
|
end
|
63
|
-
define :configure_request_headers do
|
64
|
-
match do |file_contents|
|
65
|
-
file_contents =~ /^ request_headers: \[/ &&
|
66
|
-
file_contents =~ /^ "HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING",/ &&
|
67
|
-
file_contents =~ /^ "HTTP_ACCEPT_LANGUAGE", "HTTP_CACHE_CONTROL", "HTTP_CONNECTION",/ &&
|
68
|
-
file_contents =~ /^ "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE",/ &&
|
69
|
-
file_contents =~ /^ "REQUEST_METHOD", "REQUEST_URI", "SERVER_NAME", "SERVER_PORT",/ &&
|
70
|
-
file_contents =~ /^ "SERVER_PROTOCOL"/ &&
|
71
|
-
file_contents =~ /^ \]/
|
72
|
-
end
|
73
|
-
end
|
74
53
|
define :configure_environment do |env|
|
75
54
|
match do |file_contents|
|
76
55
|
file_contents =~ /^#{env}:$/
|
@@ -293,7 +272,6 @@ describe Appsignal::CLI::Install do
|
|
293
272
|
expect(output).to include_file_config
|
294
273
|
expect(config_file).to configure_app_name(app_name)
|
295
274
|
expect(config_file).to configure_push_api_key(push_api_key)
|
296
|
-
expect(config_file).to configure_request_headers
|
297
275
|
expect(config_file).to_not configure_environment("development")
|
298
276
|
expect(config_file).to_not configure_environment("staging")
|
299
277
|
expect(config_file).to configure_environment("production")
|
@@ -321,7 +299,6 @@ describe Appsignal::CLI::Install do
|
|
321
299
|
|
322
300
|
expect(output).to include_env_push_api_key(push_api_key)
|
323
301
|
expect(output).to_not include_env_app_name
|
324
|
-
expect(output).to include_env_request_headers
|
325
302
|
end
|
326
303
|
|
327
304
|
it "completes the installation" do
|
@@ -345,7 +322,6 @@ describe Appsignal::CLI::Install do
|
|
345
322
|
expect(output).to include_file_config
|
346
323
|
expect(config_file).to configure_app_name(app_name)
|
347
324
|
expect(config_file).to configure_push_api_key(push_api_key)
|
348
|
-
expect(config_file).to configure_request_headers
|
349
325
|
expect(config_file).to configure_environment("development")
|
350
326
|
expect(config_file).to configure_environment("staging")
|
351
327
|
expect(config_file).to configure_environment("production")
|
@@ -390,7 +366,6 @@ describe Appsignal::CLI::Install do
|
|
390
366
|
|
391
367
|
expect(output).to include_env_push_api_key(push_api_key)
|
392
368
|
expect(output).to include_env_app_name(app_name)
|
393
|
-
expect(output).to include_env_request_headers
|
394
369
|
end
|
395
370
|
|
396
371
|
it "completes the installation" do
|
@@ -417,7 +392,6 @@ describe Appsignal::CLI::Install do
|
|
417
392
|
expect(output).to include_file_config
|
418
393
|
expect(config_file).to configure_app_name(app_name)
|
419
394
|
expect(config_file).to configure_push_api_key(push_api_key)
|
420
|
-
expect(config_file).to configure_request_headers
|
421
395
|
expect(config_file).to configure_environment("development")
|
422
396
|
expect(config_file).to configure_environment("staging")
|
423
397
|
expect(config_file).to configure_environment("production")
|
@@ -463,7 +437,6 @@ describe Appsignal::CLI::Install do
|
|
463
437
|
|
464
438
|
expect(output).to include_env_push_api_key(push_api_key)
|
465
439
|
expect(output).to include_env_app_name(app_name)
|
466
|
-
expect(output).to include_env_request_headers
|
467
440
|
end
|
468
441
|
|
469
442
|
it "completes the installation" do
|
@@ -487,7 +460,6 @@ describe Appsignal::CLI::Install do
|
|
487
460
|
expect(output).to include_file_config
|
488
461
|
expect(config_file).to configure_app_name(app_name)
|
489
462
|
expect(config_file).to configure_push_api_key(push_api_key)
|
490
|
-
expect(config_file).to configure_request_headers
|
491
463
|
expect(config_file).to configure_environment("development")
|
492
464
|
expect(config_file).to configure_environment("staging")
|
493
465
|
expect(config_file).to configure_environment("production")
|
@@ -532,7 +504,6 @@ describe Appsignal::CLI::Install do
|
|
532
504
|
|
533
505
|
expect(output).to include_env_push_api_key(push_api_key)
|
534
506
|
expect(output).to include_env_app_name(app_name)
|
535
|
-
expect(output).to include_env_request_headers
|
536
507
|
end
|
537
508
|
|
538
509
|
it "completes the installation" do
|
@@ -556,7 +527,6 @@ describe Appsignal::CLI::Install do
|
|
556
527
|
expect(output).to include_file_config
|
557
528
|
expect(config_file).to configure_app_name(app_name)
|
558
529
|
expect(config_file).to configure_push_api_key(push_api_key)
|
559
|
-
expect(config_file).to configure_request_headers
|
560
530
|
expect(config_file).to configure_environment("development")
|
561
531
|
expect(config_file).to configure_environment("staging")
|
562
532
|
expect(config_file).to configure_environment("production")
|
@@ -601,7 +571,6 @@ describe Appsignal::CLI::Install do
|
|
601
571
|
|
602
572
|
expect(output).to include_env_push_api_key(push_api_key)
|
603
573
|
expect(output).to include_env_app_name(app_name)
|
604
|
-
expect(output).to include_env_request_headers
|
605
574
|
end
|
606
575
|
|
607
576
|
it "completes the installation" do
|
@@ -625,7 +594,6 @@ describe Appsignal::CLI::Install do
|
|
625
594
|
expect(output).to include_file_config
|
626
595
|
expect(config_file).to configure_app_name(app_name)
|
627
596
|
expect(config_file).to configure_push_api_key(push_api_key)
|
628
|
-
expect(config_file).to configure_request_headers
|
629
597
|
expect(config_file).to configure_environment("development")
|
630
598
|
expect(config_file).to configure_environment("staging")
|
631
599
|
expect(config_file).to configure_environment("production")
|
@@ -657,7 +625,6 @@ describe Appsignal::CLI::Install do
|
|
657
625
|
"\e[31mWarning:\e[0m We could not detect which framework you are using."
|
658
626
|
expect(output).to_not include_env_push_api_key
|
659
627
|
expect(output).to_not include_env_app_name
|
660
|
-
expect(output).to_not include_env_request_headers
|
661
628
|
expect(File.exist?(config_file_path)).to be_falsy
|
662
629
|
end
|
663
630
|
end
|
@@ -658,37 +658,5 @@ describe Appsignal::Config do
|
|
658
658
|
end
|
659
659
|
end
|
660
660
|
end
|
661
|
-
|
662
|
-
describe "request_headers option validation" do
|
663
|
-
let(:out_stream) { std_stream }
|
664
|
-
let(:output) { out_stream.read }
|
665
|
-
let(:push_api_key) { "abc" }
|
666
|
-
let(:config_options) { { :push_api_key => push_api_key } }
|
667
|
-
before do
|
668
|
-
capture_stdout(out_stream) do
|
669
|
-
config.validate
|
670
|
-
end
|
671
|
-
end
|
672
|
-
|
673
|
-
context "with missing request_headers config option" do
|
674
|
-
let(:config_options) { { :push_api_key => "abc" } }
|
675
|
-
|
676
|
-
it "logs a warning" do
|
677
|
-
is_expected.to eq(true)
|
678
|
-
expect(output).to include "Warning: The `request_headers` config " \
|
679
|
-
"option was not set in the AppSignal configuration"
|
680
|
-
end
|
681
|
-
end
|
682
|
-
|
683
|
-
context "with request_headers config option present" do
|
684
|
-
let(:config_options) { { :push_api_key => "abc", :request_headers => [] } }
|
685
|
-
|
686
|
-
it "logs no warning" do
|
687
|
-
is_expected.to eq(true)
|
688
|
-
expect(output).to_not include "Warning: The `request_headers` config " \
|
689
|
-
"option was not set in the AppSignal configuration"
|
690
|
-
end
|
691
|
-
end
|
692
|
-
end
|
693
661
|
end
|
694
662
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-05-
|
12
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|