Module: SpecGuard::RSpec

Defined in:
lib/specguard/rspec.rb,
lib/specguard/rspec/cli.rb,
lib/specguard/rspec/linter.rb,
lib/specguard/rspec/finding.rb,
lib/specguard/rspec/scanner.rb,
lib/specguard/rspec/version.rb,
lib/specguard/rspec/transport.rb,
lib/specguard/rspec/ingest_cli.rb,
lib/specguard/rspec/configuration.rb,
lib/specguard/rspec/file_selector.rb,
lib/specguard/rspec/json_reporter.rb,
lib/specguard/rspec/ingest_reporter.rb,
lib/specguard/rspec/annotation_lookup.rb,
lib/specguard/rspec/validator_backend.rb,
lib/specguard/rspec/annotation_scanner.rb,
lib/specguard/rspec/payload_normalizer.rb

Defined Under Namespace

Modules: AnnotationScanner, FileSelector, GitCheckout, IngestReporter, JSONReporter, Linter, PayloadNormalizer, Scanner, ValidatorBackend Classes: AnnotationLookup, CLI, Configuration, Error, Finding, IngestCLI, ScanError, Transport, UsageError, ValidatorError

Constant Summary collapse

SCHEMA_PATH =

The vendored canonical OpenTestIntent schema, copied byte-for-byte from open-test-intent so this gem has no cross-repo runtime dependency. It ships packaged (it lives under lib/, which the gemspec includes); the spec fixtures deliberately do not, so nothing here may be load-bearing at runtime.

Since the SPGD-867 cutover nothing VALIDATES against this copy — every verdict comes from the validate-intent binary's own compiled-in schema. It survives because ValidatorBackend's schema-contract check digests it at runtime and refuses a binary that would enforce different bytes: the two halves of the seam must keep meeting somewhere, and this file is where the gem's half lives.

File.expand_path("rspec/schemas/open-test-intent.v1.json", __dir__).freeze
VERSION =
SpecGuard::VERSION

Class Method Summary collapse

Class Method Details

.configurationConfiguration

The process-wide formatter configuration.

Built on first use rather than at load time so that a configure block in a spec_helper.rb and a variable exported by a CI job describe the same object regardless of which the interpreter reached first.

Returns:



445
446
447
# File 'lib/specguard/rspec/configuration.rb', line 445

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Configuration

Configure the formatter.

SpecGuard::RSpec.configure do |config|
config.branch = "release/2.0"
end

Yield Parameters:

Returns:



457
458
459
460
# File 'lib/specguard/rspec/configuration.rb', line 457

def configure
  yield configuration if block_given?
  configuration
end

.reset_configuration!void

This method returns an undefined value.

Drop the memoized configuration so the next read re-seeds from ENV. Exists for tests, and for the rare caller that changes the environment after this file was loaded.



467
468
469
# File 'lib/specguard/rspec/configuration.rb', line 467

def reset_configuration!
  @configuration = nil
end