stager/spec/support/app_fixture.rb
# If called without a block, returns the staging output directory as a string.
# You must manually clean up the directory thus created.
# If called with a block, yields the staged directory as a Pathname, and
# automatically deletes it when the block returns.
If called without a block, returns the staging output directory as a string.
You must manually clean up the directory thus created.
If called with a block, yields the staged directory as a Pathname, and
automatically deletes it when the block returns.
If called without a block returns the staging output directory as a string . You must manually clean up the directory thus created . If called with a block yields the staged directory as a Pathname and automatically deletes it when the block returns .
def stage(framework, env = {})
    plugin_klass = StagingPlugin.load_plugin_for(framework)
    working_dir = Dir.mktmpdir("#{@name}-staged")
    stager = plugin_klass.new(source_dir, working_dir, env)
    stager.stage_application
    if block_given?
      begin
        Dir.chdir(working_dir) do
          yield Pathname.new(working_dir)
        end
      ensure
        FileUtils.rm_r(working_dir)
      end
    else
      working_dir
    end
  end
def stage ( framework , env = { } ) plugin_klass = StagingPlugin . load_plugin_for ( framework ) working_dir = Dir . mktmpdir ( "#{@name}-staged" ) stager = plugin_klass . new ( source_dir , working_dir , env ) stager . stage_application if block_given? begin Dir . chdir ( working_dir ) do yield Pathname . new ( working_dir ) end ensure FileUtils . rm_r ( working_dir ) end else working_dir end end
If called without a block, returns the staging output directory as a string.
If called without a block returns the staging output directory as a string .
framework
env