shadowm

Untitled

Sep 3rd, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.35 KB | None | 0 0
  1. #!/usr/bin/ruby
  2.  
  3. full_commits = "0"
  4.  
  5. message = "Test subject
  6.  
  7. This is a multiline commit message
  8. to check whether I understood how
  9. to do shit with arrays and strings
  10. in Ruby.
  11. "
  12.  
  13. log_lines = message.split("\n")
  14.  
  15. log = log_lines.shift
  16.  
  17. if full_commits.to_i == 1
  18.     log_lines.each do |log_line|
  19.         log << "\n" << log_line
  20.     end
  21. end
  22.  
  23. print log
Advertisement
Add Comment
Please, Sign In to add comment