trace_tree 0.2.9 → 0.2.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2acc2e68551caee98c0c8b0245646acea04bce6d
4
- data.tar.gz: f7b038d0a709e7dc15f9225179177b1948168a54
3
+ metadata.gz: 8c319cfe698cc084bb69799aef2b56fdc3d026ac
4
+ data.tar.gz: e2eedfdc873cd1b4dce0a352beb16ec3f5c00e8b
5
5
  SHA512:
6
- metadata.gz: f8c8e186db907601748d81fcd7c325c35084cb9cd504599337fc95fc0d81d59a2c5dc5cf5a4d4171ecf16b3e4660ace8e1c44f51c71a7e97a330917622f6066c
7
- data.tar.gz: 9e650c794990c69ce8154fcaca17bef4c4c3684295eaa49c84218df412b2a5d1768de8fef6e5c78319f879dc366f45e24f66f99c29a8b3fd406ca684ab37e25a
6
+ metadata.gz: b7b9db24f2a3355146fdda2da93b4f086bb3b141c5bde8d7c8da329ba540412c04a33bef95d6feb71ef7767ad9a7b3a7fe59a57def1140a760c47a386119e2ad
7
+ data.tar.gz: 9ff9e96ca80940f2f137986267437910264171cf0a5709dd962e053793c21974ed0ce8762f2bac6c3ae2d561d14a0fbdbfbcb338fe585427e6c78703eb3a2b11
data/README.md CHANGED
@@ -4,6 +4,12 @@ Print TracePoint(`:b_call`, `:b_return`, `:c_call`, `:c_return`, `:call`, `:retu
4
4
 
5
5
  *Notice: it does not trace `:raise`, which can be represented by Kernel#raise(`:c_call`)*
6
6
 
7
+ - [Installation](#installation)
8
+ - [Usage](#usage)
9
+ - [Parameters](#parameters)
10
+ - [Example 1: Output to HTML](#example-1-output-to-html)
11
+ - [Example 2: Output to STDOUT](#example-2-output-to-stdout)
12
+
7
13
  ## Installation
8
14
 
9
15
  Add this line to your application's Gemfile:
@@ -46,11 +52,27 @@ end
46
52
  * `:html => nil` by default. Set it true to generate a html in which a tree constructed with `<ul>`, `<li>`. (No need to set `color`).
47
53
  * `:tmp => nil` by default. Set it true or a string or an array of string to specify a tmp file under the default tmp dir of your system. (No need to provide `file` argument. It makes parent directories as needed)
48
54
  * `:htmp => nil` by default. It is combination of `:html` and `:tmp`.
55
+ * `:return => true` by default. It puts return values of functions into html.
56
+ * `:args => false` by default. Set it true to puts arguments of `:call` functions into html. Since arguments are always return values of other functions, so this option is not necessary.
49
57
  * `:in => //, :out => nil` by default. Give them regexp(s) to include/exclude methods defined in files match that regexp(s). Notice thread-calls and methods defined by `define_method` are always included. Also, once you set any of these two options, the code to trace should not be in same line with `binding.trace_tree() do`.
50
58
  * `:timer => nil` by default. Set it true if you want to know how much time spent in tracing and drawing tree. Notice the `file` should be appendable, otherwise the time will overwrite the tree.
51
- * `:debug =>` by default. Give it somthing like what for `:tmp` to output a whole list of TracePoints in file for debug.
59
+ * `:debug => nil` by default. Give it somthing like what for `:tmp` to output a whole list of TracePoints in file for debug.
60
+
61
+ ### Example 1: Output to HTML
62
+
63
+ Try to remove a non-existing index:
64
+
65
+ ```ruby
66
+ [4] pry(main)> binding.trace_tree(htmp: 'migrate_rm_index'){ ActiveRecord::Migration.new.remove_index "cars", [:online_at] }
67
+ -- remove_index("cars", [:online_at])
68
+ ArgumentError: Index name 'index_cars_on_online_at' on table 'cars' does not exist
69
+ ```
52
70
 
53
- ### Example
71
+ Then find the result HTML in tmp dir. Move your mouse on any method name, and press `f`/`u` to fold/unfold it's callee, press `p`/`n` to jump to it's previous/next sibling call, press `r` to print return value in scalable footer.
72
+
73
+ ![image](https://user-images.githubusercontent.com/6105214/35904349-bf264ae4-0c1d-11e8-8ab4-0c256e4b014a.png)
74
+
75
+ ### Example 2: Output to STDOUT
54
76
 
55
77
  Want to know what `Sinatra::Base#call` does? Wrap it with `binding.trace_tree`:
56
78
 
@@ -75,357 +97,4 @@ end
75
97
 
76
98
  Execute that sinatra script as normal, then you will see in console:
77
99
 
78
- ```
79
- Sinatra::Application#block in call sin.rb:12
80
- └─Sinatra::Application#call $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:894
81
- ├─Kernel#dup $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:895
82
- │ └─Kernel#initialize_dup $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:895
83
- │ └─Kernel#initialize_copy $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:895
84
- └─Sinatra::Application#call! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:898
85
- ├─Class#new $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:900
86
- │ └─Sinatra::Request#initialize $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:16
87
- ├─Class#new $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:901
88
- │ └─Sinatra::Response#initialize $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:124
89
- │ ├─Sinatra::Response#initialize $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:25
90
- │ │ ├─Integer#to_i $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:26
91
- │ │ ├─Rack::Utils::HeaderHash.new $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:489
92
- │ │ │ ├─Module#=== $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:490
93
- │ │ │ └─Class#new $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:490
94
- │ │ │ └─Rack::Utils::HeaderHash#initialize $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:493
95
- │ │ │ ├─Hash#initialize $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:494
96
- │ │ │ └─Hash#each $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:496
97
- │ │ ├─Rack::Utils::HeaderHash#merge $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:542
98
- │ │ │ ├─Kernel#dup $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:543
99
- │ │ │ │ └─Kernel#initialize_dup $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:543
100
- │ │ │ │ └─Hash#initialize_copy $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:543
101
- │ │ │ └─Rack::Utils::HeaderHash#merge! $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:537
102
- │ │ │ └─Hash#each $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:538
103
- │ │ ├─Rack::Utils::HeaderHash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:511
104
- │ │ │ ├─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
105
- │ │ │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
106
- │ │ │ └─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
107
- │ │ ├─String#== $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:29
108
- │ │ ├─Kernel#lambda $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:30
109
- │ │ ├─Kernel#respond_to? $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:36
110
- │ │ ├─Kernel#respond_to? $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:38
111
- │ │ ├─Array#each $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:39
112
- │ │ └─Kernel#block_given? $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:46
113
- │ ├─Rack::Utils::HeaderHash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:511
114
- │ │ ├─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
115
- │ │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
116
- │ │ └─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
117
- │ └─Rack::Utils::HeaderHash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:515
118
- │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:516
119
- │ └─Hash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:519
120
- ├─Sinatra::Request#params $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:229
121
- │ ├─Sinatra::Request#GET $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:187
122
- │ │ ├─Sinatra::Request#query_string $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:24
123
- │ │ │ └─String#to_s $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:24
124
- │ │ ├─Sinatra::Request#query_string $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:24
125
- │ │ │ └─String#to_s $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:24
126
- │ │ ├─Sinatra::Request#parse_query $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:368
127
- │ │ │ ├─Module#=== $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:370
128
- │ │ │ └─Rack::Utils.parse_nested_query $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:116
129
- │ │ │ ├─Class#new $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:117
130
- │ │ │ │ └─Rack::Utils::KeySpaceConstrainedParams#initialize $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:555
131
- │ │ │ ├─String#split $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:119
132
- │ │ │ ├─Array#each $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:119
133
- │ │ │ └─Rack::Utils::KeySpaceConstrainedParams#to_params_hash $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:575
134
- │ │ │ ├─Hash#keys $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:577
135
- │ │ │ └─Array#each $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:577
136
- │ │ └─Sinatra::Request#query_string $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:24
137
- │ │ └─String#to_s $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:24
138
- │ ├─Sinatra::Request#POST $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:201
139
- │ │ ├─Kernel#nil? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:202
140
- │ │ ├─BasicObject#equal? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:204
141
- │ │ ├─Sinatra::Request#form_data? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:174
142
- │ │ │ ├─Sinatra::Request#media_type $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:42
143
- │ │ │ │ └─Sinatra::Request#content_type $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:27
144
- │ │ │ │ └─NilClass#nil? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:29
145
- │ │ │ └─Array#include? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:177
146
- │ │ │ ├─String#== $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:177
147
- │ │ │ └─String#== $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:177
148
- │ │ └─Sinatra::Request#parseable_data? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:182
149
- │ │ ├─Sinatra::Request#media_type $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:42
150
- │ │ │ └─Sinatra::Request#content_type $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:27
151
- │ │ │ └─NilClass#nil? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:29
152
- │ │ └─Array#include? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:183
153
- │ │ ├─String#== $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:183
154
- │ │ └─String#== $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:183
155
- │ └─Hash#merge $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:230
156
- │ └─Kernel#initialize_dup $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:230
157
- │ └─Hash#initialize_copy $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:230
158
- ├─Sinatra::Application#indifferent_params $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1047
159
- │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1049
160
- │ ├─Sinatra::Application#indifferent_hash $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1061
161
- │ │ └─Class#new $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1062
162
- │ │ └─Hash#initialize $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1062
163
- │ └─Hash#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1051
164
- ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
165
- │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
166
- │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
167
- ├─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1885
168
- │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1885
169
- │ └─Sinatra::Application.development? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1404
170
- │ └─Sinatra::Application.environment (eval):1
171
- ├─Tilt::Cache#clear $GemPath0/gems/tilt-2.0.6/lib/tilt.rb:109
172
- ├─Sinatra::Application#force_encoding $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1810
173
- │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
174
- │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
175
- │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
176
- │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
177
- │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
178
- │ └─Sinatra::Application.force_encoding $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1812
179
- │ ├─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
180
- │ ├─Hash#== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1813
181
- │ ├─Kernel#is_a? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1813
182
- │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1814
183
- │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1816
184
- │ └─Hash#each_value $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1817
185
- ├─Sinatra::Response#[]= $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:56
186
- │ └─Rack::Utils::HeaderHash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:515
187
- │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:516
188
- │ └─Hash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:519
189
- ├─Sinatra::Application#invoke $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1066
190
- │ ├─Kernel#catch $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067
191
- │ │ └─Sinatra::Application#block in invoke $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067
192
- │ │ └─Sinatra::Application#block in call! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907
193
- │ │ └─Sinatra::Application#dispatch! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1081
194
- │ │ ├─Sinatra::Application#invoke $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1066
195
- │ │ │ ├─Kernel#catch $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067
196
- │ │ │ │ └─Sinatra::Application#block in invoke $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067
197
- │ │ │ │ └─Sinatra::Application#block in dispatch! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082
198
- │ │ │ │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
199
- │ │ │ │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
200
- │ │ │ │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
201
- │ │ │ │ ├─Sinatra::Application.static? (eval):1
202
- │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1890
203
- │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1890
204
- │ │ │ │ │ ├─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1889
205
- │ │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1889
206
- │ │ │ │ │ │ ├─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
207
- │ │ │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
208
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
209
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
210
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
211
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
212
- │ │ │ │ │ │ │ ├─#<Class:File>#dirname $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
213
- │ │ │ │ │ │ │ └─#<Class:File>#expand_path $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
214
- │ │ │ │ │ │ ├─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
215
- │ │ │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
216
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
217
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
218
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
219
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
220
- │ │ │ │ │ │ │ ├─#<Class:File>#dirname $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
221
- │ │ │ │ │ │ │ └─#<Class:File>#expand_path $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
222
- │ │ │ │ │ │ └─#<Class:File>#join $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1889
223
- │ │ │ │ │ ├─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1889
224
- │ │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1889
225
- │ │ │ │ │ │ ├─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
226
- │ │ │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
227
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
228
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
229
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
230
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
231
- │ │ │ │ │ │ │ ├─#<Class:File>#dirname $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
232
- │ │ │ │ │ │ │ └─#<Class:File>#expand_path $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
233
- │ │ │ │ │ │ ├─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
234
- │ │ │ │ │ │ │ └─Sinatra::Application.block in <class:Base> $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
235
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
236
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
237
- │ │ │ │ │ │ │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
238
- │ │ │ │ │ │ │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
239
- │ │ │ │ │ │ │ ├─#<Class:File>#dirname $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
240
- │ │ │ │ │ │ │ └─#<Class:File>#expand_path $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1883
241
- │ │ │ │ │ │ └─#<Class:File>#join $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1889
242
- │ │ │ │ │ └─#<Class:File>#exist? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1890
243
- │ │ │ │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
244
- │ │ │ │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
245
- │ │ │ │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
246
- │ │ │ │ ├─Sinatra::Application#filter! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:964
247
- │ │ │ │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
248
- │ │ │ │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
249
- │ │ │ │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
250
- │ │ │ │ │ ├─Sinatra::Application#filter! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:964
251
- │ │ │ │ │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
252
- │ │ │ │ │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
253
- │ │ │ │ │ │ └─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:966
254
- │ │ │ │ │ └─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:966
255
- │ │ │ │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
256
- │ │ │ │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
257
- │ │ │ │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
258
- │ │ │ │ └─Sinatra::Application#route! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:970
259
- │ │ │ │ ├─Sinatra::Request#request_method $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:23
260
- │ │ │ │ └─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972
261
- │ │ │ │ └─Sinatra::Application#block in route! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972
262
- │ │ │ │ └─Sinatra::Application#process_route $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1002
263
- │ │ │ │ ├─Sinatra::Request#path_info $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:22
264
- │ │ │ │ │ └─String#to_s $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:22
265
- │ │ │ │ ├─Regexp#match $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1005
266
- │ │ │ │ ├─MatchData#captures $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1006
267
- │ │ │ │ ├─Array#map! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1006
268
- │ │ │ │ ├─Array#any? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1008
269
- │ │ │ │ └─Kernel#catch $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013
270
- │ │ │ │ └─Sinatra::Application#block in process_route $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013
271
- │ │ │ │ ├─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1014
272
- │ │ │ │ └─Sinatra::Application#block (2 levels) in route! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:973
273
- │ │ │ │ ├─Kernel#instance_variable_get $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:974
274
- │ │ │ │ └─Sinatra::Application#route_eval $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:993
275
- │ │ │ │ ├─Sinatra::Application#block (3 levels) in route! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975
276
- │ │ │ │ │ └─Sinatra::Application.block in compile! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611
277
- │ │ │ │ │ ├─UnboundMethod#bind $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611
278
- │ │ │ │ │ └─Method#call $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611
279
- │ │ │ │ │ └─Sinatra::Application#block in <main> sin.rb:4
280
- │ │ │ │ │ └─Sinatra::Application#block in <main> sin.rb:4
281
- │ │ │ │ └─Kernel#throw $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:994
282
- │ │ │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1068
283
- │ │ │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1068
284
- │ │ │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1069
285
- │ │ │ ├─Array#first $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1069
286
- │ │ │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1069
287
- │ │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1074
288
- │ │ │ └─Sinatra::Application#body $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:238
289
- │ │ │ ├─Kernel#block_given? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:239
290
- │ │ │ ├─Sinatra::Request#head? $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:122
291
- │ │ │ │ └─Sinatra::Request#request_method $GemPath0/gems/rack-1.6.5/lib/rack/request.rb:23
292
- │ │ │ ├─Kernel#is_a? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:243
293
- │ │ │ ├─Kernel#is_a? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:243
294
- │ │ │ ├─Sinatra::Application#headers $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:298
295
- │ │ │ ├─Rack::Utils::HeaderHash#delete $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:522
296
- │ │ │ │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:523
297
- │ │ │ │ ├─Hash#delete $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:524
298
- │ │ │ │ ├─Hash#delete $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:524
299
- │ │ │ │ └─Hash#delete_if $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:525
300
- │ │ │ │ ├─Rack::Utils::HeaderHash#block in delete $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:525
301
- │ │ │ │ │ └─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:525
302
- │ │ │ │ └─Rack::Utils::HeaderHash#block in delete $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:525
303
- │ │ │ │ └─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:525
304
- │ │ │ └─Sinatra::Response#body= $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:129
305
- │ │ │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:130
306
- │ │ │ └─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:131
307
- │ │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
308
- │ │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
309
- │ │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
310
- │ │ └─Sinatra::Application#filter! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:964
311
- │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
312
- │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
313
- │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
314
- │ │ ├─Sinatra::Application#filter! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:964
315
- │ │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
316
- │ │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:965
317
- │ │ │ └─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:966
318
- │ │ └─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:966
319
- │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1068
320
- │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1068
321
- │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1069
322
- │ └─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1074
323
- ├─Sinatra::Application#invoke $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1066
324
- │ ├─Kernel#catch $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067
325
- │ │ └─Sinatra::Application#block in invoke $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067
326
- │ │ └─Sinatra::Application#block in call! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:908
327
- │ │ └─Sinatra::Application#error_block! $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1128
328
- │ │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
329
- │ │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
330
- │ │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
331
- │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1130
332
- │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1131
333
- │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1130
334
- │ │ ├─Class#superclass $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1131
335
- │ │ ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1130
336
- │ │ └─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1139
337
- │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1068
338
- │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1068
339
- │ ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1069
340
- │ └─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1074
341
- ├─Sinatra::Response#[] $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:52
342
- │ └─Rack::Utils::HeaderHash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:511
343
- │ ├─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
344
- │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
345
- │ └─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
346
- ├─Sinatra::Application#body $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:238
347
- │ └─Kernel#block_given? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:239
348
- ├─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:911
349
- ├─Sinatra::Application#body $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:238
350
- │ └─Kernel#block_given? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:239
351
- ├─Kernel#respond_to? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:911
352
- ├─Sinatra::Application#content_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:320
353
- │ ├─Hash#delete $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:322
354
- │ ├─Sinatra::Application#mime_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:314
355
- │ │ └─Sinatra::Base.mime_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1312
356
- │ │ ├─Kernel#nil? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1313
357
- │ │ ├─Symbol#to_s $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1314
358
- │ │ ├─String#include? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1314
359
- │ │ ├─Symbol#to_s $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1315
360
- │ │ ├─String#[] $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1315
361
- │ │ ├─Symbol#to_s $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1315
362
- │ │ └─Rack::Mime.mime_type $GemPath0/gems/rack-1.6.5/lib/rack/mime.rb:16
363
- │ │ ├─String#to_s $GemPath0/gems/rack-1.6.5/lib/rack/mime.rb:17
364
- │ │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/mime.rb:17
365
- │ │ └─Hash#fetch $GemPath0/gems/rack-1.6.5/lib/rack/mime.rb:17
366
- │ ├─Kernel#nil? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:324
367
- │ ├─Kernel#dup $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:325
368
- │ │ └─Kernel#initialize_dup $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:325
369
- │ │ └─String#initialize_copy $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:325
370
- │ ├─Hash#include? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
371
- │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
372
- │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
373
- │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
374
- │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
375
- │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
376
- │ ├─Enumerable#all? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
377
- │ │ └─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
378
- │ │ ├─Sinatra::Application#block in content_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
379
- │ │ │ └─String#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
380
- │ │ ├─Sinatra::Application#block in content_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
381
- │ │ │ └─String#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
382
- │ │ ├─Sinatra::Application#block in content_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
383
- │ │ │ └─String#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
384
- │ │ └─Sinatra::Application#block in content_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
385
- │ │ └─Regexp#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:326
386
- │ ├─Hash#delete $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:327
387
- │ ├─Sinatra::Application#settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:927
388
- │ │ ├─Kernel#class $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:928
389
- │ │ └─Sinatra::Application.settings $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:922
390
- │ ├─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
391
- │ │ └─Sinatra::Application.block in set $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1221
392
- │ ├─String#include? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:329
393
- │ ├─String#include? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:331
394
- │ ├─Enumerable#map $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:332
395
- │ │ └─Hash#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:332
396
- │ │ └─Sinatra::Application#block in content_type $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:332
397
- │ │ └─Symbol#to_s $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:334
398
- │ ├─Array#join $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:335
399
- │ └─Sinatra::Response#[]= $GemPath0/gems/rack-1.6.5/lib/rack/response.rb:56
400
- │ └─Rack::Utils::HeaderHash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:515
401
- │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:516
402
- │ └─Hash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:519
403
- └─Sinatra::Response#finish $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:138
404
- ├─Sinatra::Response#drop_content_info? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:166
405
- │ ├─Integer#to_i $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:167
406
- │ └─Sinatra::Response#drop_body? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:170
407
- │ ├─Integer#to_i $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:171
408
- │ └─Array#include? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:171
409
- ├─Sinatra::Response#drop_body? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:170
410
- │ ├─Integer#to_i $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:171
411
- │ └─Array#include? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:171
412
- ├─Sinatra::Response#calculate_content_length? $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:162
413
- │ ├─Rack::Utils::HeaderHash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:511
414
- │ │ └─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
415
- │ ├─Rack::Utils::HeaderHash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:511
416
- │ │ ├─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
417
- │ │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
418
- │ │ └─Hash#[] $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:512
419
- │ └─Module#=== $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:163
420
- ├─Enumerable#inject $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:154
421
- │ └─Array#each $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:154
422
- │ └─Sinatra::Response#block in finish $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:154
423
- │ └─Rack::Utils.bytesize $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:379
424
- │ └─String#bytesize $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:380
425
- ├─Integer#to_s $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:154
426
- ├─Rack::Utils::HeaderHash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:515
427
- │ ├─String#downcase $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:516
428
- │ └─Hash#[]= $GemPath0/gems/rack-1.6.5/lib/rack/utils.rb:519
429
- └─Integer#to_i $GemPath0/gems/sinatra-1.4.8/lib/sinatra/base.rb:157
430
- ```
431
-
100
+ ![image](https://user-images.githubusercontent.com/6105214/35924495-2e289024-0c5e-11e8-9942-895eac5791f1.PNG)
@@ -0,0 +1,7 @@
1
+ class TraceTree
2
+ module Args
3
+ def data_for_tree_html
4
+ super.merge!({args: ::JSON.generate(arguments)})
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,21 @@
1
+ require 'yaml'
2
+ require 'ostruct'
3
+
4
+ class TraceTree
5
+ class Config
6
+
7
+ DEFAULT = {
8
+ 'pp_return_value' => []
9
+ }.freeze
10
+
11
+ def self.load
12
+ config = DEFAULT
13
+ custom = File.join ENV['HOME'], '.trace_tree_config'
14
+ if File.exists?(custom) && (hash = YAML.load File.read custom)
15
+ hash.select!{ |k, v| config.include? k }
16
+ config = config.merge hash
17
+ end
18
+ OpenStruct.new config
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,33 @@
1
+ #consl-border {
2
+ -webkit-transform: rotate(-180deg);
3
+ background-color: black;
4
+ resize: vertical;
5
+ position: fixed;
6
+ left: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ padding: 0px 8px;
10
+ word-wrap: break-word;
11
+ overflow-x: scroll;
12
+ }
13
+
14
+ #consl-border::-webkit-scrollbar {
15
+ width: 5px;
16
+ }
17
+
18
+ #consl-border::-webkit-scrollbar-track {
19
+ background: #00bcd4;
20
+ }
21
+
22
+ #consl {
23
+ -webkit-transform: rotate(-180deg);
24
+ color: white;
25
+ position: fixed;
26
+ bottom: 0;
27
+ right: 0;
28
+ top: 0;
29
+ left: 0;
30
+ word-wrap: break-word;
31
+ overflow-y: scroll;
32
+ height: inherit;
33
+ }
@@ -0,0 +1,30 @@
1
+ (function(){
2
+ var footer = document.createElement('div'),
3
+ border = document.createElement('div'),
4
+ consl = document.createElement('div'),
5
+ body = document.getElementsByTagName('body')[0];
6
+
7
+ border.id = 'consl-border';
8
+ consl.id = 'consl';
9
+ footer.id = 'footer';
10
+ body.appendChild(footer);
11
+ body.appendChild(border);
12
+ border.appendChild(consl);
13
+
14
+ (function sync_height(){
15
+ console.log(footer.style.height, consl.offsetHeight);
16
+ footer.style.height = consl.offsetHeight + 'px';
17
+ setTimeout(sync_height, 500);
18
+ })();
19
+
20
+ var repl_sum = '';
21
+
22
+ TreeHtml.hover_press('r', function(n){
23
+ var a = n.querySelector('a');
24
+ var repl = '> ' + a.querySelector('span').innerText + "\n" + a.getAttribute('data-return');
25
+ console.log(repl);
26
+ repl_sum = repl_sum + "\n" + repl;
27
+ consl.innerText = "\n" + repl_sum;
28
+ consl.scroll(0, consl.scrollHeight);
29
+ });
30
+ })();
@@ -0,0 +1,19 @@
1
+ class TraceTree
2
+ class Point
3
+ class CcallKernelRaise < Point
4
+
5
+ def self.event_class_method
6
+ [:c_call, Kernel, :raise]
7
+ end
8
+
9
+ def parameters
10
+ if (err_creating = callees[0]) && (e = err_creating.return_value)
11
+ (e.message == e.class.name) ? "#<#{e.class}>" : "#<#{e.class}: #{e.message}>"
12
+ else
13
+ "#<RuntimeError>"
14
+ end
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -8,7 +8,7 @@ class TraceTree
8
8
  include TreeHtmlable
