0.0
No commit activity in last 3 years
No release in over 3 years
AMS Decision Log Parser
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

Runtime

~> 0.0.7
 Project Readme

ParseDecision Documentation

Summary

ParseDecision provides both a command line application and a rake task that is used to parse decision logs generated by the Commerce Velocity AMS application.

Installation

Add this line to your gemfile:

gem 'parse_decision'

And then execute:

$ bundle install

or install it yourself as:

$ gem install parse_decision

Usage

Command Line Application

Usage info can be retrieved from the application by calling it with the -h or --help options:

$ parse_decision --help

Notes

  • The decision log doesn't produce valid XML in many situations.
  • In the interest of preserving any data the log may contain, the resulting XML is not cleaned.
  • As a result of the previous notes, the parsed files are not guaranteed to be valid XML.

Rake Task Usage

The rake task can be included in a rakefile by requiring parse_decision like so:

require 'parse_decision'

and called as:

ParseDecisionTask.new.execute( log_src_path, dest_dir )

The parser will parse the decision log out to a destination directory. Each product within the log will be parsed into a separate file. The APP XML is also parsed to a separate file for each product.

Both the product and the APP XML file names will be prefixed with the same number. The number indicates the order that the data was found within the decision log.

A copy of the decision log (pre-parse) is also copied to the destination folder for archiving purposes.

Testing

ParseDecision uses RSpec for testing.

To run all existing tests:

$ rake spec

or directly:

$ bundle exec rspec

TODO

  • Change camelCase method naming convention to snake_case to match ruby (what was I thinking?)

Contributing

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

LICENSE

ParseDecision is licensed under the MIT license.

See LICENSE for details.