Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Jun 28, 2019
1 parent 219ca5a commit 6f9d027
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions lib/locomotive/steam/adapters/filesystem/sanitizers/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion locomotivecms_steam.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 6f9d027

Please sign in to comment.