better_errors 2.0.0 → 2.8.0

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.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +3 -0
  4. data/.travis.yml +96 -2
  5. data/CHANGELOG.md +1 -1
  6. data/Gemfile +2 -7
  7. data/LICENSE.txt +1 -1
  8. data/README.md +99 -39
  9. data/better_errors.gemspec +23 -4
  10. data/gemfiles/pry010.gemfile +9 -0
  11. data/gemfiles/pry011.gemfile +8 -0
  12. data/gemfiles/pry09.gemfile +8 -0
  13. data/gemfiles/rack.gemfile +7 -0
  14. data/gemfiles/rack_boc.gemfile +8 -0
  15. data/gemfiles/rails42.gemfile +9 -0
  16. data/gemfiles/rails42_boc.gemfile +10 -0
  17. data/gemfiles/rails42_haml.gemfile +10 -0
  18. data/gemfiles/rails50.gemfile +8 -0
  19. data/gemfiles/rails50_boc.gemfile +9 -0
  20. data/gemfiles/rails50_haml.gemfile +9 -0
  21. data/gemfiles/rails51.gemfile +8 -0
  22. data/gemfiles/rails51_boc.gemfile +9 -0
  23. data/gemfiles/rails51_haml.gemfile +9 -0
  24. data/gemfiles/rails52.gemfile +8 -0
  25. data/gemfiles/rails52_boc.gemfile +9 -0
  26. data/gemfiles/rails52_haml.gemfile +9 -0
  27. data/gemfiles/rails60.gemfile +7 -0
  28. data/gemfiles/rails60_boc.gemfile +8 -0
  29. data/gemfiles/rails60_haml.gemfile +8 -0
  30. data/lib/better_errors/code_formatter/html.rb +1 -1
  31. data/lib/better_errors/code_formatter.rb +7 -7
  32. data/lib/better_errors/error_page.rb +56 -15
  33. data/lib/better_errors/inspectable_value.rb +45 -0
  34. data/lib/better_errors/middleware.rb +96 -16
  35. data/lib/better_errors/raised_exception.rb +13 -3
  36. data/lib/better_errors/repl/basic.rb +3 -3
  37. data/lib/better_errors/repl/pry.rb +18 -8
  38. data/lib/better_errors/repl.rb +6 -4
  39. data/lib/better_errors/stack_frame.rb +33 -8
  40. data/lib/better_errors/templates/main.erb +71 -34
  41. data/lib/better_errors/templates/text.erb +2 -2
  42. data/lib/better_errors/templates/variable_info.erb +32 -23
  43. data/lib/better_errors/version.rb +1 -1
  44. data/lib/better_errors.rb +21 -3
  45. metadata +118 -35
  46. data/Rakefile +0 -13
  47. data/spec/better_errors/code_formatter_spec.rb +0 -92
  48. data/spec/better_errors/error_page_spec.rb +0 -76
  49. data/spec/better_errors/middleware_spec.rb +0 -154
  50. data/spec/better_errors/raised_exception_spec.rb +0 -52
  51. data/spec/better_errors/repl/basic_spec.rb +0 -18
  52. data/spec/better_errors/repl/pry_spec.rb +0 -40
  53. data/spec/better_errors/repl/shared_examples.rb +0 -18
  54. data/spec/better_errors/stack_frame_spec.rb +0 -157
  55. data/spec/better_errors/support/my_source.rb +0 -20
  56. data/spec/better_errors_spec.rb +0 -73
  57. data/spec/spec_helper.rb +0 -5
  58. data/spec/without_binding_of_caller.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bc36d3113c7041816a7697fbd1e50333f5976003
4
- data.tar.gz: 834f3f4a4903a45f150d83adde3f25452d2fd86b
2
+ SHA256:
3
+ metadata.gz: 10f7411145be495cf17cbebdf087e1bb21fe8c6fc8c07397fa406e7fc1f9f917
4
+ data.tar.gz: 3b14b75eaa97285c3ad5f685671348694aa7174cc43e52826e49e21a2f139b0d
5
5
  SHA512:
