Shopify/shopify_theme — pull request #72 by darrenterhune (2013-11-29 19:02:37+00:00)
Title: Initialize instance variables fixes #58

This should fix all the errors when trying to use all the tasks that were causing uninitialized variable errors. I did some debugging as well and looks like the response is the same with or without these variables initialized when it works. For instance debugging

def self.manage_timer(response)
logger.debug response.headers['x-shopify-shop-api-call-limit'].split('/')
@@current_api_call_count, @@total_api_calls = response.headers['x-shopify-shop-api-call-limit'].split('/')
@@current_timer = Time.now if @current_timer.nil?
end

Results were:

$ theme upload assets/app.css.liquid
DEBUG -- : [1,40]
$ theme replace
DEBUG -- : [1,40]
DEBUG -- : [1,40]
DEBUG -- : [1,40]
DEBUG -- : [1,40]