// Generated by CoffeeScript 1.10.0
(function() {
  var Resource, qs, request, singleton,
    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  singleton = require('singleton');

  request = require('request');

  qs = require('qs');

  Resource = (function(superClass) {
    extend(Resource, superClass);

    function Resource(oauth) {
      this.oauth = oauth != null ? oauth : false;
    }

    Resource.prototype.__request__ = function(url, slug, method, fields, callback) {
      var options, params, ref;
      if (typeof fields === 'function') {
        ref = [callback, fields], fields = ref[0], callback = ref[1];
      }
      options = {
        uri: url,
        method: method,
        json: slug !== 'oauth',
        headers: this.oauth === true && this.oauth_token ? {
          'X-Shopify-Access-Token': this.oauth_token
        } : {}
      };
      if (method === 'POST') {
        options.headers['content-type'] = 'application/x-www-form-urlencoded';
      }
      if (fields) {
        params = {};
        if (slug && slug !== 'oauth') {
          params[typeof slug === 'object' ? slug.short : slug] = fields;
          options.body = JSON.stringify(params);
        } else {
          options.body = fields;
        }
      }
      return request(options, function(err, res, body) {
        if (err || res.statusCode >= 300) {
          return process.nextTick(function() {
            return callback(err || new Error("Status code " + res.statusCode));
          });
        }
        if (method === 'DELETE') {
          body = slug;
        } else if (slug && slug !== 'oauth' && typeof(body) === "object") {
            body = body[typeof slug === 'object' ? slug.long : slug];
        }
        return process.nextTick(function() {
          return callback(err, body);
        });
      });
    };

    Resource.prototype.get = function(url, slug, callback) {
      return this.__request__(url, slug, 'GET', callback);
    };

    Resource.prototype.post = function(url, slug, fields, callback) {
      return this.__request__(url, slug, 'POST', fields, callback);
    };

    Resource.prototype.put = function(url, slug, fields, callback) {
      return this.__request__(url, slug, 'PUT', fields, callback);
    };

    Resource.prototype["delete"] = function(url, slug, callback) {
      return this.__request__(url, slug, 'DELETE', callback);
    };

    Resource.prototype.queryString = function(url, params, format) {
      var query;
      if (format == null) {
        format = "json";
      }
      query = url + "." + format;
      if (params) {
        query += "?" + qs.stringify(params, {
          arrayFormat: 'brackets'
        });
      }
      return query;
    };

    Resource.prototype.setOAuthToken = function(oauth_token) {
      this.oauth_token = oauth_token;
      return this.oauth = this.oauth_token != null;
    };

    return Resource;

  })(singleton);

  module.exports = Resource.get();

}).call(this);

@@ -1881,33 +1881,30 @@
 peof
-(
+ 
 body
-)
  === 
-%22
+'
 object
-%22
+'
 ) %7B%0A
-  
     

Recompile resource.coffee