suby 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/lib/suby/downloader.rb +8 -2
  3. data/suby.gemspec +1 -1
  4. metadata +43 -29
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f17d40637d77c01f9874b653abb840327dabea3c
4
+ data.tar.gz: be7b03b43c69b0b2700431c3f0e88279fb3f0682
5
+ SHA512:
6
+ metadata.gz: 11d9b1686500050a697ca7bf2b032738348e468a7bba3c785c2d94558ac08349cb53aa019a66463bce24d02a94bb4afb2d4b293ec17e289f3c88b8f416dd8d6a
7
+ data.tar.gz: 1c82ed3ab63745bf8e8fd1d0186e2d310d7d805228e80d763a688d8d079d571db02c5293e77d0f153491de15f6fe9a2cdeb8206f5cb0c0a67f90bec78e084bdc
@@ -36,7 +36,9 @@ module Suby
36
36
  end
37
37
 
38
38
  def xmlrpc
39
- @xmlrpc ||= XMLRPC::Client.new(self.class::SITE, self.class::XMLRPC_PATH)
39
+ @xmlrpc ||= XMLRPC::Client.new(self.class::SITE, self.class::XMLRPC_PATH).tap do |xmlrpc|
40
+ xmlrpc.http_header_extra = { 'accept-encoding' => 'identity' } if RbConfig::CONFIG['MAJOR'] == '2'
41
+ end
40
42
  end
41
43
 
42
44
  def get(path, initheader = {}, parse_response = true)
@@ -74,7 +76,11 @@ module Suby
74
76
  end
75
77
 
76
78
  def download
77
- extract download_url
79
+ begin
80
+ extract download_url
81
+ rescue Net::ReadTimeout => error
82
+ raise Suby::DownloaderError, error.message
83
+ end
78
84
  end
79
85
 
80
86
  def subtitles(url_or_response = download_url)
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency 'term-ansicolor'
17
17
  s.add_dependency 'mime-types', '>= 1.19'
18
18
 
19
- s.version = '0.4.0'
19
+ s.version = '0.4.1'
20
20
  end
metadata CHANGED
@@ -1,71 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
5
- prerelease:
4
+ version: 0.4.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - eregon
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-05 00:00:00.000000000 Z
11
+ date: 2013-09-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: path
16
- requirement: &2156184680 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.3.0
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *2156184680
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.3.0
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: nokogiri
27
- requirement: &2156184300 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *2156184300
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rubyzip
38
- requirement: &2156183760 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *2156183760
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: term-ansicolor
49
- requirement: &2156183140 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ! '>='
59
+ - - '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *2156183140
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: mime-types
60
- requirement: &2156182480 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
- - - ! '>='
73
+ - - '>='
64
74
  - !ruby/object:Gem::Version
65
75
  version: '1.19'
66
76
  type: :runtime
67
77
  prerelease: false
68
- version_requirements: *2156182480
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '1.19'
69
83
  description: Find and download subtitles
70
84
  email: eregontp@gmail.com
71
85
  executables:
@@ -87,26 +101,26 @@ files:
87
101
  - suby.gemspec
88
102
  homepage: https://github.com/eregon/suby
89
103
  licenses: []
104
+ metadata: {}
90
105
  post_install_message:
91
106
  rdoc_options: []
92
107
  require_paths:
93
108
  - lib
94
109
  required_ruby_version: !ruby/object:Gem::Requirement
95
- none: false
96
110
  requirements:
97
- - - ! '>='
111
+ - - '>='
98
112
  - !ruby/object:Gem::Version
99
113
  version: 1.9.2
100
114
  required_rubygems_version: !ruby/object:Gem::Requirement
101
- none: false
102
115
  requirements:
103
- - - ! '>='
116
+ - - '>='
104
117
  - !ruby/object:Gem::Version
105
118
  version: '0'
106
119
  requirements: []
107
120
  rubyforge_project:
108
- rubygems_version: 1.8.11
121
+ rubygems_version: 2.0.3
109
122
  signing_key:
110
- specification_version: 3
123
+ specification_version: 4
111
124
  summary: Subtitles' downloader
112
125
  test_files: []
126
+ has_rdoc: