From 6f9d027487f606b1e8a219c7efe2bea394201cbb Mon Sep 17 00:00:00 2001 From: Weston Ganger Date: Fri, 28 Jun 2019 09:02:34 -0700 Subject: [PATCH] fix --- Gemfile.lock | 6 +++--- lib/locomotive/steam/adapters/filesystem/sanitizers/page.rb | 4 ++-- .../steam/adapters/filesystem/sanitizers/section.rb | 4 ++-- locomotivecms_steam.gemspec | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 42ee77a6..c7191121 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,7 +54,7 @@ GEM attr_extras (5.2.0) autoprefixer-rails (8.0.0) execjs - bcrypt (3.1.13) + bcrypt (3.1.12) bson (4.4.2) chronic (0.10.2) chunky_png (1.3.11) @@ -93,7 +93,7 @@ GEM rack (>= 1.3) duktape (2.0.1.1) execjs (2.7.0) - ffi (1.11.1) + ffi (1.10.0) flamegraph (0.9.5) haml (5.0.4) temple (>= 0.8.0) @@ -138,7 +138,7 @@ GEM origin (2.3.1) pony (1.13.1) mail (>= 2.0) - public_suffix (3.1.1) + public_suffix (3.0.3) puma (3.12.0) rack (2.0.6) rack-cache (1.7.2) diff --git a/lib/locomotive/steam/adapters/filesystem/sanitizers/page.rb b/lib/locomotive/steam/adapters/filesystem/sanitizers/page.rb index f540211f..5c6200de 100644 --- a/lib/locomotive/steam/adapters/filesystem/sanitizers/page.rb +++ b/lib/locomotive/steam/adapters/filesystem/sanitizers/page.rb @@ -164,13 +164,13 @@ def transform_sections_content(page, locale) begin page[name][locale] = Hjson.parse(content) rescue Hjson::Error => e - raise Locomotive::Steam::JsonParsingError.new(e, path, json) + raise Locomotive::Steam::JsonParsingError.new(e, page.template_path[locale], content) end else begin page[name][locale] = MultiJson.load(content) rescue MultiJson::ParseError => e - raise Locomotive::Steam::JsonParsingError.new(e, path, json) + raise Locomotive::Steam::JsonParsingError.new(e, page.template_path[locale], content) end end diff --git a/lib/locomotive/steam/adapters/filesystem/sanitizers/section.rb b/lib/locomotive/steam/adapters/filesystem/sanitizers/section.rb index fc317e13..2eaa7107 100644 --- a/lib/locomotive/steam/adapters/filesystem/sanitizers/section.rb +++ b/lib/locomotive/steam/adapters/filesystem/sanitizers/section.rb @@ -25,13 +25,13 @@ def parse_json(entity) begin entity.definition = handle_aliases(Hjson.parse(json)) rescue Hjson::Error => e - raise Locomotive::Steam::JsonParsingError.new(e, path, json) + raise Locomotive::Steam::JsonParsingError.new(e, entity.template_path, json) end else begin entity.definition = handle_aliases(MultiJson.load(json)) rescue MultiJson::ParseError => e - raise Locomotive::Steam::JsonParsingError.new(e, path, json) + raise Locomotive::Steam::JsonParsingError.new(e, entity.template_path, json) end end diff --git a/locomotivecms_steam.gemspec b/locomotivecms_steam.gemspec index 53b31bca..8866a2b5 100644 --- a/locomotivecms_steam.gemspec +++ b/locomotivecms_steam.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'httparty', '~> 0.16.0' spec.add_dependency 'chronic', '~> 0.10.2' spec.add_dependency 'bcrypt', '~> 3.1.11' - spec.add_dependency 'multi_json', '~> 1.13.1' + spec.add_dependency 'multi_json', '~> 1.13.1' spec.add_dependency 'rack-rewrite', '~> 1.5.1' spec.add_dependency 'rack-cache', '~> 1.7.0'