peastash 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/lib/peastash.rb +2 -1
- data/lib/peastash/version.rb +1 -1
- data/peastash.gemspec +1 -1
- data/spec/dummy-3.2/config/environments/production.rb +1 -1
- data/spec/dummy-3.2/config/environments/test.rb +1 -1
- data/spec/dummy-3.2/config/environments/test_with_specific_position.rb +1 -1
- data/spec/dummy-3.2/config/environments/test_without_peastash.rb +38 -0
- data/spec/dummy/config/environments/production.rb +1 -1
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/config/environments/test_with_specific_position.rb +1 -1
- data/spec/dummy/config/environments/test_without_peastash.rb +40 -0
- data/spec/peastash/middleware_spec.rb +1 -1
- data/spec/peastash_spec.rb +12 -2
- metadata +11 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7093d147f2f4f5d620fe1ab7663422ff56aea2d7
|
4
|
+
data.tar.gz: 37fe31079bc47006adfa959ec658f47237373485
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99136f85637eb3a2dd3185b4be323a98b822d6a374958fee002d41e61dbf700b931dad7bbf48943627a3470d36c218a24e0fbe096e740dcdbad0754da6dd1e02
|
7
|
+
data.tar.gz: ffe35c9ecc91458b034b52b1d8fd7a6acdac4fad0689441771e2f2d3840f2bf4fdef632399f584827da5fc38d19ee01478cda1b886c55eabefa876ee60cf359f
|
data/.travis.yml
CHANGED
data/lib/peastash.rb
CHANGED
data/lib/peastash/version.rb
CHANGED
data/peastash.gemspec
CHANGED
@@ -28,5 +28,5 @@ Gem::Specification.new do |gem|
|
|
28
28
|
gem.add_development_dependency "simplecov", '~> 0.7.1'
|
29
29
|
gem.add_development_dependency "timecop"
|
30
30
|
gem.add_development_dependency "pry"
|
31
|
-
gem.add_development_dependency "rails"
|
31
|
+
gem.add_development_dependency "rails", '~> 4.2'
|
32
32
|
end
|
@@ -9,7 +9,7 @@ Dummy32::Application.configure do
|
|
9
9
|
config.action_controller.perform_caching = true
|
10
10
|
|
11
11
|
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
-
config.
|
12
|
+
config.serve_static_files = false
|
13
13
|
|
14
14
|
# Compress JavaScripts and CSS
|
15
15
|
config.assets.compress = true
|
@@ -8,7 +8,7 @@ Dummy32::Application.configure do
|
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
10
|
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.
|
11
|
+
config.serve_static_files = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
14
|
# Log error messages when you accidentally call methods on nil
|
@@ -8,7 +8,7 @@ Dummy32::Application.configure do
|
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
10
|
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.
|
11
|
+
config.serve_static_files = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
14
|
# Log error messages when you accidentally call methods on nil
|
@@ -0,0 +1,38 @@
|
|
1
|
+
Dummy32::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_files = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
config.peastash.enabled = false
|
38
|
+
end
|
@@ -20,7 +20,7 @@ Rails.application.configure do
|
|
20
20
|
# config.action_dispatch.rack_cache = true
|
21
21
|
|
22
22
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
-
config.
|
23
|
+
config.serve_static_files = false
|
24
24
|
|
25
25
|
# Compress JavaScripts and CSS.
|
26
26
|
config.assets.js_compressor = :uglifier
|
@@ -13,7 +13,7 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.
|
16
|
+
config.serve_static_files = true
|
17
17
|
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
@@ -13,7 +13,7 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.
|
16
|
+
config.serve_static_files = true
|
17
17
|
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Raises error for missing translations
|
38
|
+
# config.action_view.raise_on_missing_translations = true
|
39
|
+
config.peastash.enabled = false
|
40
|
+
end
|
data/spec/peastash_spec.rb
CHANGED
@@ -133,6 +133,7 @@ describe Peastash do
|
|
133
133
|
before { Peastash.safe! }
|
134
134
|
|
135
135
|
it 'rescues errors silently' do
|
136
|
+
allow(STDERR).to receive(:puts)
|
136
137
|
expect {
|
137
138
|
Peastash.safely { 1 / 0 }
|
138
139
|
}.not_to raise_error
|
@@ -143,7 +144,11 @@ describe Peastash do
|
|
143
144
|
end
|
144
145
|
|
145
146
|
it "puts the error to STDERR for easy debugging" do
|
146
|
-
expect(STDERR).to receive(:puts)
|
147
|
+
expect(STDERR).to receive(:puts).with("#<ZeroDivisionError: divided by 0>")
|
148
|
+
expect(STDERR).to receive(:puts) do |args|
|
149
|
+
expect(args.join).to include("spec/peastash_spec.rb")
|
150
|
+
expect(args.join).to include(":in `safely'")
|
151
|
+
end
|
147
152
|
Peastash.safely { 1 / 0 }
|
148
153
|
end
|
149
154
|
end
|
@@ -152,13 +157,18 @@ describe Peastash do
|
|
152
157
|
before { Peastash.unsafe! }
|
153
158
|
|
154
159
|
it 'doesn\'t rescue errors silently' do
|
160
|
+
allow(STDERR).to receive(:puts)
|
155
161
|
expect {
|
156
162
|
Peastash.safely { 1 / 0 }
|
157
163
|
}.to raise_error(ZeroDivisionError)
|
158
164
|
end
|
159
165
|
|
160
166
|
it "puts the error to STDERR for easy debugging" do
|
161
|
-
expect(STDERR).to receive(:puts)
|
167
|
+
expect(STDERR).to receive(:puts).with("#<ZeroDivisionError: divided by 0>")
|
168
|
+
expect(STDERR).to receive(:puts) do |args|
|
169
|
+
expect(args.join).to include("spec/peastash_spec.rb")
|
170
|
+
expect(args.join).to include(":in `safely'")
|
171
|
+
end
|
162
172
|
|
163
173
|
expect {
|
164
174
|
Peastash.safely { 1 / 0 }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peastash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Boisard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-event
|
@@ -140,16 +140,16 @@ dependencies:
|
|
140
140
|
name: rails
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '4.2'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '4.2'
|
153
153
|
description: Peastash allows you to instrument your code with the ELK stack easily.
|
154
154
|
email:
|
155
155
|
- boisard.v@gmail.com
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- spec/dummy-3.2/config/environments/production.rb
|
198
198
|
- spec/dummy-3.2/config/environments/test.rb
|
199
199
|
- spec/dummy-3.2/config/environments/test_with_specific_position.rb
|
200
|
+
- spec/dummy-3.2/config/environments/test_without_peastash.rb
|
200
201
|
- spec/dummy-3.2/config/initializers/backtrace_silencers.rb
|
201
202
|
- spec/dummy-3.2/config/initializers/inflections.rb
|
202
203
|
- spec/dummy-3.2/config/initializers/mime_types.rb
|
@@ -250,6 +251,7 @@ files:
|
|
250
251
|
- spec/dummy/config/environments/production.rb
|
251
252
|
- spec/dummy/config/environments/test.rb
|
252
253
|
- spec/dummy/config/environments/test_with_specific_position.rb
|
254
|
+
- spec/dummy/config/environments/test_without_peastash.rb
|
253
255
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
254
256
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
255
257
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
@@ -291,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
293
|
version: '0'
|
292
294
|
requirements: []
|
293
295
|
rubyforge_project:
|
294
|
-
rubygems_version: 2.5
|
296
|
+
rubygems_version: 2.4.5
|
295
297
|
signing_key:
|
296
298
|
specification_version: 4
|
297
299
|
summary: Peastash allows you to instrument your code with the ELK stack easily.
|
@@ -317,6 +319,7 @@ test_files:
|
|
317
319
|
- spec/dummy-3.2/config/environments/production.rb
|
318
320
|
- spec/dummy-3.2/config/environments/test.rb
|
319
321
|
- spec/dummy-3.2/config/environments/test_with_specific_position.rb
|
322
|
+
- spec/dummy-3.2/config/environments/test_without_peastash.rb
|
320
323
|
- spec/dummy-3.2/config/initializers/backtrace_silencers.rb
|
321
324
|
- spec/dummy-3.2/config/initializers/inflections.rb
|
322
325
|
- spec/dummy-3.2/config/initializers/mime_types.rb
|
@@ -370,6 +373,7 @@ test_files:
|
|
370
373
|
- spec/dummy/config/environments/production.rb
|
371
374
|
- spec/dummy/config/environments/test.rb
|
372
375
|
- spec/dummy/config/environments/test_with_specific_position.rb
|
376
|
+
- spec/dummy/config/environments/test_without_peastash.rb
|
373
377
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
374
378
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
375
379
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
@@ -391,4 +395,3 @@ test_files:
|
|
391
395
|
- spec/peastash/rails_ext/watch_spec.rb
|
392
396
|
- spec/peastash_spec.rb
|
393
397
|
- spec/spec_helper.rb
|
394
|
-
has_rdoc:
|