A set of methods for retrieving data from Voyager.
On Ubuntu systems, do this. All of it.
Add configuration for VGER In
$ORACLE_HOME/network/admin/tnsnames.ora (ask DBA).
export ORACLE_LIB=$ORACLE_HOME/lib export TNS_ADMIN=$ORACLE_HOME/network/admin
To the variables you added earlier.
On MacOSX, follow the [ruby-oci8 instructions for setting up Oracle with Homebrew]
(http://www.rubydoc.info/gems/ruby-oci8/file/docs/install-on-osx.md), and set the
variable to the directory containing your
tnsnames.ora config file. These instructions
install the 11.2 client, which works fine with 10.2 Oracle servers.
ruby-oci8 gems to your application's Gemfile
gem 'ruby-oci8' gem 'voyager_helpers'
The gem needs to know the database username, password and database name. Put this somewhere:
VoyagerHelpers.configure do |config| config.du_user = 'foo' config.db_password = 'quux' config.db_name = 'VOYAGER' end
(Like in an initializer if you're using Rails)
Once everything is installed and configured, usage is pretty straightforward:
record = VoyagerHelpers::Liberator.get_bib_record(4609321) record.inspect => [#<MARC::Record:0x000000031781c8 @fields=[#<MARC::ControlField:0x00 ...
- Fork it ( https://github.com/pulibrary/marc_liberation/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request