Class: Bundler::Spinel::Ledger::Verdict

Inherits:
Struct
  • Object
show all
Defined in:
lib/bundler/spinel/ledger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#atObject

Returns the value of attribute at

Returns:

  • (Object)

    the current value of at



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def at
  @at
end

#gemObject

Returns the value of attribute gem

Returns:

  • (Object)

    the current value of gem



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def gem
  @gem
end

#probeObject

Returns the value of attribute probe

Returns:

  • (Object)

    the current value of probe



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def probe
  @probe
end

#reasonsObject

Returns the value of attribute reasons

Returns:

  • (Object)

    the current value of reasons



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def reasons
  @reasons
end

#revObject

Returns the value of attribute rev

Returns:

  • (Object)

    the current value of rev



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def rev
  @rev
end

#risksObject

Returns the value of attribute risks

Returns:

  • (Object)

    the current value of risks



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def risks
  @risks
end

#verdictObject

Returns the value of attribute verdict

Returns:

  • (Object)

    the current value of verdict



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def verdict
  @verdict
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



17
18
19
# File 'lib/bundler/spinel/ledger.rb', line 17

def version
  @version
end

Instance Method Details

#clean?Boolean

Compiles clean and no risky dynamic constructs found statically.

Returns:

  • (Boolean)


24
25
26
# File 'lib/bundler/spinel/ledger.rb', line 24

def clean? = verdict == "clean"
# Compiles clean but uses constructs Spinel degrades silently
# (define_method/eval/…): allowed by default, fails under --strict.

#loaded?Boolean

Compiles AND loads identically under a differential CRuby-vs-Spinel run, but with no behaviour smoke — so silent miscompiles in its logic are still possible. Stronger than ‘clean` (it actually ran), weaker than `verified`. Not trustworthy enough for the curated source on its own.

Returns:

  • (Boolean)


32
33
34
35
# File 'lib/bundler/spinel/ledger.rb', line 32

def loaded? = verdict == "loaded"
# Compiles clean AND a behaviour smoke runs identically under CRuby and a
# Spinel-compiled harness. The only verdict that earns a whitelist slot /
# platform badge — catches the silent miscompiles `loaded` can't.

#rejected?Boolean

Hard no: will not compile, or compiles to silent no-ops we detected.

Returns:

  • (Boolean)


22
23
# File 'lib/bundler/spinel/ledger.rb', line 22

def rejected? = verdict == "rejected"
# Compiles clean *and* no risky dynamic constructs found statically.

#risky?Boolean

Compiles clean but uses constructs Spinel degrades silently (define_method/eval/…): allowed by default, fails under –strict.

Returns:

  • (Boolean)


27
28
29
30
31
# File 'lib/bundler/spinel/ledger.rb', line 27

def risky? = verdict == "risky"
# Compiles AND loads identically under a differential CRuby-vs-Spinel run,
# but with no behaviour smoke — so silent miscompiles in its *logic* are
# still possible. Stronger than `clean` (it actually ran), weaker than
# `verified`. Not trustworthy enough for the curated source on its own.

#to_lineObject



38
# File 'lib/bundler/spinel/ledger.rb', line 38

def to_line = JSON.generate(to_h.transform_keys(&:to_s))

#verified?Boolean

Compiles clean AND a behaviour smoke runs identically under CRuby and a Spinel-compiled harness. The only verdict that earns a whitelist slot / platform badge — catches the silent miscompiles ‘loaded` can’t.

Returns:

  • (Boolean)


36
# File 'lib/bundler/spinel/ledger.rb', line 36

def verified? = verdict == "verified"