Class: Tebako::PackagerLite
- Inherits:
-
Object
- Object
- Tebako::PackagerLite
- Defined in:
- lib/tebako/packager_lite.rb
Overview
Tebako application package descriptor
Instance Method Summary collapse
- #codegen ⇒ Object
- #create_implib ⇒ Object
- #create_package ⇒ Object
- #deploy ⇒ Object
-
#initialize(options_manager, scenario_manager) ⇒ PackagerLite
constructor
A new instance of PackagerLite.
- #name ⇒ Object
Constructor Details
#initialize(options_manager, scenario_manager) ⇒ PackagerLite
Returns a new instance of PackagerLite.
39 40 41 42 43 |
# File 'lib/tebako/packager_lite.rb', line 39 def initialize(, scenario_manager) @opts = @scm = scenario_manager @scm.configure_scenario end |
Instance Method Details
#codegen ⇒ Object
45 46 47 48 |
# File 'lib/tebako/packager_lite.rb', line 45 def codegen puts "-- Generating files" Tebako::Codegen.generate_package_descriptor(@opts, @scm) end |
#create_implib ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/tebako/packager_lite.rb', line 50 def create_implib rv = Tebako::RubyVersion.new(@opts.ruby_ver) bname = if @opts.mode == "application" @opts.ref else # @opts.mode == "both" @opts.package end Tebako::Packager.create_implib(@opts.ruby_src_dir, @opts.data_src_dir, bname, rv) end |
#create_package ⇒ Object
60 61 62 63 64 65 |
# File 'lib/tebako/packager_lite.rb', line 60 def create_package deploy FileUtils.rm_f(name) Tebako::Packager.mkdwarfs(@opts.deps_bin_dir, name, @opts.data_src_dir, codegen) puts "Created tebako #{@opts.output_type_second} at \"#{name}\"" end |
#deploy ⇒ Object
67 68 69 70 71 |
# File 'lib/tebako/packager_lite.rb', line 67 def deploy Tebako::Packager.init(@opts.stash_dir, @opts.data_src_dir, @opts.data_pre_dir, @opts.data_bin_dir) create_implib if @scm.msys? Tebako::Packager.deploy(@opts.data_src_dir, @opts.data_pre_dir, @opts.rv, @opts.root, @scm.fs_entrance, @opts.cwd) end |
#name ⇒ Object
73 74 75 76 |
# File 'lib/tebako/packager_lite.rb', line 73 def name bname = Pathname.new(@opts.package).cleanpath.to_s @name ||= "#{bname}.tebako" end |