source_route 0.1.6 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd182d935ed8eb7520d0cebb22fe7af916d0d137
4
- data.tar.gz: 44b50d2846f827b6a15cd98a0a49125c34f965da
3
+ metadata.gz: 33409f8b60b621ff40f5df4c5154430334884017
4
+ data.tar.gz: 2fcdf3f68ed75e8dede1f051e804058285834ae5
5
5
  SHA512:
6
- metadata.gz: 4bf100bdc4ff65df991267c0905d9f8546f6a70e7b8860262d0b275c918a73bb17dd953cc6da896280e92a2f24702eb7c4e8edaed551d044acf603b535410fd4
7
- data.tar.gz: 6b5a8dc7cf522fbdcd7520c10377d9d5bac16d069e1d6df52ba82b4290c5b82438a42bc1a11042fda38a3ec76e2a007c19fcfc67c9e1b61ed09f29624ddebe0a
6
+ metadata.gz: c0e36502780c37fefdffb66f8cb120bed3f1d007bfa599fc7061fc482156b66e2184818ef1becdf28a5f396e0e60204ec2ffdf9bf7bd2b4cd79596568bdbaff4
7
+ data.tar.gz: 4e5980aaa635a1235079e694dad739615f274d03f408f3ab3d4afe1063c3ac5714554643ac27232e6e667ee54af38c852c4ba67ae2013b2a64dacea2f061ac2a
data/README.md CHANGED
@@ -66,6 +66,8 @@ It will output the trace when you run the application.
66
66
  see more usage in examples.
67
67
  see full usage in examples/study_callback.rb
68
68
 
69
+ ![Study Callback Example](https://cloud.githubusercontent.com/assets/490502/5468821/decbb8fe-860e-11e4-9b74-7aef7f8679fd.png)
70
+
69
71
  ## Why
70
72
 
71
73
  I always wanna upgrade my ruby(rails) skills. But everytime when I looking for workaround from stack overflow I feel frustration.
@@ -4,7 +4,7 @@ require 'source_route'
4
4
 
5
5
  SourceRoute.enable do
6
6
  method_id 'base_decorate', 'prepare_decorate'
7
- defined_class 'ActiveSupport::Callbacks', 'PersonRecord', 'Filters'
7
+ defined_class 'ActiveSupport::Callbacks', 'House', 'Filters'
8
8
  result_config.filename = 'trace_callback.html'
9
9
  full_feature 10
10
10
  end
@@ -39,10 +39,11 @@ module SourceRoute
39
39
  def treeize_call_chain
40
40
  init_order_id_and_parent_ids
41
41
  call_chain.each do |tpr|
42
- return_tpr = return_chain.find do |rtpr|
43
- rtpr[:defined_class] == tpr[:defined_class] and rtpr[:method_id] == tpr[:method_id]
42
+ return_tpr = return_chain.reject { |c| c[:record_parent] }.find do |rtpr|
43
+ rtpr[:tp_self] == tpr[:tp_self] and rtpr[:defined_class] == tpr[:defined_class] and rtpr[:method_id] == tpr[:method_id]
44
44
  end
45
45
  unless return_tpr.nil?
46
+ return_tpr[:record_parent] = true
46
47
  start_index, end_index = tpr[:order_id], return_tpr[:order_id]
47
48
  unless end_index == start_index + 1
48
49
  values_at(start_index+1 ... end_index).select { |tpr| tpr[:event] == :call }.each do |tpr|
@@ -1,3 +1,3 @@
1
1
  module SourceRoute
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: source_route
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - raykin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-17 00:00:00.000000000 Z
11
+ date: 2015-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -171,4 +171,3 @@ test_files:
171
171
  - test/source_route/wrapper_test.rb
172
172
  - test/source_route_test.rb
173
173
  - test/test_helper.rb
174
- has_rdoc: