Code Monkey home page Code Monkey logo

method_log's Introduction

Method Log Build Status Gem Version

Trace the history of an individual method in a git repository (experimental).

See this article for more information.

Requirements

  • Tool runtime: Ruby >= v2.0.0
  • Source code under analysis: Ruby >= v1.8

Install

gem install method_log

Run

Display the commit history for a single method

$ method_log [options] <method-signature>

Build a parallel git repository of method definitions

$ build_methods_repo [options] <source-repo-path> <target-repo-path>

Credits

Written by James Mead and the other members of Go Free Range.

Thanks to Michael Feathers for some ideas in delta-flora.

Thanks to TICOSA for giving me the impetus to do something about an idea I'd been kicking around for a while.

License

Released under the MIT License.

method_log's People

Contributors

floehopper avatar sohaibbhatti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

sohaibbhatti

method_log's Issues

gem install fails

Attempting to install method_log results in the following:

ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: method_log requires rugged (>= 0), diffy (>= 0), trollop (>= 0)

Tried to install the rugged gem by itself and got:

Temporarily enhancing PATH to include DevKit...
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument - C:/Ruby193/lib/ruby/gems/1.9.1/gems/rugged-0.19.0/test/fixtures/status/h?↓

Add parsing support for RSpec tests

While I think they should already be parsable in the sense that they are valid Ruby, I suspect an individual example might not correspond to an individual method definition.

Extract MethodFinder into its own gem

From Further Work section of blog post:

I have a bunch of ideas that could make use of the MethodFinder functionality, so I think it might be worth extracting this into its own gem, e.g. having a pre-commit hook to annotate commit messages with method events, and enhancing GitHub source file pages to have links to a "method log".

uninitialized constant MethodLog::VERSION

Just installed this gem on OSX 10.11.6
But I get the next error.

method_log
Traceback (most recent call last):
	9: from /Users/jgd/.rvm/gems/[email protected]/bin/ruby_executable_hooks:24:in `<main>'
	8: from /Users/jgd/.rvm/gems/[email protected]/bin/ruby_executable_hooks:24:in `eval'
	7: from /Users/jgd/.rvm/gems/[email protected]/bin/method_log:23:in `<main>'
	6: from /Users/jgd/.rvm/gems/[email protected]/bin/method_log:23:in `load'
	5: from /Users/jgd/.rvm/gems/[email protected]/gems/method_log-0.2.0/bin/method_log:6:in `<top (required)>'
	4: from /Users/jgd/.rvm/gems/[email protected]/gems/optimist-3.0.0/lib/optimist.rb:921:in `options'
	3: from /Users/jgd/.rvm/gems/[email protected]/gems/optimist-3.0.0/lib/optimist.rb:921:in `new'
	2: from /Users/jgd/.rvm/gems/[email protected]/gems/optimist-3.0.0/lib/optimist.rb:103:in `initialize'
	1: from /Users/jgd/.rvm/gems/[email protected]/gems/optimist-3.0.0/lib/optimist.rb:103:in `call'
/Users/jgd/.rvm/gems/[email protected]/gems/method_log-0.2.0/bin/method_log:7:in `block in <top (required)>': uninitialized constant MethodLog::VERSION (NameError)

Any hints?

Build a "database" of method metadata vs commits

From Further Work section of blog post:

Running the tool against a very large repo (e.g. Rails) is still very slow, so I suspect in the end it might be necessary to build a “database” of method metadata vs commits.

I think this idea lead me to building a parallel git repo with the same commits, but with module & classes represented as directories and methods represented as files. I think the code for this is in this branch and there are a couple of example repos: mocha.methods & method_log.methods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.