better_errors 2.0.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.coveralls.yml +1 -0
- data/.gitignore +3 -0
- data/.travis.yml +96 -2
- data/CHANGELOG.md +1 -1
- data/Gemfile +2 -7
- data/LICENSE.txt +1 -1
- data/README.md +99 -39
- data/better_errors.gemspec +23 -4
- data/gemfiles/pry010.gemfile +9 -0
- data/gemfiles/pry011.gemfile +8 -0
- data/gemfiles/pry09.gemfile +8 -0
- data/gemfiles/rack.gemfile +7 -0
- data/gemfiles/rack_boc.gemfile +8 -0
- data/gemfiles/rails42.gemfile +9 -0
- data/gemfiles/rails42_boc.gemfile +10 -0
- data/gemfiles/rails42_haml.gemfile +10 -0
- data/gemfiles/rails50.gemfile +8 -0
- data/gemfiles/rails50_boc.gemfile +9 -0
- data/gemfiles/rails50_haml.gemfile +9 -0
- data/gemfiles/rails51.gemfile +8 -0
- data/gemfiles/rails51_boc.gemfile +9 -0
- data/gemfiles/rails51_haml.gemfile +9 -0
- data/gemfiles/rails52.gemfile +8 -0
- data/gemfiles/rails52_boc.gemfile +9 -0
- data/gemfiles/rails52_haml.gemfile +9 -0
- data/gemfiles/rails60.gemfile +7 -0
- data/gemfiles/rails60_boc.gemfile +8 -0
- data/gemfiles/rails60_haml.gemfile +8 -0
- data/lib/better_errors/code_formatter/html.rb +1 -1
- data/lib/better_errors/code_formatter.rb +7 -7
- data/lib/better_errors/error_page.rb +56 -15
- data/lib/better_errors/inspectable_value.rb +45 -0
- data/lib/better_errors/middleware.rb +96 -16
- data/lib/better_errors/raised_exception.rb +13 -3
- data/lib/better_errors/repl/basic.rb +3 -3
- data/lib/better_errors/repl/pry.rb +18 -8
- data/lib/better_errors/repl.rb +6 -4
- data/lib/better_errors/stack_frame.rb +33 -8
- data/lib/better_errors/templates/main.erb +71 -34
- data/lib/better_errors/templates/text.erb +2 -2
- data/lib/better_errors/templates/variable_info.erb +32 -23
- data/lib/better_errors/version.rb +1 -1
- data/lib/better_errors.rb +21 -3
- metadata +118 -35
- data/Rakefile +0 -13
- data/spec/better_errors/code_formatter_spec.rb +0 -92
- data/spec/better_errors/error_page_spec.rb +0 -76
- data/spec/better_errors/middleware_spec.rb +0 -154
- data/spec/better_errors/raised_exception_spec.rb +0 -52
- data/spec/better_errors/repl/basic_spec.rb +0 -18
- data/spec/better_errors/repl/pry_spec.rb +0 -40
- data/spec/better_errors/repl/shared_examples.rb +0 -18
- data/spec/better_errors/stack_frame_spec.rb +0 -157
- data/spec/better_errors/support/my_source.rb +0 -20
- data/spec/better_errors_spec.rb +0 -73
- data/spec/spec_helper.rb +0 -5
- data/spec/without_binding_of_caller.rb +0 -9
data/spec/better_errors_spec.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe BetterErrors do
|
4
|
-
context ".editor" do
|
5
|
-
it "defaults to textmate" do
|
6
|
-
subject.editor["foo.rb", 123].should == "txmt://open?url=file://foo.rb&line=123"
|
7
|
-
end
|
8
|
-
|
9
|
-
it "url escapes the filename" do
|
10
|
-
subject.editor["&.rb", 0].should == "txmt://open?url=file://%26.rb&line=0"
|
11
|
-
end
|
12
|
-
|
13
|
-
[:emacs, :emacsclient].each do |editor|
|
14
|
-
it "uses emacs:// scheme when set to #{editor.inspect}" do
|
15
|
-
subject.editor = editor
|
16
|
-
subject.editor[].should start_with "emacs://"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
[:macvim, :mvim].each do |editor|
|
21
|
-
it "uses mvim:// scheme when set to #{editor.inspect}" do
|
22
|
-
subject.editor = editor
|
23
|
-
subject.editor[].should start_with "mvim://"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
[:sublime, :subl, :st].each do |editor|
|
28
|
-
it "uses subl:// scheme when set to #{editor.inspect}" do
|
29
|
-
subject.editor = editor
|
30
|
-
subject.editor[].should start_with "subl://"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
[:textmate, :txmt, :tm].each do |editor|
|
35
|
-
it "uses txmt:// scheme when set to #{editor.inspect}" do
|
36
|
-
subject.editor = editor
|
37
|
-
subject.editor[].should start_with "txmt://"
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
["emacsclient", "/usr/local/bin/emacsclient"].each do |editor|
|
42
|
-
it "uses emacs:// scheme when EDITOR=#{editor}" do
|
43
|
-
ENV["EDITOR"] = editor
|
44
|
-
subject.editor = subject.default_editor
|
45
|
-
subject.editor[].should start_with "emacs://"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
["mvim -f", "/usr/local/bin/mvim -f"].each do |editor|
|
50
|
-
it "uses mvim:// scheme when EDITOR=#{editor}" do
|
51
|
-
ENV["EDITOR"] = editor
|
52
|
-
subject.editor = subject.default_editor
|
53
|
-
subject.editor[].should start_with "mvim://"
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
["subl -w", "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"].each do |editor|
|
58
|
-
it "uses mvim:// scheme when EDITOR=#{editor}" do
|
59
|
-
ENV["EDITOR"] = editor
|
60
|
-
subject.editor = subject.default_editor
|
61
|
-
subject.editor[].should start_with "subl://"
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
["mate -w", "/usr/bin/mate -w"].each do |editor|
|
66
|
-
it "uses txmt:// scheme when EDITOR=#{editor}" do
|
67
|
-
ENV["EDITOR"] = editor
|
68
|
-
subject.editor = subject.default_editor
|
69
|
-
subject.editor[].should start_with "txmt://"
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
data/spec/spec_helper.rb
DELETED