9
9
 
10
10
  attr_reader :current, :thread, :frame_env
11
- attr_accessor :terminal
11
+ attr_accessor :terminal, :config
12
12
 
13
13
  Interfaces = [:event, :defined_class, :method_id, :path, :lineno]
14
14
  attr_reader *Interfaces
@@ -67,7 +67,8 @@ EOM
67
67
  end
68
68
 
69
69
  def method_missing method_id, *args, &blk
70
- raise NoMethodError, "NoMethodError: undefined method `#{method_id}' for #<#{self.class.proto or self.class.name}#{inspect}>"
70
+ raise NoMethodError, "NoMethodError: undefined method `#{method_id}' "\
71
+ "for #<#{self.class.proto or self.class.name}#{inspect}>"
71
72
  end
72
73
 
73
74
  def initialize trace_point
@@ -116,9 +117,17 @@ EOM
116
117
  )
117
118
  end
118
119
 
120
+ def arguments
121
+ {}.tap do |args|
122
+ if event == :call
123
+ defined_class.instance_method(method_id).parameters.
124
+ each{ |role, name| args[name] = current.lv(name) unless name.nil? && role == :rest }
125
+ end
126
+ end
127
+ end
128
+
119
129
  def return_value
120
- raise RuntimeError.new('RuntimeError: not supported by this event') unless x_return?
121
- @return_value
130
+ x_return? ? @return_value : (terminal.nil? ? nil : terminal.return_value)
122
131
  end
