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
|
# A sample Gemfile
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
# gem "pry"
|
||||||
|
|
||||||
# Specify your gem's dependencies in timecost.gemspec
|
# Specify your gem's dependencies in timecost.gemspec
|
||||||
gemspec
|
gemspec
|
||||||
|
|
|
@ -174,12 +174,18 @@ module TimeCost
|
||||||
|
|
||||||
def analyze_dumps
|
def analyze_dumps
|
||||||
#read ranges
|
#read ranges
|
||||||
@rangelist = RangeList.new
|
|
||||||
|
|
||||||
@config[:input_dump].each do |filename|
|
@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.each do |range|
|
||||||
@rangelist.add range
|
@rangelist[author].add range
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue