transmission-rss 0.1.22 → 0.1.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -66,9 +66,19 @@ module TransmissionRSS
66
66
 
67
67
  begin
68
68
  content = open(url, allow_redirections: :safe).read
69
+ rescue Exception => e
70
+ @log.debug("retrieval error (#{e.class}: #{e.message})")
71
+ next
72
+ end
73
+
74
+ # gzip HTTP Content-Encoding is not automatically decompressed in
75
+ # Ruby 1.9.3.
76
+ content = decompress(content) if RUBY_VERSION == '1.9.3'
77
+
78
+ begin
69
79
  items = RSS::Parser.parse(content, false).items
70
80
  rescue Exception => e
71
- @log.debug("retrieval error (#{e.message})")
81
+ @log.debug("parse error (#{e.class}: #{e.message})")
72
82
  next
73
83
  end
74
84
 
@@ -121,5 +131,13 @@ module TransmissionRSS
121
131
  def seen?(link)
122
132
  @seen.include?(link)
123
133
  end
134
+
135
+ private
136
+
137
+ def decompress(string)
138
+ Zlib::GzipReader.new(StringIO.new(string)).read
139
+ rescue Zlib::GzipFile::Error, Zlib::Error
140
+ # Ignore if not gzipped
141
+ end
124
142
  end
125
143
  end
@@ -1,3 +1,3 @@
1
1
  module TransmissionRSS
2
- VERSION = '0.1.22'
2
+ VERSION = '0.1.23'
3
3
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transmission-rss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.22
4
+ version: 0.1.23
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - henning mueller
@@ -13,27 +14,28 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: open_uri_redirections
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - "~>"
19
+ - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0.1'
20
- - - ">="
22
+ - - ! '>='
21
23
  - !ruby/object:Gem::Version
22
24
  version: 0.1.4
23
25
  type: :runtime
24
26
  prerelease: false
25
27
  version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
26
29
  requirements:
27
- - - "~>"
30
+ - - ~>
28
31
  - !ruby/object:Gem::Version
29
32
  version: '0.1'
30
- - - ">="
33
+ - - ! '>='
31
34
  - !ruby/object:Gem::Version
32
35
  version: 0.1.4
33
- description: |-
34
- transmission-rss is basically a workaround for
35
- transmission's lack of the ability to monitor RSS feeds and
36
- automatically add enclosed torrent links. Devoted to Ann.
36
+ description: ! "transmission-rss is basically a workaround for\n transmission's
37
+ lack of the ability to monitor RSS feeds and\n automatically add enclosed torrent
38
+ links. Devoted to Ann."
37
39
  email: henning@orgizm.net
38
40
  executables:
39
41
  - transmission-add-file
@@ -41,40 +43,41 @@ executables:
41
43
  extensions: []
42
44
  extra_rdoc_files: []
43
45
  files:
44
- - README.md
45
46
  - bin/transmission-add-file
46
47
  - bin/transmission-rss
47
48
  - lib/transmission-rss.rb
48
- - lib/transmission-rss/aggregator.rb
49
- - lib/transmission-rss/callback.rb
50
- - lib/transmission-rss/client.rb
51
49
  - lib/transmission-rss/config.rb
52
- - lib/transmission-rss/hash.rb
53
50
  - lib/transmission-rss/log.rb
51
+ - lib/transmission-rss/client.rb
52
+ - lib/transmission-rss/hash.rb
54
53
  - lib/transmission-rss/version.rb
54
+ - lib/transmission-rss/aggregator.rb
55
+ - lib/transmission-rss/callback.rb
56
+ - README.md
55
57
  - transmission-rss.conf.example
56
58
  homepage: https://rubygems.org/gems/transmission-rss
57
59
  licenses:
58
60
  - GPL-3.0
59
- metadata: {}
60
61
  post_install_message:
61
62
  rdoc_options: []
62
63
  require_paths:
63
64
  - lib
64
65
  required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
65
67
  requirements:
66
- - - ">="
68
+ - - ! '>='
67
69
  - !ruby/object:Gem::Version
68
70
  version: '0'
69
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
70
73
  requirements:
71
- - - ">="
74
+ - - ! '>='
72
75
  - !ruby/object:Gem::Version
73
76
  version: '0'
74
77
  requirements: []
75
78
  rubyforge_project:
76
- rubygems_version: 2.5.0
79
+ rubygems_version: 1.8.23.2
77
80
  signing_key:
78
- specification_version: 4
81
+ specification_version: 3
79
82
  summary: Adds torrents from rss feeds to transmission web frontend.
80
83
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: d04dcbfa2b15a85adac02157dbe197068e22aba7
4
- data.tar.gz: 08f228da9f88789ca114f7395c8f6c12f257b2d4
5
- SHA512:
6
- metadata.gz: c7540dc33d8862a6ac5135b327487b0fd0b8b3cb43aa31950f3c0f5e6f63a2fd7cd1edc323d0af4ffe1ab3a4def186a85e2dbe4125b6e246d71692f37229cf6c
7
- data.tar.gz: 88cd91d28ea29c2620737d332916d0628d795cbdff851a8f3f099191faa9f58581a87ba52e1532c467f66f22b2fe9e17edd382c933f1f53db4043c17d6e21ccf