Skip to content

Working with documentation on a case insensitive file system

Chris Smith edited this page Aug 14, 2018 · 3 revisions

Normally, documentation is generated by CI in a Linux environment that is case sensitive. Beware, however, that generating documentation locally in a case-insensitive OS X environment can lead to subtle errors, which can be addressed as follows.

YARD creates directories and files that are case-sensitive. This can be a problem for gems that have namespaces that vary only by case. e.g. Google::Cloud::VideoIntelligence and Google::Cloud::Videointelligence. Some platforms, such as OS X, have file systems that are case-insensitive by default. If you are wanting to contribute to the documentation but on OS X you can do the following:

Create a case-sensitive volume

Open Disk Utility and click on the "Partition" button.

fs-case-0

If you are using APFS choose "Add Volume".

fs-case-1

Give the new volume a name and choose "APFS (Case-sensitive)" or "APFS (Case-sensitive, Encrypted)" for the volum's format.

fs-case-2

Now you have a volume that is case-sensitive. We will use this volume to be the target for all the documentation changes.

fs-case-3

Configure google-cloud-ruby to use the case-sensitive volume

By setting the GCLOUD_TMP_DIR environment variable we can override the system's default tmp directory used for generating documentation.

$ export GCLOUD_TMP_DIR=/Volumes/development/tmp