Class: Albacore::FpmAppSpec::Task
- Inherits:
-
Object
- Object
- Albacore::FpmAppSpec::Task
- Includes:
- CrossPlatformCmd, Logging
- Defined in:
- lib/albacore/fpm_app_spec.rb
Overview
task implementation that can be #execute’d
Constant Summary
Constants included from CrossPlatformCmd
CrossPlatformCmd::KILL_TIMEOUT
Instance Attribute Summary
Attributes included from CrossPlatformCmd
Instance Method Summary collapse
-
#execute ⇒ Object
this runs fpm and does some file copying.
-
#initialize(opts) ⇒ Task
constructor
create a new task instance with the given opts.
Methods included from CrossPlatformCmd
#chdir, #make_command, #normalise_slashes, #sh, #shie, #stop, #system, #which
Methods included from Logging
#debug, #err, #error, #fatal, #info, #puts, #trace, #warn
Constructor Details
#initialize(opts) ⇒ Task
create a new task instance with the given opts
101 102 103 104 |
# File 'lib/albacore/fpm_app_spec.rb', line 101 def initialize opts raise ArgumentError, 'opts is nil' if opts.nil? @opts = opts end |
Instance Method Details
#execute ⇒ Object
this runs fpm and does some file copying
107 108 109 110 111 112 |
# File 'lib/albacore/fpm_app_spec.rb', line 107 def execute warn 'executing fpm app spec task, but there are no input files [fpm_app_spec::task#execute]' if @opts.get(:files).empty? fpm_package @opts.get(:out), @opts.get(:files) end |