Module: Deployman::App::Postsetup
- Defined in:
- lib/deployman/app/postsetup.rb
Defined Under Namespace
Classes: Task
Constant Summary collapse
- @@tasks =
[]
Class Method Summary collapse
-
.createPostsetupFile(path) ⇒ Object
create postsetup.json file path = “/sandbox/liveserver/customerName/software/repoOwner/repoName/releases/v2.2.0”.
-
.getTasks ⇒ Object
get array of all tasks.
-
.newTask ⇒ Object
add new task to tasks.
Class Method Details
.createPostsetupFile(path) ⇒ Object
create postsetup.json file path = “/sandbox/liveserver/customerName/software/repoOwner/repoName/releases/v2.2.0”
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/deployman/app/postsetup.rb', line 37 def self.createPostsetupFile (path) if not @@tasks.empty? # if exists, file will be overwritten File.open(path + '/postsetup.json', 'wb') do |file| file.write(Oj::dump @@tasks, :indent => 2) file.close end else print "(no tasks found)..." end end |
.getTasks ⇒ Object
get array of all tasks
30 31 32 |
# File 'lib/deployman/app/postsetup.rb', line 30 def self.getTasks @@tasks end |
.newTask ⇒ Object
add new task to tasks
22 23 24 25 26 |
# File 'lib/deployman/app/postsetup.rb', line 22 def self.newTask task = Task.new @@tasks.push(task) return task end |