An extraction of limited localized vocabulary for Sipity and CurateND. This controlled vocabulary has a limited shelf-life as we explore other more robust options.
At its core Locabulary provides a set of public methods that helps with building a list or hierarchy tree of controlled vocabularies.
The module methods marked
@api public in the Locabulary top-level module are the public facing methods that both Sipity and CurateND utilize. They should not use any other methods of Locabulary.
As such, the implementation details of Locabulary are opaque to downstream dependencies.
Peeling the details back a bit, Locabulary provides several controlled vocabularies. You can find them in the ./data directory. By convention, the data file is the predicate_name of the term (e.g. the
predicate_name: "copyright" will use the ./data/copyright.json data).
Everything else is about mapping and querying the JSON data.
Install the gems via
BUNDLE_GEMFILE=gemfiles/activesupport4.gemfile bundle install
The full test suite is run via
bundle exec rake.
If you are interested in running each file in isolation - a good thing for unit tests - use
Testing/Using Different Gemfiles
If you want to run your tests via a different gemfile, see the following:
$ BUNDLE_GEMFILE=gemfiles/activesupport4.gemfile bundle update $ BUNDLE_GEMFILE=gemfiles/activesupport4.gemfile bundle install $ BUNDLE_GEMFILE=gemfiles/activesupport4.gemfile bundle exec rspec
See the Bundler
bundle config documentation for further information.
Updating Data Files
The "administrative_units" data is maintained in a Google Spreadsheet. To synchronize the JSON data:
- Ensure that you have a copy of the
config/client_secret.ymlfrom the staging secrets
- Make sure you have a clean working tree (eg.
git statusshows no changes)
bundle exec ./script/update_data_files.shscript following its instructions
- Review changes to the
- Commit changes
Once committed and pushed upstream, to see the changes will require a deploy of the applications.