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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a83b6eb0ce086c1fd625510a00d60726850c72ea
4
- data.tar.gz: 4dda76256973bc0ef9c77b6a7f9adc28eb8d555d
3
+ metadata.gz: e8d12566ada7af101b2899243788af5bbd66823d
4
+ data.tar.gz: bee74de42bd0226f6113033af03db665fbabc8fc
5
5
  SHA512:
6
- metadata.gz: ec96d6c074f873f8b6f7ce52c4e210cc61fff546424a9073f46df063daa05c1be89115f2b3271beffa36b34a2252b70dfa256448342fa1f24e42c120f3cdd7fb
7
- data.tar.gz: d44bcdfa45c08023098f40b5beac2400d59bbd4ee0c3f9fa082eb4695fe42c3ef79aee0efe7eeafaedbeaf2c62b00467254a0c780cd0a5df59b665d739cfcb0a
6
+ metadata.gz: 8b24d0636cb778efb53a3d8b3fd24bda42a7d4663d1cd444cb361e74fb65b4eab87adb5cf4ae0db0c2d4f7b398571ff21855d9f988496047d809139db6eb97a2
7
+ data.tar.gz: 0560f862e9b91e7075b22b26270abdb44608a6fb3a30be0b8dd15d11aff5b23f87a7ebb316399357e3ad217caa0de88f65450e72f1a407fa53f6e3b520204044
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.5.2
2
+ - Add some other tests and fix skip parameter
3
+
1
4
  # 0.5.1
2
5
  - Fix bug that ignores already downloaded episodes
3
6
 
@@ -17,9 +17,18 @@ end
17
17
  And(/^I modify something in "(.*?)"/) do |file|
18
18
  @previous_config = Miyuki.config
19
19
 
20
- FileUtils.touch(file)
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
@@ -1,5 +1,5 @@
1
1
  watchDir: "features/support/testWatchDir"
2
- refreshEvery: 6s
2
+ refreshEvery: 5s
3
3
  notifications:
4
4
  enabled: true
5
5
 
@@ -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 he episode 10 of "Danna"
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, skip = false)
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 skip unless torrent.title
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) : skip
40
+ is_integer?(episode) ? range.include?(episode.to_i) : keep
41
41
  else
42
- skip
42
+ keep
43
43
  end
44
44
  end
45
45
  end
@@ -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)
@@ -13,5 +13,5 @@
13
13
  ##
14
14
 
15
15
  module Miyuki
16
- VERSION = '0.5.2'
16
+ VERSION = '0.5.3'
17
17
  end
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.2
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-28 00:00:00.000000000 Z
11
+ date: 2014-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yamazaki