123
132
 
124
133
  def inspect
@@ -187,9 +196,10 @@ EOM
187
196
 
188
197
  class Loader
189
198
 
190
- attr_reader :point_classes
199
+ attr_reader :point_classes, :config
191
200
 
192
- def initialize *enhancement
201
+ def initialize *enhancement, config
202
+ @config = config
193
203
  return @point_classes = Point.classes if enhancement.empty?
194
204
  @point_classes = Point.classes.each_with_object(Point.classes.dup) do |entry, hash|
195
205
  hash[entry[0]] = entry[1].clone.prepend *enhancement
@@ -198,7 +208,9 @@ EOM
198
208
 
199
209
  def create point
200
210
  point_klass = point_classes[[point.event, point.defined_class, point.method_id]]
201
- point_klass.new point
211
+ poi = point_klass.new point
212
+ poi.config = config
213
+ poi
202
214
  end
203
215
  end
204
216
 
@@ -0,0 +1,67 @@
1
+ require 'cgi'
2
+ require 'pp'
3
+
4
+ class TraceTree
5
+ module ReturnValue
6
+
7
+ CONSOLE_JS = File.read File.expand_path('../console.js', __FILE__)
8
+
9
+ CONSOLE_CSS = File.read File.expand_path('../console.css', __FILE__)
10
+
11
+ BLANK = ''.freeze
12
+
13
+ NEED_PP = (
14
+ if File.exists? (pp_config = File.join(ENV['HOME'], '.trace_tree_pp'))
15
+ IO.readlines(pp_config).map &:strip
16
+ else
17
+ []
18
+ end
19
+ ).freeze
20
+
21
+ def data_for_tree_html
22
+ attr_value = ::CGI.escapeHTML return_value._trace_tree_pp(config)
23
+ super.merge!({return: attr_value})
24
+ end
25
+
26
+ def css_for_tree_html
27
+ super + CONSOLE_CSS
28
+ end
29
+
30
+ def body_js_for_tree_html
31
+ super.push({text: CONSOLE_JS})
32
+ end
33
+
34
+ def self.formatted klass, &block
35
+ klass.send :define_method, :_trace_tree_pp, &block
36
+ end
37
+
38
+ formatted BasicObject do |*|
39
+ ::Kernel.instance_method(:to_s).bind(self).call
40
+ end
41
+
42
+ formatted Object do |config|
43
+ if self.class.ancestors.any?{ |a| config.pp_return_value.include? a.to_s }
44
+ ::PP.singleline_pp(self, ::TraceTree::ReturnValue::BLANK.dup)
45
+ else
46
+ self.to_s
47
+ end
48
+ end
49
+
50
+ formatted Array do |config|
51
+ "[#{self.map{ |e| e._trace_tree_pp(config) }.join(', ')}]"
52
+ end
53
+
54
+ formatted Hash do |config|
55
+ pairs = self.map{ |k, v| "#{k._trace_tree_pp(config)}=>#{v._trace_tree_pp(config)}"}
56
+ "{#{pairs.join(', ')}}"
57
+ end
58
+
59
+ [ENV.singleton_class, Struct, Range, MatchData,
60
+ Numeric, Symbol, FalseClass, TrueClass, NilClass, Module].each do |klass|
61
+ formatted klass do |*|
62
+ ::PP.singleline_pp(self, ::TraceTree::ReturnValue::BLANK.dup)
63
+ end
64
+ end
65
+
66
+ end
67
+ end
@@ -1,5 +1,6 @@
1
1
  require 'tree_html'
