imasquerade 0.1.1 → 0.1.2

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.1"
8
+ s.version = "0.1.2"
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"]
@@ -19,9 +19,15 @@ module Imasquerade
19
19
  response = Curl::Easy.perform(uri) do |curl|
20
20
  curl.headers["User-Agent"] = 'iTunes/10.1.1'
21
21
  end
22
- reader = Nokogiri::XML(response.body_str)
23
- array_of_feeds = reader.xpath('//xmlns:key[text()="feedURL"]/following-sibling::xmlns:string[1]/text()')
24
- return array_of_feeds[0].to_s
22
+ # In case there is some sort of error
23
+ begin
24
+ reader = Nokogiri::XML(response.body_str)
25
+ array_of_feeds = reader.xpath('//xmlns:key[text()="feedURL"]/following-sibling::xmlns:string[1]/text()')
26
+ return array_of_feeds[0].to_s
27
+ rescue Nokogiri::XML::SyntaxError => e
28
+ puts "Caught exception: #{e}"
29
+ return ""
30
+ end
25
31
  end
26
32
  end
27
33
  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 = 1
5
+ PATCH = 2
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
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
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: 2488958235385478376
171
+ hash: -4598513057111881966
172
172
  segments:
173
173
  - 0
174
174
  version: "0"