appsignal 1.1.5.beta.2 → 1.1.5.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/appsignal.rb +1 -3
- data/lib/appsignal/config.rb +5 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +8 -0
- data/spec/lib/appsignal_spec.rb +0 -14
- 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: 8ab24c0a488648acac563bdbf764376900b0d28b
|
4
|
+
data.tar.gz: 5458e8dbfbcc4a16a50c58eda06769c78eca10a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d2f97e01145a80d25aede13c6679380feff0778b2ee3bd1e0433d6be0d08d819a847e26459db65bbaa83b88cebd50e575bc4cc50484db1b4e7645b0c7e3330b
|
7
|
+
data.tar.gz: 0bd95af4c2c48c75a27e47d4a14f4a4acc063afdd03ccb3b2da648510f343c25722b706faf8c3a9c7d19d3e360d4b6abedea0b467ce5a0e7e88e2f07498afaad
|
data/CHANGELOG.md
CHANGED
data/lib/appsignal.rb
CHANGED
@@ -207,9 +207,7 @@ module Appsignal
|
|
207
207
|
|
208
208
|
def start_logger(path_arg=nil)
|
209
209
|
path = Appsignal.config ? Appsignal.config.log_file_path : nil
|
210
|
-
if path &&
|
211
|
-
!ENV['DYNO'] &&
|
212
|
-
!ENV['SHELLYCLOUD_DEPLOYMENT']
|
210
|
+
if path && !ENV['DYNO']
|
213
211
|
@logger = Logger.new(path)
|
214
212
|
@logger.formatter = log_formatter
|
215
213
|
else
|
data/lib/appsignal/config.rb
CHANGED
@@ -78,7 +78,11 @@ module Appsignal
|
|
78
78
|
|
79
79
|
def log_file_path
|
80
80
|
path = config_hash[:log_path] || root_path
|
81
|
-
File.
|
81
|
+
if File.writable?(path)
|
82
|
+
File.join(File.realpath(path), 'appsignal.log')
|
83
|
+
else
|
84
|
+
'/tmp/appsignal.log'
|
85
|
+
end
|
82
86
|
rescue Errno::ENOENT
|
83
87
|
'/tmp/appsignal.log'
|
84
88
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -43,6 +43,14 @@ describe Appsignal::Config do
|
|
43
43
|
its(:log_file_path) { should end_with('/tmp/appsignal.log') }
|
44
44
|
|
45
45
|
context "if it is not writable" do
|
46
|
+
before { FileUtils.mkdir_p('/tmp/not-writable', :mode => 0555) }
|
47
|
+
|
48
|
+
let(:config) { project_fixture_config('production', :log_path => '/tmp/not-writable') }
|
49
|
+
|
50
|
+
its(:log_file_path) { should == '/tmp/appsignal.log' }
|
51
|
+
end
|
52
|
+
|
53
|
+
context "if it does not exist" do
|
46
54
|
let(:config) { project_fixture_config('production', :log_path => '/non-existing') }
|
47
55
|
|
48
56
|
its(:log_file_path) { should == '/tmp/appsignal.log' }
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -489,20 +489,6 @@ describe Appsignal do
|
|
489
489
|
end
|
490
490
|
end
|
491
491
|
|
492
|
-
context "when we're on Shelly Cloud" do
|
493
|
-
before do
|
494
|
-
ENV['SHELLYCLOUD_DEPLOYMENT'] = 'true'
|
495
|
-
end
|
496
|
-
after { ENV.delete('SHELLYCLOUD_DEPLOYMENT') }
|
497
|
-
|
498
|
-
it "should log to stdout" do
|
499
|
-
Appsignal.start_logger
|
500
|
-
Appsignal.logger.error('Log to stdout')
|
501
|
-
out_stream.string.should include 'appsignal: Log to stdout'
|
502
|
-
out_stream.string.should include 'Log something'
|
503
|
-
end
|
504
|
-
end
|
505
|
-
|
506
492
|
context "when there is no in memory log" do
|
507
493
|
it "should not crash" do
|
508
494
|
Appsignal.in_memory_log = nil
|
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: 1.1.5.beta.
|
4
|
+
version: 1.1.5.beta.3
|
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: 2016-04-
|
12
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|