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

polydice / forklift / 18
95%

Build:
DEFAULT BRANCH: master
Ran 18 Jul 2013 10:17AM UTC
Jobs 3
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

pending completion
18

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%)

287.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 18.1 (1.9.2) 18 Jul 2013 10:17AM UTC 0
94.3
Travis Job 18.1
2 18.2 (1.9.3) 18 Jul 2013 10:17AM UTC 0
94.3
Travis Job 18.2
3 18.3 (2.0.0) 18 Jul 2013 10:17AM UTC 0
94.3
Travis Job 18.3
Source Files on build 18
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #18
  • 89374a61 on github
  • Prev Build on master (#17)
  • Next Build on master (#19)
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