Revs::Utils

Shared methods and functions used by revs-indexer, pre-assembly and bulk metadata loading code.

Releases

  • 0.0.1 Initial release

  • 0.0.3 Add collection name cleaning method

  • 0.0.5 Lock down the version of countries gem to avoid problems

  • 0.0.5 Lock down the version of countries gem to avoid problems

  • 0.0.7 Don’t use this version, it uses the wrong method of Dir.pwd to find the root directory for loading assets.

  • 0.0.8 Add in helper functions to check the .csv files for registration and metadata updates

  • 0.0.9 Add in a clean marque function

  • 1.0.0 Make format fixing case insensitive; add a method for loading CSV files with UTF-8 compliance

  • 1.0.1 Remove a couple methods from Revs code and update the methods to make them consistent in gem

  • 1.0.2 and 1.0.3 Make invalid two digit years in dates return as false

  • 1.0.4 Revs-Utils now assumes .csv files are in UTF-8 format instead of Latin-1

  • 1.0.5 Parse location using commas as well as pipes

  • 1.0.6 Add some more conditions to CSV header checks

  • 1.0.7 Label column needs to be there but does not need to have a value to register

  • 1.0.8 Update clean_collection_name method to deal with other possible names

  • 1.0.9 Add more common format corrections

  • 1.0.10 Update valid for metadata method so it is not sensitive to blank or uppercase columns

  • 1.0.11 Fix issues with year parsing

  • 1.0.12 Allow two digit years in year formatting

Running tests

bundle exec rspec spec

Release the gem to the gemserver

  1. Bump the version number in lib/revs-utils/version.rb

  2. Add to the release notes in this readme.

  3. Ensure the tests pass.

  4. Git commit and push

  5. Build the gem:

gem build revs-utils.gemspec

  1. Release the gem to RubyGems:

gem push revs-utils-1.0.9.gem # substitute actual version number

Installation

Add this line to your application’s Gemfile:

gem 'revs-utils'

And then execute:

$ bundle

Or install it yourself as:

$ gem install revs-utils

Updating LC Automobile Terms in Gem

  1. Check out Gem code.

  2. CD into Gem directory

  3. ruby bin/revs_lc_automobile_terms.rb

  4. Update Gem in git, bump version number and rake dlss_release