rss2mail 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef8bedfd16d99cdc944139b587acb2cc62b1967f
4
- data.tar.gz: 62fd84a1410ea0601a9c978e00c52f49007c1e16
3
+ metadata.gz: 9caa784387678cab2092fbd159b7b03491445d62
4
+ data.tar.gz: 5a8b2b47e81fa752ddd9c2c05fe91929159f3723
5
5
  SHA512:
6
- metadata.gz: c82d6b18e1909fcbdb57418279a36da537676172400f1ffb036c4aefeba23028dfc58e04272f471cf90abf10ce767c1d7201995db5e13155d02d9b64c30622b6
7
- data.tar.gz: 3e4215196b5e62655f360cbbf72aea4f22156a459fd8e96205abd284b99f33f2f87096e34a4825ae5d0459d3bee52e74470fa0b538e9fb33b6602ef3638f4d07
6
+ metadata.gz: 4d3090010753a6f3b9e802f32a61952e7b923dd8b02c48b8d5898cbc88efe83776358c61c3f92897e3a5e52c69311cfb987fca7d1d4284230b4da43cfa53f227
7
+ data.tar.gz: 633772786d5ee96802a14f3f7f3c25c608310e7be6693c5f479b01b9022ed004e80872d91e76f35df64c06275527ad23cf1ea4904115ae4408bc8ad767d4d9a7
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to rss2mail version 0.4.4
5
+ This documentation refers to rss2mail version 0.4.5
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -25,7 +25,7 @@ RubyGem:: https://rubygems.org/gems/rss2mail
25
25
 
26
26
  == LICENSE AND COPYRIGHT
27
27
 
28
- Copyright (C) 2007-2014 Jens Wille
28
+ Copyright (C) 2007-2015 Jens Wille
29
29
 
30
30
  rss2mail is free software: you can redistribute it and/or modify it under
31
31
  the terms of the GNU Affero General Public License as published by the Free
data/lib/rss2mail/util.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # #
4
4
  # A component of rss2mail, the RSS to e-mail forwarder. #
5
5
  # #
6
- # Copyright (C) 2007-2013 Jens Wille #
6
+ # Copyright (C) 2007-2015 Jens Wille #
7
7
  # #
8
8
  # Authors: #
9
9
  # Jens Wille <jens.wille@gmail.com> #
@@ -42,7 +42,11 @@ module RSS2Mail
42
42
 
43
43
  URI_RE = URI.regexp(%w[http https])
44
44
 
45
- XPATH = '//link[@rel="alternate"]'
45
+ ALTERNATE_XPATH = '//link[@rel="alternate"]'
46
+
47
+ FACEBOOK_XPATH = '//div[starts-with(@id, "PageAuxContentPagelet_")]'
48
+
49
+ FACEBOOK_FEED = 'https://www.facebook.com/feeds/page.php?format=atom10&id='
46
50
 
47
51
  # cf. <http://www.rssboard.org/rss-autodiscovery>
48
52
  def discover_feed(url, fallback = false)
@@ -52,7 +56,7 @@ module RSS2Mail
52
56
  rescue => err
53
57
  warn "Unable to discover feed `#{url}': #{err} (#{err.class})"
54
58
  else
55
- doc.xpath(XPATH).each { |link|
59
+ doc.xpath(ALTERNATE_XPATH).each { |link|
56
60
  if link[:type] =~ FEED_RE && href = link[:href]
57
61
  return href =~ URI_RE ? href : begin
58
62
  base = doc.at_xpath('//base')
@@ -60,6 +64,10 @@ module RSS2Mail
60
64
  end
61
65
  end
62
66
  }
67
+
68
+ doc.xpath(FACEBOOK_XPATH).each { |node|
69
+ return FACEBOOK_FEED + node[:id][/\d+/]
70
+ } if url.include?('facebook.com')
63
71
  end
64
72
  end
65
73
 
@@ -4,7 +4,7 @@ module RSS2Mail
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 4
7
- TINY = 4
7
+ TINY = 5
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rss2mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-21 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cyclops
@@ -117,7 +117,7 @@ dependencies:
117
117
  version: '0.8'
118
118
  - - ">="
119
119
  - !ruby/object:Gem::Version
120
- version: 0.8.0
120
+ version: 0.8.1
121
121
  type: :development
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
@@ -127,7 +127,7 @@ dependencies:
127
127
  version: '0.8'
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: 0.8.0
130
+ version: 0.8.1
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: rake
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +176,7 @@ metadata: {}
176
176
  post_install_message:
177
177
  rdoc_options:
178
178
  - "--title"
179
- - rss2mail Application documentation (v0.4.4)
179
+ - rss2mail Application documentation (v0.4.5)
180
180
  - "--charset"
181
181
  - UTF-8
182
182
  - "--line-numbers"
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.4.4
200
+ rubygems_version: 2.4.6
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Send RSS feeds as e-mail