alexrabarts-term_extraction 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 3
3
+ :patch: 4
4
4
  :major: 0
@@ -43,7 +43,12 @@ class TermExtraction
43
43
  end
44
44
 
45
45
  def remote_xml
46
- open(uri).read
46
+ begin
47
+ open(uri).read
48
+ rescue => e
49
+ $stderr.puts "Couldn't fetch from API: #{e.message}" if $VERBOSE
50
+ nil
51
+ end
47
52
  end
48
53
  end
49
54
  end
@@ -41,7 +41,12 @@ class TermExtraction
41
41
  end
42
42
 
43
43
  def remote_xml
44
- Net::HTTP.post_form(uri, post_params).body
44
+ begin
45
+ Net::HTTP.post_form(uri, post_params).body
46
+ rescue => e
47
+ $stderr.puts "Couldn't fetch from API: #{e.message}" if $VERBOSE
48
+ nil
49
+ end
45
50
  end
46
51
  end
47
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexrabarts-term_extraction
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - alex