herpes 0.0.1.1 → 0.0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/herpes/rss.rb +12 -12
  2. data/lib/herpes/version.rb +1 -1
  3. metadata +3 -3
data/lib/herpes/rss.rb CHANGED
@@ -43,11 +43,11 @@ Herpes::Generator.define :rss do
43
43
 
44
44
  RSS::Parser.parse(open(r.url).read, false).tap {|p|
45
45
  p.items.reverse_each {|item|
46
- if p.is_a?(RSS::Atom::Feed)
47
- next if state[:rss][r.url].member? [item.updated.content, item.title.content]
46
+ next if state[:rss][r.url].member?(if p.is_a?(RSS::Atom::Feed)
47
+ item.link.href
48
48
  else
49
- next if state[:rss][r.url].member? [item.date, item.title]
50
- end
49
+ item.link
50
+ end)
51
51
 
52
52
  event = Herpes::Event.new {
53
53
  tags r.tags
@@ -77,19 +77,19 @@ Herpes::Generator.define :rss do
77
77
  dispatch(event)
78
78
  end
79
79
 
80
- if p.is_a?(RSS::Atom::Feed)
81
- state[:rss][r.url].push [item.updated.content, item.title.content]
80
+ state[:rss][r.url].push(if p.is_a?(RSS::Atom::Feed)
81
+ item.link.href
82
82
  else
83
- state[:rss][r.url].push [item.date, item.title]
84
- end
83
+ item.link
84
+ end)
85
85
  }
86
86
 
87
- state[:rss][r.url].reject! {|(date, title)|
87
+ state[:rss][r.url].reject! {|link|
88
88
  p.items.none? {|item|
89
- if p.is_a?(RSS::Atom::Feed)
90
- item.updated.content == date && item.title.content == title
89
+ link == if p.is_a?(RSS::Atom::Feed)
90
+ item.link.href
91
91
  else
92
- item.date == date && item.title == title
92
+ item.link
93
93
  end
94
94
  }
95
95
  }
@@ -10,6 +10,6 @@
10
10
 
11
11
  class Herpes
12
12
  def self.version
13
- '0.0.1.1'
13
+ '0.0.1.2'
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herpes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.1
4
+ version: 0.0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: threadpool
16
- requirement: &14985100 !ruby/object:Gem::Requirement
16
+ requirement: &19904260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *14985100
24
+ version_requirements: *19904260
25
25
  description:
26
26
  email: meh@paranoici.org
27
27
  executables: