The Digital Assets Rails Engine Gem for OFI
Ruby JavaScript
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
client
config
lib
script
spec
.dbshell
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
daengine-0.0.1.gem
daengine-0.0.2.gem
daengine-0.0.3.gem
daengine-0.0.4.gem
daengine-0.0.5.gem
daengine-0.0.8.alpha.gem
daengine-0.0.9.alpha.gem
daengine.gemspec

README.md

daengine - Digital Asset File parsing and search for OFI

daengine is a rails engine plugin gem that provides access to digital assets, aka SSC documents/pdfs such as fund documents from the rails applications. It also includes the parser code that reads digital-asset metadata produced by the Teamsite legacy CMS and ingests it into a MongoDB instance for use by the client API.

Installation

To install the gem for use as a server process

$ gem install daengine

To install within a rails app as an engine (for client API use)

# Use the digital-asset api
gem "daengine"

daengine Server Process

The server process of daengine is packaged as an executable inside the gem called process_assets. You execute the server portion of the gem on a single-instance where the Teamsite tuple .xml files are accessible and you must provide a configuration .yml file to the executable that specifies the location of the tuple files and the MongoDB connection settings ala...

$ cat config_prod.yml
hosts: [[prod-db1,22785], [prod-db3,22785]]
database: the_database_where_you_want_stuff_to_go
assets_path: /tmp/some/teamsite/tuple/file/dir/

You then execute the server process as so:

$ process_assets config_prod.yml

daengine Client API

The data produced by the daengine server process can be consumed by any rails app that includes the daengine gem and has an existing Mongoid connection to the MongoDB database that the producer side writes to. Client access is either directly thru the DigitalAssets model class, or via the engine-provided REST API ie http://localhost:3000/digital_assets.json

Querying for Digital Assets

Querying assets via the Model Class...

DigitalAsset.guid_is('/asdfasdflasdfalasdfasdfasdf.asfdasdf.foo')
DigitalAsset.path_is('/digitalAssets/some-crazy-guid.pdf')
DigitalAsset.sami_is('FOOBAR.001')

Query via the REST API...

get 'http://localhost:3000/digital_assets/search?sami=FOOBAR.001'
get 'http://localhost:3000/digital_assets/search?funds=12345'