Project

conpar

0.0
No commit activity in last 3 years
No release in over 3 years
Full-featured firewall configuration parser library.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0
>= 2.4.0
>= 0
 Project Readme

Conpar

Gem Version Build Status Coverage Status Dependency Status

Conpar (short for Configuration Parser) is designed to be a flexible and extendable library for parsing through a Firewall configuration file by tokenizing the configuration directives into ruby objects for evaluation.

NOTE: This gem is still in a very alpha state. It currently only knows how to tokenize Comments and Access Lists for Cisco ASA and Cisco PIX firewall configurations.

Installation

Add this line to your application's Gemfile:

gem 'conpar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install conpar

Supported Rubies

MRE 1.9.3, 2.0.0, 2.1.0

Versions prior to 1.9.3 will NOT be supported with this gem. Since 1.8.7 and ree are EOL, they no longer desirable to code against. Ruby 1.9.2 will not be used due to some incompatibilities.

Usage

Conpar::Document.parse(config_string) #=> Array

The returned array will have parsed every line in the configuration string into Conpar::Directive (or descendant) objects.

Configuration

NOTE: While configuration is functional, it is not advised to do any configuration for the current version of this gem.

CHANGELOG

0.2.2/0.2.3

  • Updated to add legacy access-list syntax support (0.2.2)
    • This includes version 6.3 and earlier of the ASA/PIX devices.
  • Updated specs for RSpec 3.x compatibility (0.2.3)

0.2.0

  • Minor version bumped due to potentially breaking change in functionality.
  • Changes
    • Directive line_number now returns a string that is in the same encoding as the line it refers.

Contributing

  1. Fork it
  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 new Pull Request