Module: FlossFunding::Lockfile
- Defined in:
- lib/floss_funding/lockfile.rb
Overview
Facade to access the two lockfiles from existing call sites
:nocov:
NOTE: These facade methods are heavily defensive to protect production apps if
lockfile initialization fails. Forcing these error branches in tests is not
practical without stubbing core classes in ways that reduce test value. The
primary (happy) paths are exercised throughout the suite.
Class Method Summary collapse
-
.at_exit ⇒ Object
-
.at_exit_contraindicated? ⇒ Boolean
Previously used to gate at-exit globally; now FinalSummary handles per-library gating.
-
.cleanup! ⇒ Object
No-op cleanup; rotation is handled automatically per access.
-
.exists? ⇒ Boolean
Previously used to gate Poke; now always false (never contraindicate discovery).
-
.install! ⇒ Object
Compatibility no-ops for previous API: no longer used for gating.
-
.on_load ⇒ Object
Class Method Details
.at_exit ⇒ Object
331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/floss_funding/lockfile.rb', line 331 def at_exit @at_exit ||= AtExitLockfile.new rescue StandardError => e ::FlossFunding.error!(e, "Lockfile.at_exit") begin AtExitLockfile.new rescue StandardError => e2 ::FlossFunding.error!(e2, "Lockfile.at_exit/fallback") nil end end |
.at_exit_contraindicated? ⇒ Boolean
Previously used to gate at-exit globally; now FinalSummary handles per-library gating
359 360 361 |
# File 'lib/floss_funding/lockfile.rb', line 359 def at_exit_contraindicated? false end |
.cleanup! ⇒ Object
No-op cleanup; rotation is handled automatically per access
364 365 366 |
# File 'lib/floss_funding/lockfile.rb', line 364 def cleanup! nil end |
.exists? ⇒ Boolean
Previously used to gate Poke; now always false (never contraindicate discovery)
354 355 356 |
# File 'lib/floss_funding/lockfile.rb', line 354 def exists? false end |
.install! ⇒ Object
Compatibility no-ops for previous API: no longer used for gating.
344 345 346 347 348 349 350 351 |
# File 'lib/floss_funding/lockfile.rb', line 344 def install! # Reinitialize to pick up current project_root (may change after load in tests) @on_load = OnLoadLockfile.new @at_exit = AtExitLockfile.new @on_load.touch! @at_exit.touch! nil end |
.on_load ⇒ Object
319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/floss_funding/lockfile.rb', line 319 def on_load @on_load ||= OnLoadLockfile.new rescue StandardError => e ::FlossFunding.error!(e, "Lockfile.on_load") begin OnLoadLockfile.new rescue StandardError => e2 ::FlossFunding.error!(e2, "Lockfile.on_load/fallback") nil end end |