Sha256: 85110ae36967d19c4468348f47ade1a34534d4727b3c404ac072e08ae21bd3c4

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

# frozen_string_literal: true

require_relative "snapshot_ui/snapshot"
require_relative "snapshot_ui/configuration"

module SnapshotUI
  DEFAULT_CONFIGURATION = {
    project_root_directory: ".",
    storage_directory: "tmp/snapshot_ui"
  }.freeze

  def self.configure
    yield(configuration)
  end

  def self.configuration
    @configuration ||= Configuration.new(**DEFAULT_CONFIGURATION)
  end

  def self.snapshot_taking_enabled?
    %w[1 true].include?(ENV["TAKE_SNAPSHOTS"])
  end

  def self.publish_snapshots_in_progress
    Snapshot.publish_snapshots_in_progress
  end

  def self.clear_snapshots_in_progress
    Snapshot.clear_snapshots_in_progress
  end

  def self.clear_snapshots
    Snapshot.clear_snapshots
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
snapshot_ui-0.1.0 lib/snapshot_ui.rb