Class: Vx::Builder::ScriptBuilder::Cache

Inherits:
Base
  • Object
show all
Includes:
Helper::Config
Defined in:
lib/vx/builder/script_builder/cache.rb

Constant Summary collapse

CASHER_URL =
"https://raw2.github.com/dima-exe/casher/master/bin/casher"
CASHER_BIN =
"$HOME/.casher/bin/casher"

Instance Attribute Summary

Attributes inherited from Base

#app

Instance Method Summary collapse

Methods included from Helper::Config

#config

Methods inherited from Base

#deploy?, #do_after_deploy, #do_announce, #do_before_deploy, #do_before_install, #do_before_script, #do_cache_key, #do_cached_directories, #do_deploy_script, #do_init, #do_install, #do_script

Methods included from Helper::VxvmInstall

#vxvm_install

Methods included from Helper::TraceShCommand

#trace_sh_command

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/vx/builder/script_builder/cache.rb', line 12

def call(env)
  rs = app.call env

  if env.task.cache_url_prefix && enabled?(env)

    assign_url_to_env(env)
    prepare(env)
    fetch(env)
    add(env)
    push(env)
  end

  rs
end