• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polydice / forklift / 18 / 3
95%
master: 95%

Build:
DEFAULT BRANCH: master
Ran 18 Jul 2013 10:17AM UTC
Files 15
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Jul 2013 10:17AM UTC coverage: 94.297%. Remained the same
2.0.0

push

travis-ci

lazywei
Fix a damn bug cause by parsing XML.

The XML return by Yahoo API is in the form:

<categories count="8">
    <category>
        <no>259</no>
        <level_no>2</level_no>
        <name><![CDATA[ohoh-mini]]></name>
        <type><![CDATA[1]]></type>
    </category>
    <category>
        <no>260</no>
        <level_no>2</level_no>
        <name><![CDATA[ohoh-max]]></name>
        <type><![CDATA[2]]></type>
    </category>
</categories>

After parsing the XML(via MultiXML), we get the Hash in the form:

{"categories"=>
    {"count"=>"8", "category"=>
        [{"no"=>"259", "level_no"=>"2", "name"=>"ohoh-mini", "type"=>"1"}, {"no"=>"260", "level_no"=>"2", "name"=>"ohoh-max", "type"=>"2"}]
    }
}

The bug happens when the returned XML is:

<categories count="8">
    <category>
        <no>259</no>
        <level_no>2</level_no>
        <name><![CDATA[ohoh-mini]]></name>
        <type><![CDATA[1]]></type>
    </category>
</categories>

In this case, the Hash will be:

{"categories"=>{"category"=>{"no"=>"259", "level_no"=>"2", "name"=>"ohoh-mini", "type"=>"1"}, "count"=>"8"}}

i.e. the value of key "category" will be a Hash instead of an Array, this will cause an error in Forklift::Utils

248 of 263 relevant lines covered (94.3%)

95.93 hits per line

Source Files on job 18.3 (2.0.0)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 18
  • Travis Job 18.3
  • 89374a61 on github
  • Prev Job for 2.0.0 on master (#17.3)
  • Next Job for 2.0.0 on master (#19.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc