class RBCM::Action::File
ToDo: approve all changes to a spicific file at once
Attributes
content[R]
path[R]
Public Instance Methods
apply!()
click to toggle source
# File app/action/file.rb, line 18 def apply! @applied = true #@result = @job.node.remote.execute("echo #{Shellwords.escape content} > #{path}") @result = Net::SCP::upload!(@job.node.name, nil, StringIO.new(content), @params[0]) def @result.exitstatus self.class == TrueClass ? 0 : 1 end @result end
check!()
click to toggle source
# File app/action/file.rb, line 5 def check! # compare @job.node.files[path].content end
obsolete()
click to toggle source
# File app/action/file.rb, line 10 def obsolete @job.node.files[path].content == content end
same_file()
click to toggle source
# File app/action/file.rb, line 38 def same_file @job.node.actions.file(path) - [self] end
siblings()
click to toggle source
# File app/action/file.rb, line 14 def siblings [] # TODO end