JKHeadley / rest-hapi

🚀 A RESTful API generator for Node.js
https://resthapi.com
MIT License
1.19k stars 153 forks source link

Added windows support for loading Policies #232

Closed yoieh closed 4 years ago

yoieh commented 4 years ago

small but fixes #231

"node_modules/rest-hapi" dose not exist in __dirname do to windows \ in path. changed path replacement to be resolved by path.join this should work on all platforms.

This should also be considered if anyone are modifying the config.policyPath with config.absolutePolicyPath = true if they intend the project to work on different platforms

codecov[bot] commented 4 years ago

Codecov Report

Merging #232 into master will not change coverage by %. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #232   +/-   ##
=======================================
  Coverage   81.47%   81.47%           
=======================================
  Files          24       24           
  Lines        2802     2802           
=======================================
  Hits         2283     2283           
  Misses        519      519           
Impacted Files Coverage Δ
rest-hapi.js 90.72% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 061cb6a...a78af07. Read the comment docs.

JKHeadley commented 4 years ago

@yoieh thanks for this!