diff --git a/bower.json b/bower.json index 13c1ad6..8fe0297 100755 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "resourcify", - "version": "0.7.0", + "version": "1.0.0-rc.1", "authors": [ "Erik Donohoo " ], diff --git a/dist/resourcify.js b/dist/resourcify.js index eb2e0c8..7273569 100644 --- a/dist/resourcify.js +++ b/dist/resourcify.js @@ -225,8 +225,14 @@ function resourcificator ($http, $q, utils, Cache) { config.url = config.url ? $q.when(config.url) : null; config.$Const = Constructor; + config.isInstance = (config.isInstance == null) ? true : config.isInstance; config.config = config.config || {}; + // No before/after on class level + if (config.isInstance === false && (config.before || config.after)) { + throw new Error('Before/After functions not supported on Class level requests'); + } + if (config.isInstance) { Constructor.prototype[config.name] = generateRequest(config); Constructor.prototype[config.name].withConfig = function () { diff --git a/dist/resourcify.min.js b/dist/resourcify.min.js index 874f50d..6027ba9 100644 --- a/dist/resourcify.min.js +++ b/dist/resourcify.min.js @@ -1,2 +1,2 @@ -/*! resourcify 20-12-2014 v0.7.0 */ -!function(a,b){"use strict";function c(){function b(b){this.$cache={},this.$options=a.extend({id:"id",saveMethod:"POST",key:["id"]},b),this.$lists={}}return b.prototype.add=function(b,c){for(var d=this.getKey(b),e=this.$cache,f=0;f