Sha256: b14db25ef07a0a0664f7688149689558bf9b93aaff4318c71868a8ab950a6afe

Contents?: true

Size: 693 Bytes

Versions: 2

Compression:

Stored size: 693 Bytes

Contents

require 'yaml'

module AllImages::Config
  def load(filename)
    YAML.load_file(filename)
  end

  EXAMPLE = <<~end
    dockerfile: |-
      RUN apk add --no-cache build-base git
      RUN gem update --system
      RUN gem install gem_hadar bundler

    script: &script |-
      echo -e "\\e[1m"
      ruby -v
      bundle
      echo -e "\\e[0m"
      rake test

    images:
      ruby:3.1-alpine: *script
      ruby:3.0-alpine: *script
      ruby:2.7-alpine: *script
      ruby:2.6-alpine: *script
      ruby:2.5-alpine: *script
  end

  def init(filename)
    File.open(filename, 'w') do |output|
      output.print EXAMPLE
    end
  end

  def example
    EXAMPLE
  end

  extend self
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
all_images-0.0.1 lib/all_images/config.rb
all_images-0.0.0 lib/all_images/config.rb