Sha256: b18587c1a5897f73a53ecf727acfd8fe1f57bbc3f1709126b86b505d494566bb

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

# SourceRoute

Wrapper of TracePoint

## Dependency

    ruby 2

## Installation

Add this line to your application's Gemfile:

    gem 'source_route', git: 'https://github.com/raykin/source-route'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install source_route

## Usage

    SourceRoute.enable /ActiveRecord/

## Contributing

1. Fork it ( https://github.com/[my-github-username]/source_route/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


### TODO

Following code is a good sample that track file running sequence, how to change it into a good code design and merge into the gem

```ruby

    files = []
    tp = TracePoint.new(:line) do |tp|
      if tp.path =~ /bole_api/
        unless files.include? tp.path
          puts "#{tp.path}".inspect
          files.push(tp.path)
        end
      end
    end
    tp.enable

```

It's better to add html output format, 'cause it can be kept.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
source_route-0.0.1 README.md