2
2
  require 'cgi'
3
+ require 'json'
3
4
 
4
5
  class TraceTree
5
6
  module TreeHtmlable
@@ -7,7 +8,16 @@ class TraceTree
7
8
  include TreeHtml
8
9
 
9
10
  def label_for_tree_html
10
- "<span class='highlight'>#{CGI::escapeHTML class_and_method}</span> #{CGI::escapeHTML source_location}"
11
+ "<span class='highlight'>#{CGI::escapeHTML class_and_method}</span> "\
12
+ "#{CGI::escapeHTML source_location}"
13
+ end
14
+
15
+ def data_for_tree_html
16
+ {}
17
+ end
18
+
19
+ def body_js_for_tree_html
20
+ []
11
21
  end
12
22
 
13
23
  def children_for_tree_html
@@ -1,3 +1,3 @@
1
1
  class TraceTree
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
data/lib/trace_tree.rb CHANGED
@@ -3,8 +3,11 @@ require 'binding_of_callers/pry'
3
3
  require 'trace_tree/point'
4
4
  require 'trace_tree/short_gem_path'
5
5
  require 'trace_tree/color'
6
+ require 'trace_tree/return_value'
7
+ require 'trace_tree/args'
6
8
  require 'trace_tree/tmp_file'
7
9
  require 'trace_tree/timer'
10
+ require 'trace_tree/config'
8
11
  require 'thread'
9
12
  require 'terminal-tableofhashes'
10
13
 
@@ -28,6 +31,7 @@ class TraceTree
28
31
  @bi = bi
29
32
  @trace_points = Queue.new
30
33
  @timer = Timer.new
34
+ @config = Config.load
31
35
  end
32
36
 
33
37
  def generate *log, **opt, &to_do
@@ -55,7 +59,7 @@ class TraceTree
55
59
 
56
60
  private
57
61
 
58
- attr_reader :bi, :trace_points, :log, :build_command, :timer, :opt, :point_loader
62
+ attr_reader :bi, :trace_points, :log, :build_command, :timer, :opt, :point_loader, :config
59
63
 
60
64
  def dump_location *log
61
65
  return TmpFile.new opt[:tmp] if opt[:tmp]
@@ -67,7 +71,9 @@ class TraceTree
67
71
  enhancement = []
68
72
  enhancement << TraceTree::Color unless opt[:color] == false
69
73
  enhancement << TraceTree::ShortGemPath unless opt[:gem] == false
70
- @point_loader = Point::Loader.new *enhancement
74
+ enhancement << TraceTree::ReturnValue unless opt[:return] == false
75
+ enhancement << TraceTree::Args if opt[:args] == true
76
+ @point_loader = Point::Loader.new *enhancement, config
71
77
  end
72
78
 
73
79
  def dump_trace_tree
@@ -78,9 +84,7 @@ class TraceTree
78
84
  log.puts tree
79
85
  log.puts timer.to_s if opt[:timer]
80
86
  rescue => e
81
- log.puts timer.to_s
82
- log.puts e
83
- log.puts table_of_points
87
+ log.puts timer.to_s, e.inspect, e.backtrace, table_of_points
84
88
  end
85
89
 
86
90
  def table_of_points
data/trace_tree.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency "binding_of_callers", "~> 0.1.5"
29
29
  spec.add_dependency "tree_graph", "~> 0.2.0"
30
- spec.add_dependency "tree_html", "~> 0.1.0"
30
+ spec.add_dependency "tree_html", "~> 0.1.6"
31
31
  spec.add_dependency "terminal-tableofhashes", "~> 0.1.0"
32
32
 
33
33
  spec.extensions << "ext/mkrf_conf.rb"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trace_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-01 00:00:00.000000000 Z
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.1.0
103
+ version: 0.1.6
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.1.0
110
+ version: 0.1.6
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: terminal-tableofhashes
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -141,13 +141,18 @@ files:
141
141
  - bin/setup
142
142
  - ext/mkrf_conf.rb
143
143
  - lib/trace_tree.rb
