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/python.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/parallel.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, Parallel, Prepare, Python, 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.
51
52
53
54
|
# File 'lib/vx/builder/script_builder.rb', line 51
def initialize(task, source)
@source = source
@task = task
end
|
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source.
49
50
51
|
# File 'lib/vx/builder/script_builder.rb', line 49
def source
@source
end
|
#task ⇒ Object
Returns the value of attribute task.
49
50
51
|
# File 'lib/vx/builder/script_builder.rb', line 49
def task
@task
end
|
Instance Method Details
#image ⇒ Object
56
57
58
|
# File 'lib/vx/builder/script_builder.rb', line 56
def image
source.image.first
end
|
#to_after_script ⇒ Object
80
81
82
83
84
85
86
87
88
|
# File 'lib/vx/builder/script_builder.rb', line 80
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# File 'lib/vx/builder/script_builder.rb', line 60
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
90
91
92
93
94
95
96
97
98
99
100
|
# File 'lib/vx/builder/script_builder.rb', line 90
def to_script
a = []
a << "\n# script"
a += env.script
a << "\n# after success"
a += env.after_success
a.join("\n")
end
|
#vexor ⇒ Object
102
103
104
|
# File 'lib/vx/builder/script_builder.rb', line 102
def vexor
source.vexor
end
|