-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Rakefile
49 lines (35 loc) · 984 Bytes
/
Rakefile
1
2
3
4
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*- ruby -*-
require 'rubygems'
require 'hoe'
Hoe.add_include_dirs("../../ruby_parser/dev/lib",
"../../RubyInline/dev/lib",
"../../sexp_processor/dev/lib",
"../../ZenTest/dev/lib",
"../../minitest/dev/lib",
"lib")
Hoe.plugin :seattlerb
Hoe.spec 'flog' do
developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
self.rubyforge_name = 'seattlerb'
self.flog_method = :max_method
self.flog_threshold = timebomb 150, 50, '2013-11-01', '2012-11-01'
dependency "sexp_processor", "~> 4.0"
dependency "ruby_parser", ["~> 3.1", "> 3.1.0"]
end
task :debug do
require "flog_cli"
class FlogCLI
def_delegators :@flog, :flog_ruby
end
file = ENV["F"]
ruby = ENV["R"]
flog = FlogCLI.new :parser => RubyParser
if file then
flog.flog file
else
flog.flog_ruby ruby, "-"
flog.calculate_total_scores
end
flog.report
end
# vim: syntax=ruby