anchor.diff:      docker:
         - image: *ruby-image
           environment: *env-vars
  +      <% if selected?(:database, :postgresql) %>
         - image: *postgres-image
  +      <% end %>
  +      <% if selected?(:background_processor) %>
         - image: *redis-image
  +      <% end %>
   
     lint-executor:
       docker:
  
positive.code: version: 2.1
  
  ruby-image: &ruby-image circleci/ruby:<%= ruby_version %>
  postgres-image: &postgres-image postgres:<%= Potassium::POSTGRES_VERSION %>
  redis-image: &redis-image redis
  env-vars: &env-vars
    BUNDLE_JOBS: 4
    BUNDLE_PATH: vendor/bundle
  
negative.code:     steps:
        - setup
  
        <% if selected?(:database, :postgresql) %>
        - run:
            name: Wait for postgres service
            command: dockerize -wait tcp://localhost:5432 -timeout 1m
        <% end %>
  
        <% if selected?(:background_processor) %>
        - run:
            name: Wait for redis service
            command: dockerize -wait tcp://localhost:6379 -timeout 1m
        <% end %>
  
        <% if selected?(:database, :postgresql) %>
        - run:
            name: Setup database
            command: bundle exec rails db:create db:schema:load
        <% end %>
  
        - run:
            name: Run rspec
  