Fix bugs related to input ranges
This commit is contained in:
parent
c2524fc675
commit
d5d04412b6
2 changed files with 12 additions and 4 deletions
2
Gemfile
2
Gemfile
|
@ -1,5 +1,7 @@
|
|||
# A sample Gemfile
|
||||
source "https://rubygems.org"
|
||||
|
||||
# gem "pry"
|
||||
|
||||
# Specify your gem's dependencies in timecost.gemspec
|
||||
gemspec
|
||||
|
|
|
@ -174,12 +174,18 @@ module TimeCost
|
|||
|
||||
def analyze_dumps
|
||||
#read ranges
|
||||
@rangelist = RangeList.new
|
||||
|
||||
@config[:input_dump].each do |filename|
|
||||
rangelist = YAML::load(File.open(filename,"r"))
|
||||
filelists = YAML::load(File.open(filename,"r"))
|
||||
# require 'pry'
|
||||
# binding.pry
|
||||
filelists.each do |author, rangelist|
|
||||
# create list if author is new
|
||||
@rangelist[author] ||= RangeList.new
|
||||
|
||||
rangelist.each do |range|
|
||||
@rangelist.add range
|
||||
@rangelist[author].add range
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue