forked from seattlerb/flog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
38 lines (27 loc) · 876 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
# -*- 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', '[email protected]'
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"
file = ENV["F"] || "-"
ruby = file == "-" ? ENV["R"] : File.read(file)
@flog = Flog.new :parser => RubyParser
@flog.flog_ruby ruby, file
@flog.report
end
# vim: syntax=ruby