code_buddy 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.rdoc +20 -6
- data/lib/code_buddy.rb +0 -3
- data/lib/code_buddy/middleware.rb +3 -1
- data/lib/code_buddy/public/stylesheets/coderay.css +0 -55
- data/lib/code_buddy/version.rb +1 -1
- data/lib/code_buddy/views/form.erb +1 -1
- metadata +23 -4
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,18 @@
|
|
1
|
-
=
|
1
|
+
=CodeBuddy
|
2
2
|
|
3
|
-
|
3
|
+
CodeBuddy makes it easy for you to understand the code behind each line of a Ruby exception stack. When something goes wrong during development and you get an exception do you read through the stack trace and start opening files in VIM or TextMate? With CodeBuddy the stack trace and source files are all available in your browser making it easy to understand what's going on.
|
4
|
+
|
5
|
+
== Use it in your Rails app
|
6
|
+
|
7
|
+
Simply add one line to your app's Gemfile and the Rails exception page just got better.
|
8
|
+
|
9
|
+
gem 'code_buddy'
|
10
|
+
|
11
|
+
And install it:
|
12
|
+
|
13
|
+
$ bundle install
|
14
|
+
|
15
|
+
Now when you're running in development (or any environment with config.consider_all_requests_local=true) whenever you see a exception page you'll be able to click on the stack and see it inside CodeBuddy.
|
4
16
|
|
5
17
|
== Run as a Sinatra app
|
6
18
|
|
@@ -10,10 +22,12 @@ Code Buddy will display a Ruby stack in a browser, along with code snippets from
|
|
10
22
|
|
11
23
|
Now open http://localhost:4567 and paste your stack.
|
12
24
|
|
13
|
-
==
|
25
|
+
== Caveats
|
14
26
|
|
15
|
-
|
27
|
+
This should also work as Rack middleware in Rails 2.3.x or any Rack app soon, but we haven't tried it yet.
|
16
28
|
|
17
|
-
|
29
|
+
We also haven't tested viewing a stack with Internet Explorer or running the Sinatra app on Windows.
|
30
|
+
|
31
|
+
== Contributors
|
18
32
|
|
19
|
-
|
33
|
+
{Alex Rothenberg}[http://www.alexrothenberg.com/], {Daniel Higginbotham}[http://www.flyingmachinestudios.com/], {Pat Shaughnessy}[http://patshaughnessy.net/]
|
data/lib/code_buddy.rb
CHANGED
@@ -9,7 +9,9 @@ if rails_loaded
|
|
9
9
|
module CodeBuddy
|
10
10
|
class Railtie < Rails::Railtie
|
11
11
|
initializer "code_buddy.add_middleware" do |app|
|
12
|
-
app.
|
12
|
+
if app.config.action_dispatch.show_exceptions
|
13
|
+
app.middleware.swap ActionDispatch::ShowExceptions, CodeBuddy::ShowExceptions
|
14
|
+
end
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
@@ -37,7 +37,6 @@
|
|
37
37
|
bottom: 0;
|
38
38
|
left: 0;
|
39
39
|
width: 100%;
|
40
|
-
/* background: #56547A; */
|
41
40
|
background: #CCCCFF;
|
42
41
|
opacity: 0.35;
|
43
42
|
-moz-opacity: 0.35;
|
@@ -45,58 +44,4 @@
|
|
45
44
|
}
|
46
45
|
.container {
|
47
46
|
position: relative;
|
48
|
-
/* float: left; */
|
49
|
-
}
|
50
|
-
|
51
|
-
#shadow {
|
52
|
-
width: 600px;
|
53
|
-
position: relative;
|
54
|
-
border-right: 1px solid #aaa;
|
55
|
-
border-bottom: 1px solid #aaa;
|
56
|
-
background: #666666;
|
57
|
-
}
|
58
|
-
#bodyblock {
|
59
|
-
width: 600px;
|
60
|
-
position: relative;
|
61
|
-
top: -3px;
|
62
|
-
left: -3px;
|
63
|
-
border-right: 1px solid #666666;
|
64
|
-
border-bottom: 1px solid #666666;
|
65
|
-
text-align: left;
|
66
|
-
color: #666;
|
67
|
-
background: #ff9966;
|
68
|
-
}
|
69
|
-
#header {
|
70
|
-
width: 600px;
|
71
|
-
height: 20px;
|
72
|
-
text-align: left;
|
73
|
-
background: #c0c0c0;
|
74
|
-
line-height: 20px;
|
75
|
-
font-family: Monaco;
|
76
|
-
font-size: 10px;
|
77
|
-
}
|
78
|
-
#header_left {
|
79
|
-
width: 300px;
|
80
|
-
float: left;
|
81
|
-
text-align: left;
|
82
|
-
}
|
83
|
-
#header_right {
|
84
|
-
width: 300px;
|
85
|
-
float: right;
|
86
|
-
text-align: right;
|
87
|
-
vertical-align: middle;
|
88
|
-
}
|
89
|
-
#header_right a.icon {
|
90
|
-
background:url(/images/right.png);
|
91
|
-
display:block;
|
92
|
-
float:right;
|
93
|
-
width:20px;
|
94
|
-
height:20px;
|
95
|
-
}
|
96
|
-
#header_left a.icon {
|
97
|
-
background:url(/images/left.png);
|
98
|
-
display:block;
|
99
|
-
float:left;
|
100
|
-
width:20px;
|
101
|
-
height:20px;
|
102
47
|
}
|
data/lib/code_buddy/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Pat Shaughnessy, Alex Rothenberg, Daniel Higginbotham
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-10 00:00:00 -05:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rack
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ~>
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 31
|
27
30
|
segments:
|
28
31
|
- 1
|
29
32
|
- 2
|
@@ -35,9 +38,11 @@ dependencies:
|
|
35
38
|
name: sinatra
|
36
39
|
prerelease: false
|
37
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
38
42
|
requirements:
|
39
43
|
- - ~>
|
40
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 19
|
41
46
|
segments:
|
42
47
|
- 1
|
43
48
|
- 1
|
@@ -49,9 +54,11 @@ dependencies:
|
|
49
54
|
name: json_pure
|
50
55
|
prerelease: false
|
51
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
52
58
|
requirements:
|
53
59
|
- - ~>
|
54
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 11
|
55
62
|
segments:
|
56
63
|
- 1
|
57
64
|
- 4
|
@@ -63,9 +70,11 @@ dependencies:
|
|
63
70
|
name: coderay
|
64
71
|
prerelease: false
|
65
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
66
74
|
requirements:
|
67
75
|
- - ~>
|
68
76
|
- !ruby/object:Gem::Version
|
77
|
+
hash: 55
|
69
78
|
segments:
|
70
79
|
- 0
|
71
80
|
- 9
|
@@ -77,9 +86,11 @@ dependencies:
|
|
77
86
|
name: rake
|
78
87
|
prerelease: false
|
79
88
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
80
90
|
requirements:
|
81
91
|
- - ~>
|
82
92
|
- !ruby/object:Gem::Version
|
93
|
+
hash: 49
|
83
94
|
segments:
|
84
95
|
- 0
|
85
96
|
- 8
|
@@ -91,9 +102,11 @@ dependencies:
|
|
91
102
|
name: rspec
|
92
103
|
prerelease: false
|
93
104
|
requirement: &id006 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
94
106
|
requirements:
|
95
107
|
- - ~>
|
96
108
|
- !ruby/object:Gem::Version
|
109
|
+
hash: 7
|
97
110
|
segments:
|
98
111
|
- 2
|
99
112
|
- 2
|
@@ -105,9 +118,11 @@ dependencies:
|
|
105
118
|
name: mocha
|
106
119
|
prerelease: false
|
107
120
|
requirement: &id007 !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
108
122
|
requirements:
|
109
123
|
- - ~>
|
110
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 47
|
111
126
|
segments:
|
112
127
|
- 0
|
113
128
|
- 9
|
@@ -175,23 +190,27 @@ rdoc_options: []
|
|
175
190
|
require_paths:
|
176
191
|
- lib
|
177
192
|
required_ruby_version: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
178
194
|
requirements:
|
179
195
|
- - ">="
|
180
196
|
- !ruby/object:Gem::Version
|
197
|
+
hash: 3
|
181
198
|
segments:
|
182
199
|
- 0
|
183
200
|
version: "0"
|
184
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
+
none: false
|
185
203
|
requirements:
|
186
204
|
- - ">="
|
187
205
|
- !ruby/object:Gem::Version
|
206
|
+
hash: 3
|
188
207
|
segments:
|
189
208
|
- 0
|
190
209
|
version: "0"
|
191
210
|
requirements: []
|
192
211
|
|
193
212
|
rubyforge_project: code_buddy
|
194
|
-
rubygems_version: 1.3.
|
213
|
+
rubygems_version: 1.3.7
|
195
214
|
signing_key:
|
196
215
|
specification_version: 3
|
197
216
|
summary: See the Ruby code running in your app.
|