view · edit · sidebar · attach · print · history

20130827-debug-brand2csv-ruby-1-8-7

<< | Index | >>


Summary

  • Debug/Update brand2csv.
  • Update specs to use webmock.

Commits / Patches

Index / Status


Debug brand2csv

  • If swissreg.ch does not have any result or too many results are fond, brand2csv got errors.
  • Same error on any ruby.
% bundle exec bin/brand2csv 01.01.2013-30.06.2013
Info: Suche meldet <Vereinfachte Trefferliste anzeigen> 
Info: Suche meldet <Erweiterte Suche> 
/path/to/brand2csv/lib/brand2csv.rb:424:in `initialize': undefined method `[]' for nil:NilClass (NoMethodError)
        from /path/to/brand2csv/lib/brand2csv.rb:488:in `new'
        from /path/to/brand2csv/lib/brand2csv.rb:488:in `getAllHits'
        from /path/to/brand2csv/lib/brand2csv.rb:527:in `fetchresult'
        from /path/to/brand2csv/lib/brand2csv.rb:560:in `run'
        from bin/brand2csv:94:in `<main>'

Update brand2csv to parse this result and continue.

commit

Tested with

  • 2.0.0-p247
  • 1.9.3-p448
  • 1.8.7-p374

Update webmock specs

Updated swissreg spec to use webmock (server stub).
And Updated all specs to require spec_helper.

Sutb responses are in spec/data as html.

commits
% bundle exec rspec
Run options:
  include {:focus=>true}
  exclude {:slow=>true}

All examples were filtered out; ignoring {:focus=>true}
..........................

Finished in 0.10785 seconds
26 examples, 0 failures

Randomized with seed 13901
view · edit · sidebar · attach · print · history
Page last modified on August 27, 2013, at 09:54 AM