PlugNPlay
Java Ruby JavaScript Python Shell CSS CoffeeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
clients
config
db
lib
log
public
test
vendor/assets
.gitignore
.ruby-version
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Plug N' Play

This project is a Rails application that should be used as reference for integrating with Subledger API.

It tries to make integrating with Subledger even easier, by encapsulating your accounting logic into single API calls, which in turn make the calls to the lower level Subledger APIs. It also handle mapping between your app user and transaction ids (optional) to the Subledger IDs.

It should be deployed as a standalone App, and accessed by means of the API it exposes. To make thigs even simplier, we also provide an HTTP client for the API, so you just need to do add the client to your code, and make the calls at the right place, passing the right data.

The example client code can be found at: https://github.com/subledger/PlugNPlay/tree/atpay/clients/ruby

The accounting logic can be found at: https://github.com/subledger/PlugNPlay/blob/atpay/app/services/subledger_service.rb

Demo App Requirements

This project is using:

  • Ruby: 2.0.0-p247
  • Rails: 4.0.1

Demo App Setup

After cloning the project, run the following commands on project root dir:

bundle install
bundle exec rake db:create
bundle exec rake db:migrate

Please note that you may need to setup values on config/database.yml before running db:setup.

Running the App

bundle exec rails s

This will start app on http://localhost:3000. By accessing this url the first time, it will guide you through the process of creating credentials for using Subledger API.