enhanced_errors 2.0.6 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enhanced_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Beland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-13 00:00:00.000000000 Z
11
+ date: 2024-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.9'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: 'EnhancedErrors will automatically enhance your errors with messages
56
70
  containing variable values from the moment they were raised, using no extra dependencies,
57
71
  and only Ruby''s built-in TracePoint. '
@@ -84,6 +98,9 @@ files:
84
98
  - doc/file.README.html
85
99
  - doc/file_list.html
86
100
  - doc/frames.html
101
+ - doc/images/enhance.png
102
+ - doc/images/enhanced-error.png
103
+ - doc/images/enhanced-spec.png
87
104
  - doc/index.html
88
105
  - doc/js/app.js
89
106
  - doc/js/full_list.js
@@ -91,11 +108,12 @@ files:
91
108
  - doc/method_list.html
92
109
  - doc/top-level-namespace.html
93
110
  - enhanced_errors.gemspec
94
- - examples/demo_spec.rb
95
- - examples/division_by_zero_example.rb
96
- - examples/example_spec.rb
111
+ - examples/demo_exception_enhancement.rb
112
+ - examples/demo_minitest.rb
113
+ - examples/demo_rspec.rb
97
114
  - lib/enhanced/colors.rb
98
115
  - lib/enhanced/exception.rb
116
+ - lib/enhanced/minitest_patch.rb
99
117
  - lib/enhanced_errors.rb
100
118
  homepage: https://github.com/ericbeland/enhanced_errors
101
119
  licenses: []
@@ -1,32 +0,0 @@
1
- # spec/enhanced_errors_spec.rb
2
-
3
- require_relative '../lib/enhanced_errors'
4
- require_relative '../spec/spec_helper'
5
-
6
- RSpec.describe 'Demo' do
7
- let(:baz) { 'bee'}
8
-
9
- before do
10
- @yo = 'sup'
11
- end
12
-
13
- it 'does something' do
14
- foo = 'bar'
15
- baz
16
- expect(false).to eq(true)
17
- end
18
-
19
- it 'does something else' do
20
- something = 'else'
21
- expect(false).to eq(true)
22
- end
23
-
24
- it 'passes fine' do
25
- expect(true).to eq(true)
26
- end
27
-
28
- it 'works if it raises an errors' do
29
- hi = 'there'
30
- raise StandardError.new('crud')
31
- end
32
- end
@@ -1,47 +0,0 @@
1
- require 'rspec'
2
- require_relative '../lib/enhanced_errors'
3
-
4
- # INSTRUCTIONS: Install rspec
5
- # gem install rspec
6
- # rspec examples/example_spec.rb
7
-
8
- RSpec.describe 'Neo' do
9
- before(:each) do
10
- EnhancedErrors.enhance_exceptions!(override_messages: true)
11
- end
12
-
13
- describe 'sees through' do
14
- let(:the_matrix) { 'code rains, dramatically' }
15
-
16
- before(:each) do
17
- @spoon = 'there is no spoon'
18
- end
19
-
20
- it 'the matrix' do
21
- #activate memoized item
22
- the_matrix
23
- stop = 'bullets'
24
- raise 'No!'
25
- end
26
- end
27
- end
28
-
29
- # Note:
30
- # The approach above is unlikely to work in large codebases where there are many
31
- # exception-based specs that verify exception messages.
32
- #
33
- # Instead, take this (recommended) approach:
34
- #
35
- # RSpec.configure do |config|
36
- # config.before(:suite) do
37
- # RSpec::Core::Example.prepend(Enhanced::Integrations::RSpecErrorFailureMessage)
38
- # end
39
- #
40
- # config.before(:example) do |_example|
41
- # EnhancedErrors.start_rspec_binding_capture
42
- # end
43
- #
44
- # config.after(:example) do |example|
45
- # example.metadata[:expect_binding] = EnhancedErrors.stop_rspec_binding_capture
46
- # end
47
- # end