yegor256 / est

Estimates Automated
https://rubygems.org/gems/est
MIT License
13 stars 3 forks source link

champions.rb bug #16

Open sergiivorobei opened 8 years ago

sergiivorobei commented 8 years ago

Please change line 50 in champions.rb from: e['worst'].to_i + to: e['worst-case'].to_i +

ekondrashev commented 8 years ago

@yegor256 seems like there is some weird missing in the script champions.rb

# Get total estimate.
    def total
      n = @yaml['scope'].size
      champs = @yaml['champions']
      m = champs.size
      k = 0.54
      sum = champs.map do |i, e|
        total = (e['best-case'].to_i +
          e['worst'].to_i +
          e['most-likely'].to_i * 4) / 6
        Est.log.info "#{i}: (#{e['best-case']} + #{e['worst-case']} +"\
          " #{e['most-likely']} * 4) / 6 = #{total}"
        total
      end.reduce(&:+)
      total = sum * k * (n / m)
      Est.log.info "#{sum} * #{k} * (#{n} / #{m}) = #{total}"
      total.to_i
    end
davvd commented 8 years ago

@yegor256 please do something about this issue

yegor256 commented 7 years ago

@rultor release, tag is 0.3.2

rultor commented 7 years ago

@rultor release, tag is 0.3.2

@yegor256 OK, I will release it now. Please check the progress here

rultor commented 7 years ago

@rultor release, tag is 0.3.2

@yegor256 Done! FYI, the full log is here (took me 9min)

yegor256 commented 7 years ago

@kennyx46 the bug is fixed, new version released. thanks for reporting!

yegor256 commented 7 years ago

@kennyx46 please, close the ticket if everything is fine now