class String
Public Instance Methods
latest_commit()
click to toggle source
# File lib/raykit/string.rb, line 9 def latest_commit Dir.chdir(self) do text=`git log -n 1` scan=text.scan(/commit ([\w]+)\s/) return scan[0][0].to_s end end
work_dir()
click to toggle source
# File lib/raykit/string.rb, line 4 def work_dir rel_name=self.sub('https://','').gsub('http://','').gsub('.git','') Raykit::Environment.get_dev_dir('work') + '/' + rel_name end