Method: TTK::Strategies::Authors#run_impl

Defined in:
lib/ttk/strategies/Authors.rb

#run_implObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ttk/strategies/Authors.rb', line 14

def run_impl
  author = "#{@dir}/#{@file}"

	unless File.exists?(author)
	  fail "No '#{author}' file found"
	end

  authors = []
  IO.foreach(author) do |line|
	  authors << $1 if line =~ /^\* ([-a-z]{1,6}_[-_a-zA-Z\d]).*$/
	end

  unless authors.include?(@author)
	  fail "AUTHORS not well formatted"
  end

  pass
end