Module: Humans

Defined in:
lib/humans.rb,
lib/humans/version.rb

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.generateObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/humans.rb', line 5

def self.generate
  people = `git log --format='%aN|%aE' | sort -u`.split("\n")

  File.open('humans.txt', 'w') do |f|

    f << "/* TEAM */\n\n\n"

    people.each do |w|
      name, match, email = w.rpartition('|')
      name.gsub!(/[^0-9a-z ]/i, '')
      email.gsub!(/[^0-9a-z \@\.]/i, '')

      f << "Name:  \#{ name }\nEmail: \#{ email }\n\n"

    end

  end

puts `cat humans.txt`

end