lib/rally_user_helper.rb
# Write subscription/workspace/project cache
Write subscription/workspace/project cache
Write subscription / workspace / project cache
def write_subscription_cache()
      subscription_cache_filename = File.dirname(__FILE__) + "/" + SUB_CACHE
      @logger.info "Started writing subscription cache to #{subscription_cache_filename}"
      subscription_csv = CSV.open(
        subscription_cache_filename,
        CACHE_WRITE_MODE,
        {:col_sep => CACHE_COL_DELIM, :encoding => @file_encoding}
      )
      subscription_csv << SUB_CACHE_FIELDS
      @cached_subscription.each_pair do | sub_id, this_subscription |
        data = []
        data << sub_id
        data << this_subscription
        subscription_csv << CSV::Row.new(SUB_CACHE_FIELDS, data)
      end
      @logger.info "Finished writing subscription cache to #{subscription_cache_filename}"
    end
def write_subscription_cache ( ) subscription_cache_filename = File . dirname ( __FILE__ ) + "/" + SUB_CACHE @logger . info "Started writing subscription cache to #{subscription_cache_filename}" subscription_csv = CSV . open ( subscription_cache_filename , CACHE_WRITE_MODE , { :col_sep => CACHE_COL_DELIM , :encoding => @file_encoding } ) subscription_csv << SUB_CACHE_FIELDS @cached_subscription . each_pair do | sub_id , this_subscription | data = [ ] data << sub_id data << this_subscription subscription_csv << CSV :: Row . new ( SUB_CACHE_FIELDS , data ) end @logger . info "Finished writing subscription cache to #{subscription_cache_filename}" end
Write subscription/workspace/project cache
Write subscription / workspace / project cache
# Output CSV header # Output cache to file # Record for CSV output