yarss 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/yarss/version.rb +1 -1
  3. data/lib/yarss.rb +3 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb5a8eb19140ed00473aa01207c73ed9f9d7eb46
4
- data.tar.gz: ec2f4a8d882acf25c80c6b9a1b90b97b08ee65ac
3
+ metadata.gz: cb088fb3631b5463bb8927d313274cf60231cc77
4
+ data.tar.gz: 3d32d941a069626c5ca40095aa94141d336e2ca8
5
5
  SHA512:
6
- metadata.gz: 894f9cda3adfb3e109350028d1ba7b825c3871bb94ec265a13581728cbe54bd6f8d548bcec1f8b3f420fc99fb1624590fd0333eceac9021f60deb09702a91d23
7
- data.tar.gz: 2f679583c97b1c728c2da37d36f70f98ef243b9d63c6f4fb23373e2dc02cd61c8cdafdc20f2d454640aa963f91772bef80f5d5c5704fbdcaabb9f8ef84c66fd1
6
+ metadata.gz: cd09570af97b5d8abe25d824293b5a7d5bd08411b6e8e968d9fe72ea274ae4e08f42066a49f6507245f714a8321775bd7e503ed26522557b541c4a1ae58b676e
7
+ data.tar.gz: 7ed021d0ec037c09e6e19fbb023450f9d8b8e36ad0d23236e38fca69cc1876acb2db6ae0da88aa97a129e993168ffee464982f2fd04e7ad3a319f87cd64d29b5
data/lib/yarss/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Yarss
4
4
  # Version number, happy now?
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.2'
6
6
  end
data/lib/yarss.rb CHANGED
@@ -113,14 +113,15 @@ module Yarss
113
113
  # end
114
114
  #
115
115
  # @return [Feed]
116
- def self.from_string(data, path_or_io)
116
+ def self.from_string(data, path_or_io = nil)
117
117
  data = MultiXml.parse(data)
118
118
 
119
119
  return Rss::FeedParser.new(data).parse if data['rss']
120
120
  return Atom::FeedParser.new(data).parse if data['feed']
121
121
  return Rdf::FeedParser.new(data).parse if data['rdf:RDF'] || data['RDF']
122
122
 
123
- raise UnknownParserError, "Cannot find parser for #{path_or_io}"
123
+ msg = "Cannot find parser for #{path_or_io}" if path_or_io
124
+ raise UnknownParserError, msg
124
125
  rescue MultiXml::ParseError => e
125
126
  raise ParseError, e
126
127
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yarss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oldrich Vetesnik