lib/coverband/adapters/redis_store.rb
def migrate!
        reset_base_key
        @format_version = 'coverband3_1'
        previous_data = get_report
        if previous_data.empty?
          puts 'no previous data to migrate found'
          exit 0
        end
        relative_path_report = previous_data.each_with_object({}) do |(key, vals), fixed_report|
          fixed_report[full_path_to_relative(key)] = vals
        end
        clear!
        reset_base_key
        @format_version = REDIS_STORAGE_FORMAT_VERSION
        save_coverage(merge_reports(get_report, relative_path_report, skip_expansion: true))
      end
###
# Current implementation moves from coverband3_1 to coverband_3_2
# In the future this can be made more general and support a more specific
# version format.
###
Current implementation moves from coverband3_1 to coverband_3_2
In the future this can be made more general and support a more specific
version format.
Current implementation moves from coverband3_1 to coverband_3_2 In the future this can be made more general and support a more specific version format .
def migrate!
        reset_base_key
        @format_version = 'coverband3_1'
        previous_data = get_report
        if previous_data.empty?
          puts 'no previous data to migrate found'
          exit 0
        end
        relative_path_report = previous_data.each_with_object({}) do |(key, vals), fixed_report|
          fixed_report[full_path_to_relative(key)] = vals
        end
        clear!
        reset_base_key
        @format_version = REDIS_STORAGE_FORMAT_VERSION
        save_coverage(merge_reports(get_report, relative_path_report, skip_expansion: true))
      end
def migrate! reset_base_key @format_version = 'coverband3_1' previous_data = get_report if previous_data . empty? puts 'no previous data to migrate found' exit 0 end relative_path_report = previous_data . each_with_object ( { } ) do | ( key , vals ) , fixed_report | fixed_report [ full_path_to_relative ( key ) ] = vals end clear! reset_base_key @format_version = REDIS_STORAGE_FORMAT_VERSION save_coverage ( merge_reports ( get_report , relative_path_report , skip_expansion : true ) ) end
Current implementation moves from coverband3_1 to coverband_3_2
In the future this can be made more general and support a more specific
version format.
Current implementation moves from coverband3_1 to coverband_3_2 In the future this can be made more general and support a more specific version format .