Module: SpecGuard::RSpec
- Defined in:
- lib/specguard/rspec.rb,
lib/specguard/rspec/cli.rb,
lib/specguard/rspec/linter.rb,
lib/specguard/rspec/schema.rb,
lib/specguard/rspec/finding.rb,
lib/specguard/rspec/scanner.rb,
lib/specguard/rspec/version.rb,
lib/specguard/rspec/transport.rb,
lib/specguard/rspec/configuration.rb,
lib/specguard/rspec/file_selector.rb,
lib/specguard/rspec/json_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,
lib/specguard/rspec/violation_renderer.rb
Defined Under Namespace
Modules: AnnotationScanner, FileSelector, GitCheckout, JSONReporter, PayloadNormalizer, Scanner, ValidatorBackend Classes: AnnotationLookup, CLI, Configuration, Error, Finding, Linter, ScanError, Schema, SchemaError, Transport, UsageError, ValidatorError, ViolationRenderer
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.SpecGuard::RSpec::Schema.load reads it, and treats every way that can fail as exit 2 — if a packaging accident leaves it out of the gem, the linter must say so rather than blame someone's annotations.
File.("rspec/schemas/open-test-intent.v1.json", __dir__).freeze
- VERSION =
"0.2.1"
Class Method Summary collapse
-
.configuration ⇒ Configuration
The process-wide formatter configuration.
-
.configure {|configuration| ... } ⇒ Configuration
Configure the formatter.
-
.reset_configuration! ⇒ void
Drop the memoized configuration so the next read re-seeds from ENV.
Class Method Details
.configuration ⇒ Configuration
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.
432 433 434 |
# File 'lib/specguard/rspec/configuration.rb', line 432 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Configuration
444 445 446 447 |
# File 'lib/specguard/rspec/configuration.rb', line 444 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.
454 455 456 |
# File 'lib/specguard/rspec/configuration.rb', line 454 def reset_configuration! @configuration = nil end |