Module: LockJar
- Defined in:
- lib/pacer/support/lock_jar_disabler.rb,
lib/pacer/support/lock_jar.rb
Overview
Disable LockJar so that other libraries can’t bring in random other jars. TODO: add LockJar.disable! or something like that.
NOTE: this file should only be loaded by #register_bundled_jarfiles after loading is complete.
Class Method Summary collapse
- .load(*a) ⇒ Object
- .lock(*a) ⇒ Object
- .orig_load ⇒ Object
- .orig_lock ⇒ Object
-
.register_bundled_jarfiles ⇒ Object
If Bundler constant is defined, assume we are running in a bundled environment and register all Jarfiles.
Class Method Details
.load(*a) ⇒ Object
11 |
# File 'lib/pacer/support/lock_jar_disabler.rb', line 11 def self.load(*a); end |
.lock(*a) ⇒ Object
10 |
# File 'lib/pacer/support/lock_jar_disabler.rb', line 10 def self.lock(*a); end |
.orig_load ⇒ Object
8 |
# File 'lib/pacer/support/lock_jar_disabler.rb', line 8 alias orig_load load |
.orig_lock ⇒ Object
7 |
# File 'lib/pacer/support/lock_jar_disabler.rb', line 7 alias orig_lock lock |
.register_bundled_jarfiles ⇒ Object
If Bundler constant is defined, assume we are running in a bundled environment and register all Jarfiles
4 5 6 7 8 9 10 11 12 |
# File 'lib/pacer/support/lock_jar.rb', line 4 def self.register_bundled_jarfiles if defined? Bundler Gem::Specification. map { |s| File.join(s.full_gem_path, 'Jarfile') }. select { |f| File.exists? f }. each { |f| LockJar.register_jarfile f } true end end |