imasquerade 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/imasquerade.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{imasquerade}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Lovelett"]
@@ -16,17 +16,19 @@ module Imasquerade
16
16
 
17
17
  def Extractor.fetch_and_parse_feed_from_apple(id)
18
18
  uri = "http://itunes.apple.com/podcast/id#{id}"
19
- response = Curl::Easy.perform(uri) do |curl|
20
- curl.headers["User-Agent"] = 'iTunes/10.1.1'
21
- end
22
19
  # In case there is some sort of error
23
20
  begin
21
+ response = Curl::Easy.perform(uri) do |curl|
22
+ curl.headers["User-Agent"] = 'iTunes/10.1.1'
23
+ end
24
24
  reader = Nokogiri::XML(response.body_str)
25
25
  array_of_feeds = reader.xpath('//xmlns:key[text()="feedURL"]/following-sibling::xmlns:string[1]/text()')
26
26
  return array_of_feeds[0].to_s
27
27
  rescue Nokogiri::XML::SyntaxError => e
28
28
  puts "Caught exception: #{e}"
29
29
  return ""
30
+ rescue Curl::Err::HostResolutionError => e
31
+ puts "Caught exception: #{e}"
30
32
  end
31
33
  end
32
34
  end
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Imasquerade
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 2
5
+ PATCH = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Lovelett
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
168
  requirements:
169
169
  - - ">="
170
170
  - !ruby/object:Gem::Version
171
- hash: -4598513057111881966
171
+ hash: 1752020548328588146
172
172
  segments:
173
173
  - 0
174
174
  version: "0"