Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix #44 #45

Open
wants to merge 1 commit into from

1 participant

@allencblee

Use getResource("local.json") instead of read("local.json") when running under RingoJS

@kriszyp kriszyp referenced this pull request from a commit in kriszyp/perstore
@kriszyp kriszyp Add support for using getResource in Ringo, if available, fixes #44, …
…fixes #45
34535f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 util/settings.js
View
4 util/settings.js
@@ -9,7 +9,9 @@ if(!read){
read = require("file").read;
}
try{
- var settings = JSON.parse(read("local.json").toString("utf8"));
+ var settings;
+ if (typeof java == "object") JSON.parse(getResource("local.json").content);
+ else JSON.parse(read("local.json").toString("utf8"));
for(var i in settings){
exports[i] = settings[i];
}
Something went wrong with that request. Please try again.