Class: Bubing::Bundler
- Inherits:
-
Object
- Object
- Bubing::Bundler
- Defined in:
- lib/bubing/bundler.rb
Direct Known Subclasses
Constant Summary collapse
- PATH_RE =
/=> (.+?(?=\())/
Instance Method Summary collapse
- #bundle! ⇒ Object
-
#initialize(binary, directory, **options) ⇒ Bundler
constructor
A new instance of Bundler.
Constructor Details
#initialize(binary, directory, **options) ⇒ Bundler
Returns a new instance of Bundler.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/bubing/bundler.rb', line 13 def initialize(binary, directory, **) @binary = binary @directory = directory @interpreter = [:interpreter] @plugins = [:plugins] || [] @plugin_dirs = [:plugin_dirs] || [] @files = [:files] || [] @file_dirs = [:file_dirs] || [] @ld_paths = [:ld_paths] || [] @verbose = [:verbose] @lib_dir = File.join(directory, 'lib') @copied = [] end |
Instance Method Details
#bundle! ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/bubing/bundler.rb', line 28 def bundle! prepare_dir log("Interpreter is #{@interpreter}") copy_deps(@binary) log('Copying plugins...') log("Plugins to bundle #{@plugins.count}") copy_plugins(@plugins) log("Plugin dirs to bundle #{@plugin_dirs.count}") copy_plugin_dirs log('Copying files...') log("Files to bundle #{@files.count}") copy_files(@files) log("File dirs to bundle #{@file_dirs.count}") copy_files(@file_dirs) rescue Bubing::DependencyNotFoundError => e puts "#{e.message} not found!" raise Bubing::BundlingError end |