Class: RSpecTracer::Storage::Snapshot Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec_tracer/storage/snapshot.rb,
lib/rspec_tracer/storage/snapshot.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Internal Snapshot — see RSpecTracer for the user-facing surface.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#all_examplesObject

Returns the value of attribute all_examples

Returns:

  • (Object)

    the current value of all_examples



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def all_examples
  @all_examples
end

#all_filesObject

Returns the value of attribute all_files

Returns:

  • (Object)

    the current value of all_files



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def all_files
  @all_files
end

#boot_setObject

Returns the value of attribute boot_set

Returns:

  • (Object)

    the current value of boot_set



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def boot_set
  @boot_set
end

#cache_hit_reasonObject

Returns the value of attribute cache_hit_reason

Returns:

  • (Object)

    the current value of cache_hit_reason



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def cache_hit_reason
  @cache_hit_reason
end

#dependencyObject

Returns the value of attribute dependency

Returns:

  • (Object)

    the current value of dependency



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def dependency
  @dependency
end

#duplicate_examplesObject

Returns the value of attribute duplicate_examples

Returns:

  • (Object)

    the current value of duplicate_examples



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def duplicate_examples
  @duplicate_examples
end

#env_dependencyObject

Returns the value of attribute env_dependency

Returns:

  • (Object)

    the current value of env_dependency



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def env_dependency
  @env_dependency
end

#env_snapshotObject

Returns the value of attribute env_snapshot

Returns:

  • (Object)

    the current value of env_snapshot



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def env_snapshot
  @env_snapshot
end

#examples_coverageObject

Returns the value of attribute examples_coverage

Returns:

  • (Object)

    the current value of examples_coverage



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def examples_coverage
  @examples_coverage
end

#failed_examplesObject

Returns the value of attribute failed_examples

Returns:

  • (Object)

    the current value of failed_examples



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def failed_examples
  @failed_examples
end

#flaky_examplesObject

Returns the value of attribute flaky_examples

Returns:

  • (Object)

    the current value of flaky_examples



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def flaky_examples
  @flaky_examples
end

#interrupted_examplesObject

Returns the value of attribute interrupted_examples

Returns:

  • (Object)

    the current value of interrupted_examples



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def interrupted_examples
  @interrupted_examples
end

#pending_examplesObject

Returns the value of attribute pending_examples

Returns:

  • (Object)

    the current value of pending_examples



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def pending_examples
  @pending_examples
end

#reverse_dependencyObject

Returns the value of attribute reverse_dependency

Returns:

  • (Object)

    the current value of reverse_dependency



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def reverse_dependency
  @reverse_dependency
end

#run_idObject

Returns the value of attribute run_id

Returns:

  • (Object)

    the current value of run_id



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def run_id
  @run_id
end

#schema_versionObject

Returns the value of attribute schema_version

Returns:

  • (Object)

    the current value of schema_version



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def schema_version
  @schema_version
end

#skipped_examplesObject

Returns the value of attribute skipped_examples

Returns:

  • (Object)

    the current value of skipped_examples



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def skipped_examples
  @skipped_examples
end

#wsi_snapshotObject

Returns the value of attribute wsi_snapshot

Returns:

  • (Object)

    the current value of wsi_snapshot



74
75
76
# File 'lib/rspec_tracer/storage/snapshot.rb', line 74

def wsi_snapshot
  @wsi_snapshot
end

Class Method Details

.empty(schema_version:, run_id:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Defaults every collection to its 1.x starting shape: Hash for keyed collections, Set for example-id lists. Keeps spec construction terse and prevents accidental nil-deref when a save is composed incrementally.



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/rspec_tracer/storage/snapshot.rb', line 103

def self.empty(schema_version:, run_id:)
  new(
    schema_version: schema_version,
    run_id: run_id,
    all_examples: {},
    duplicate_examples: {},
    interrupted_examples: Set.new,
    flaky_examples: Set.new,
    failed_examples: Set.new,
    pending_examples: Set.new,
    skipped_examples: Set.new,
    all_files: {},
    dependency: {},
    reverse_dependency: {},
    examples_coverage: {},
    boot_set: {},
    wsi_snapshot: {},
    env_snapshot: {},
    env_dependency: {},
    cache_hit_reason: {}
  )
end