Skip to content

Commit

Permalink
Fixed installing templates with liquid markup (Issue #128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Tolstoy committed Sep 27, 2016
1 parent 3cda1ac commit 259abfb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/generamba/template/helpers/rambaspec_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def self.validate_spec_existance(template_name, template_path)
# @return [Bool]
def self.validate_spec(template_name, template_path)
spec_path = self.obtain_spec_path(template_name, template_path)
spec = YAML.load_file(spec_path)

spec_source = IO.read(spec_path)
spec_template = Liquid::Template.parse(spec_source)
spec_content = spec_template.render
spec = YAML.load(spec_content)

is_spec_valid =
spec[TEMPLATE_NAME_KEY] != nil &&
Expand Down

0 comments on commit 259abfb

Please sign in to comment.