DocOps / liquidoc-gem

The canonical gem source for LiquiDoc, a ruby-based documentation parsing and rendering utility enabling advanced builds with Asciidoctor, Jekyll, Liquid, and semi-structured data files.
https://docs.docops.org/liquidoc-user-manual.html
MIT License
12 stars 5 forks source link

Data object collisions are possible; fix with renaming and catch errors #84

Open briandominick opened 5 years ago

briandominick commented 5 years ago

Now that #40 is implemented, object collisions are possible. I won't go into why I thought this would not be a problem, but it definitely is. One issue is multiple files of the same name being ingested from different paths, such as platform1/data/product.yml and `platform2/daata/product.yml.

- action: parse
  data:
    - file: platform/data/product.yml
      token: platform
    - file: client/data/product.yml
      token: client
  builds: ...

This really means adding the token: property to DataSource and making sure that class always processes data file ingest entries. (Not using object: as the property name because that namespace may be better used for ingesting data objects in this action, as in #83, in which case you might want to ingest an object: by name and rename it with token:.

This fix should also incorporate error handling for configured collisions.