pauldix-feedzirra 0.0.5 → 0.0.6

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.
data/README.textile CHANGED
@@ -110,6 +110,17 @@ feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExpla
110
110
  # the behavior for the handlers when using Feedzirra::Feed.update is slightly different. The feed passed into on_success will be
111
111
  # the updated feed with the standard updated accessors. on failure it will be the original feed object passed into update
112
112
 
113
+ # You can add custom parsing to the feed entry classes. I made the decision to not include guid parsing. However, you can
114
+ # add that functionality in (or parsing for other elements) with a single line of code.
115
+ Feedzirra::Feed.add_common_feed_entry_element(:id, :as => :guid)
116
+ # The arguments are the same as the SAXMachine arguments for the element method. For more example usage look at the RSSEntry and
117
+ # AtomEntry classes. Now you can access those in an atom feed:
118
+ Feedzirra::Feed.parse(some_atom_xml).entries.first.guid # => guid is now parsed!
119
+
120
+ # You can also access http basic auth feeds. Unfortunately, you can't get to these inside of a bulk get of a bunch of feeds.
121
+ # You'll have to do it on its own like so:
122
+ Feedzirra::Feed.fetch_and_parse(some_url, :http_authentication => ["myusername", "mypassword"])
123
+
113
124
  # Defining custom parsers
114
125
  # TODO: the functionality is here, just write some good examples that show how to do this
115
126
  </pre>
data/lib/feedzirra.rb CHANGED
@@ -32,5 +32,5 @@ require 'feedzirra/atom'
32
32
  require 'feedzirra/atom_feed_burner'
33
33
 
34
34
  module Feedzirra
35
- VERSION = "0.0.3"
35
+ VERSION = "0.0.6"
36
36
  end
@@ -11,9 +11,10 @@ module Feedzirra
11
11
  end
12
12
 
13
13
  def sanitize!
14
- self.title.sanitize!
15
- self.author.sanitize!
16
- self.content.sanitize!
14
+ self.title.sanitize! if self.title
15
+ self.author.sanitize! if self.author
16
+ self.summary.sanitize! if self.summary
17
+ self.content.sanitize! if self.content
17
18
  end
18
19
 
19
20
  alias_method :last_modified, :published
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pauldix-feedzirra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dix
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.9
33
+ version: 0.0.12
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: taf2-curb