144
+ - lib/trace_tree/args.rb
144
145
  - lib/trace_tree/color.rb
146
+ - lib/trace_tree/config.rb
147
+ - lib/trace_tree/console.css
148
+ - lib/trace_tree/console.js
145
149
  - lib/trace_tree/gem_paths.rb
146
150
  - lib/trace_tree/point.rb
147
151
  - lib/trace_tree/point/call_activesupportconcern_appendfeatures.rb
148
152
  - lib/trace_tree/point/call_modulemutexm_extendobject.rb
149
153
  - lib/trace_tree/point/ccall_classthread_new.rb
150
154
  - lib/trace_tree/point/ccall_kernel_extend.rb
155
+ - lib/trace_tree/point/ccall_kernel_raise.rb
151
156
  - lib/trace_tree/point/ccall_module_appendfeatures.rb
152
157
  - lib/trace_tree/point/ccall_module_extendobject.rb
153
158
  - lib/trace_tree/point/ccall_module_include.rb
@@ -162,6 +167,7 @@ files:
162
167
  - lib/trace_tree/point/creturn_thread_initialize.rb
163
168
  - lib/trace_tree/point/threadbegin.rb
164
169
  - lib/trace_tree/point/threadend.rb
170
+ - lib/trace_tree/return_value.rb
165
171
  - lib/trace_tree/short_gem_path.rb
166
172
  - lib/trace_tree/timer.rb
167
173
  - lib/trace_tree/tmp_file.rb