Skip to content

Support .yaml #91

@tsujp

Description

@tsujp

Describe the bug
Currently only .yml is supported, e.g. dip.yml and not dip.yaml.

To Reproduce

  1. Install Dip
  2. Use any dip.yaml configuration, including the default but renamed to dip.yml.
For completeness here is the configuration explicitly
$ dip ls
ERROR: Could not find dip.yml config

With the following

file: dip.yaml

version: '6.0.0'

environment:
  RAILS_ENV: development

compose:
  files:
    - docker-compose.yml
  project_name: higher

interaction:
  sh:
    description: Open a Bash shell within a Rails container (with dependencies up)
    service: runner
    command: /bin/bash

  bash:
    description: Run an arbitrary script within a container (or open a shell without deps)
    service: runner
    command: /bin/bash
    compose_run_options: [no-deps]

  bundle:
    description: Run Bundler commands
    service: runner
    command: bundle
    compose_run_options: [no-deps]

  rake:
    description: Run Rake commands
    service: runner
    command: bundle exec rake

  rails:
    description: Run Rails commands
    service: runner
    command: bundle exec rails
    subcommands:
      s:
        description: Run Rails server available at http://localhost:3030
        service: rails
        compose:
          run_options: [service-ports, use-aliases]

  yarn:
    description: Run Yarn commands
    service: runner
    command: yarn
    compose_run_options: [no-deps]

  rspec:
    description: Run Rails tests
    service: runner
    environment:
      RAILS_ENV: test
    command: bundle exec rspec

  rubocop:
    description: Run Rubocop
    service: runner
    command: bundle exec rubocop
    compose_run_options: [no-deps]

  psql:
    description: Run psql console
    service: postgres
    command: psql -h postgres -U postgres -d example_app_dev

  'redis-cli':
    description: Run Redis console
    service: redis
    command: redis-cli -h redis

provision:
  - dip compose down --volumes
  - dip compose up -d postgres redis
  - dip bundle install
  - dip yarn install
  - dip rails db:setup

The exact same file as dip.yaml

$ dip ls
sh         # Open a Bash shell within a Rails container (with dependencies up)
bash       # Run an arbitrary script within a container (or open a shell without deps)
bundle     # Run Bundler commands
rake       # Run Rake commands
rails      # Run Rails commands
rails s    # Run Rails server available at http://localhost:3030
yarn       # Run Yarn commands
rspec      # Run Rails tests
rubocop    # Run Rubocop
psql       # Run psql console
redis-cli  # Run Redis console

Expected behavior
Works as it would if said config file was named dip.yml.

Context (please complete the following information):

  • OS: 5.7.12-arch1-1
  • Version: 6.0.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions