enhanced_errors 2.0.6 → 2.1.1

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.
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.1
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-16 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. '
@@ -76,6 +90,7 @@ files:
76
90
  - doc/Enhanced/Integrations/RSpecErrorFailureMessage.html
77
91
  - doc/EnhancedErrors.html
78
92
  - doc/Exception.html
93
+ - doc/Minitest.html
79
94
  - doc/_index.html
80
95
  - doc/class_list.html
81
96
  - doc/css/common.css
@@ -84,6 +99,9 @@ files:
84
99
  - doc/file.README.html
85
100
  - doc/file_list.html
86
101
  - doc/frames.html
102
+ - doc/images/enhance.png
103
+ - doc/images/enhanced-error.png
104
+ - doc/images/enhanced-spec.png
87
105
  - doc/index.html
88
106
  - doc/js/app.js
89
107
  - doc/js/full_list.js
@@ -91,11 +109,12 @@ files:
91
109
  - doc/method_list.html
92
110
  - doc/top-level-namespace.html
93
111
  - enhanced_errors.gemspec
94
- - examples/demo_spec.rb
95
- - examples/division_by_zero_example.rb
96
- - examples/example_spec.rb
112
+ - examples/demo_exception_enhancement.rb
113
+ - examples/demo_minitest.rb
114
+ - examples/demo_rspec.rb
97
115
  - lib/enhanced/colors.rb
98
116
  - lib/enhanced/exception.rb
117
+ - lib/enhanced/minitest_patch.rb
99
118
  - lib/enhanced_errors.rb
100
119
  homepage: https://github.com/ericbeland/enhanced_errors
101
120
  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