yell 2.0.5 → 2.0.6
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/Gemfile +3 -2
- data/README.md +2 -1
- data/lib/yell/event.rb +2 -0
- data/lib/yell/version.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/threaded/yell_spec.rb +3 -3
- data/spec/yell/adapters/datefile_spec.rb +7 -7
- data/spec/yell/dsl_spec.rb +5 -5
- data/spec/yell/level_spec.rb +70 -70
- data/spec/yell/repository_spec.rb +17 -9
- data/spec/yell_spec.rb +22 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e19cff458ef6d40231f8f0e2096bb279649618d
|
4
|
+
data.tar.gz: d78ed9263a83bc5e9b2b23aa58f351b8ded2b416
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b80248ab8e02027cf36edc8ab49bdb3195c4af5abf60c0bcfac16da4810b753fb6c749004c00221c5bfbfe85ef553e93a822b53e907ba1bd5aeb629ff931f549
|
7
|
+
data.tar.gz: 52967711166a7aa4e0c9a5df4dc99e01f75708b38c6847393dcf30036af9e55b409f74f3e043d78f2dd4d6316a860d78c75cdbf95616044d0e548b6e63d00114
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -203,6 +203,7 @@ logger.debug 'Served asset /logo.png - 304 Not Modified (0ms)'
|
|
203
203
|
|
204
204
|
### Additional Adapters
|
205
205
|
[Syslog](https://github.com/rudionrails/yell/wiki/additional-adapters-syslog)
|
206
|
+
[syslog-sd](https://github.com/raymond-wells/yell-adapters-syslogsd)
|
206
207
|
[Graylog2 (GELF)](https://github.com/rudionrails/yell/wiki/additional-adapters-gelf)
|
207
208
|
[Fluentd](https://github.com/red5studios/yell-adapters-fluentd)
|
208
209
|
|
@@ -215,5 +216,5 @@ You can find further examples and additional adapters in the [wiki](https://gith
|
|
215
216
|
or have a look into the examples folder.
|
216
217
|
|
217
218
|
|
218
|
-
Copyright © 2011-
|
219
|
+
Copyright © 2011-2015 Rudolf Schmidt, released under the MIT license
|
219
220
|
|
data/lib/yell/event.rb
CHANGED
data/lib/yell/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/threaded/yell_spec.rb
CHANGED
@@ -19,7 +19,7 @@ describe "running Yell multi-threaded" do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it "should write all messages" do
|
22
|
-
lines.
|
22
|
+
expect(lines).to eq(10*threads)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -51,7 +51,7 @@ describe "running Yell multi-threaded" do
|
|
51
51
|
Thread.new { 10.times { Yell['threaded'].info count } }
|
52
52
|
end.each(&:join)
|
53
53
|
|
54
|
-
lines.
|
54
|
+
expect(lines).to eq(10*threads)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -83,7 +83,7 @@ describe "running Yell multi-threaded" do
|
|
83
83
|
sleep 0.3
|
84
84
|
|
85
85
|
files = Dir[ fixture_path + '/*.*.log' ]
|
86
|
-
files.size.
|
86
|
+
expect(files.size).to eq(2)
|
87
87
|
|
88
88
|
# files.last.should match( datefile_pattern_for(Time.now) ) # today
|
89
89
|
# files.first.should match( datefile_pattern_for(Time.now-86400) ) # yesterday
|
@@ -28,7 +28,7 @@ describe Yell::Adapters::Datefile do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should be output to filename with date pattern" do
|
31
|
-
expect(File.exist?(today_filename)).to
|
31
|
+
expect(File.exist?(today_filename)).to be_truthy
|
32
32
|
|
33
33
|
expect(today_lines.size).to eq(2) # includes header line
|
34
34
|
expect(today_lines.last).to match(message)
|
@@ -37,7 +37,7 @@ describe Yell::Adapters::Datefile do
|
|
37
37
|
it "should output to the same file" do
|
38
38
|
adapter.write(event)
|
39
39
|
|
40
|
-
expect(File.exist?(today_filename)).to
|
40
|
+
expect(File.exist?(today_filename)).to be_truthy
|
41
41
|
expect(today_lines.size).to eq(3) # includes header line
|
42
42
|
end
|
43
43
|
|
@@ -55,7 +55,7 @@ describe Yell::Adapters::Datefile do
|
|
55
55
|
end
|
56
56
|
|
57
57
|
it "should rotate file" do
|
58
|
-
expect(File.exist?(tomorrow_filename)).to
|
58
|
+
expect(File.exist?(tomorrow_filename)).to be_truthy
|
59
59
|
|
60
60
|
expect(tomorrow_lines.size).to eq(2) # includes header line
|
61
61
|
expect(tomorrow_lines.last).to match(message)
|
@@ -89,14 +89,14 @@ describe Yell::Adapters::Datefile do
|
|
89
89
|
end
|
90
90
|
|
91
91
|
it "should be created on the original filename" do
|
92
|
-
expect(File.symlink?(filename)).to
|
92
|
+
expect(File.symlink?(filename)).to be_truthy
|
93
93
|
expect(File.readlink(filename)).to eq(today_filename)
|
94
94
|
end
|
95
95
|
|
96
96
|
it "should be recreated upon rollover" do
|
97
97
|
Timecop.freeze(tomorrow) { adapter.write(event) }
|
98
98
|
|
99
|
-
expect(File.symlink?(filename)).to
|
99
|
+
expect(File.symlink?(filename)).to be_truthy
|
100
100
|
expect(File.readlink(filename)).to eq(tomorrow_filename)
|
101
101
|
end
|
102
102
|
end
|
@@ -109,7 +109,7 @@ describe Yell::Adapters::Datefile do
|
|
109
109
|
it "should not create the sylink the original filename" do
|
110
110
|
adapter.write( event )
|
111
111
|
|
112
|
-
expect(File.symlink?(filename)).to
|
112
|
+
expect(File.symlink?(filename)).to be_falsey
|
113
113
|
end
|
114
114
|
end
|
115
115
|
end
|
@@ -129,7 +129,7 @@ describe Yell::Adapters::Datefile do
|
|
129
129
|
it "should be rewritten upon rollover" do
|
130
130
|
Timecop.freeze(tomorrow) { adapter.write(event) }
|
131
131
|
|
132
|
-
expect(File.symlink?(filename)).to
|
132
|
+
expect(File.symlink?(filename)).to be_truthy
|
133
133
|
expect(File.readlink(filename)).to eq(tomorrow_filename)
|
134
134
|
end
|
135
135
|
end
|
data/spec/yell/dsl_spec.rb
CHANGED
@@ -23,7 +23,7 @@ describe "Yell Adapter DSL spec" do
|
|
23
23
|
|
24
24
|
it "should perform #setup" do
|
25
25
|
adapter = DSLAdapter.new
|
26
|
-
expect(adapter.test_setup?).to
|
26
|
+
expect(adapter.test_setup?).to be_truthy
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should perform #write" do
|
@@ -31,18 +31,18 @@ describe "Yell Adapter DSL spec" do
|
|
31
31
|
stub(event).level { 0 }
|
32
32
|
|
33
33
|
adapter = DSLAdapter.new
|
34
|
-
expect(adapter.test_write?).to
|
34
|
+
expect(adapter.test_write?).to be_falsey
|
35
35
|
|
36
36
|
adapter.write(event)
|
37
|
-
expect(adapter.test_write?).to
|
37
|
+
expect(adapter.test_write?).to be_truthy
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should perform #close" do
|
41
41
|
adapter = DSLAdapter.new
|
42
|
-
expect(adapter.test_close?).to
|
42
|
+
expect(adapter.test_close?).to be_falsey
|
43
43
|
|
44
44
|
adapter.close
|
45
|
-
expect(adapter.test_close?).to
|
45
|
+
expect(adapter.test_close?).to be_truthy
|
46
46
|
end
|
47
47
|
|
48
48
|
end
|
data/spec/yell/level_spec.rb
CHANGED
@@ -6,11 +6,11 @@ describe Yell::Level do
|
|
6
6
|
let(:level) { Yell::Level.new }
|
7
7
|
|
8
8
|
it "should should return correctly" do
|
9
|
-
expect(level.at?(:debug)).to
|
10
|
-
expect(level.at?(:info)).to
|
11
|
-
expect(level.at?(:warn)).to
|
12
|
-
expect(level.at?(:error)).to
|
13
|
-
expect(level.at?(:fatal)).to
|
9
|
+
expect(level.at?(:debug)).to be_truthy
|
10
|
+
expect(level.at?(:info)).to be_truthy
|
11
|
+
expect(level.at?(:warn)).to be_truthy
|
12
|
+
expect(level.at?(:error)).to be_truthy
|
13
|
+
expect(level.at?(:fatal)).to be_truthy
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -21,11 +21,11 @@ describe Yell::Level do
|
|
21
21
|
let(:severity) { :debug }
|
22
22
|
|
23
23
|
it "should should return correctly" do
|
24
|
-
expect(level.at?(:debug)).to
|
25
|
-
expect(level.at?(:info)).to
|
26
|
-
expect(level.at?(:warn)).to
|
27
|
-
expect(level.at?(:error)).to
|
28
|
-
expect(level.at?(:fatal)).to
|
24
|
+
expect(level.at?(:debug)).to be_truthy
|
25
|
+
expect(level.at?(:info)).to be_truthy
|
26
|
+
expect(level.at?(:warn)).to be_truthy
|
27
|
+
expect(level.at?(:error)).to be_truthy
|
28
|
+
expect(level.at?(:fatal)).to be_truthy
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -33,11 +33,11 @@ describe Yell::Level do
|
|
33
33
|
let(:severity) { :info }
|
34
34
|
|
35
35
|
it "should should return correctly" do
|
36
|
-
expect(level.at?(:debug)).to
|
37
|
-
expect(level.at?(:info)).to
|
38
|
-
expect(level.at?(:warn)).to
|
39
|
-
expect(level.at?(:error)).to
|
40
|
-
expect(level.at?(:fatal)).to
|
36
|
+
expect(level.at?(:debug)).to be_falsey
|
37
|
+
expect(level.at?(:info)).to be_truthy
|
38
|
+
expect(level.at?(:warn)).to be_truthy
|
39
|
+
expect(level.at?(:error)).to be_truthy
|
40
|
+
expect(level.at?(:fatal)).to be_truthy
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -45,11 +45,11 @@ describe Yell::Level do
|
|
45
45
|
let(:severity) { :warn }
|
46
46
|
|
47
47
|
it "should should return correctly" do
|
48
|
-
expect(level.at?(:debug)).to
|
49
|
-
expect(level.at?(:info)).to
|
50
|
-
expect(level.at?(:warn)).to
|
51
|
-
expect(level.at?(:error)).to
|
52
|
-
expect(level.at?(:fatal)).to
|
48
|
+
expect(level.at?(:debug)).to be_falsey
|
49
|
+
expect(level.at?(:info)).to be_falsey
|
50
|
+
expect(level.at?(:warn)).to be_truthy
|
51
|
+
expect(level.at?(:error)).to be_truthy
|
52
|
+
expect(level.at?(:fatal)).to be_truthy
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -57,11 +57,11 @@ describe Yell::Level do
|
|
57
57
|
let(:severity) { :error }
|
58
58
|
|
59
59
|
it "should should return correctly" do
|
60
|
-
expect(level.at?(:debug)).to
|
61
|
-
expect(level.at?(:info)).to
|
62
|
-
expect(level.at?(:warn)).to
|
63
|
-
expect(level.at?(:error)).to
|
64
|
-
expect(level.at?(:fatal)).to
|
60
|
+
expect(level.at?(:debug)).to be_falsey
|
61
|
+
expect(level.at?(:info)).to be_falsey
|
62
|
+
expect(level.at?(:warn)).to be_falsey
|
63
|
+
expect(level.at?(:error)).to be_truthy
|
64
|
+
expect(level.at?(:fatal)).to be_truthy
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
@@ -69,11 +69,11 @@ describe Yell::Level do
|
|
69
69
|
let(:severity) { :fatal }
|
70
70
|
|
71
71
|
it "should should return correctly" do
|
72
|
-
expect(level.at?(:debug)).to
|
73
|
-
expect(level.at?(:info)).to
|
74
|
-
expect(level.at?(:warn)).to
|
75
|
-
expect(level.at?(:error)).to
|
76
|
-
expect(level.at?(:fatal)).to
|
72
|
+
expect(level.at?(:debug)).to be_falsey
|
73
|
+
expect(level.at?(:info)).to be_falsey
|
74
|
+
expect(level.at?(:warn)).to be_falsey
|
75
|
+
expect(level.at?(:error)).to be_falsey
|
76
|
+
expect(level.at?(:fatal)).to be_truthy
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
@@ -85,11 +85,11 @@ describe Yell::Level do
|
|
85
85
|
let(:severity) { 'error' }
|
86
86
|
|
87
87
|
it "should should return correctly" do
|
88
|
-
expect(level.at?(:debug)).to
|
89
|
-
expect(level.at?(:info)).to
|
90
|
-
expect(level.at?(:warn)).to
|
91
|
-
expect(level.at?(:error)).to
|
92
|
-
expect(level.at?(:fatal)).to
|
88
|
+
expect(level.at?(:debug)).to be_falsey
|
89
|
+
expect(level.at?(:info)).to be_falsey
|
90
|
+
expect(level.at?(:warn)).to be_falsey
|
91
|
+
expect(level.at?(:error)).to be_truthy
|
92
|
+
expect(level.at?(:fatal)).to be_truthy
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
@@ -97,11 +97,11 @@ describe Yell::Level do
|
|
97
97
|
let(:severity) { 'gte.info lte.error' }
|
98
98
|
|
99
99
|
it "should should return correctly" do
|
100
|
-
expect(level.at?(:debug)).to
|
101
|
-
expect(level.at?(:info)).to
|
102
|
-
expect(level.at?(:warn)).to
|
103
|
-
expect(level.at?(:error)).to
|
104
|
-
expect(level.at?(:fatal)).to
|
100
|
+
expect(level.at?(:debug)).to be_falsey
|
101
|
+
expect(level.at?(:info)).to be_truthy
|
102
|
+
expect(level.at?(:warn)).to be_truthy
|
103
|
+
expect(level.at?(:error)).to be_truthy
|
104
|
+
expect(level.at?(:fatal)).to be_falsey
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
@@ -109,11 +109,11 @@ describe Yell::Level do
|
|
109
109
|
let(:severity) { 'gt.info lt.error' }
|
110
110
|
|
111
111
|
it "should be valid" do
|
112
|
-
expect(level.at?(:debug)).to
|
113
|
-
expect(level.at?(:info)).to
|
114
|
-
expect(level.at?(:warn)).to
|
115
|
-
expect(level.at?(:error)).to
|
116
|
-
expect(level.at?(:fatal)).to
|
112
|
+
expect(level.at?(:debug)).to be_falsey
|
113
|
+
expect(level.at?(:info)).to be_falsey
|
114
|
+
expect(level.at?(:warn)).to be_truthy
|
115
|
+
expect(level.at?(:error)).to be_falsey
|
116
|
+
expect(level.at?(:fatal)).to be_falsey
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
@@ -121,11 +121,11 @@ describe Yell::Level do
|
|
121
121
|
let(:severity) { 'at.info at.error' }
|
122
122
|
|
123
123
|
it "should be valid" do
|
124
|
-
expect(level.at?(:debug)).to
|
125
|
-
expect(level.at?(:info)).to
|
126
|
-
expect(level.at?(:warn)).to
|
127
|
-
expect(level.at?(:error)).to
|
128
|
-
expect(level.at?(:fatal)).to
|
124
|
+
expect(level.at?(:debug)).to be_falsey
|
125
|
+
expect(level.at?(:info)).to be_truthy
|
126
|
+
expect(level.at?(:warn)).to be_falsey
|
127
|
+
expect(level.at?(:error)).to be_truthy
|
128
|
+
expect(level.at?(:fatal)).to be_falsey
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
@@ -133,11 +133,11 @@ describe Yell::Level do
|
|
133
133
|
let(:severity) { 'gte.error at.debug' }
|
134
134
|
|
135
135
|
it "should be valid" do
|
136
|
-
expect(level.at?(:debug)).to
|
137
|
-
expect(level.at?(:info)).to
|
138
|
-
expect(level.at?(:warn)).to
|
139
|
-
expect(level.at?(:error)).to
|
140
|
-
expect(level.at?(:fatal)).to
|
136
|
+
expect(level.at?(:debug)).to be_truthy
|
137
|
+
expect(level.at?(:info)).to be_falsey
|
138
|
+
expect(level.at?(:warn)).to be_falsey
|
139
|
+
expect(level.at?(:error)).to be_truthy
|
140
|
+
expect(level.at?(:fatal)).to be_truthy
|
141
141
|
end
|
142
142
|
end
|
143
143
|
end
|
@@ -146,11 +146,11 @@ describe Yell::Level do
|
|
146
146
|
let(:level) { Yell::Level.new( [:debug, :warn, :fatal] ) }
|
147
147
|
|
148
148
|
it "should return correctly" do
|
149
|
-
expect(level.at?(:debug)).to
|
150
|
-
expect(level.at?(:info)).to
|
151
|
-
expect(level.at?(:warn)).to
|
152
|
-
expect(level.at?(:error)).to
|
153
|
-
expect(level.at?(:fatal)).to
|
149
|
+
expect(level.at?(:debug)).to be_truthy
|
150
|
+
expect(level.at?(:info)).to be_falsey
|
151
|
+
expect(level.at?(:warn)).to be_truthy
|
152
|
+
expect(level.at?(:error)).to be_falsey
|
153
|
+
expect(level.at?(:fatal)).to be_truthy
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
@@ -158,11 +158,11 @@ describe Yell::Level do
|
|
158
158
|
let(:level) { Yell::Level.new( (1..3) ) }
|
159
159
|
|
160
160
|
it "should return correctly" do
|
161
|
-
expect(level.at?(:debug)).to
|
162
|
-
expect(level.at?(:info)).to
|
163
|
-
expect(level.at?(:warn)).to
|
164
|
-
expect(level.at?(:error)).to
|
165
|
-
expect(level.at?(:fatal)).to
|
161
|
+
expect(level.at?(:debug)).to be_falsey
|
162
|
+
expect(level.at?(:info)).to be_truthy
|
163
|
+
expect(level.at?(:warn)).to be_truthy
|
164
|
+
expect(level.at?(:error)).to be_truthy
|
165
|
+
expect(level.at?(:fatal)).to be_falsey
|
166
166
|
end
|
167
167
|
end
|
168
168
|
|
@@ -170,11 +170,11 @@ describe Yell::Level do
|
|
170
170
|
let(:level) { Yell::Level.new(:warn) }
|
171
171
|
|
172
172
|
it "should return correctly" do
|
173
|
-
expect(level.at?(:debug)).to
|
174
|
-
expect(level.at?(:info)).to
|
175
|
-
expect(level.at?(:warn)).to
|
176
|
-
expect(level.at?(:error)).to
|
177
|
-
expect(level.at?(:fatal)).to
|
173
|
+
expect(level.at?(:debug)).to be_falsey
|
174
|
+
expect(level.at?(:info)).to be_falsey
|
175
|
+
expect(level.at?(:warn)).to be_truthy
|
176
|
+
expect(level.at?(:error)).to be_truthy
|
177
|
+
expect(level.at?(:fatal)).to be_truthy
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
@@ -14,7 +14,9 @@ describe Yell::Repository do
|
|
14
14
|
context "when logger with :name exists" do
|
15
15
|
let!(:logger) { Yell.new(:stdout, :name => name) }
|
16
16
|
|
17
|
-
it
|
17
|
+
it "should eq(logger)" do
|
18
|
+
expect(subject).to eq(logger)
|
19
|
+
end
|
18
20
|
end
|
19
21
|
|
20
22
|
context "given a Class" do
|
@@ -22,29 +24,33 @@ describe Yell::Repository do
|
|
22
24
|
|
23
25
|
it "should raise with the correct :name when logger not found" do
|
24
26
|
mock.proxy(Yell::LoggerNotFound).new(String)
|
25
|
-
|
27
|
+
expect{ Yell::Repository[String] }.to raise_error(Yell::LoggerNotFound)
|
26
28
|
end
|
27
29
|
|
28
30
|
it "should return the logger" do
|
29
|
-
Yell::Repository[Numeric].
|
31
|
+
expect(Yell::Repository[Numeric]).to eq(logger)
|
30
32
|
end
|
31
33
|
|
32
34
|
it "should return the logger when superclass has it defined" do
|
33
|
-
Yell::Repository[Integer].
|
35
|
+
expect(Yell::Repository[Integer]).to eq(logger)
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
40
|
context ".[]=" do
|
39
41
|
before { Yell::Repository[name] = logger }
|
40
|
-
it
|
42
|
+
it "should eq(logger)" do
|
43
|
+
expect(subject).to eq(logger)
|
44
|
+
end
|
41
45
|
end
|
42
46
|
|
43
47
|
context ".[]= with a named logger" do
|
44
48
|
let!(:logger) { Yell.new(:stdout, :name => name) }
|
45
49
|
before { Yell::Repository[name] = logger }
|
46
50
|
|
47
|
-
it
|
51
|
+
it "should eq(logger)" do
|
52
|
+
expect(subject).to eq(logger)
|
53
|
+
end
|
48
54
|
end
|
49
55
|
|
50
56
|
context ".[]= with a named logger of a different name" do
|
@@ -53,8 +59,8 @@ describe Yell::Repository do
|
|
53
59
|
before { Yell::Repository[name] = logger }
|
54
60
|
|
55
61
|
it "should add logger to both repositories" do
|
56
|
-
Yell::Repository[name].
|
57
|
-
Yell::Repository[other].
|
62
|
+
expect(Yell::Repository[name]).to eq(logger)
|
63
|
+
expect(Yell::Repository[other]).to eq(logger)
|
58
64
|
end
|
59
65
|
end
|
60
66
|
|
@@ -63,7 +69,9 @@ describe Yell::Repository do
|
|
63
69
|
subject { Yell::Repository.loggers }
|
64
70
|
before { Yell::Repository[name] = logger }
|
65
71
|
|
66
|
-
it
|
72
|
+
it "should eq(loggers)" do
|
73
|
+
expect(subject).to eq(loggers)
|
74
|
+
end
|
67
75
|
end
|
68
76
|
|
69
77
|
end
|
data/spec/yell_spec.rb
CHANGED
@@ -5,7 +5,9 @@ describe Yell do
|
|
5
5
|
|
6
6
|
subject { logger }
|
7
7
|
|
8
|
-
it
|
8
|
+
it "should be_kind_of Yell::Logger" do
|
9
|
+
expect(subject).to be_a_kind_of(Yell::Logger)
|
10
|
+
end
|
9
11
|
|
10
12
|
it "should raise AdapterNotFound when adapter cant be loaded" do
|
11
13
|
expect {
|
@@ -15,12 +17,16 @@ describe Yell do
|
|
15
17
|
|
16
18
|
context ".level" do
|
17
19
|
subject { Yell.level }
|
18
|
-
it
|
20
|
+
it "should be_kind_of Yell::Level" do
|
21
|
+
expect(subject).to be_a_kind_of(Yell::Level)
|
22
|
+
end
|
19
23
|
end
|
20
24
|
|
21
25
|
context ".format" do
|
22
26
|
subject { Yell.format( "%m" ) }
|
23
|
-
it
|
27
|
+
it "should be_kind_of Yell::Formatter" do
|
28
|
+
expect(subject).to be_a_kind_of(Yell::Formatter)
|
29
|
+
end
|
24
30
|
end
|
25
31
|
|
26
32
|
context ".load!" do
|
@@ -30,7 +36,9 @@ describe Yell do
|
|
30
36
|
mock(Yell::Configuration).load!('yell.yml') { {} }
|
31
37
|
end
|
32
38
|
|
33
|
-
it
|
39
|
+
it "should be_kind_of Yell::Logger" do
|
40
|
+
expect(subject).to be_a_kind_of(Yell::Logger)
|
41
|
+
end
|
34
42
|
end
|
35
43
|
|
36
44
|
context ".[]" do
|
@@ -57,7 +65,7 @@ describe Yell do
|
|
57
65
|
subject { Yell.env }
|
58
66
|
|
59
67
|
it "should default to YELL_ENV" do
|
60
|
-
subject.
|
68
|
+
expect(subject).to eq('test')
|
61
69
|
end
|
62
70
|
|
63
71
|
context "fallback to RACK_ENV" do
|
@@ -70,7 +78,9 @@ describe Yell do
|
|
70
78
|
|
71
79
|
after { ENV.delete 'RACK_ENV' }
|
72
80
|
|
73
|
-
it
|
81
|
+
it "should == 'rack'" do
|
82
|
+
expect(subject).to eq('rack')
|
83
|
+
end
|
74
84
|
end
|
75
85
|
|
76
86
|
context "fallback to RAILS_ENV" do
|
@@ -84,7 +94,9 @@ describe Yell do
|
|
84
94
|
|
85
95
|
after { ENV.delete 'RAILS_ENV' }
|
86
96
|
|
87
|
-
it
|
97
|
+
it "should == 'rails'" do
|
98
|
+
expect(subject).to eq('rails')
|
99
|
+
end
|
88
100
|
end
|
89
101
|
|
90
102
|
context "fallback to development" do
|
@@ -94,7 +106,9 @@ describe Yell do
|
|
94
106
|
stub(ENV).key?('RAILS_ENV') { false }
|
95
107
|
end
|
96
108
|
|
97
|
-
it
|
109
|
+
it "should == 'development'" do
|
110
|
+
expect(subject).to eq('development')
|
111
|
+
end
|
98
112
|
end
|
99
113
|
end
|
100
114
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rudolf Schmidt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Yell - Your Extensible Logging Library. Define multiple adapters, various
|
14
14
|
log level combinations or message formatting options like you've never done before
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project: yell
|
104
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.5.1
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Yell - Your Extensible Logging Library
|