Sha256: 65b8b1b02b36ee4909538ad28414383d8b1a628ddbff4096fab6f5f8f01ccd9f

Contents?: true

Size: 677 Bytes

Versions: 34

Compression:

Stored size: 677 Bytes

Contents

class Ufo::TaskDefinition::Erb
  class Yaml < Base
    def data
      text = IO.read(@path)
      YAML.load(text)
    rescue Psych::SyntaxError => e
      logger.error "ERROR: #{e.class}: #{e.message}".color(:red)
      logger.error <<~EOL
        Rendered file contains invalid YAML. For debugging, files available at:

        source:   #{@task_definition.path}
        compiled: #{@path}

      EOL

      md = e.message.match(/at line (\d+) column (\d+)/)
      if md
        line_number = md[1]
        DslEvaluator.print_code(@path, line_number)
      else
        print_code(text) # fallback to simpler print code if cannot find line numbers
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
ufo-6.1.5 lib/ufo/task_definition/erb/yaml.rb
ufo-6.1.4 lib/ufo/task_definition/erb/yaml.rb
ufo-6.1.3 lib/ufo/task_definition/erb/yaml.rb
ufo-6.1.2 lib/ufo/task_definition/erb/yaml.rb
ufo-6.1.1 lib/ufo/task_definition/erb/yaml.rb
ufo-6.1.0 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.9 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.8 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.7 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.6 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.5 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.4 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.3 lib/ufo/task_definition/erb/yaml.rb
ufo-6.0.2 lib/ufo/task_definition/erb/yaml.rb