Class: Vx::Builder::ScriptBuilder
- Inherits:
-
Object
- Object
- Vx::Builder::ScriptBuilder
show all
- Includes:
- Common::Helper::Middlewares
- Defined in:
- lib/vx/builder/script_builder.rb,
lib/vx/builder/script_builder/go.rb,
lib/vx/builder/script_builder/env.rb,
lib/vx/builder/script_builder/base.rb,
lib/vx/builder/script_builder/java.rb,
lib/vx/builder/script_builder/ruby.rb,
lib/vx/builder/script_builder/rust.rb,
lib/vx/builder/script_builder/cache.rb,
lib/vx/builder/script_builder/scala.rb,
lib/vx/builder/script_builder/deploy.rb,
lib/vx/builder/script_builder/nodejs.rb,
lib/vx/builder/script_builder/clojure.rb,
lib/vx/builder/script_builder/prepare.rb,
lib/vx/builder/script_builder/defaults.rb,
lib/vx/builder/script_builder/services.rb,
lib/vx/builder/script_builder/timeouts.rb
Defined Under Namespace
Classes: Base, Cache, Clojure, Defaults, Deploy, Env, Go, Java, Nodejs, Prepare, Ruby, Rust, Scala, Services, Timeouts
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(task, source) ⇒ ScriptBuilder
Returns a new instance of ScriptBuilder.
47
48
49
50
|
# File 'lib/vx/builder/script_builder.rb', line 47
def initialize(task, source)
@source = source
@task = task
end
|
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source.
45
46
47
|
# File 'lib/vx/builder/script_builder.rb', line 45
def source
@source
end
|
#task ⇒ Object
Returns the value of attribute task.
45
46
47
|
# File 'lib/vx/builder/script_builder.rb', line 45
def task
@task
end
|
Instance Method Details
#image ⇒ Object
52
53
54
|
# File 'lib/vx/builder/script_builder.rb', line 52
def image
source.image.first
end
|
#to_after_script ⇒ Object
76
77
78
79
80
81
82
83
84
|
# File 'lib/vx/builder/script_builder.rb', line 76
def to_after_script
a = []
a << "\n# after script init"
a += env.after_script_init
a << "\n# after script"
a += env.after_script
a.join("\n")
end
|
#to_before_script ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/vx/builder/script_builder.rb', line 56
def to_before_script
a = []
a << "\n# init"
a += env.init
a << "\n# before install"
a += env.before_install
a << "\n# announce"
a += env.announce
a << "\n# install"
a += env.install
a << "\n# before script"
a += env.before_script
a.join("\n")
end
|
#to_script ⇒ Object
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/vx/builder/script_builder.rb', line 86
def to_script
a = []
a << "\n# script"
a += env.script
a << "\n# after success"
a += env.after_success
a.join("\n")
end
|
#vexor ⇒ Object
98
99
100
|
# File 'lib/vx/builder/script_builder.rb', line 98
def vexor
source.vexor
end
|