boilerpipe 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/boilerpipe.gemspec +1 -1
  2. data/lib/boilerpipe.rb +5 -1
  3. metadata +4 -4
data/boilerpipe.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "boilerpipe"
3
- s.version = "0.0.2"
3
+ s.version = "0.0.3"
4
4
  s.date = "2010-05-15"
5
5
  s.summary = "Ruby wrapper of the Boilerpipe API"
6
6
  s.email = "g.marcilhacy@gmail.com"
data/lib/boilerpipe.rb CHANGED
@@ -21,6 +21,10 @@ module Boilerpipe
21
21
  @api = opts[:api].present? ? opts[:api] : BP_DEFAULT_API_URL
22
22
 
23
23
  url = [@api, "?url=#{extract_url}", "&extractor=#{@extractor}","&output=#{@output}"].join
24
- open(url).read
24
+ begin
25
+ open(url).read
26
+ rescue Exception => e
27
+ Hash[:error => e.message]
28
+ end
25
29
  end
26
30
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boilerpipe
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Gr\xC3\xA9gory Marcilhacy"
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  requirements: []
63
63
 
64
64
  rubyforge_project:
65
- rubygems_version: 1.6.2
65
+ rubygems_version: 1.4.1
66
66
  signing_key:
67
67
  specification_version: 3
68
68
  summary: Ruby wrapper of the Boilerpipe API