Skip to content

Commit

Permalink
Merge pull request #4 from woothee/test_blank_cases
Browse files Browse the repository at this point in the history
Test blank cases
  • Loading branch information
tagomoris committed Mar 1, 2015
2 parents 0778580 + 176e98f commit 9ecd7a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/woothee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self.is_crawler(useragent)
def self.exec_parse(useragent)
result = {}

return result if useragent.length < 1 or useragent == '-'
return result if useragent.nil? or useragent.length < 1 or useragent == '-'

if try_crawler(useragent, result)
return result
Expand Down
1 change: 1 addition & 0 deletions spec/02_run_testsets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
['pc_lowpriority.yaml','PC/LowPriority'],
['misc.yaml','Misc'],
['crawler_nonmajor.yaml','Crawler/NonMajor'],
['blank.yaml','Blank'],
]

describe Woothee do
Expand Down
2 changes: 1 addition & 1 deletion woothee
Submodule woothee updated 2 files
+1 −2 README.md
+17 −20 testsets/blank.yaml

0 comments on commit 9ecd7a2

Please sign in to comment.