Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/raykit/string.rb
Instance Method Summary collapse
Instance Method Details
#latest_commit ⇒ Object
9 10 11 12 13 14 15 |
# 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 ⇒ Object
4 5 6 7 |
# 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 |