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.3.13 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.12 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.11 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.10 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.9 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.8 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.7 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.6 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.5 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.4 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.3 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.2 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.1 lib/ufo/task_definition/erb/yaml.rb
ufo-6.3.0 lib/ufo/task_definition/erb/yaml.rb
ufo-6.2.5 lib/ufo/task_definition/erb/yaml.rb
ufo-6.2.4 lib/ufo/task_definition/erb/yaml.rb
ufo-6.2.3 lib/ufo/task_definition/erb/yaml.rb
ufo-6.2.2 lib/ufo/task_definition/erb/yaml.rb
ufo-6.2.1 lib/ufo/task_definition/erb/yaml.rb
ufo-6.2.0 lib/ufo/task_definition/erb/yaml.rb