pluto 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/{History.md → HISTORY.md} +0 -0
- data/Manifest.txt +1 -1
- data/Rakefile +2 -2
- data/lib/pluto/fetcher.rb +15 -1
- data/lib/pluto/refresher.rb +2 -2
- data/lib/pluto/version.rb +1 -1
- metadata +24 -24
data/{History.md → HISTORY.md}
RENAMED
File without changes
|
data/Manifest.txt
CHANGED
data/Rakefile
CHANGED
@@ -15,11 +15,11 @@ Hoe.spec 'pluto' do
|
|
15
15
|
|
16
16
|
# switch extension to .markdown for gihub formatting
|
17
17
|
self.readme_file = 'README.md'
|
18
|
-
self.history_file = '
|
18
|
+
self.history_file = 'HISTORY.md'
|
19
19
|
|
20
20
|
self.extra_deps = [
|
21
21
|
['pakman', '>= 0.5'],
|
22
|
-
['fetcher', '>= 0.4.
|
22
|
+
['fetcher', '>= 0.4.3'], # use min. 0.4.3 - added cache/conditional GET support
|
23
23
|
['logutils', '>= 0.6'],
|
24
24
|
['feedutils', '>= 0.4.0'], # use min. 0.4.0 - added rss 2.0 - content:encoded; added fix for rss.item.guid missing; no more auto-summary in atom
|
25
25
|
['props', '>= 1.0.3'], # use min. 1.0.2 - added ini support
|
data/lib/pluto/fetcher.rb
CHANGED
@@ -5,6 +5,8 @@ class Fetcher
|
|
5
5
|
|
6
6
|
include LogUtils::Logging
|
7
7
|
|
8
|
+
include Models # for easy convenience access for Activity etc.
|
9
|
+
|
8
10
|
def initialize
|
9
11
|
@worker = ::Fetcher::Worker.new
|
10
12
|
end
|
@@ -86,7 +88,19 @@ class Fetcher
|
|
86
88
|
'last-modified' => feed_rec.http_last_modified
|
87
89
|
}
|
88
90
|
|
89
|
-
|
91
|
+
begin
|
92
|
+
response = @worker.get( feed_url )
|
93
|
+
rescue SocketError => e
|
94
|
+
## catch socket error for unknown domain names (e.g. pragdave.blogs.pragprog.com)
|
95
|
+
### will result in SocketError -- getaddrinfo: Name or service not known
|
96
|
+
puts "*** error: fetching feed '#{feed_key}' - #{e.to_s}"
|
97
|
+
Activity.create!( text: "*** error: fetching feed '#{feed_key}' - #{e.to_s}" )
|
98
|
+
|
99
|
+
### todo/fix: update feed rec in db
|
100
|
+
@worker.use_cache = false # fix/todo: restore old use_cache setting instead of false
|
101
|
+
return nil
|
102
|
+
end
|
103
|
+
|
90
104
|
@worker.use_cache = false # fix/todo: restore old use_cache setting instead of false
|
91
105
|
|
92
106
|
if response.code == '304' # not modified (conditional GET - e.g. using etag/last-modified)
|
data/lib/pluto/refresher.rb
CHANGED
@@ -22,7 +22,7 @@ class Refresher
|
|
22
22
|
end
|
23
23
|
|
24
24
|
# -- log update activity
|
25
|
-
Activity.create!( text:
|
25
|
+
Activity.create!( text: "update sites (#{Site.count})" )
|
26
26
|
|
27
27
|
#### - hack - use order(:id) instead of .all - avoids rails/activerecord 4 warnings
|
28
28
|
|
@@ -40,7 +40,7 @@ class Refresher
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# -- log update activity
|
43
|
-
Activity.create!( text:
|
43
|
+
Activity.create!( text: "update feeds (#{Feed.count})" )
|
44
44
|
|
45
45
|
#### - hack - use order(:id) instead of .all - avoids rails/activerecord 4 warnings
|
46
46
|
|
data/lib/pluto/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-02-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pakman
|
16
|
-
requirement: &
|
16
|
+
requirement: &72026150 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,21 +21,21 @@ dependencies:
|
|
21
21
|
version: '0.5'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *72026150
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: fetcher
|
27
|
-
requirement: &
|
27
|
+
requirement: &72025920 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.4.
|
32
|
+
version: 0.4.3
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *72025920
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: logutils
|
38
|
-
requirement: &
|
38
|
+
requirement: &72025620 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0.6'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *72025620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: feedutils
|
49
|
-
requirement: &
|
49
|
+
requirement: &72025240 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.4.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *72025240
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: props
|
60
|
-
requirement: &
|
60
|
+
requirement: &72024910 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.0.3
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *72024910
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: textutils
|
71
|
-
requirement: &
|
71
|
+
requirement: &72024550 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0.7'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *72024550
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: activityutils
|
82
|
-
requirement: &
|
82
|
+
requirement: &72024270 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.1.0
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *72024270
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: gli
|
93
|
-
requirement: &
|
93
|
+
requirement: &72024020 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 2.5.6
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *72024020
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rdoc
|
104
|
-
requirement: &
|
104
|
+
requirement: &72023760 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '3.10'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *72023760
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: hoe
|
115
|
-
requirement: &
|
115
|
+
requirement: &72023540 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
version: '3.3'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *72023540
|
124
124
|
description: pluto - Another Planet Generator (Lets You Build Web Pages from Published
|
125
125
|
Web Feeds)
|
126
126
|
email: feedreader@googlegroups.com
|
@@ -130,7 +130,7 @@ extensions: []
|
|
130
130
|
extra_rdoc_files:
|
131
131
|
- Manifest.txt
|
132
132
|
files:
|
133
|
-
-
|
133
|
+
- HISTORY.md
|
134
134
|
- Manifest.txt
|
135
135
|
- README.md
|
136
136
|
- Rakefile
|