mauricioklein / docker-compose-api

A Docker Compose parser for Ruby
MIT License
33 stars 25 forks source link

Add support for environment in Hash format #10

Closed zuazo closed 8 years ago

zuazo commented 8 years ago

From the official documentation:

environment

Add environment variables. You can use either an array or a dictionary.

But the dictionary format does not work with this gem.

For example, using:

db:
  image: mariadb
  environment:
    MYSQL_ROOT_PASSWORD: myPassword

I get the following error:

Docker::Error::ServerError:
json: cannot unmarshal object into Go value of type []string
zuazo commented 8 years ago

Hi @mauricioklein,

Do you think you will have time to review this?

After this, I want to fix other similar bugs I found. I am very interested in improving this gem.

Either way, thanks for sharing your work :wink:

mauricioklein commented 8 years ago

Outstanding work @zuazo , thanks for contributing! Let's fix the other bug you've found and, so, I create a new gem version with the fixes.

Thanks!

zuazo commented 8 years ago

Thanks @mauricioklein! :smiley:

I'm working on the next PR.