lib/shopify_cli/context.rb
def new_version
      if (time_of_last_check + VERSION_CHECK_INTERVAL) < (now = Time.now.to_i)
        update_time_of_last_check(now)
        latest_version = retrieve_latest_gem_version
        latest_version unless latest_version == ShopifyCLI::VERSION
      end
    end
# Checks if there's a newer version of the CLI available and returns version string if
# this should be conveyed to the user (i.e., if it's been over 24 hours since last check)
#
# #### Parameters
#
# #### Returns
# - `version`: string of newer version available, IFF new version is available AND it's time to inform user,
#            : nil otherwise
#
Checks if there's a newer version of the CLI available and returns version string if
this should be conveyed to the user

Parameters

Returns
`version`: string of newer version available, IFF new version is available AND it's time to inform user,
: nil otherwise
Checks if there ' s a newer version of the CLI available and returns version string if this should be conveyed to the user Parameters Returns ` version ` : string of newer version available IFF new version is available AND it ' s time to inform user : nil otherwise
def new_version
      if (time_of_last_check + VERSION_CHECK_INTERVAL) < (now = Time.now.to_i)
        update_time_of_last_check(now)
        latest_version = retrieve_latest_gem_version
        latest_version unless latest_version == ShopifyCLI::VERSION
      end
    end
def new_version if ( time_of_last_check + VERSION_CHECK_INTERVAL ) < ( now = Time . now . to_i ) update_time_of_last_check ( now ) latest_version = retrieve_latest_gem_version latest_version unless latest_version == ShopifyCLI :: VERSION end end
Checks if there's a newer version of the CLI available and returns version string if
this should be conveyed to the user (i.e., if it's been over 24 hours since last check)
Checks if there ' s a newer version of the CLI available and returns version string if this should be conveyed to the user ( i . e . if it ' s been over 24 hours since last check )