6
- metadata.gz: 130d61a4ce2e5509eb1585dfa0e3c620bf54387ac6a0931d1a534296460a0e06601a6d71ce41b3d3ffbd15951626ddfd7e753bb1bc911c35cf76cfa52cfcd771
7
- data.tar.gz: 5906697a352187036b92cdefe124fea459405d7e3cc80f3bcc6f07c7a2952f328367f452e88272947edef464a4cc75fbe3d276c24580b9b633b6f9e60c99a60d
6
+ metadata.gz: 141e1056c402ed7b0aa0965278018096ca1d2bc4032072692c1f146ad09d6848d87792d665ecc6dcb41322594e91d9a5e27955edc560bb665a2995f150c0be4e
7
+ data.tar.gz: 03a94aa9fdcd0340b1fdf913a52978437692587efabe196ebb119087712086cc304289ec1c684ab4efbdece115a4bd1298b57bf58699a0d672f76f6aa196793b
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore CHANGED
@@ -6,3 +6,6 @@
6
6
  /doc
7
7
  /.bundle
8
8
  /vendor/gems
9
+
10
+ /gemfiles/*.gemfile.lock
11
+ /gemfiles/.bundle
data/.travis.yml CHANGED
@@ -1,4 +1,98 @@
1
1
  language: ruby
2
+ cache: bundler
3
+ notifications:
4
+ webhooks:
5
+ # With COVERALLS_PARALLEL, coverage information sent to coveralls will not be processed until
6
+ # this webhook is sent.
7
+ # https://coveralls.zendesk.com/hc/en-us/articles/203484329-Parallel-Build-Webhook
8
+ - secure: "YnHYbTq51ySistjvOxsuNhyg4GLuUffEJstTYeGYXiBF7HG5h43IVYo8KNuLzwkgsOYBcNo+YMdQX7qCqJffSbhsr1FZRSzBmjFFxcyD4hu+ukM2theZ4mePVAZiePscYvQPRNY4hIb4d3egStJEytkalDhB3sOebF57tIaCssg="
2
9
  rvm:
3
- - 2.1.0
4
- - 2.0.0
10
+ - 2.2.10
11
+ - 2.3.8
12
+ - 2.4.9
13
+ - 2.5.7
14
+ - 2.6.5
15
+ - 2.7.0
16
+ - ruby-head
17
+ gemfile:
18
+ - gemfiles/rails42.gemfile
19
+ - gemfiles/rails50.gemfile
20
+ - gemfiles/rails51.gemfile
21
+ - gemfiles/rails52.gemfile
22
+ - gemfiles/rails60.gemfile
23
+ - gemfiles/rails42_haml.gemfile
24
+ - gemfiles/rails50_haml.gemfile
25
+ - gemfiles/rails51_haml.gemfile
26
+ - gemfiles/rails52_haml.gemfile
27
+ - gemfiles/rails60_haml.gemfile
28
+ - gemfiles/rails42_boc.gemfile
29
+ - gemfiles/rails50_boc.gemfile
30
+ - gemfiles/rails51_boc.gemfile
31
+ - gemfiles/rails52_boc.gemfile
32
+ - gemfiles/rails60_boc.gemfile
33
+ - gemfiles/rack.gemfile
34
+ - gemfiles/rack_boc.gemfile
35
+ - gemfiles/pry09.gemfile
36
+ - gemfiles/pry010.gemfile
37
+ - gemfiles/pry011.gemfile
38
+ matrix:
39
+ fast_finish: true
40
+ allow_failures:
41
+ - rvm: ruby-head
42
+ - gemfile: gemfiles/pry010.gemfile
43
+ - gemfile: gemfiles/pry011.gemfile
44
+ exclude:
45
+ - rvm: 2.2.10
46
+ gemfile: gemfiles/rails60.gemfile
47
+ - rvm: 2.2.10
48
+ gemfile: gemfiles/rails60_boc.gemfile
49
+ - rvm: 2.2.10
50
+ gemfile: gemfiles/rails60_haml.gemfile
51
+ - rvm: 2.3.8
52
+ gemfile: gemfiles/rails42.gemfile
53
+ - rvm: 2.3.8
54
+ gemfile: gemfiles/rails42_boc.gemfile
55
+ - rvm: 2.3.8
56
+ gemfile: gemfiles/rails42_haml.gemfile
57
+ - rvm: 2.3.8
58
+ gemfile: gemfiles/rails60.gemfile
59
+ - rvm: 2.3.8
60
+ gemfile: gemfiles/rails60_boc.gemfile
61
+ - rvm: 2.3.8
62
+ gemfile: gemfiles/rails60_haml.gemfile
63
+ - rvm: 2.4.9
64
+ gemfile: gemfiles/rails42.gemfile
65
+ - rvm: 2.4.9
66
+ gemfile: gemfiles/rails42_boc.gemfile
67
+ - rvm: 2.4.9
68
+ gemfile: gemfiles/rails42_haml.gemfile
69
+ - rvm: 2.4.9
70
+ gemfile: gemfiles/rails60.gemfile
71
+ - rvm: 2.4.9
72
+ gemfile: gemfiles/rails60_boc.gemfile
73
+ - rvm: 2.4.9
74
+ gemfile: gemfiles/rails60_haml.gemfile
75
+ - rvm: 2.5.7
76
+ gemfile: gemfiles/rails42.gemfile
77
+ - rvm: 2.5.7
78
+ gemfile: gemfiles/rails42_boc.gemfile
79
+ - rvm: 2.5.7
80
+ gemfile: gemfiles/rails42_haml.gemfile
81
+ - rvm: 2.6.5
82
+ gemfile: gemfiles/rails42.gemfile
83
+ - rvm: 2.6.5
84
+ gemfile: gemfiles/rails42_boc.gemfile
85
+ - rvm: 2.6.5
86
+ gemfile: gemfiles/rails42_haml.gemfile
87
+ - rvm: 2.7.0
88
+ gemfile: gemfiles/rails42.gemfile
89
+ - rvm: 2.7.0
90
+ gemfile: gemfiles/rails42_boc.gemfile
91
+ - rvm: 2.7.0
92
+ gemfile: gemfiles/rails42_haml.gemfile
93
+ - rvm: ruby-head
94
+ gemfile: gemfiles/rails42.gemfile
95
+ - rvm: ruby-head
96
+ gemfile: gemfiles/rails42_boc.gemfile
97
+ - rvm: ruby-head
98
+ gemfile: gemfiles/rails42_haml.gemfile
data/CHANGELOG.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Changelog
2
2
 
3
- See https://github.com/charliesome/better_errors/releases
3
+ See https://github.com/BetterErrors/better_errors/releases
data/Gemfile CHANGED
@@ -2,10 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem "rake"
6
- gem "rack"
7
- gem "rspec", "2.14.1"
8
- gem "binding_of_caller", platforms: :ruby
9
- gem "pry", "0.9.12"
10
- gem "yard"
11
- gem "kramdown"
5
+ # gem "pry-byebug"
6
+ gem 'simplecov', require: false
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Charlie Somerville
1
+ Copyright (c) 2012-2016 Charlie Somerville
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,15 +1,24 @@
1
- # Better Errors [![Gem Version](http://img.shields.io/gem/v/better_errors.svg)](https://rubygems.org/gems/better_errors) [![Build Status](https://travis-ci.org/charliesome/better_errors.svg)](https://travis-ci.org/charliesome/better_errors) [![Code Climate](http://img.shields.io/codeclimate/github/charliesome/better_errors.svg)](https://codeclimate.com/github/charliesome/better_errors)
1
+ [![Build Status](https://travis-ci.org/BetterErrors/better_errors.svg)](https://travis-ci.org/BetterErrors/better_errors)
2
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6bc3e7d6118d47e6959b16690b815909)](https://www.codacy.com/app/BetterErrors/better_errors?utm_source=github.com&utm_medium=referral&utm_content=BetterErrors/better_errors&utm_campaign=Badge_Grade)
3
+ [![Coverage](https://coveralls.io/repos/github/BetterErrors/better_errors/badge.svg?branch=master)](https://coveralls.io/github/BetterErrors/better_errors?branch=master)
4
+ [![Gem Version](https://img.shields.io/gem/v/better_errors.svg)](https://rubygems.org/gems/better_errors)
5
+
6
+ # Better Errors
2
7
 
3
8
  Better Errors replaces the standard Rails error page with a much better and more useful error page. It is also usable outside of Rails in any Rack app as Rack middleware.
4
9
 
5
- ![image](http://i.imgur.com/6zBGAAb.png)
10
+ ![screenshot of Better Errors in action](https://i.imgur.com/6zBGAAb.png)
6
11
 
7
12
  ## Features
8
13
 
14
+ For screenshots of these features, [see the wiki](https://github.com/BetterErrors/better_errors/wiki).
15
+
9
16
  * Full stack trace
10
17
  * Source code inspection for all stack frames (with highlighting)
11
18
  * Local and instance variable inspection
12
- * Live REPL on every stack frame
19
+ * Live shell (REPL) on every stack frame
20
+ * Links directly to the source line in your editor
21
+ * Useful information in non-HTML requests
13
22
 
14
23
  ## Installation
15
24
 
@@ -18,71 +27,68 @@ Add this to your Gemfile:
18
27
  ```ruby
19
28
  group :development do
20
29
  gem "better_errors"
30
+ gem "binding_of_caller"
21
31
  end
22
32
  ```
23
33
 
24
- If you would like to use Better Errors' **advanced features** (REPL, local/instance variable inspection, pretty stack frame names), you need to add the [`binding_of_caller`](https://github.com/banister/binding_of_caller) gem by [@banisterfiend](http://twitter.com/banisterfiend) to your Gemfile:
34
+ [`binding_of_caller`](https://github.com/banister/binding_of_caller) is optional, but is necessary to use Better Errors' advanced features (REPL, local/instance variable inspection, pretty stack frame names).
25
35
 
26
- ```ruby
27
- gem "binding_of_caller"
28
- ```
36
+ _Note: If you discover that Better Errors isn't working - particularly after upgrading from version 0.5.0 or less - be sure to set `config.consider_all_requests_local = true` in `config/environments/development.rb`._
29
37
 
30
- This is an optional dependency however, and Better Errors will work without it.
38
+ ### Optional: Set `EDITOR`
31
39
 
32
- _Note: If you discover that Better Errors isn't working - particularly after upgrading from version 0.5.0 or less - be sure to set `config.consider_all_requests_local = true` in `config/environments/development.rb`._
40
+ For many reasons outside of Better Errors, you should have the `EDITOR` environment variable set to your preferred
41
+ editor.
42
+ Better Errors, like many other tools, will use that environment variable to show a link that opens your
43
+ editor to the file and line from the console.
33
44
 
34
- ## Security
45
+ By default the links will open TextMate-protocol links.
35
46
 
36
- **NOTE:** It is *critical* you put better\_errors in the **development** section. **Do NOT run better_errors in production, or on Internet facing hosts.**
47
+ To see if your editor is supported or to set up a different editor, see [the wiki](https://github.com/BetterErrors/better_errors/wiki/Link-to-your-editor).
37
48
 
38
- You will notice that the only machine that gets the Better Errors page is localhost, which means you get the default error page if you are developing on a remote host (or a virtually remote host, such as a Vagrant box). Obviously, the REPL is not something you want to expose to the public, but there may also be other pieces of sensitive information available in the backtrace.
49
+ ### Optional: Set `BETTER_ERRORS_INSIDE_FRAME`
39
50
 
40
- To poke selective holes in this security mechanism, you can add a line like this to your startup (for example, on Rails it would be `config/environments/development.rb`)
51
+ If your application is running inside of an iframe, or if you have a Content Security Policy that disallows links
52
+ to other protocols, the editor links will not work.
41
53
 
42
- ```ruby
43
- BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
44
- ```
54
+ To work around this set `BETTER_ERRORS_INSIDE_FRAME=1` in the environment, and the links will include `target=_blank`,
55
+ allowing the link to open regardless of the policy.
45
56
 
46
- Then run Rails like this:
57
+ _This works because it opens the editor from a new browser tab, escaping from the restrictions of your site._
58
+ _Unfortunately it leaves behind an empty tab each time, so only use this if needed._
47
59
 
48
- ```shell
49
- TRUSTED_IP=66.68.96.220 rails s
50
- ```
60
+ ## Security
51
61
 
52
- Note that the `allow_ip!` is actually backed by a `Set`, so you can add more than one IP address or subnet.
62
+ **NOTE:** It is *critical* you put better\_errors only in the **development** section of your Gemfile.
63
+ **Do NOT run better_errors in production, or on Internet-facing hosts.**
53
64
 
54
- **Tip:** You can find your apparent IP by hitting the old error page's "Show env dump" and looking at "REMOTE_ADDR".
65
+ You will notice that the only machine that gets the Better Errors page is localhost, which means you get the default error page if you are developing on a remote host (or a virtually remote host, such as a Vagrant box).
66
+ Obviously, the REPL is not something you want to expose to the public, and there may be sensitive information available in the backtrace.
55
67
 
56
- **VirtualBox:** If you are using VirtualBox and are accessing the guest from your host's browser, you will need to use `allow_ip!` to see the error page.
68
+ For more information on how to configure access, see [the wiki](https://github.com/BetterErrors/better_errors/wiki/Allowing-access-to-the-console).
57
69
 
58
70
  ## Usage
59
71
 
60
72
  If you're using Rails, there's nothing else you need to do.
61
73
 
74
+ ### Using without Rails.
75
+
62
76
  If you're not using Rails, you need to insert `BetterErrors::Middleware` into your middleware stack, and optionally set `BetterErrors.application_root` if you'd like Better Errors to abbreviate filenames within your application.
63
77
 
64
- Here's an example using Sinatra:
78
+ For instructions for your specific middleware, [see the wiki](https://github.com/BetterErrors/better_errors/wiki/Non-Rails-frameworks).
65
79
 
66
- ```ruby
67
- require "sinatra"
68
- require "better_errors"
69
-
70
- configure :development do
71
- use BetterErrors::Middleware
72
- BetterErrors.application_root = __dir__
73
- end
80
+ ### Plain text requests
74
81
 
75
- get "/" do
76
- raise "oops"
77
- end
78
- ```
82
+ Better Errors will render a plain text error page when the request is an
83
+ `XMLHttpRequest` or when the `Accept` header does *not* include 'html'.
79
84
 
80
85
  ### Unicorn, Puma, and other multi-worker servers
81
86
 
82
- Better Errors works by leaving a lot of context in server process memory. If
83
- you're using a web server that runs multiple "workers" it's likely that a second
87
+ Better Errors works by leaving a lot of context in server process memory.
88
+ If you're using a web server that runs multiple "workers" it's likely that a second
84
89
  request (as happens when you click on a stack frame) will hit a different
85
- worker. That worker won't have the necessary context in memory, and you'll see
90
+ worker.
91
+ That worker won't have the necessary context in memory, and you'll see
86
92
  a `Session Expired` message.
87
93
 
88
94
  If this is the case for you, consider turning the number of workers to one (1)
@@ -90,10 +96,64 @@ in `development`. Another option would be to use Webrick, Mongrel, Thin,
90
96
  or another single-process server as your `rails server`, when you are trying
91
97
  to troubleshoot an issue in development.
92
98
 
99
+ ### Changing the link to your editor
100
+
101
+ Better Errors includes a link to your editor for the file and line of code that is being shown.
102
+ By default, it uses your environment to determine which editor should be opened.
103
+ See [the wiki for instructions on configuring the editor](https://github.com/BetterErrors/better_errors/wiki/Link-to-your-editor).
104
+
105
+
106
+ ## Set maximum variable size for inspector.
107
+
108
+ ```ruby
109
+ # e.g. in config/initializers/better_errors.rb
110
+ # This will stop BetterErrors from trying to render larger objects, which can cause
111
+ # slow loading times and browser performance problems. Stated size is in characters and refers
112
+ # to the length of #inspect's payload for the given object. Please be aware that HTML escaping
113
+ # modifies the size of this payload so setting this limit too precisely is not recommended.
114
+ # default value: 100_000
115
+ BetterErrors.maximum_variable_inspect_size = 100_000
116
+ ```
117
+
118
+ ## Ignore inspection of variables with certain classes.
119
+
120
+ ```ruby
121
+ # e.g. in config/initializers/better_errors.rb
122
+ # This will stop BetterErrors from trying to inspect objects of these classes, which can cause
123
+ # slow loading times and unneccessary database queries. Does not check inheritance chain, use
124
+ # strings not contants.
125
+ # default value: ['ActionDispatch::Request', 'ActionDispatch::Response']
126
+ BetterErrors.ignored_classes = ['ActionDispatch::Request', 'ActionDispatch::Response']
127
+ ```
128
+
93
129
  ## Get in touch!
94
130
 
95
131
  If you're using better_errors, I'd love to hear from you. Drop me a line and tell me what you think!
96
132
 
133
+ ## Development
134
+
135
+ After checking out the repo, run `bundle install` to install the basic dependencies.
136
+
137
+ You can run the tests with the simplest set of dependencies using:
138
+
139
+ ```rb
140
+ bundle exec rspec
141
+ ```
142
+
143
+ To run specs for each of the dependency combinations, run:
144
+
145
+ ```rb
146
+ bundle exec rake test:all
147
+ ```
148
+
149
+ You can run specs for a specific dependency combination using:
150
+
151
+ ```rb
152
+ BUNDLE_GEMFILE=gemfiles/pry09.gemfile bundle exec rspec
153
+ ```
154
+
155
+ On CI, the specs are run against each gemfile on each supported version of Ruby.
156
+
97
157
  ## Contributing
98
158
 
99
159
  1. Fork it
@@ -9,20 +9,39 @@ Gem::Specification.new do |s|
9
9
  s.email = ["charlie@charliesomerville.com"]
10
10
  s.description = %q{Provides a better error page for Rails and other Rack apps. Includes source code inspection, a live REPL and local/instance variable inspection for all stack frames.}
11
11
  s.summary = %q{Better error page for Rails and other Rack apps}
12
- s.homepage = "https://github.com/charliesome/better_errors"
12
+ s.homepage = "https://github.com/BetterErrors/better_errors"
13
13
  s.license = "MIT"
14
14
 
15
- s.files = `git ls-files`.split($/)
16
- s.test_files = s.files.grep(%r{^(test|spec|features)/})
15
+ s.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(%r{^((test|spec|features|feature-screenshots)/|Rakefile)})
17
+ end
18
+
17
19
  s.require_paths = ["lib"]
18
20
 
19
21
  s.required_ruby_version = ">= 2.0.0"
20
22
 
21
- s.add_dependency "erubis", ">= 2.6.6"
23
+ s.add_development_dependency "rake", "~> 10.0"
24
+ s.add_development_dependency "rspec", "~> 3.5"
25
+ s.add_development_dependency "rspec-html-matchers"
26
+ s.add_development_dependency "rspec-its"
27
+ s.add_development_dependency "yard"
28
+ # kramdown 2.1 requires Ruby 2.3+
29
+ s.add_development_dependency "kramdown", (RUBY_VERSION < '2.3' ? '< 2.0.0' : '> 2.0.0')
30
+ # simplecov and coveralls must not be included here. See the Gemfiles instead.
31
+
32
+ s.add_dependency "erubi", ">= 1.0.0"
22
33
  s.add_dependency "coderay", ">= 1.0.0"
23
34
  s.add_dependency "rack", ">= 0.9.0"
24
35
 
25
36
  # optional dependencies:
26
37
  # s.add_dependency "binding_of_caller"
27
38
  # s.add_dependency "pry"
39
+
40
+ if s.respond_to?(:metadata)
41
+ s.metadata['changelog_uri'] = 'https://github.com/BetterErrors/better_errors/releases'
42
+ s.metadata['source_code_uri'] = 'https://github.com/BetterErrors/better_errors'
43
+ s.metadata['bug_tracker_uri'] = 'https://github.com/BetterErrors/better_errors/issues'
44
+ else
45
+ puts "Your RubyGems does not support metadata. Update if you'd like to make a release."
46
+ end
28
47
  end
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
4
+ gem "binding_of_caller"
5
+ gem "pry", "~> 0.10.0"
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
4
+ gem "pry", "~> 0.11.0pre"
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
4
+ gem "pry", "~> 0.9.12"
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
4
+
5
+ gem 'coveralls', require: false
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0'
4
+ gem "binding_of_caller"
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 4.2.0"
4
+ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
5
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 4.2.0"
4
+ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
5
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
6
+ gem "binding_of_caller"
7
+
8
+ gem 'coveralls', require: false
9
+
10
+ gemspec path: "../"
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 4.2.0"
4
+ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
5
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
6
+ gem "haml"
7
+
8
+ gem 'coveralls', require: false
9
+
10
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.0.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.0.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+ gem "binding_of_caller"
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.0.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+ gem "haml"
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.1.0"
4
+ gem 'i18n', '< 1.5.2', require: false if RUBY_VERSION < '2.3'
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.1.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+ gem "binding_of_caller"
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.1.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+ gem "haml"
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.2.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.2.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+ gem "binding_of_caller"
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 5.2.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
+ gem "haml"
6
+
7
+ gem 'coveralls', require: false
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 6.0.0"
4
+
5
+ gem 'coveralls', require: false
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 6.0.0"
4
+ gem "binding_of_caller"
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rails", "~> 6.0.0"
4
+ gem "haml"
5
+
6
+ gem 'coveralls', require: false
7
+
8
+ gemspec path: "../"
@@ -11,7 +11,7 @@ module BetterErrors
11
11
  sprintf '<pre class="%s">%s</pre>', class_name, str
12
12
  }
13
13
  end
14
-
14
+
15
15
  def formatted_nums
16
16
  each_line_of(highlighted_lines) { |highlight, current_line, str|
17
17
  class_name = highlight ? "highlight" : ""