diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2020-12-24 23:04:23 +0100 |
---|---|---|
committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2020-12-24 23:05:39 +0100 |
commit | 5293501d69cece2d40bfe89c51bfa522a55af932 (patch) | |
tree | c8a805c65584bf69370f02892866d9ca7565d9e9 | |
parent | 83b0721610a4e11832e83df19c73ace3289972b9 (diff) | |
download | mustache-spec-5293501d69cece2d40bfe89c51bfa522a55af932.tar.gz |
Rakefile: ensure the ATTN warning is merged before the test data, not after
On my system (yaml gem version 0.1.0), `foo.merge(bar)` will include the
keys of `foo` before the keys of `bar`, so the previous Rakebuild
definition would include the ATTN warning *after* the test data in the
rendered JSON files.
-rw-r--r-- | Rakefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -19,8 +19,9 @@ namespace :build do json_file = filename.gsub('.yml', '.json') File.open(json_file, 'w') do |file| + warning = {:__ATTN__ => note} doc = YAML.load_file(filename) - file << doc.merge(:__ATTN__ => note).to_json() + file << warning.merge(doc).to_json() end end end |