module RakeTasks::System
Public Instance Methods
dir(*glob)
click to toggle source
# File lib/rake_tasks/system.rb, line 10 def dir(*glob) Dir[*glob] end
dir_glob(*patterns)
click to toggle source
# File lib/rake_tasks/system.rb, line 14 def dir_glob(*patterns) Dir.glob(*patterns) end
directory?(*args)
click to toggle source
# File lib/rake_tasks/system.rb, line 30 def directory?(*args) File.directory?(*args) end
file?(*args)
click to toggle source
# File lib/rake_tasks/system.rb, line 26 def file?(*args) File.file?(*args) end
import_task(*task_path)
click to toggle source
# File lib/rake_tasks/system.rb, line 18 def import_task(*task_path) import(*task_path) end
load_gemspec(*args)
click to toggle source
# File lib/rake_tasks/system.rb, line 56 def load_gemspec(*args) ::Gem::Specification.load(*args) end
load_yaml(*args)
click to toggle source
# File lib/rake_tasks/system.rb, line 50 def load_yaml(*args) # Psych must be available on the system, # preferably via installing ruby with libyaml already installed. Psych.load_file(*args) end
open_file(*args, &block)
click to toggle source
# File lib/rake_tasks/system.rb, line 38 def open_file(*args, &block) File.open(*args, &block) end
pwd(*args)
click to toggle source
# File lib/rake_tasks/system.rb, line 22 def pwd(*args) Dir.pwd(*args) end
rm(*args)
click to toggle source
# File lib/rake_tasks/system.rb, line 34 def rm(*args) FileUtils.rm(*args) end
system(*args)
click to toggle source
# File lib/rake_tasks/system.rb, line 6 def system(*args) Kernel.system(*args) end
write_file(file_path, array)
click to toggle source
# File lib/rake_tasks/system.rb, line 42 def write_file(file_path, array) open_file(file_path, 'w') do |file| array.each do |element| file.puts element end end end