rack-logs 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ LOG ENTRY 1234
@@ -0,0 +1 @@
1
+ LOG ENTRY 5678
@@ -1,3 +1,4 @@
1
+ require 'timeout'
1
2
  require 'rack/logs/viewer'
2
3
 
3
4
  describe 'Rack::Logs::Viewer' do
@@ -16,6 +17,14 @@ describe 'Rack::Logs::Viewer' do
16
17
  let(:viewer) { Rack::Logs::Viewer.new config }
17
18
  let(:contents) { response[2].inject("") { |contents, fragment| contents + fragment } }
18
19
 
20
+ around do |example|
21
+ begin
22
+ Timeout::timeout(0.01) { example.run }
23
+ rescue Timeout::Error
24
+ fail "Performance regression, even large files should be under .01s"
25
+ end
26
+ end
27
+
19
28
  shared_examples_for "a rack logs response" do
20
29
  it 'returns a rack response' do
21
30
  expect(response[0]).to be_a Fixnum
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Rowe
@@ -103,9 +103,12 @@ files:
103
103
  - spec/integration/accessing_an_individual_log_spec.rb
104
104
  - spec/integration/running_rack_logs_via_rack_spec.rb
105
105
  - spec/spec_helper.rb
106
+ - spec/support/fixtures/log/large_log.doge
106
107
  - spec/support/fixtures/log/my_log.doge
108
+ - spec/support/fixtures/log/my_log_file.log
107
109
  - spec/support/fixtures/log/not_log.txt
108
110
  - spec/support/fixtures/log/other_log.doge
111
+ - spec/support/fixtures/other_log_file.log
109
112
  - spec/support/fixtures/tmp/secret_file.txt
110
113
  - spec/unit/rack/logs/config_spec.rb
111
114
  - spec/unit/rack/logs/viewer_spec.rb
@@ -139,9 +142,12 @@ test_files:
139
142
  - spec/integration/accessing_an_individual_log_spec.rb
140
143
  - spec/integration/running_rack_logs_via_rack_spec.rb
141
144
  - spec/spec_helper.rb
145
+ - spec/support/fixtures/log/large_log.doge
142
146
  - spec/support/fixtures/log/my_log.doge
147
+ - spec/support/fixtures/log/my_log_file.log
143
148
  - spec/support/fixtures/log/not_log.txt
144
149
  - spec/support/fixtures/log/other_log.doge
150
+ - spec/support/fixtures/other_log_file.log
145
151
  - spec/support/fixtures/tmp/secret_file.txt
146
152
  - spec/unit/rack/logs/config_spec.rb
147
153
  - spec/unit/rack/logs/viewer_spec.rb