better_errors 1.0.0.rc1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of better_errors might be problematic. Click here for more details.
- checksums.yaml +6 -14
- data/.travis.yml +2 -0
- data/Gemfile +1 -1
- data/README.md +0 -8
- data/better_errors.gemspec +1 -0
- data/ext/mkrf_conf.rb +11 -0
- data/lib/better_errors.rb +3 -2
- data/lib/better_errors/repl/pry.rb +1 -1
- data/lib/better_errors/templates/main.erb +44 -13
- data/lib/better_errors/version.rb +1 -1
- metadata +13 -11
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MTBhZDMwMTI5MzFiZTYwNzNlNzk2YWI2NTE2OTYzODc2ODZjZjFkYjQ4MGIw
|
10
|
-
MGI5ZGM5NzVkMzQzZmUzYzBjOTJlYmYzMWZjMDZlMjZjYmQzNjQ2NDM5OTY5
|
11
|
-
NTdlNDMwMjFhNTlhY2VhYWU1YzVlMTA2ZGZmYmI0OGYwYzYxNmQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZTZmNjc4ZTRmZjlhZTZhOTJhMjc1MDM0NDAwMDMyYjdkNzY4MDdkOTNlN2Nk
|
14
|
-
YjBhMjhlNjE3YTZhZmFkODU1OTk1MGFkMjk4MWRhMzljNzc4ZTczMzdhMTBk
|
15
|
-
MTRjNWJhMGU4NDllYWFiMDFiOWNiMmNhZTQ4OGU2MzE3MGQyMzQ=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b488ee0f5ae9ab59d99cdf4600dcd8068142f7af
|
4
|
+
data.tar.gz: 16eb29a92fc99d51ac5bec8bfda47551ee70eb5e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 011da282c504e61de751a0ac51084fe71bca604ade85fc6fd432d7fd2cf87d2f13396766d78b1f80d54481b605bc490acf7d5a44d358d2721ce87b3058617078
|
7
|
+
data.tar.gz: ed553954f0e7471ec4ad323d96e5db470e0c94db4545ecaf97f84c828ac2d4c8a257cfe8f54aa48e1f0f1b8ee3394e33c6649a046572c21f35efb4f6912d14e3
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -21,14 +21,6 @@ group :development do
|
|
21
21
|
end
|
22
22
|
```
|
23
23
|
|
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:
|
25
|
-
|
26
|
-
```ruby
|
27
|
-
gem "binding_of_caller"
|
28
|
-
```
|
29
|
-
|
30
|
-
This is an optional dependency however, and Better Errors will work without it.
|
31
|
-
|
32
24
|
## Security
|
33
25
|
|
34
26
|
**NOTE:** It is *critical* you put better\_errors in the **development** section. **Do NOT run better_errors in production, or on Internet facing hosts.**
|
data/better_errors.gemspec
CHANGED
data/ext/mkrf_conf.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'rubygems/dependency_installer'
|
2
|
+
|
3
|
+
gem = Gem::DependencyInstaller.new
|
4
|
+
|
5
|
+
if ["rbx", "ruby"].include?(RUBY_ENGINE)
|
6
|
+
# This MUST match the version specified in lib/better_errors.rb, or else
|
7
|
+
# weird shit will happen.
|
8
|
+
if Gem::Dependency.new("binding_of_caller", "0.7.2").matching_specs.empty?
|
9
|
+
gem.install "binding_of_caller", "0.7.2"
|
10
|
+
end
|
11
|
+
end
|
data/lib/better_errors.rb
CHANGED
@@ -134,10 +134,11 @@ module BetterErrors
|
|
134
134
|
BetterErrors.editor = default_editor
|
135
135
|
end
|
136
136
|
|
137
|
-
|
137
|
+
if Gem::Dependency.new("binding_of_caller", "0.7.2").matching_specs.any?
|
138
|
+
gem "binding_of_caller", "0.7.2"
|
138
139
|
require "binding_of_caller"
|
139
140
|
BetterErrors.binding_of_caller_available = true
|
140
|
-
|
141
|
+
else
|
141
142
|
BetterErrors.binding_of_caller_available = false
|
142
143
|
end
|
143
144
|
|
@@ -252,6 +252,12 @@
|
|
252
252
|
text-shadow: 0 0 4px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 0, 0, 0.4);
|
253
253
|
}
|
254
254
|
|
255
|
+
nav.tabs a.disabled {
|
256
|
+
text-decoration: line-through;
|
257
|
+
text-shadow: none;
|
258
|
+
cursor: default;
|
259
|
+
}
|
260
|
+
|
255
261
|
/* ---------------------------------------------------------------------
|
256
262
|
* Sidebar
|
257
263
|
* --------------------------------------------------------------------- */
|
@@ -953,24 +959,40 @@
|
|
953
959
|
document.querySelector(".frames li")
|
954
960
|
).onclick();
|
955
961
|
|
962
|
+
// This is the second query performed for frames; maybe the 'allFrames' list
|
963
|
+
// currently used and this list can be better used to avoid the repetition:
|
964
|
+
var applicationFramesCount = document.querySelectorAll(
|
965
|
+
"ul.frames li[data-context=application]"
|
966
|
+
).length;
|
967
|
+
|
968
|
+
var applicationFramesButtonIsInstalled = false;
|
956
969
|
var applicationFramesButton = document.getElementById("application_frames");
|
957
970
|
var allFramesButton = document.getElementById("all_frames");
|
958
971
|
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
allFrames[i].
|
972
|
+
// The application frames button only needs to be bound if
|
973
|
+
// there are actually any application frames to look at.
|
974
|
+
var installApplicationFramesButton = function() {
|
975
|
+
applicationFramesButton.onclick = function() {
|
976
|
+
allFramesButton.className = "";
|
977
|
+
applicationFramesButton.className = "selected";
|
978
|
+
for(var i = 0; i < allFrames.length; i++) {
|
979
|
+
if(allFrames[i].attributes["data-context"].value == "application") {
|
980
|
+
allFrames[i].style.display = "block";
|
981
|
+
} else {
|
982
|
+
allFrames[i].style.display = "none";
|
983
|
+
}
|
967
984
|
}
|
968
|
-
|
969
|
-
|
970
|
-
|
985
|
+
return false;
|
986
|
+
};
|
987
|
+
|
988
|
+
applicationFramesButtonIsInstalled = true;
|
989
|
+
}
|
971
990
|
|
972
991
|
allFramesButton.onclick = function() {
|
973
|
-
|
992
|
+
if(applicationFramesButtonIsInstalled) {
|
993
|
+
applicationFramesButton.className = "";
|
994
|
+
}
|
995
|
+
|
974
996
|
allFramesButton.className = "selected";
|
975
997
|
for(var i = 0; i < allFrames.length; i++) {
|
976
998
|
allFrames[i].style.display = "block";
|
@@ -978,7 +1000,16 @@
|
|
978
1000
|
return false;
|
979
1001
|
};
|
980
1002
|
|
981
|
-
|
1003
|
+
// If there are no application frames, select the 'All Frames'
|
1004
|
+
// tab by default.
|
1005
|
+
if(applicationFramesCount > 0) {
|
1006
|
+
installApplicationFramesButton();
|
1007
|
+
applicationFramesButton.onclick();
|
1008
|
+
} else {
|
1009
|
+
applicationFramesButton.className = "disabled";
|
1010
|
+
applicationFramesButton.title = "No application frames available";
|
1011
|
+
allFramesButton.onclick();
|
1012
|
+
}
|
982
1013
|
})();
|
983
1014
|
</script>
|
984
1015
|
</html>
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Somerville
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08
|
11
|
+
date: 2013-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubis
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.6.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.6.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coderay
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.0.0
|
41
41
|
description: Provides a better error page for Rails and other Rack apps. Includes
|
@@ -44,7 +44,8 @@ description: Provides a better error page for Rails and other Rack apps. Include
|
|
44
44
|
email:
|
45
45
|
- charlie@charliesomerville.com
|
46
46
|
executables: []
|
47
|
-
extensions:
|
47
|
+
extensions:
|
48
|
+
- ext/mkrf_conf.rb
|
48
49
|
extra_rdoc_files: []
|
49
50
|
files:
|
50
51
|
- .gitignore
|
@@ -55,6 +56,7 @@ files:
|
|
55
56
|
- README.md
|
56
57
|
- Rakefile
|
57
58
|
- better_errors.gemspec
|
59
|
+
- ext/mkrf_conf.rb
|
58
60
|
- lib/better_errors.rb
|
59
61
|
- lib/better_errors/code_formatter.rb
|
60
62
|
- lib/better_errors/code_formatter/html.rb
|
@@ -91,17 +93,17 @@ require_paths:
|
|
91
93
|
- lib
|
92
94
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
95
|
requirements:
|
94
|
-
- -
|
96
|
+
- - '>='
|
95
97
|
- !ruby/object:Gem::Version
|
96
98
|
version: 1.9.2
|
97
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
100
|
requirements:
|
99
|
-
- -
|
101
|
+
- - '>='
|
100
102
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
103
|
+
version: '0'
|
102
104
|
requirements: []
|
103
105
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.0.
|
106
|
+
rubygems_version: 2.0.3
|
105
107
|
signing_key:
|
106
108
|
specification_version: 4
|
107
109
|
summary: Better error page for Rails and other Rack apps
|