better_errors 0.0.6 → 0.0.7

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.
data/README.md CHANGED
@@ -16,7 +16,9 @@ Better Errors replaces the standard Rails error page with a much better and more
16
16
  Add this line to your application's Gemfile (under the **development** group):
17
17
 
18
18
  ```ruby
19
- gem "better_errors"
19
+ group :development do
20
+ gem "better_errors"
21
+ end
20
22
  ```
21
23
 
22
24
  If you would like to use Better Errors' **advanced features**, you need to add the [`binding_of_caller`](https://github.com/banister/binding_of_caller) gem to your Gemfile:
@@ -51,7 +53,8 @@ end
51
53
 
52
54
  * **Supported**
53
55
  * MRI 1.9.2, 1.9.3
54
- * Rubinius (untested, should work)
56
+ * JRuby (1.9 mode) - *advanced features unsupported*
57
+ * Rubinius (1.9 mode) - *advanced features unsupported*
55
58
  * **Coming soon**
56
59
  * MRI 2.0.0 - the official API for grabbing caller bindings is slated for MRI 2.0.0, but it has not been implemented yet
57
60
 
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.version = BetterErrors::VERSION
9
9
  s.authors = ["Charlie Somerville"]
10
10
  s.email = ["charlie@charliesomerville.com"]
11
- s.description = %q{Better Errors gives Rails a better error page.}
12
- s.summary = %q{Better Errors gives Rails a better error page}
11
+ 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.}
12
+ s.summary = %q{Better error page for Rails and other Rack apps}
13
13
  s.homepage = "https://github.com/charliesome/better_errors"
14
14
  s.license = "MIT"
15
15
 
@@ -95,6 +95,8 @@ module BetterErrors
95
95
  end
96
96
  html << "</div>"
97
97
  end
98
+ rescue Errno::ENOENT
99
+ "<p>Source unavailable</p>"
98
100
  end
99
101
  end
100
102
  end
@@ -8,7 +8,7 @@ module BetterErrors
8
8
  end
9
9
 
10
10
  def call(env)
11
- if env["REQUEST_PATH"] =~ %r{\A/__better_errors/(?<oid>\d+)/(?<method>\w+)\z}
11
+ if env["PATH_INFO"] =~ %r{/__better_errors/(?<oid>\d+)/(?<method>\w+)}
12
12
  internal_call env, $~
13
13
  else
14
14
  app_call env
@@ -1,3 +1,3 @@
1
1
  module BetterErrors
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -41,5 +41,12 @@ module BetterErrors
41
41
  response.should_not include("14 fourteen")
42
42
  end
43
43
  end
44
+
45
+ it "should not die if the source file is not a real filename" do
46
+ exception.stub!(:backtrace).and_return([
47
+ "<internal:prelude>:10:in `spawn_rack_application'"
48
+ ])
49
+ response.should include("Source unavailable")
50
+ end
44
51
  end
45
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -59,7 +59,9 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- description: Better Errors gives Rails a better error page.
62
+ description: Provides a better error page for Rails and other Rack apps. Includes
63
+ source code inspection, a live REPL and local/instance variable inspection for all
64
+ stack frames.
63
65
  email:
64
66
  - charlie@charliesomerville.com
65
67
  executables: []
@@ -110,7 +112,7 @@ rubyforge_project:
110
112
  rubygems_version: 1.8.24
111
113
  signing_key:
112
114
  specification_version: 3
113
- summary: Better Errors gives Rails a better error page
115
+ summary: Better error page for Rails and other Rack apps
114
116
  test_files:
115
117
  - spec/better_errors/error_frame_spec.rb
116
118
  - spec/better_errors/error_page_spec.rb