nzbgetpp 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nzbgetpp (0.1.2)
4
+ nzbgetpp (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module NzbGetPP
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/support/config.rb CHANGED
@@ -78,18 +78,28 @@ def move_tv_shows_to_the_archive
78
78
  ].join(" ")
79
79
  log.detail("Will exec(): " + dewey_exec.inspect())
80
80
 
81
- rd, wr = IO.pipe()
82
- rc = shellout(dewey_exec, nil, wr, wr)
83
- wr.close() unless wr.closed?
84
- rd.each_line do |line|
85
- log.detail(line)
81
+ child_pid, stdout, stderr = shellout(dewey_exec)
82
+
83
+ # Will raise Errno::ECHILD if the pid doesn't exist
84
+ until Process.wait(child_pid, Process::WNOHANG)
85
+ readable, _ = IO.select([stdout, stderr], [], [], 1)
86
+ next if readable.nil?
87
+ readable.each do |io|
88
+ next if io.closed? or io.eof?
89
+ line = io.readline
90
+ case io
91
+ when stdout
92
+ log.detail(line)
93
+ else
94
+ log.error(line)
95
+ end
96
+ end
86
97
  end
87
- rd.close() unless rd.closed?
88
-
89
- if rc
98
+
99
+ if $?.success?
90
100
  log.info("Dewey seems happy :-)")
91
101
  else
92
- log.error("Dewey failed with a rc #{rc.inspect()} :-(")
102
+ log.error("Dewey failed with #{$?.inspect} :-(")
93
103
  end
94
104
  end
95
105
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nzbgetpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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: 2012-05-09 00:00:00.000000000 Z
12
+ date: 2012-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &9244120 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *9244120
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec
27
- requirement: &9030260 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *9030260
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rcov
38
- requirement: &9029200 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,7 +53,12 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *9029200
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  description: A postprocessing script for NzbGet, written in Ruby.
48
63
  email:
49
64
  - marcbowes+nzbgetpp@gmail.com
@@ -95,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
110
  version: '0'
96
111
  segments:
97
112
  - 0
98
- hash: -917312237398823558
113
+ hash: 4269737146820044877
99
114
  required_rubygems_version: !ruby/object:Gem::Requirement
100
115
  none: false
101
116
  requirements:
@@ -104,11 +119,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
119
  version: '0'
105
120
  segments:
106
121
  - 0
107
- hash: -917312237398823558
122
+ hash: 4269737146820044877
108
123
  requirements: []
109
124
  rubyforge_project: nzbgetpp
110
- rubygems_version: 1.8.11
125
+ rubygems_version: 1.8.21
111
126
  signing_key:
112
127
  specification_version: 3
113
128
  summary: NzbGet Postprocessor
114
- test_files: []
129
+ test_files:
130
+ - spec/log_spec.rb
131
+ - spec/nzb_spec.rb
132
+ - spec/nzbgetpp_spec.rb
133
+ - spec/par_spec.rb
134
+ - spec/shellout_spec.rb
135
+ - spec/spec_helper.rb
136
+ - spec/support/log.rb
137
+ - spec/support/sample-dst/example job/_brokenlog.txt
138
+ - spec/support/sample-dst/example job/example.rar
139
+ - spec/support/sample-dst/example job/survivor
140
+ - spec/unrar_spec.rb