rss2mail 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/bin/rss2mail +3 -6
- data/lib/rss2mail/feed.rb +0 -3
- data/lib/rss2mail/rss.rb +8 -4
- data/lib/rss2mail/util.rb +1 -3
- data/lib/rss2mail/version.rb +1 -1
- metadata +8 -8
data/README
CHANGED
data/bin/rss2mail
CHANGED
@@ -26,17 +26,14 @@
|
|
26
26
|
###############################################################################
|
27
27
|
#++
|
28
28
|
|
29
|
-
require 'optparse'
|
30
29
|
require 'yaml'
|
31
|
-
|
32
|
-
require 'rubygems'
|
30
|
+
require 'optparse'
|
33
31
|
require 'nuggets/env/user_home'
|
34
32
|
|
35
|
-
base = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
36
|
-
$: << File.join(base, 'lib')
|
37
|
-
|
38
33
|
require 'rss2mail'
|
39
34
|
|
35
|
+
base = File.expand_path('../..', __FILE__)
|
36
|
+
|
40
37
|
USAGE = "Usage: #{$0} [options] <target>"
|
41
38
|
abort USAGE if ARGV.empty?
|
42
39
|
|
data/lib/rss2mail/feed.rb
CHANGED
data/lib/rss2mail/rss.rb
CHANGED
@@ -26,10 +26,8 @@
|
|
26
26
|
###############################################################################
|
27
27
|
#++
|
28
28
|
|
29
|
-
require 'open-uri'
|
30
29
|
require 'rss'
|
31
|
-
|
32
|
-
require 'rubygems'
|
30
|
+
require 'open-uri'
|
33
31
|
require 'simple-rss'
|
34
32
|
require 'unidecode'
|
35
33
|
require 'nuggets/util/i18n'
|
@@ -56,6 +54,10 @@ module RSS2Mail
|
|
56
54
|
|
57
55
|
attr_reader :content, :rss
|
58
56
|
|
57
|
+
def self.parse(url, *args)
|
58
|
+
new(open(url), *args)
|
59
|
+
end
|
60
|
+
|
59
61
|
def initialize(content, simple = false)
|
60
62
|
@content = content
|
61
63
|
@simple = simple
|
@@ -90,7 +92,9 @@ module RSS2Mail
|
|
90
92
|
end
|
91
93
|
|
92
94
|
def link
|
93
|
-
@link ||= value_for(:link, :href)
|
95
|
+
@link ||= value_for([:links, :link], :href) { |field, value|
|
96
|
+
field == :links ? value.find { |link| link.rel == 'alternate' } : value
|
97
|
+
}
|
94
98
|
end
|
95
99
|
|
96
100
|
def description(unescape_html = false)
|
data/lib/rss2mail/util.rb
CHANGED
data/lib/rss2mail/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rss2mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jens Wille
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-24 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: simple-rss
|
@@ -102,14 +102,14 @@ licenses: []
|
|
102
102
|
|
103
103
|
post_install_message:
|
104
104
|
rdoc_options:
|
105
|
-
- --line-numbers
|
106
105
|
- --main
|
107
106
|
- README
|
108
107
|
- --charset
|
109
108
|
- UTF-8
|
110
|
-
- --all
|
111
109
|
- --title
|
112
|
-
- rss2mail Application documentation (v0.0.
|
110
|
+
- rss2mail Application documentation (v0.0.9)
|
111
|
+
- --all
|
112
|
+
- --line-numbers
|
113
113
|
require_paths:
|
114
114
|
- lib
|
115
115
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
requirements: []
|
134
134
|
|
135
135
|
rubyforge_project: rss2mail
|
136
|
-
rubygems_version: 1.
|
136
|
+
rubygems_version: 1.8.3
|
137
137
|
signing_key:
|
138
138
|
specification_version: 3
|
139
139
|
summary: Send RSS feeds as e-mail
|