miyuki 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/features/step_definitions/load_config_step.rb +10 -1
- data/features/support/miyuki.conf +1 -1
- data/features/tracker.feature +1 -1
- data/lib/miyuki/parser.rb +4 -4
- data/lib/miyuki/tracker.rb +0 -1
- data/lib/miyuki/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8d12566ada7af101b2899243788af5bbd66823d
|
4
|
+
data.tar.gz: bee74de42bd0226f6113033af03db665fbabc8fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b24d0636cb778efb53a3d8b3fd24bda42a7d4663d1cd444cb361e74fb65b4eab87adb5cf4ae0db0c2d4f7b398571ff21855d9f988496047d809139db6eb97a2
|
7
|
+
data.tar.gz: 0560f862e9b91e7075b22b26270abdb44608a6fb3a30be0b8dd15d11aff5b23f87a7ebb316399357e3ad217caa0de88f65450e72f1a407fa53f6e3b520204044
|
data/CHANGELOG.md
CHANGED
@@ -17,9 +17,18 @@ end
|
|
17
17
|
And(/^I modify something in "(.*?)"/) do |file|
|
18
18
|
@previous_config = Miyuki.config
|
19
19
|
|
20
|
-
|
20
|
+
config = File.read(file)
|
21
|
+
|
22
|
+
if config.include?('6s')
|
23
|
+
config.gsub!('6s', '5s')
|
24
|
+
elsif config.include?('5s')
|
25
|
+
config.gsub!('5s', '6s')
|
26
|
+
end
|
27
|
+
|
28
|
+
File.open(file, ?w) { |f| f.puts(config) }
|
21
29
|
end
|
22
30
|
|
23
31
|
Then(/^Miyuki reloads her configuration/) do
|
24
32
|
expect(Miyuki.config).to_not be equal(@previous_config)
|
33
|
+
expect(Miyuki.config['refreshEvery']).to_not be @previous_config['refreshEvery']
|
25
34
|
end
|
data/features/tracker.feature
CHANGED
@@ -14,7 +14,7 @@ Feature: Download new episodes
|
|
14
14
|
And there are 0 torrent files containing "Nisekoi 720p"
|
15
15
|
And there are some torrent files by "Commie"
|
16
16
|
And I have the episodes 11, 12 of "Danna"
|
17
|
-
And I have not
|
17
|
+
And I have not the episode 10 of "Danna"
|
18
18
|
And there are some torrent files by "Task-Force"
|
19
19
|
|
20
20
|
Scenario: Episodes already downloaded are ignored
|
data/lib/miyuki/parser.rb
CHANGED
@@ -25,21 +25,21 @@ module Miyuki
|
|
25
25
|
pattern
|
26
26
|
end
|
27
27
|
|
28
|
-
def filter_episodes!(torrents, from_episode,
|
28
|
+
def filter_episodes!(torrents, from_episode, keep = true)
|
29
29
|
range = from_episode..1.0/0
|
30
30
|
|
31
31
|
if range
|
32
32
|
torrents.select! do |torrent|
|
33
|
-
return
|
33
|
+
return keep unless torrent.title
|
34
34
|
|
35
35
|
episode = torrent.title.scan(/- [0-9]*\.?[0-9]+/).last
|
36
36
|
episode = episode.scan(/[0-9]*\.?[0-9]+/).last if episode
|
37
37
|
episode = episode[1..-1] if episode && episode[0] == '0'
|
38
38
|
|
39
39
|
if episode
|
40
|
-
is_integer?(episode) ? range.include?(episode.to_i) :
|
40
|
+
is_integer?(episode) ? range.include?(episode.to_i) : keep
|
41
41
|
else
|
42
|
-
|
42
|
+
keep
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
data/lib/miyuki/tracker.rb
CHANGED
@@ -62,7 +62,6 @@ module Miyuki
|
|
62
62
|
torrents = search(query)
|
63
63
|
torrents.each { |torrent| torrent.title.gsub!(/_/, ' ') }
|
64
64
|
|
65
|
-
|
66
65
|
episodes = series['episodes']
|
67
66
|
if episodes && episodes['from']
|
68
67
|
Parser.filter_episodes!(torrents, episodes['from'], episodes['skipIfNotSure'] == true)
|
data/lib/miyuki/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miyuki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roxas Shadow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yamazaki
|