No commit activity in last 3 years
No release in over 3 years
Agreements for meta commit extension
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 10.0
~> 3.0
 Project Readme

meta commit contracts

Gem Version Build Status

Description

gem includes agreements on data structures, which used by meta commit gem to interact with extensions.

Contracts (and their responsibilities) :

  • Ast
    • stores information about which parser built it
    • stores abstract syntax tree
    • provides access to children nodes
    • provides access to first line number and last line number
  • Parser
    • builds ast node from code string
    • knows about file extensions he supports
    • knows about syntax he supports
  • ContextualAst
    • stores information about which parser built target ast
    • stores target ast and all nodes
  • Diff
    • builds human-readable message of change
    • knows what changes it can be used for
  • ChangeContext
    • stores information about currently examined changes (line, commit id, file name, touched ast)
    • passed to diff as source of examined changes
  • Locator
    • locates exported classes of extension

You can check documentation here

Installation

Add this line to your application's Gemfile:

gem 'meta_commit_contracts'

And then execute:

$ bundle

Or install it yourself as:

$ gem install meta_commit_contracts

Usage

Inherit components of extension from these classes and override appropriate methods