better_errors 2.10.0.beta1 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/release-drafter.yml +46 -0
- data/.github/workflows/draft_release_update.yml +22 -0
- data/.github/workflows/pull_request.yml +20 -0
- data/.github/workflows/release.yml +5 -1
- data/.gitignore +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/better_errors.gemspec +7 -6
- data/lib/better_errors/code_formatter/html.rb +15 -1
- data/lib/better_errors/code_formatter.rb +16 -27
- data/lib/better_errors/error_page.rb +3 -1
- data/lib/better_errors/error_page_style.rb +30 -0
- data/lib/better_errors/middleware.rb +2 -2
- data/lib/better_errors/templates/main.css +1 -0
- data/lib/better_errors/templates/main.erb +3 -723
- data/lib/better_errors/version.rb +2 -1
- data/lib/better_errors.rb +0 -1
- metadata +27 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63e5bb97d23bd3c7afee4c068d074160eca36a9215fb17239a28e807b4ba5b31
|
4
|
+
data.tar.gz: cd08b12eaa698201185e457f6d0eb1f4e330de23fd230b7329e32f636665d350
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ee33a489d6117bb2446ccbd3a41893639df2af5bcb00996ca893b7acf33e6c0310e81124b978f4c991354eef9ca4459288db838d8ed4ea1a622911f96b14c9b
|
7
|
+
data.tar.gz: 46d7e1c8fd6738280b5e0c1d23c85c8a7c6c4bce531ad174fbb729a78dea0a0e5870161d6c36fd4fa348da38549f03079e3e46506f8a095f6dfc4247aba390e9
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
name-template: 'v$RESOLVED_VERSION'
|
3
|
+
tag-template: 'v$RESOLVED_VERSION'
|
4
|
+
autolabeler:
|
5
|
+
- label: breaking change
|
6
|
+
title:
|
7
|
+
- '/(?<!non[- ]?)breaking/i'
|
8
|
+
- label: feature
|
9
|
+
branch:
|
10
|
+
- '/^feature/'
|
11
|
+
- label: patch fix
|
12
|
+
branch:
|
13
|
+
- '/^fix/'
|
14
|
+
- label: chore
|
15
|
+
branch:
|
16
|
+
- '/^chore/'
|
17
|
+
categories:
|
18
|
+
- title: ⚠ Breaking Changes
|
19
|
+
labels:
|
20
|
+
- breaking change
|
21
|
+
- title: Feature Changes
|
22
|
+
labels:
|
23
|
+
- feature
|
24
|
+
- title: Fixes
|
25
|
+
labels:
|
26
|
+
- patch fix
|
27
|
+
- title: Maintenance
|
28
|
+
labels:
|
29
|
+
- chore
|
30
|
+
exclude-labels:
|
31
|
+
- skip-changelog
|
32
|
+
change-template: '- $TITLE (@$AUTHOR) #$NUMBER'
|
33
|
+
template: '$CHANGES'
|
34
|
+
no-changes-template: '_No changes yet._'
|
35
|
+
version-resolver:
|
36
|
+
major:
|
37
|
+
labels:
|
38
|
+
- breaking change
|
39
|
+
minor:
|
40
|
+
labels:
|
41
|
+
- minor
|
42
|
+
patch:
|
43
|
+
labels:
|
44
|
+
- patch fix
|
45
|
+
- chore
|
46
|
+
default: minor
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
name: Draft Release
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
# Run on change of the main branch, which covers merged pull requests
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
- master
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
update:
|
14
|
+
name: "Update"
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- uses: release-drafter/release-drafter@v5
|
18
|
+
with:
|
19
|
+
# Not sure what autolabeler would do in the main branch, but it wouldn't make sense.
|
20
|
+
disable-autolabeler: true
|
21
|
+
env:
|
22
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
name: Pull Request
|
4
|
+
|
5
|
+
on:
|
6
|
+
pull_request:
|
7
|
+
# Run on new/reopened/renamed pull requests so that autolabeling happens
|
8
|
+
types: [opened, reopened, edited]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
label:
|
12
|
+
name: "Label"
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- uses: release-drafter/release-drafter@v5
|
16
|
+
with:
|
17
|
+
# Don't run the releaser from the PR, because that will create a draft PR containing the current PR even though it's not merged.
|
18
|
+
disable-releaser: true
|
19
|
+
env:
|
20
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -48,10 +48,14 @@ jobs:
|
|
48
48
|
run: |
|
49
49
|
bundle exec gem bump better_errors --version ${{ steps.get_version.outputs.version }} --no-commit
|
50
50
|
|
51
|
+
- name: Compile CSS
|
52
|
+
run: |
|
53
|
+
bundle exec rake style:build
|
54
|
+
|
51
55
|
- name: Build gem
|
52
56
|
run: gem build better_errors.gemspec
|
53
57
|
|
54
|
-
- name:
|
58
|
+
- name: Add gem to GitHub Release
|
55
59
|
uses: actions/upload-release-asset@v1
|
56
60
|
env:
|
57
61
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.gitignore
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -120,8 +120,8 @@ BetterErrors.maximum_variable_inspect_size = 100_000
|
|
120
120
|
```ruby
|
121
121
|
# e.g. in config/initializers/better_errors.rb
|
122
122
|
# This will stop BetterErrors from trying to inspect objects of these classes, which can cause
|
123
|
-
# slow loading times and
|
124
|
-
# strings not
|
123
|
+
# slow loading times and unnecessary database queries. Does not check inheritance chain, use
|
124
|
+
# strings not constants.
|
125
125
|
# default value: ['ActionDispatch::Request', 'ActionDispatch::Response']
|
126
126
|
BetterErrors.ignored_classes = ['ActionDispatch::Request', 'ActionDispatch::Response']
|
127
127
|
```
|
data/better_errors.gemspec
CHANGED
@@ -5,16 +5,16 @@ require 'better_errors/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "better_errors"
|
7
7
|
s.version = BetterErrors::VERSION
|
8
|
-
s.authors = ["
|
9
|
-
s.email = ["
|
8
|
+
s.authors = ["Hailey Somerville"]
|
9
|
+
s.email = ["hailey@hailey.lol"]
|
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
12
|
s.homepage = "https://github.com/BetterErrors/better_errors"
|
13
13
|
s.license = "MIT"
|
14
14
|
|
15
|
-
s.files = `git ls-files -z`.split("\x0").reject
|
16
|
-
f.match(%r{^((test|spec|features|feature-screenshots)/|Rakefile)})
|
17
|
-
|
15
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f|
|
16
|
+
f.match(%r{^((test|spec|features|feature-screenshots)/|Rakefile)|\.scss$})
|
17
|
+
} + %w[lib/better_errors/templates/main.css]
|
18
18
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
@@ -25,12 +25,13 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency "rspec-html-matchers"
|
26
26
|
s.add_development_dependency "rspec-its"
|
27
27
|
s.add_development_dependency "yard"
|
28
|
+
s.add_development_dependency "sassc"
|
28
29
|
# kramdown 2.1 requires Ruby 2.3+
|
29
30
|
s.add_development_dependency "kramdown", (RUBY_VERSION < '2.3' ? '< 2.0.0' : '> 2.0.0')
|
30
31
|
# simplecov and coveralls must not be included here. See the Gemfiles instead.
|
31
32
|
|
32
33
|
s.add_dependency "erubi", ">= 1.0.0"
|
33
|
-
s.add_dependency "
|
34
|
+
s.add_dependency "rouge", ">= 1.0.0"
|
34
35
|
s.add_dependency "rack", ">= 0.9.0"
|
35
36
|
|
36
37
|
# optional dependencies:
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "rouge"
|
2
|
+
|
1
3
|
module BetterErrors
|
2
4
|
# @private
|
3
5
|
class CodeFormatter::HTML < CodeFormatter
|
@@ -20,7 +22,19 @@ module BetterErrors
|
|
20
22
|
end
|
21
23
|
|
22
24
|
def formatted_code
|
23
|
-
%{
|
25
|
+
%{
|
26
|
+
<div class="code_linenums">#{formatted_nums.join}</div>
|
27
|
+
<div class="code"><div class='code-wrapper'>#{super}</div></div>
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def rouge_lexer
|
32
|
+
Rouge::Lexer.guess(filename: filename, source: source) { Rouge::Lexers::Ruby }
|
24
33
|
end
|
34
|
+
|
35
|
+
def highlighted_lines
|
36
|
+
Rouge::Formatters::HTML.new.format(rouge_lexer.lex(context_lines.join)).lines
|
37
|
+
end
|
38
|
+
|
25
39
|
end
|
26
40
|
end
|
@@ -4,14 +4,6 @@ module BetterErrors
|
|
4
4
|
require "better_errors/code_formatter/html"
|
5
5
|
require "better_errors/code_formatter/text"
|
6
6
|
|
7
|
-
FILE_TYPES = {
|
8
|
-
".rb" => :ruby,
|
9
|
-
"" => :ruby,
|
10
|
-
".html" => :html,
|
11
|
-
".erb" => :erb,
|
12
|
-
".haml" => :haml
|
13
|
-
}
|
14
|
-
|
15
7
|
attr_reader :filename, :line, :context
|
16
8
|
|
17
9
|
def initialize(filename, line, context = 5)
|
@@ -26,13 +18,21 @@ module BetterErrors
|
|
26
18
|
source_unavailable
|
27
19
|
end
|
28
20
|
|
29
|
-
def
|
30
|
-
|
21
|
+
def line_range
|
22
|
+
min = [line - context, 1].max
|
23
|
+
max = [line + context, source_lines.count].min
|
24
|
+
min..max
|
31
25
|
end
|
32
26
|
|
33
|
-
def
|
34
|
-
|
35
|
-
|
27
|
+
def context_lines
|
28
|
+
range = line_range
|
29
|
+
source_lines[(range.begin - 1)..(range.end - 1)] or raise Errno::EINVAL
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def formatted_code
|
35
|
+
formatted_lines.join
|
36
36
|
end
|
37
37
|
|
38
38
|
def each_line_of(lines, &blk)
|
@@ -41,23 +41,12 @@ module BetterErrors
|
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
44
|
-
def
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
def context_lines
|
49
|
-
range = line_range
|
50
|
-
source_lines[(range.begin - 1)..(range.end - 1)] or raise Errno::EINVAL
|
44
|
+
def source
|
45
|
+
@source ||= File.read(filename)
|
51
46
|
end
|
52
47
|
|
53
48
|
def source_lines
|
54
|
-
@source_lines ||=
|
55
|
-
end
|
56
|
-
|
57
|
-
def line_range
|
58
|
-
min = [line - context, 1].max
|
59
|
-
max = [line + context, source_lines.count].min
|
60
|
-
min..max
|
49
|
+
@source_lines ||= source.lines
|
61
50
|
end
|
62
51
|
end
|
63
52
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
require "cgi"
|
2
2
|
require "json"
|
3
3
|
require "securerandom"
|
4
|
+
require "rouge"
|
5
|
+
require "better_errors/error_page_style"
|
4
6
|
|
5
7
|
module BetterErrors
|
6
8
|
# @private
|
@@ -157,7 +159,7 @@ module BetterErrors
|
|
157
159
|
result, prompt, prefilled_input = @repls[index].send_input(code)
|
158
160
|
|
159
161
|
{
|
160
|
-
highlighted_input:
|
162
|
+
highlighted_input: Rouge::Formatters::HTML.new.format(Rouge::Lexers::Ruby.lex(code)),
|
161
163
|
prefilled_input: prefilled_input,
|
162
164
|
prompt: prompt,
|
163
165
|
result: result
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require "sassc"
|
2
|
+
|
3
|
+
module BetterErrors
|
4
|
+
# @private
|
5
|
+
module ErrorPageStyle
|
6
|
+
def self.compiled_css(for_deployment = false)
|
7
|
+
style_dir = File.expand_path("style", File.dirname(__FILE__))
|
8
|
+
style_file = "#{style_dir}/main.scss"
|
9
|
+
|
10
|
+
engine = SassC::Engine.new(
|
11
|
+
File.read(style_file),
|
12
|
+
filename: style_file,
|
13
|
+
style: for_deployment ? :compressed : :expanded,
|
14
|
+
line_comments: !for_deployment,
|
15
|
+
load_paths: [style_dir],
|
16
|
+
)
|
17
|
+
engine.render
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.style_tag(csp_nonce)
|
21
|
+
style_file = File.expand_path("templates/main.css", File.dirname(__FILE__))
|
22
|
+
css = if File.exist?(style_file)
|
23
|
+
File.open(style_file).read
|
24
|
+
else
|
25
|
+
compiled_css(false)
|
26
|
+
end
|
27
|
+
"<style type='text/css' nonce='#{csp_nonce}'>\n#{css}\n</style>"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -119,8 +119,8 @@ module BetterErrors
|
|
119
119
|
# for older browsers without nonce support.
|
120
120
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src
|
121
121
|
"script-src 'self' 'nonce-#{csp_nonce}' 'unsafe-inline'",
|
122
|
-
|
123
|
-
"
|
122
|
+
"style-src 'self' 'nonce-#{csp_nonce}' 'unsafe-inline'",
|
123
|
+
"img-src data:",
|
124
124
|
"connect-src 'self'",
|
125
125
|
"navigate-to 'self' #{BetterErrors.editor.scheme}",
|
126
126
|
].join('; '),
|
@@ -0,0 +1 @@
|
|
1
|
+
*{margin:0;padding:0}table{width:100%;border-collapse:collapse}th,td{vertical-align:top;text-align:left}textarea{resize:none}body{font-size:10pt}body,td,input,textarea{font-family:helvetica neue, lucida grande, sans-serif;line-height:1.5;color:#333;text-shadow:0 1px 0 rgba(255,255,255,0.6)}html{background:#f0f0f5}.clearfix::after{clear:both;content:".";display:block;height:0;visibility:hidden}@media screen and (max-width: 1100px){html{overflow-y:scroll}body{margin:0 20px}header.exception{margin:0 -20px}nav.sidebar{padding:0;margin:20px 0}ul.frames{max-height:200px;overflow:auto}}@media screen and (min-width: 1100px){header.exception{position:fixed;top:0;left:0;right:0}nav.sidebar,.frame_info{position:fixed;top:102px;bottom:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden}nav.sidebar{width:40%;left:20px;top:122px;bottom:20px}.frame_info{display:none;right:0;left:40%;padding:20px;padding-left:10px;margin-left:30px}.frame_info.current{display:block}}nav.sidebar{background:#d3d3da;border-top:solid 3px #a33;border-bottom:solid 3px #a33;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,0.2),inset 0 0 0 1px rgba(0,0,0,0.1)}header.exception{padding:18px 20px;height:66px;min-height:59px;overflow:hidden;background-color:#20202a;color:#aaa;text-shadow:0 1px 0 rgba(0,0,0,0.3);font-weight:200;box-shadow:inset 0 -5px 3px -3px rgba(0,0,0,0.05),inset 0 -1px 0 rgba(0,0,0,0.05);-webkit-text-smoothing:antialiased}header.exception .fix-actions{margin-top:.5em}header.exception .fix-actions input[type=submit]{font-weight:bold}header.exception h2{font-weight:200;font-size:11pt}header.exception h2,header.exception p{line-height:1.5em;overflow:hidden;white-space:pre;text-overflow:ellipsis}header.exception h2 strong{font-weight:700;color:#d55}header.exception p{font-weight:200;font-size:17pt;color:white}header.exception:hover{height:auto;z-index:2}header.exception:hover h2,header.exception:hover p{padding-right:20px;overflow-y:auto;word-wrap:break-word;white-space:pre-wrap;height:auto;max-height:7.5em}@media screen and (max-width: 1100px){header.exception{height:auto}header.exception h2,header.exception p{padding-right:20px;overflow-y:auto;word-wrap:break-word;height:auto;max-height:7em}}.better-errors-javascript-not-loaded .backtrace .tabs{display:none}nav.tabs{border-bottom:solid 1px #ddd;background-color:#eee;text-align:center;padding:6px;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1)}nav.tabs a{display:inline-block;height:22px;line-height:22px;padding:0 10px;text-decoration:none;font-size:8pt;font-weight:bold;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.6)}nav.tabs a.selected{color:white;background:rgba(0,0,0,0.5);border-radius:16px;box-shadow:1px 1px 0 rgba(255,255,255,0.1);text-shadow:0 0 4px rgba(0,0,0,0.4),0 1px 0 rgba(0,0,0,0.4)}nav.tabs a.disabled{text-decoration:line-through;text-shadow:none;cursor:default}ul.frames{box-shadow:0 0 10px rgba(0,0,0,0.1)}ul.frames li{background-color:#f8f8f8;background:-webkit-linear-gradient(top, #f8f8f8 80%, #f0f0f0);background:-moz-linear-gradient(top, #f8f8f8 80%, #f0f0f0);background:linear-gradient(top, #f8f8f8 80%, #f0f0f0);box-shadow:inset 0 -1px 0 #e2e2e2;padding:7px 20px;cursor:pointer;overflow:hidden}ul.frames .name,ul.frames .location{overflow:hidden;height:1.5em;white-space:nowrap;word-wrap:none;text-overflow:ellipsis}ul.frames .method{color:#966}ul.frames .location{font-size:0.85em;font-weight:400;color:#999}ul.frames .line{font-weight:bold}ul.frames li.selected{background:#38a;box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),inset 0 2px 0 rgba(255,255,255,0.01),inset 0 -1px 0 rgba(0,0,0,0.1)}ul.frames li.selected .name,ul.frames li.selected .method,ul.frames li.selected .location{color:white;text-shadow:0 1px 0 rgba(0,0,0,0.2)}ul.frames li.selected .location{opacity:0.6}ul.frames li{padding-left:60px;position:relative}ul.frames li .icon{display:block;width:20px;height:20px;line-height:20px;border-radius:15px;text-align:center;background:white;border:solid 2px #ccc;font-size:9pt;font-weight:200;font-style:normal;position:absolute;top:14px;left:20px}ul.frames .icon.application{background:#808090;border-color:#555}ul.frames .icon.application:before{content:'A';color:white;text-shadow:0 0 3px rgba(0,0,0,0.2)}@media screen and (max-width: 1100px){ul.frames li{padding-top:6px;padding-bottom:6px;padding-left:36px;line-height:1.3}ul.frames li .icon{width:11px;height:11px;line-height:11px;top:7px;left:10px;font-size:5pt}ul.frames .name,ul.frames .location{display:inline-block;line-height:1.3;height:1.3em}ul.frames .name{margin-right:10px}}pre,code,.be-repl input,.be-repl .command-line span,textarea,.code_linenums{font-family:menlo, lucida console, monospace;font-size:8pt}p.no-javascript-notice{margin-bottom:1em;padding:1em;border:2px solid #e00}.better-errors-javascript-loaded .no-javascript-notice{display:none}.no-inline-style-notice{display:none}.trace_info{background:#fff;padding:6px;border-radius:3px;margin-bottom:2px;box-shadow:0 0 10px rgba(0,0,0,0.03),1px 1px 0 rgba(0,0,0,0.05),-1px 1px 0 rgba(0,0,0,0.05),0 0 0 4px rgba(0,0,0,0.04)}.code_block{background:#f1f1f1;border-left:1px solid #ccc}.trace_info .title{background:#f1f1f1;box-shadow:inset 0 1px 0 rgba(255,255,255,0.3);overflow:hidden;padding:6px 10px;border:solid 1px #ccc;border-bottom:0;border-top-left-radius:2px;border-top-right-radius:2px}.trace_info .title .name,.trace_info .title .location{font-size:9pt;line-height:26px;height:26px;overflow:hidden}.trace_info .title .location{float:left;font-weight:bold;font-size:10pt}.trace_info .title .location a{color:inherit;text-decoration:none;border-bottom:1px solid #aaaaaa}.trace_info .title .location a:hover{border-color:#666666}.trace_info .title .name{float:right;font-weight:200}.better-errors-javascript-not-loaded .be-repl{display:none}.code,.be-console,.unavailable{padding:5px;box-shadow:inset 3px 3px 3px rgba(0,0,0,0.1),inset 0 0 0 1px rgba(0,0,0,0.1)}.code,.unavailable{text-shadow:none}.code_linenums{background:#f1f1f1;padding-top:10px;padding-bottom:9px;float:left}.code_linenums span{display:block;padding:0 12px}.code,.be-console .syntax-highlighted{text-shadow:none}.code,.be-console .syntax-highlighted{background-color:#fdf6e3;color:#586e75}.code .c,.be-console .syntax-highlighted .c{color:#93a1a1}.code .err,.be-console .syntax-highlighted .err{color:#586e75}.code .g,.be-console .syntax-highlighted .g{color:#586e75}.code .k,.be-console .syntax-highlighted .k{color:#859900}.code .l,.be-console .syntax-highlighted .l{color:#586e75}.code .n,.be-console .syntax-highlighted .n{color:#586e75}.code .o,.be-console .syntax-highlighted .o{color:#859900}.code .x,.be-console .syntax-highlighted .x{color:#cb4b16}.code .p,.be-console .syntax-highlighted .p{color:#586e75}.code .cm,.be-console .syntax-highlighted .cm{color:#93a1a1}.code .cp,.be-console .syntax-highlighted .cp{color:#859900}.code .c1,.be-console .syntax-highlighted .c1{color:#93a1a1}.code .cs,.be-console .syntax-highlighted .cs{color:#859900}.code .gd,.be-console .syntax-highlighted .gd{color:#2aa198}.code .ge,.be-console .syntax-highlighted .ge{color:#586e75;font-style:italic}.code .gr,.be-console .syntax-highlighted .gr{color:#dc322f}.code .gh,.be-console .syntax-highlighted .gh{color:#cb4b16}.code .gi,.be-console .syntax-highlighted .gi{color:#859900}.code .go,.be-console .syntax-highlighted .go{color:#586e75}.code .gp,.be-console .syntax-highlighted .gp{color:#586e75}.code .gs,.be-console .syntax-highlighted .gs{color:#586e75;font-weight:bold}.code .gu,.be-console .syntax-highlighted .gu{color:#cb4b16}.code .gt,.be-console .syntax-highlighted .gt{color:#586e75}.code .kc,.be-console .syntax-highlighted .kc{color:#cb4b16}.code .kd,.be-console .syntax-highlighted .kd{color:#268bd2}.code .kn,.be-console .syntax-highlighted .kn{color:#859900}.code .kp,.be-console .syntax-highlighted .kp{color:#859900}.code .kr,.be-console .syntax-highlighted .kr{color:#268bd2}.code .kt,.be-console .syntax-highlighted .kt{color:#dc322f}.code .ld,.be-console .syntax-highlighted .ld{color:#586e75}.code .m,.be-console .syntax-highlighted .m{color:#2aa198}.code .s,.be-console .syntax-highlighted .s{color:#2aa198}.code .na,.be-console .syntax-highlighted .na{color:#586e75}.code .nb,.be-console .syntax-highlighted .nb{color:#B58900}.code .nc,.be-console .syntax-highlighted .nc{color:#268bd2}.code .no,.be-console .syntax-highlighted .no{color:#cb4b16}.code .nd,.be-console .syntax-highlighted .nd{color:#268bd2}.code .ni,.be-console .syntax-highlighted .ni{color:#cb4b16}.code .ne,.be-console .syntax-highlighted .ne{color:#cb4b16}.code .nf,.be-console .syntax-highlighted .nf{color:#268bd2}.code .nl,.be-console .syntax-highlighted .nl{color:#586e75}.code .nn,.be-console .syntax-highlighted .nn{color:#586e75}.code .nx,.be-console .syntax-highlighted .nx{color:#586e75}.code .py,.be-console .syntax-highlighted .py{color:#586e75}.code .nt,.be-console .syntax-highlighted .nt{color:#268bd2}.code .nv,.be-console .syntax-highlighted .nv{color:#268bd2}.code .ow,.be-console .syntax-highlighted .ow{color:#859900}.code .w,.be-console .syntax-highlighted .w{color:#586e75}.code .mf,.be-console .syntax-highlighted .mf{color:#2aa198}.code .mh,.be-console .syntax-highlighted .mh{color:#2aa198}.code .mi,.be-console .syntax-highlighted .mi{color:#2aa198}.code .mo,.be-console .syntax-highlighted .mo{color:#2aa198}.code .sb,.be-console .syntax-highlighted .sb{color:#93a1a1}.code .sc,.be-console .syntax-highlighted .sc{color:#2aa198}.code .sd,.be-console .syntax-highlighted .sd{color:#586e75}.code .s2,.be-console .syntax-highlighted .s2{color:#2aa198}.code .se,.be-console .syntax-highlighted .se{color:#cb4b16}.code .sh,.be-console .syntax-highlighted .sh{color:#586e75}.code .si,.be-console .syntax-highlighted .si{color:#2aa198}.code .sx,.be-console .syntax-highlighted .sx{color:#2aa198}.code .sr,.be-console .syntax-highlighted .sr{color:#dc322f}.code .s1,.be-console .syntax-highlighted .s1{color:#2aa198}.code .ss,.be-console .syntax-highlighted .ss{color:#2aa198}.code .bp,.be-console .syntax-highlighted .bp{color:#268bd2}.code .vc,.be-console .syntax-highlighted .vc{color:#268bd2}.code .vg,.be-console .syntax-highlighted .vg{color:#268bd2}.code .vi,.be-console .syntax-highlighted .vi{color:#268bd2}.code .il,.be-console .syntax-highlighted .il{color:#2aa198}@media (prefers-color-scheme: dark){.code{background-color:#002b36;color:#93a1a1}.code .c{color:#586e75;background-color:transparent;font-style:inherit}.code .err{color:#93a1a1;background-color:transparent;font-style:inherit}.code .g{color:#93a1a1;background-color:transparent;font-style:inherit}.code .k{color:#859900;background-color:transparent;font-style:inherit}.code .l{color:#93a1a1;background-color:transparent;font-style:inherit}.code .n{color:#93a1a1;background-color:transparent;font-style:inherit}.code .o{color:#859900;background-color:transparent;font-style:inherit}.code .x{color:#cb4b16;background-color:transparent;font-style:inherit}.code .p{color:#93a1a1;background-color:transparent;font-style:inherit}.code .cm{color:#586e75;background-color:transparent;font-style:inherit}.code .cp{color:#859900;background-color:transparent;font-style:inherit}.code .c1{color:#586e75;background-color:transparent;font-style:inherit}.code .cs{color:#859900;background-color:transparent;font-style:inherit}.code .gd{color:#2aa198;background-color:transparent;font-style:inherit}.code .ge{color:#93a1a1;background-color:transparent;font-style:italic}.code .gr{color:#dc322f;background-color:transparent;font-style:inherit}.code .gh{color:#cb4b16;background-color:transparent;font-style:inherit}.code .gi{color:#859900;background-color:transparent;font-style:inherit}.code .go{color:#93a1a1;background-color:transparent;font-style:inherit}.code .gp{color:#93a1a1;background-color:transparent;font-style:inherit}.code .gs{color:#93a1a1;background-color:transparent;font-weight:bold}.code .gu{color:#cb4b16;background-color:transparent;font-style:inherit}.code .gt{color:#93a1a1;background-color:transparent;font-style:inherit}.code .kc{color:#cb4b16;background-color:transparent;font-style:inherit}.code .kd{color:#268bd2;background-color:transparent;font-style:inherit}.code .kn{color:#859900;background-color:transparent;font-style:inherit}.code .kp{color:#859900;background-color:transparent;font-style:inherit}.code .kr{color:#268bd2;background-color:transparent;font-style:inherit}.code .kt{color:#dc322f;background-color:transparent;font-style:inherit}.code .ld{color:#93a1a1;background-color:transparent;font-style:inherit}.code .m{color:#2aa198;background-color:transparent;font-style:inherit}.code .s{color:#2aa198;background-color:transparent;font-style:inherit}.code .na{color:#93a1a1;background-color:transparent;font-style:inherit}.code .nb{color:#B58900;background-color:transparent;font-style:inherit}.code .nc{color:#268bd2;background-color:transparent;font-style:inherit}.code .no{color:#cb4b16;background-color:transparent;font-style:inherit}.code .nd{color:#268bd2;background-color:transparent;font-style:inherit}.code .ni{color:#cb4b16;background-color:transparent;font-style:inherit}.code .ne{color:#cb4b16;background-color:transparent;font-style:inherit}.code .nf{color:#268bd2;background-color:transparent;font-style:inherit}.code .nl{color:#93a1a1;background-color:transparent;font-style:inherit}.code .nn{color:#93a1a1;background-color:transparent;font-style:inherit}.code .nx{color:#93a1a1;background-color:transparent;font-style:inherit}.code .py{color:#93a1a1;background-color:transparent;font-style:inherit}.code .nt{color:#268bd2;background-color:transparent;font-style:inherit}.code .nv{color:#268bd2;background-color:transparent;font-style:inherit}.code .ow{color:#859900;background-color:transparent;font-style:inherit}.code .w{color:#93a1a1;background-color:transparent;font-style:inherit}.code .mf{color:#2aa198;background-color:transparent;font-style:inherit}.code .mh{color:#2aa198;background-color:transparent;font-style:inherit}.code .mi{color:#2aa198;background-color:transparent;font-style:inherit}.code .mo{color:#2aa198;background-color:transparent;font-style:inherit}.code .sb{color:#586e75;background-color:transparent;font-style:inherit}.code .sc{color:#2aa198;background-color:transparent;font-style:inherit}.code .sd{color:#93a1a1;background-color:transparent;font-style:inherit}.code .s2{color:#2aa198;background-color:transparent;font-style:inherit}.code .se{color:#cb4b16;background-color:transparent;font-style:inherit}.code .sh{color:#93a1a1;background-color:transparent;font-style:inherit}.code .si{color:#2aa198;background-color:transparent;font-style:inherit}.code .sx{color:#2aa198;background-color:transparent;font-style:inherit}.code .sr{color:#dc322f;background-color:transparent;font-style:inherit}.code .s1{color:#2aa198;background-color:transparent;font-style:inherit}.code .ss{color:#2aa198;background-color:transparent;font-style:inherit}.code .bp{color:#268bd2;background-color:transparent;font-style:inherit}.code .vc{color:#268bd2;background-color:transparent;font-style:inherit}.code .vg{color:#268bd2;background-color:transparent;font-style:inherit}.code .vi{color:#268bd2;background-color:transparent;font-style:inherit}.code .il{color:#2aa198;background-color:transparent;font-style:inherit}}.code{margin-bottom:-1px;border-top-left-radius:2px;padding:10px 0;overflow:auto}.code .code-wrapper{display:inline-block;min-width:100%}.code pre{padding-left:12px;min-height:16px}p.unavailable{padding:20px 0 40px 0;text-align:center;color:#b99;font-weight:bold}p.unavailable:before{content:'\00d7';display:block;color:#daa;text-align:center;font-size:40pt;font-weight:normal;margin-bottom:-10px}@-webkit-keyframes highlight{0%{background:rgba(51,136,170,0.45)}100%{background:rgba(51,136,170,0.15)}}@-moz-keyframes highlight{0%{background:rgba(51,136,170,0.45)}100%{background:rgba(51,136,170,0.15)}}@keyframes highlight{0%{background:rgba(51,136,170,0.45)}100%{background:rgba(51,136,170,0.15)}}.code .highlight,.code_linenums .highlight{background:rgba(51,136,170,0.15);-webkit-animation:highlight 400ms linear 1;-moz-animation:highlight 400ms linear 1;animation:highlight 400ms linear 1}.be-console{background:#fff;padding:0 1px 10px 1px;border-bottom-left-radius:2px;border-bottom-right-radius:2px}.be-console pre{padding:10px 10px 0 10px;max-height:400px;overflow-x:none;overflow-y:auto;margin-bottom:-3px;word-wrap:break-word;white-space:pre-wrap}.be-console .command-line{display:table;width:100%}.be-console .command-line span,.be-console .command-line input{display:table-cell}.be-console .command-line span{width:1%;padding-right:5px;padding-left:10px;white-space:pre}.be-console .command-line input{width:99%}.be-console input,.be-console input:focus{outline:0;border:0;padding:0;background:transparent;margin:0}.hint{margin:15px 0 20px 0;font-size:8pt;color:#8080a0;padding-left:20px}.console-has-been-used .live-console-hint{display:none}.better-errors-javascript-not-loaded .live-console-hint{display:none}.hint:before{content:'\25b2';margin-right:5px;opacity:0.5}.sub{padding:10px 0;margin:10px 0}.sub h3{color:#39a;font-size:1.1em;margin:10px 0;text-shadow:0 1px 0 rgba(255,255,255,0.6);-webkit-font-smoothing:antialiased}.sub .inset{overflow-y:auto}.sub table{table-layout:fixed}.sub table td{border-top:dotted 1px #ddd;padding:7px 1px}.sub table td.name{width:150px;font-weight:bold;font-size:0.8em;padding-right:20px;word-wrap:break-word}.sub table td pre{max-height:15em;overflow-y:auto}.sub table td pre{width:100%;word-wrap:break-word;white-space:normal}.sub .unsupported{font-family:sans-serif;color:#777}nav.sidebar::-webkit-scrollbar,.inset pre::-webkit-scrollbar,.be-console pre::-webkit-scrollbar,.code::-webkit-scrollbar{width:10px;height:10px}.inset pre::-webkit-scrollbar-thumb,.be-console pre::-webkit-scrollbar-thumb,.code::-webkit-scrollbar-thumb{background:#ccc;border-radius:5px}nav.sidebar::-webkit-scrollbar-thumb{background:rgba(0,0,0,0);border-radius:5px}nav.sidebar:hover::-webkit-scrollbar-thumb{background-color:#999;background:-webkit-linear-gradient(left, #aaa, #999)}.be-console pre:hover::-webkit-scrollbar-thumb,.inset pre:hover::-webkit-scrollbar-thumb,.code:hover::-webkit-scrollbar-thumb{background:#888}
|
@@ -2,731 +2,11 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title><%= exception_type %> at <%= request_path %></title>
|
5
|
+
<link rel="icon" href="data:;base64,=" />
|
5
6
|
</head>
|
6
7
|
<body class="better-errors-javascript-not-loaded">
|
7
8
|
<%# Stylesheets are placed in the <body> for Turbolinks compatibility. %>
|
8
|
-
|
9
|
-
/* Basic reset */
|
10
|
-
* {
|
11
|
-
margin: 0;
|
12
|
-
padding: 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
table {
|
16
|
-
width: 100%;
|
17
|
-
border-collapse: collapse;
|
18
|
-
}
|
19
|
-
|
20
|
-
th, td {
|
21
|
-
vertical-align: top;
|
22
|
-
text-align: left;
|
23
|
-
}
|
24
|
-
|
25
|
-
textarea {
|
26
|
-
resize: none;
|
27
|
-
}
|
28
|
-
|
29
|
-
body {
|
30
|
-
font-size: 10pt;
|
31
|
-
}
|
32
|
-
|
33
|
-
body, td, input, textarea {
|
34
|
-
font-family: helvetica neue, lucida grande, sans-serif;
|
35
|
-
line-height: 1.5;
|
36
|
-
color: #333;
|
37
|
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
|
38
|
-
}
|
39
|
-
|
40
|
-
html {
|
41
|
-
background: #f0f0f5;
|
42
|
-
}
|
43
|
-
|
44
|
-
.clearfix::after{
|
45
|
-
clear: both;
|
46
|
-
content: ".";
|
47
|
-
display: block;
|
48
|
-
height: 0;
|
49
|
-
visibility: hidden;
|
50
|
-
}
|
51
|
-
|
52
|
-
/* ---------------------------------------------------------------------
|
53
|
-
* Basic layout
|
54
|
-
* --------------------------------------------------------------------- */
|
55
|
-
|
56
|
-
/* Small */
|
57
|
-
@media screen and (max-width: 1100px) {
|
58
|
-
html {
|
59
|
-
overflow-y: scroll;
|
60
|
-
}
|
61
|
-
|
62
|
-
body {
|
63
|
-
margin: 0 20px;
|
64
|
-
}
|
65
|
-
|
66
|
-
header.exception {
|
67
|
-
margin: 0 -20px;
|
68
|
-
}
|
69
|
-
|
70
|
-
nav.sidebar {
|
71
|
-
padding: 0;
|
72
|
-
margin: 20px 0;
|
73
|
-
}
|
74
|
-
|
75
|
-
ul.frames {
|
76
|
-
max-height: 200px;
|
77
|
-
overflow: auto;
|
78
|
-
}
|
79
|
-
}
|
80
|
-
|
81
|
-
/* Wide */
|
82
|
-
@media screen and (min-width: 1100px) {
|
83
|
-
header.exception {
|
84
|
-
position: fixed;
|
85
|
-
top: 0;
|
86
|
-
left: 0;
|
87
|
-
right: 0;
|
88
|
-
}
|
89
|
-
|
90
|
-
nav.sidebar,
|
91
|
-
.frame_info {
|
92
|
-
position: fixed;
|
93
|
-
top: 102px;
|
94
|
-
bottom: 0;
|
95
|
-
|
96
|
-
box-sizing: border-box;
|
97
|
-
|
98
|
-
overflow-y: auto;
|
99
|
-
overflow-x: hidden;
|
100
|
-
}
|
101
|
-
|
102
|
-
nav.sidebar {
|
103
|
-
width: 40%;
|
104
|
-
left: 20px;
|
105
|
-
top: 122px;
|
106
|
-
bottom: 20px;
|
107
|
-
}
|
108
|
-
|
109
|
-
.frame_info {
|
110
|
-
display: none;
|
111
|
-
|
112
|
-
right: 0;
|
113
|
-
left: 40%;
|
114
|
-
|
115
|
-
padding: 20px;
|
116
|
-
padding-left: 10px;
|
117
|
-
margin-left: 30px;
|
118
|
-
}
|
119
|
-
.frame_info.current {
|
120
|
-
display: block;
|
121
|
-
}
|
122
|
-
}
|
123
|
-
|
124
|
-
nav.sidebar {
|
125
|
-
background: #d3d3da;
|
126
|
-
border-top: solid 3px #a33;
|
127
|
-
border-bottom: solid 3px #a33;
|
128
|
-
border-radius: 4px;
|
129
|
-
box-shadow: 0 0 6px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
|
130
|
-
}
|
131
|
-
|
132
|
-
/* ---------------------------------------------------------------------
|
133
|
-
* Header
|
134
|
-
* --------------------------------------------------------------------- */
|
135
|
-
|
136
|
-
header.exception {
|
137
|
-
padding: 18px 20px;
|
138
|
-
|
139
|
-
height: 66px;
|
140
|
-
min-height: 59px;
|
141
|
-
|
142
|
-
overflow: hidden;
|
143
|
-
|
144
|
-
background-color: #20202a;
|
145
|
-
color: #aaa;
|
146
|
-
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
|
147
|
-
font-weight: 200;
|
148
|
-
box-shadow: inset 0 -5px 3px -3px rgba(0, 0, 0, 0.05), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
|
149
|
-
|
150
|
-
-webkit-text-smoothing: antialiased;
|
151
|
-
}
|
152
|
-
|
153
|
-
/* Heading */
|
154
|
-
header.exception .fix-actions {
|
155
|
-
margin-top: .5em;
|
156
|
-
}
|
157
|
-
|
158
|
-
header.exception .fix-actions input[type=submit] {
|
159
|
-
font-weight: bold;
|
160
|
-
}
|
161
|
-
|
162
|
-
header.exception h2 {
|
163
|
-
font-weight: 200;
|
164
|
-
font-size: 11pt;
|
165
|
-
}
|
166
|
-
|
167
|
-
header.exception h2,
|
168
|
-
header.exception p {
|
169
|
-
line-height: 1.5em;
|
170
|
-
overflow: hidden;
|
171
|
-
white-space: pre;
|
172
|
-
text-overflow: ellipsis;
|
173
|
-
}
|
174
|
-
|
175
|
-
header.exception h2 strong {
|
176
|
-
font-weight: 700;
|
177
|
-
color: #d55;
|
178
|
-
}
|
179
|
-
|
180
|
-
header.exception p {
|
181
|
-
font-weight: 200;
|
182
|
-
font-size: 17pt;
|
183
|
-
color: white;
|
184
|
-
}
|
185
|
-
|
186
|
-
header.exception:hover {
|
187
|
-
height: auto;
|
188
|
-
z-index: 2;
|
189
|
-
}
|
190
|
-
|
191
|
-
header.exception:hover h2,
|
192
|
-
header.exception:hover p {
|
193
|
-
padding-right: 20px;
|
194
|
-
overflow-y: auto;
|
195
|
-
word-wrap: break-word;
|
196
|
-
white-space: pre-wrap;
|
197
|
-
height: auto;
|
198
|
-
max-height: 7.5em;
|
199
|
-
}
|
200
|
-
|
201
|
-
@media screen and (max-width: 1100px) {
|
202
|
-
header.exception {
|
203
|
-
height: auto;
|
204
|
-
}
|
205
|
-
|
206
|
-
header.exception h2,
|
207
|
-
header.exception p {
|
208
|
-
padding-right: 20px;
|
209
|
-
overflow-y: auto;
|
210
|
-
word-wrap: break-word;
|
211
|
-
height: auto;
|
212
|
-
max-height: 7em;
|
213
|
-
}
|
214
|
-
}
|
215
|
-
|
216
|
-
<%#
|
217
|
-
/* Light theme */
|
218
|
-
header.exception {
|
219
|
-
text-shadow: 0 1px 0 rgba(250, 250, 250, 0.6);
|
220
|
-
background: rgba(200,100,50,0.10);
|
221
|
-
color: #977;
|
222
|
-
}
|
223
|
-
header.exception h2 strong {
|
224
|
-
color: #533;
|
225
|
-
}
|
226
|
-
header.exception p {
|
227
|
-
color: #744;
|
228
|
-
}
|
229
|
-
%>
|
230
|
-
|
231
|
-
/* ---------------------------------------------------------------------
|
232
|
-
* Navigation
|
233
|
-
* --------------------------------------------------------------------- */
|
234
|
-
|
235
|
-
.better-errors-javascript-not-loaded .backtrace .tabs {
|
236
|
-
display: none;
|
237
|
-
}
|
238
|
-
|
239
|
-
nav.tabs {
|
240
|
-
border-bottom: solid 1px #ddd;
|
241
|
-
|
242
|
-
background-color: #eee;
|
243
|
-
text-align: center;
|
244
|
-
|
245
|
-
padding: 6px;
|
246
|
-
|
247
|
-
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
248
|
-
}
|
249
|
-
|
250
|
-
nav.tabs a {
|
251
|
-
display: inline-block;
|
252
|
-
|
253
|
-
height: 22px;
|
254
|
-
line-height: 22px;
|
255
|
-
padding: 0 10px;
|
256
|
-
|
257
|
-
text-decoration: none;
|
258
|
-
font-size: 8pt;
|
259
|
-
font-weight: bold;
|
260
|
-
|
261
|
-
color: #999;
|
262
|
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
|
263
|
-
}
|
264
|
-
|
265
|
-
nav.tabs a.selected {
|
266
|
-
color: white;
|
267
|
-
background: rgba(0, 0, 0, 0.5);
|
268
|
-
border-radius: 16px;
|
269
|
-
box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.1);
|
270
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 0, 0, 0.4);
|
271
|
-
}
|
272
|
-
|
273
|
-
nav.tabs a.disabled {
|
274
|
-
text-decoration: line-through;
|
275
|
-
text-shadow: none;
|
276
|
-
cursor: default;
|
277
|
-
}
|
278
|
-
|
279
|
-
/* ---------------------------------------------------------------------
|
280
|
-
* Sidebar
|
281
|
-
* --------------------------------------------------------------------- */
|
282
|
-
|
283
|
-
ul.frames {
|
284
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
285
|
-
}
|
286
|
-
|
287
|
-
/* Each item */
|
288
|
-
ul.frames li {
|
289
|
-
background-color: #f8f8f8;
|
290
|
-
background: -webkit-linear-gradient(top, #f8f8f8 80%, #f0f0f0);
|
291
|
-
background: -moz-linear-gradient(top, #f8f8f8 80%, #f0f0f0);
|
292
|
-
background: linear-gradient(top, #f8f8f8 80%, #f0f0f0);
|
293
|
-
box-shadow: inset 0 -1px 0 #e2e2e2;
|
294
|
-
padding: 7px 20px;
|
295
|
-
|
296
|
-
cursor: pointer;
|
297
|
-
overflow: hidden;
|
298
|
-
}
|
299
|
-
|
300
|
-
ul.frames .name,
|
301
|
-
ul.frames .location {
|
302
|
-
overflow: hidden;
|
303
|
-
height: 1.5em;
|
304
|
-
|
305
|
-
white-space: nowrap;
|
306
|
-
word-wrap: none;
|
307
|
-
text-overflow: ellipsis;
|
308
|
-
}
|
309
|
-
|
310
|
-
ul.frames .method {
|
311
|
-
color: #966;
|
312
|
-
}
|
313
|
-
|
314
|
-
ul.frames .location {
|
315
|
-
font-size: 0.85em;
|
316
|
-
font-weight: 400;
|
317
|
-
color: #999;
|
318
|
-
}
|
319
|
-
|
320
|
-
ul.frames .line {
|
321
|
-
font-weight: bold;
|
322
|
-
}
|
323
|
-
|
324
|
-
/* Selected frame */
|
325
|
-
ul.frames li.selected {
|
326
|
-
background: #38a;
|
327
|
-
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.01), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
328
|
-
}
|
329
|
-
|
330
|
-
ul.frames li.selected .name,
|
331
|
-
ul.frames li.selected .method,
|
332
|
-
ul.frames li.selected .location {
|
333
|
-
color: white;
|
334
|
-
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
|
335
|
-
}
|
336
|
-
|
337
|
-
ul.frames li.selected .location {
|
338
|
-
opacity: 0.6;
|
339
|
-
}
|
340
|
-
|
341
|
-
/* Iconography */
|
342
|
-
ul.frames li {
|
343
|
-
padding-left: 60px;
|
344
|
-
position: relative;
|
345
|
-
}
|
346
|
-
|
347
|
-
ul.frames li .icon {
|
348
|
-
display: block;
|
349
|
-
width: 20px;
|
350
|
-
height: 20px;
|
351
|
-
line-height: 20px;
|
352
|
-
border-radius: 15px;
|
353
|
-
|
354
|
-
text-align: center;
|
355
|
-
|
356
|
-
background: white;
|
357
|
-
border: solid 2px #ccc;
|
358
|
-
|
359
|
-
font-size: 9pt;
|
360
|
-
font-weight: 200;
|
361
|
-
font-style: normal;
|
362
|
-
|
363
|
-
position: absolute;
|
364
|
-
top: 14px;
|
365
|
-
left: 20px;
|
366
|
-
}
|
367
|
-
|
368
|
-
ul.frames .icon.application {
|
369
|
-
background: #808090;
|
370
|
-
border-color: #555;
|
371
|
-
}
|
372
|
-
|
373
|
-
ul.frames .icon.application:before {
|
374
|
-
content: 'A';
|
375
|
-
color: white;
|
376
|
-
text-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
|
377
|
-
}
|
378
|
-
|
379
|
-
/* Responsiveness -- flow to single-line mode */
|
380
|
-
@media screen and (max-width: 1100px) {
|
381
|
-
ul.frames li {
|
382
|
-
padding-top: 6px;
|
383
|
-
padding-bottom: 6px;
|
384
|
-
padding-left: 36px;
|
385
|
-
line-height: 1.3;
|
386
|
-
}
|
387
|
-
|
388
|
-
ul.frames li .icon {
|
389
|
-
width: 11px;
|
390
|
-
height: 11px;
|
391
|
-
line-height: 11px;
|
392
|
-
|
393
|
-
top: 7px;
|
394
|
-
left: 10px;
|
395
|
-
font-size: 5pt;
|
396
|
-
}
|
397
|
-
|
398
|
-
ul.frames .name,
|
399
|
-
ul.frames .location {
|
400
|
-
display: inline-block;
|
401
|
-
line-height: 1.3;
|
402
|
-
height: 1.3em;
|
403
|
-
}
|
404
|
-
|
405
|
-
ul.frames .name {
|
406
|
-
margin-right: 10px;
|
407
|
-
}
|
408
|
-
}
|
409
|
-
|
410
|
-
/* ---------------------------------------------------------------------
|
411
|
-
* Monospace
|
412
|
-
* --------------------------------------------------------------------- */
|
413
|
-
|
414
|
-
pre, code, .be-repl input, .be-repl .command-line span, textarea, .code_linenums {
|
415
|
-
font-family: menlo, lucida console, monospace;
|
416
|
-
font-size: 8pt;
|
417
|
-
}
|
418
|
-
|
419
|
-
/* ---------------------------------------------------------------------
|
420
|
-
* Display area
|
421
|
-
* --------------------------------------------------------------------- */
|
422
|
-
|
423
|
-
p.no-javascript-notice {
|
424
|
-
margin-bottom: 1em;
|
425
|
-
padding: 1em;
|
426
|
-
border: 2px solid #e00;
|
427
|
-
}
|
428
|
-
.better-errors-javascript-loaded .no-javascript-notice {
|
429
|
-
display: none;
|
430
|
-
}
|
431
|
-
.no-inline-style-notice {
|
432
|
-
display: none;
|
433
|
-
}
|
434
|
-
|
435
|
-
.trace_info {
|
436
|
-
background: #fff;
|
437
|
-
padding: 6px;
|
438
|
-
border-radius: 3px;
|
439
|
-
margin-bottom: 2px;
|
440
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.03), 1px 1px 0 rgba(0, 0, 0, 0.05), -1px 1px 0 rgba(0, 0, 0, 0.05), 0 0 0 4px rgba(0, 0, 0, 0.04);
|
441
|
-
}
|
442
|
-
|
443
|
-
.code_block{
|
444
|
-
background: #f1f1f1;
|
445
|
-
border-left: 1px solid #ccc;
|
446
|
-
}
|
447
|
-
|
448
|
-
/* Titlebar */
|
449
|
-
.trace_info .title {
|
450
|
-
background: #f1f1f1;
|
451
|
-
|
452
|
-
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
|
453
|
-
overflow: hidden;
|
454
|
-
padding: 6px 10px;
|
455
|
-
|
456
|
-
border: solid 1px #ccc;
|
457
|
-
border-bottom: 0;
|
458
|
-
|
459
|
-
border-top-left-radius: 2px;
|
460
|
-
border-top-right-radius: 2px;
|
461
|
-
}
|
462
|
-
|
463
|
-
.trace_info .title .name,
|
464
|
-
.trace_info .title .location {
|
465
|
-
font-size: 9pt;
|
466
|
-
line-height: 26px;
|
467
|
-
height: 26px;
|
468
|
-
overflow: hidden;
|
469
|
-
}
|
470
|
-
|
471
|
-
.trace_info .title .location {
|
472
|
-
float: left;
|
473
|
-
font-weight: bold;
|
474
|
-
font-size: 10pt;
|
475
|
-
}
|
476
|
-
|
477
|
-
.trace_info .title .location a {
|
478
|
-
color:inherit;
|
479
|
-
text-decoration:none;
|
480
|
-
border-bottom:1px solid #aaaaaa;
|
481
|
-
}
|
482
|
-
|
483
|
-
.trace_info .title .location a:hover {
|
484
|
-
border-color:#666666;
|
485
|
-
}
|
486
|
-
|
487
|
-
.trace_info .title .name {
|
488
|
-
float: right;
|
489
|
-
font-weight: 200;
|
490
|
-
}
|
491
|
-
|
492
|
-
.better-errors-javascript-not-loaded .be-repl {
|
493
|
-
display: none;
|
494
|
-
}
|
495
|
-
|
496
|
-
.code, .be-console, .unavailable {
|
497
|
-
background: #fff;
|
498
|
-
padding: 5px;
|
499
|
-
|
500
|
-
box-shadow: inset 3px 3px 3px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
|
501
|
-
}
|
502
|
-
|
503
|
-
.code_linenums{
|
504
|
-
background:#f1f1f1;
|
505
|
-
padding-top:10px;
|
506
|
-
padding-bottom:9px;
|
507
|
-
float:left;
|
508
|
-
}
|
509
|
-
|
510
|
-
.code_linenums span{
|
511
|
-
display:block;
|
512
|
-
padding:0 12px;
|
513
|
-
}
|
514
|
-
|
515
|
-
.code {
|
516
|
-
margin-bottom: -1px;
|
517
|
-
border-top-left-radius:2px;
|
518
|
-
padding: 10px 0;
|
519
|
-
overflow: auto;
|
520
|
-
}
|
521
|
-
|
522
|
-
.code pre{
|
523
|
-
padding-left:12px;
|
524
|
-
min-height:16px;
|
525
|
-
}
|
526
|
-
|
527
|
-
/* Source unavailable */
|
528
|
-
p.unavailable {
|
529
|
-
padding: 20px 0 40px 0;
|
530
|
-
text-align: center;
|
531
|
-
color: #b99;
|
532
|
-
font-weight: bold;
|
533
|
-
}
|
534
|
-
|
535
|
-
p.unavailable:before {
|
536
|
-
content: '\00d7';
|
537
|
-
display: block;
|
538
|
-
|
539
|
-
color: #daa;
|
540
|
-
|
541
|
-
text-align: center;
|
542
|
-
font-size: 40pt;
|
543
|
-
font-weight: normal;
|
544
|
-
margin-bottom: -10px;
|
545
|
-
}
|
546
|
-
|
547
|
-
@-webkit-keyframes highlight {
|
548
|
-
0% { background: rgba(220, 30, 30, 0.3); }
|
549
|
-
100% { background: rgba(220, 30, 30, 0.1); }
|
550
|
-
}
|
551
|
-
@-moz-keyframes highlight {
|
552
|
-
0% { background: rgba(220, 30, 30, 0.3); }
|
553
|
-
100% { background: rgba(220, 30, 30, 0.1); }
|
554
|
-
}
|
555
|
-
@keyframes highlight {
|
556
|
-
0% { background: rgba(220, 30, 30, 0.3); }
|
557
|
-
100% { background: rgba(220, 30, 30, 0.1); }
|
558
|
-
}
|
559
|
-
|
560
|
-
.code .highlight, .code_linenums .highlight {
|
561
|
-
background: rgba(220, 30, 30, 0.1);
|
562
|
-
-webkit-animation: highlight 400ms linear 1;
|
563
|
-
-moz-animation: highlight 400ms linear 1;
|
564
|
-
animation: highlight 400ms linear 1;
|
565
|
-
}
|
566
|
-
|
567
|
-
/* REPL shell */
|
568
|
-
.be-console {
|
569
|
-
padding: 0 1px 10px 1px;
|
570
|
-
border-bottom-left-radius: 2px;
|
571
|
-
border-bottom-right-radius: 2px;
|
572
|
-
}
|
573
|
-
|
574
|
-
.be-console pre {
|
575
|
-
padding: 10px 10px 0 10px;
|
576
|
-
max-height: 400px;
|
577
|
-
overflow-x: none;
|
578
|
-
overflow-y: auto;
|
579
|
-
margin-bottom: -3px;
|
580
|
-
word-wrap: break-word;
|
581
|
-
white-space: pre-wrap;
|
582
|
-
}
|
583
|
-
|
584
|
-
/* .command-line > span + input */
|
585
|
-
.be-console .command-line {
|
586
|
-
display: table;
|
587
|
-
width: 100%;
|
588
|
-
}
|
589
|
-
|
590
|
-
.be-console .command-line span,
|
591
|
-
.be-console .command-line input {
|
592
|
-
display: table-cell;
|
593
|
-
}
|
594
|
-
|
595
|
-
.be-console .command-line span {
|
596
|
-
width: 1%;
|
597
|
-
padding-right: 5px;
|
598
|
-
padding-left: 10px;
|
599
|
-
white-space: pre;
|
600
|
-
}
|
601
|
-
|
602
|
-
.be-console .command-line input {
|
603
|
-
width: 99%;
|
604
|
-
}
|
605
|
-
|
606
|
-
/* Input box */
|
607
|
-
.be-console input,
|
608
|
-
.be-console input:focus {
|
609
|
-
outline: 0;
|
610
|
-
border: 0;
|
611
|
-
padding: 0;
|
612
|
-
background: transparent;
|
613
|
-
margin: 0;
|
614
|
-
}
|
615
|
-
|
616
|
-
/* Hint text */
|
617
|
-
.hint {
|
618
|
-
margin: 15px 0 20px 0;
|
619
|
-
font-size: 8pt;
|
620
|
-
color: #8080a0;
|
621
|
-
padding-left: 20px;
|
622
|
-
}
|
623
|
-
.console-has-been-used .live-console-hint {
|
624
|
-
display: none;
|
625
|
-
}
|
626
|
-
.better-errors-javascript-not-loaded .live-console-hint {
|
627
|
-
display: none;
|
628
|
-
}
|
629
|
-
|
630
|
-
.hint:before {
|
631
|
-
content: '\25b2';
|
632
|
-
margin-right: 5px;
|
633
|
-
opacity: 0.5;
|
634
|
-
}
|
635
|
-
|
636
|
-
/* ---------------------------------------------------------------------
|
637
|
-
* Variable infos
|
638
|
-
* --------------------------------------------------------------------- */
|
639
|
-
|
640
|
-
.sub {
|
641
|
-
padding: 10px 0;
|
642
|
-
margin: 10px 0;
|
643
|
-
}
|
644
|
-
|
645
|
-
.sub h3 {
|
646
|
-
color: #39a;
|
647
|
-
font-size: 1.1em;
|
648
|
-
margin: 10px 0;
|
649
|
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
|
650
|
-
|
651
|
-
-webkit-font-smoothing: antialiased;
|
652
|
-
}
|
653
|
-
|
654
|
-
.sub .inset {
|
655
|
-
overflow-y: auto;
|
656
|
-
}
|
657
|
-
|
658
|
-
.sub table {
|
659
|
-
table-layout: fixed;
|
660
|
-
}
|
661
|
-
|
662
|
-
.sub table td {
|
663
|
-
border-top: dotted 1px #ddd;
|
664
|
-
padding: 7px 1px;
|
665
|
-
}
|
666
|
-
|
667
|
-
.sub table td.name {
|
668
|
-
width: 150px;
|
669
|
-
|
670
|
-
font-weight: bold;
|
671
|
-
font-size: 0.8em;
|
672
|
-
padding-right: 20px;
|
673
|
-
|
674
|
-
word-wrap: break-word;
|
675
|
-
}
|
676
|
-
|
677
|
-
.sub table td pre {
|
678
|
-
max-height: 15em;
|
679
|
-
overflow-y: auto;
|
680
|
-
}
|
681
|
-
|
682
|
-
.sub table td pre {
|
683
|
-
width: 100%;
|
684
|
-
|
685
|
-
word-wrap: break-word;
|
686
|
-
white-space: normal;
|
687
|
-
}
|
688
|
-
|
689
|
-
/* "(object doesn't support inspect)" */
|
690
|
-
.sub .unsupported {
|
691
|
-
font-family: sans-serif;
|
692
|
-
color: #777;
|
693
|
-
}
|
694
|
-
|
695
|
-
/* ---------------------------------------------------------------------
|
696
|
-
* Scrollbar
|
697
|
-
* --------------------------------------------------------------------- */
|
698
|
-
|
699
|
-
nav.sidebar::-webkit-scrollbar,
|
700
|
-
.inset pre::-webkit-scrollbar,
|
701
|
-
.be-console pre::-webkit-scrollbar,
|
702
|
-
.code::-webkit-scrollbar {
|
703
|
-
width: 10px;
|
704
|
-
height: 10px;
|
705
|
-
}
|
706
|
-
|
707
|
-
.inset pre::-webkit-scrollbar-thumb,
|
708
|
-
.be-console pre::-webkit-scrollbar-thumb,
|
709
|
-
.code::-webkit-scrollbar-thumb {
|
710
|
-
background: #ccc;
|
711
|
-
border-radius: 5px;
|
712
|
-
}
|
713
|
-
|
714
|
-
nav.sidebar::-webkit-scrollbar-thumb {
|
715
|
-
background: rgba(0, 0, 0, 0.0);
|
716
|
-
border-radius: 5px;
|
717
|
-
}
|
718
|
-
|
719
|
-
nav.sidebar:hover::-webkit-scrollbar-thumb {
|
720
|
-
background-color: #999;
|
721
|
-
background: -webkit-linear-gradient(left, #aaa, #999);
|
722
|
-
}
|
723
|
-
|
724
|
-
.be-console pre:hover::-webkit-scrollbar-thumb,
|
725
|
-
.inset pre:hover::-webkit-scrollbar-thumb,
|
726
|
-
.code:hover::-webkit-scrollbar-thumb {
|
727
|
-
background: #888;
|
728
|
-
}
|
729
|
-
</style>
|
9
|
+
<%== ErrorPageStyle.style_tag(csp_nonce) %>
|
730
10
|
|
731
11
|
<%# IE8 compatibility crap %>
|
732
12
|
<script nonce="<%= csp_nonce %>">
|
@@ -969,7 +249,7 @@
|
|
969
249
|
self.writeOutput(response.error + "\n");
|
970
250
|
}
|
971
251
|
self.writeOutput(self._prompt + " ");
|
972
|
-
self.writeRawOutput(response.highlighted_input + "
|
252
|
+
self.writeRawOutput("<span class='syntax-highlighted'>" + response.highlighted_input + "</span>\n");
|
973
253
|
self.writeOutput(response.result);
|
974
254
|
self.setPrompt(response.prompt);
|
975
255
|
self.setInput(response.prefilled_input);
|
data/lib/better_errors.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.0
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Hailey Somerville
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sassc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: kramdown
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +123,7 @@ dependencies:
|
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: 1.0.0
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
126
|
+
name: rouge
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - ">="
|
@@ -140,13 +154,16 @@ description: Provides a better error page for Rails and other Rack apps. Include
|
|
140
154
|
source code inspection, a live REPL and local/instance variable inspection for all
|
141
155
|
stack frames.
|
142
156
|
email:
|
143
|
-
-
|
157
|
+
- hailey@hailey.lol
|
144
158
|
executables: []
|
145
159
|
extensions: []
|
146
160
|
extra_rdoc_files: []
|
147
161
|
files:
|
148
162
|
- ".coveralls.yml"
|
163
|
+
- ".github/release-drafter.yml"
|
149
164
|
- ".github/workflows/ci.yml"
|
165
|
+
- ".github/workflows/draft_release_update.yml"
|
166
|
+
- ".github/workflows/pull_request.yml"
|
150
167
|
- ".github/workflows/release.yml"
|
151
168
|
- ".gitignore"
|
152
169
|
- ".ruby-version"
|
@@ -185,6 +202,7 @@ files:
|
|
185
202
|
- lib/better_errors/code_formatter/text.rb
|
186
203
|
- lib/better_errors/editor.rb
|
187
204
|
- lib/better_errors/error_page.rb
|
205
|
+
- lib/better_errors/error_page_style.rb
|
188
206
|
- lib/better_errors/exception_extension.rb
|
189
207
|
- lib/better_errors/exception_hint.rb
|
190
208
|
- lib/better_errors/inspectable_value.rb
|
@@ -195,6 +213,7 @@ files:
|
|
195
213
|
- lib/better_errors/repl/basic.rb
|
196
214
|
- lib/better_errors/repl/pry.rb
|
197
215
|
- lib/better_errors/stack_frame.rb
|
216
|
+
- lib/better_errors/templates/main.css
|
198
217
|
- lib/better_errors/templates/main.erb
|
199
218
|
- lib/better_errors/templates/text.erb
|
200
219
|
- lib/better_errors/templates/variable_info.erb
|
@@ -217,11 +236,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
236
|
version: 2.0.0
|
218
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
219
238
|
requirements:
|
220
|
-
- - "
|
239
|
+
- - ">="
|
221
240
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
241
|
+
version: '0'
|
223
242
|
requirements: []
|
224
|
-
rubygems_version: 3.1.
|
243
|
+
rubygems_version: 3.1.6
|
225
244
|
signing_key:
|
226
245
|
specification_version: 4
|
227
246
|
summary: Better error page for Rails and other Rack apps
|