New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom constraint using function and resolve types in scope #142

Merged
merged 1 commit into from Feb 25, 2015

Conversation

Projects
None yet
4 participants
@raymondfeng
Contributor

raymondfeng commented Feb 18, 2015

The PR adds two things:

  1. Allow the constraint to be a JS function in addition to nools expression
  2. Allow type names to be resolved with options.scope

Motivations:

We try to use nools as the rules engine for LoopBack's policy framework. LoopBack has its own JSON format to describe rules/constraints/actions that will be transformed to the formats consumable by nools.

@raymondfeng

This comment has been minimized.

Contributor

raymondfeng commented Feb 23, 2015

@doug-martin Any chance to review this PR?

@ritch

This comment has been minimized.

ritch commented Feb 24, 2015

👍

@doug-martin

This comment has been minimized.

Contributor

doug-martin commented Feb 24, 2015

@raymondfeng Thanks for the PR, Ill take a look tonight and try to get a release out!

@raymondfeng

This comment has been minimized.

Contributor

raymondfeng commented Feb 24, 2015

@doug-martin Thanks!

@superkhau

This comment has been minimized.

superkhau commented Feb 24, 2015

👍

@doug-martin doug-martin merged commit d606e67 into noolsjs:master Feb 25, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

doug-martin added a commit to doug-martin/nools that referenced this pull request Feb 25, 2015

v0.4.0
* Fix for issue noolsjs#122 referencing defined class within another defined class
   * Also fixes accessing scoped functions within a defined class.
* Fix for issue noolsjs#119 window was removed from the nools.js file now it is called in the current scope of `this`.
* Allow session.halt even for `match()` noolsjs#143 - @raymondfeng
   * Now if you call `halt()` even if you did not call `matchUntilHalt()`
* Now you can use a function as a constraint (Only applies to rules defined programatically) noolsjs#142 - @raymondfeng
* You can now define types using scope [noolsjs#142](noolsjs#142) - @raymondfeng
* Fix for issue, is the dsl you do not have to escape `\` characters noolsjs#123

@doug-martin doug-martin referenced this pull request Feb 25, 2015

Merged

v0.4.0 #144

doug-martin added a commit to doug-martin/nools that referenced this pull request Feb 25, 2015

v0.4.0
* Fix for issue noolsjs#122 referencing defined class within another defined class
   * Also fixes accessing scoped functions within a defined class.
* Fix for issue noolsjs#119 window was removed from the nools.js file now it is called in the current scope of `this`.
* Allow session.halt even for `match()` noolsjs#143 - @raymondfeng
   * Now if you call `halt()` even if you did not call `matchUntilHalt()`
* Now you can use a function as a constraint (Only applies to rules defined programatically) noolsjs#142 - @raymondfeng
* You can now define types using scope [noolsjs#142](noolsjs#142) - @raymondfeng
* Fix for issue, is the dsl you do not have to escape `\` characters noolsjs#123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment