Skip to content

Commit

Permalink
fix: fix coffeescript and underscore breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
daern91 committed Nov 20, 2018
1 parent 293631c commit c04a6fd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module.exports = (grunt) ->
'# <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n' +
'# ==============================================================\n' +
'# Copyright (c) <%= grunt.template.today(\"yyyy\") %> SPHERE.IO\u2122\n' +
'# Licensed <%= _.pluck(pkg.licenses, \"type\").join(\", \") %>.\n' +
'# Licensed <%= _.map(pkg.licenses, \"type\").join(\", \") %>.\n' +
'#\n' +
'# <%= _.pluck(pkg.licenses, \"url\").join(\"\\n\") %>\n' +
'# <%= _.map(pkg.licenses, \"url\").join(\"\\n\") %>\n' +
'*/\n'

coffeelint:
Expand Down
10 changes: 10 additions & 0 deletions src/coffee/errors.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class HttpError extends Error
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "HttpError"
@statusCode = @body.statusCode if @body.statusCode
@code = @statusCode
Expand All @@ -19,6 +20,7 @@ class SphereError extends Error
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "SphereError"
@statusCode = @body.statusCode if @body.statusCode
@code = @statusCode
Expand All @@ -32,6 +34,7 @@ class GraphQLError extends Error
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "GraphQLError"
@statusCode = @body.statusCode if @body.statusCode
@code = @statusCode
Expand All @@ -45,6 +48,7 @@ class BadRequest extends SphereError
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "BadRequest"
@statusCode = 400
@code = @statusCode
Expand All @@ -58,6 +62,7 @@ class Unauthorized extends SphereError
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "Unauthorized"
@statusCode = 401
@code = @statusCode
Expand All @@ -71,6 +76,7 @@ class NotFound extends SphereError
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "NotFound"
@statusCode = 404
@code = @statusCode
Expand All @@ -84,6 +90,7 @@ class MethodNotAllowed extends SphereError
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "MethodNotAllowed"
@statusCode = 405
@code = @statusCode
Expand All @@ -97,6 +104,7 @@ class ConcurrentModification extends SphereError
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "ConcurrentModification"
@statusCode = 409
@code = @statusCode
Expand All @@ -110,6 +118,7 @@ class InternalServerError extends SphereError
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "InternalServerError"
@statusCode = 500
@code = @statusCode
Expand All @@ -123,6 +132,7 @@ class ServiceUnavailable extends SphereError
# message - {String} The error message
# body - {Object} A JSON object with optional information to pass to the error, like the error response body
constructor: (@message, @body = {}) ->
super()
@name = "ServiceUnavailable"
@statusCode = 503
@code = @statusCode
Expand Down
1 change: 1 addition & 0 deletions src/coffee/sync/category-sync.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CategorySync extends BaseSync

# Public: Construct a `CategorySync` object.
constructor: ->
super()
# Override base utils
@_utils = new CategoryUtil()

Expand Down
1 change: 1 addition & 0 deletions src/coffee/sync/inventory-sync.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class InventorySync extends BaseSync

# Public: Construct a `InventorySync` object.
constructor: ->
super()
# Override base utils
@_utils = new InventoryUtils

Expand Down
1 change: 1 addition & 0 deletions src/coffee/sync/order-sync.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class OrderSync extends BaseSync

# Public: Construct a `OrderSync` object.
constructor: ->
super()
# Override base utils
@_utils = new OrderUtils

Expand Down
1 change: 1 addition & 0 deletions src/coffee/sync/product-sync.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ProductSync extends BaseSync

# Public: Construct a `ProductSync` object.
constructor: ->
super()
# Override base utils
@_utils = new ProductUtils

Expand Down

0 comments on commit c04a6fd

Please sign in to comment.