dexter 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -11
- data/dexter.gemspec +0 -1
- data/features/dexter_organises_series.feature +26 -16
- data/lib/dexter.rb +4 -1
- data/lib/dexter/version.rb +1 -1
- metadata +5 -18
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
dexter (0.0
|
|
4
|
+
dexter (0.1.0)
|
|
5
5
|
trollop
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -19,17 +19,10 @@ GEM
|
|
|
19
19
|
json (~> 1.4.6)
|
|
20
20
|
term-ansicolor (~> 1.0.5)
|
|
21
21
|
diff-lcs (1.1.2)
|
|
22
|
-
gemcutter (0.6.1)
|
|
23
22
|
gherkin (2.2.9)
|
|
24
23
|
json (~> 1.4.6)
|
|
25
24
|
term-ansicolor (~> 1.0.5)
|
|
26
|
-
git (1.2.5)
|
|
27
|
-
jeweler (1.4.0)
|
|
28
|
-
gemcutter (>= 0.1.0)
|
|
29
|
-
git (>= 1.2.5)
|
|
30
|
-
rubyforge (>= 2.0.0)
|
|
31
25
|
json (1.4.6)
|
|
32
|
-
json_pure (1.4.6)
|
|
33
26
|
rspec (2.0.1)
|
|
34
27
|
rspec-core (~> 2.0.1)
|
|
35
28
|
rspec-expectations (~> 2.0.1)
|
|
@@ -40,8 +33,6 @@ GEM
|
|
|
40
33
|
rspec-mocks (2.0.1)
|
|
41
34
|
rspec-core (~> 2.0.1)
|
|
42
35
|
rspec-expectations (~> 2.0.1)
|
|
43
|
-
rubyforge (2.0.4)
|
|
44
|
-
json_pure (>= 1.1.7)
|
|
45
36
|
term-ansicolor (1.0.5)
|
|
46
37
|
trollop (1.16.2)
|
|
47
38
|
|
|
@@ -52,6 +43,5 @@ DEPENDENCIES
|
|
|
52
43
|
aruba
|
|
53
44
|
cucumber
|
|
54
45
|
dexter!
|
|
55
|
-
jeweler
|
|
56
46
|
rspec
|
|
57
47
|
trollop
|
data/dexter.gemspec
CHANGED
|
@@ -11,17 +11,25 @@ Feature: Dexter organises series
|
|
|
11
11
|
And a directory named "Video"
|
|
12
12
|
And an empty file named "Downloads/dexter s01e09.avi"
|
|
13
13
|
When I run "dexter --input \"Downloads/dexter s01e09.avi\" --output Video"
|
|
14
|
-
Then the following
|
|
15
|
-
| Video/Dexter/S01
|
|
14
|
+
Then the following files should exist:
|
|
15
|
+
| Video/Dexter/S01/Dexter S01E09.avi |
|
|
16
16
|
|
|
17
|
+
@announce
|
|
18
|
+
Scenario: Dexter organizes a subtitle
|
|
19
|
+
Given a directory named "Downloads"
|
|
20
|
+
And a directory named "Downloads/mess"
|
|
21
|
+
And a directory named "Video"
|
|
22
|
+
And an empty file named "Downloads/dexter s01e09.srt"
|
|
23
|
+
When I run "dexter --input \"Downloads/dexter s01e09.srt\" --output Video"
|
|
24
|
+
Then the following files should exist:
|
|
25
|
+
| Video/Dexter/S01/Dexter S01E09.srt |
|
|
26
|
+
|
|
17
27
|
@announce
|
|
18
28
|
Scenario: Dexter tries to move a file that's already organized
|
|
19
29
|
Given a directory named "Dexter/S01"
|
|
20
30
|
And an empty file named "Dexter/Dexter S01E01.avi"
|
|
21
31
|
When I run "dexter"
|
|
22
|
-
Then the following
|
|
23
|
-
| Dexter/S01 |
|
|
24
|
-
And the following files should exist:
|
|
32
|
+
Then the following files should exist:
|
|
25
33
|
| Dexter/S01/Dexter S01E01.avi |
|
|
26
34
|
|
|
27
35
|
@announce
|
|
@@ -30,9 +38,9 @@ Feature: Dexter organises series
|
|
|
30
38
|
And a directory named "Downloads/mess"
|
|
31
39
|
And a directory named "Video"
|
|
32
40
|
And an empty file named "Downloads/dexter s01e09.avi"
|
|
33
|
-
When I run "dexter --input \"Downloads/dexter s01e09.avi\" --output Video --format \":name (Season :season)/:
|
|
34
|
-
Then the following
|
|
35
|
-
| Video/Dexter (Season 01) |
|
|
41
|
+
When I run "dexter --input \"Downloads/dexter s01e09.avi\" --output Video --format \":name (Season :season)/:episode.:extension\""
|
|
42
|
+
Then the following files should exist:
|
|
43
|
+
| Video/Dexter (Season 01)/09.avi |
|
|
36
44
|
|
|
37
45
|
@announce
|
|
38
46
|
Scenario: Dexter isn't verbose
|
|
@@ -41,8 +49,8 @@ Feature: Dexter organises series
|
|
|
41
49
|
And a directory named "Video"
|
|
42
50
|
And an empty file named "Downloads/dexter s01e09.avi"
|
|
43
51
|
When I run "dexter --input \"Downloads/dexter s01e09.avi\" --output Video --verbose false"
|
|
44
|
-
Then the following
|
|
45
|
-
| Video/Dexter/S01
|
|
52
|
+
Then the following files should exist:
|
|
53
|
+
| Video/Dexter/S01/Dexter S01E09.avi |
|
|
46
54
|
And the output should contain exactly ""
|
|
47
55
|
|
|
48
56
|
@announce
|
|
@@ -51,14 +59,16 @@ Feature: Dexter organises series
|
|
|
51
59
|
And a directory named "Downloads/mess"
|
|
52
60
|
And a directory named "Video"
|
|
53
61
|
And an empty file named "Downloads/dexter s01e09.avi"
|
|
62
|
+
And an empty file named "Downloads/dexter s01e09.srt"
|
|
54
63
|
And an empty file named "Downloads/Fringe.1x03.HDTV.avi"
|
|
55
64
|
And an empty file named "Downloads/The.big.bang.theory.s01e09.avi"
|
|
56
65
|
And an empty file named "Downloads/mess/MY NAME IS EARL - s08e04 HDTV.avi"
|
|
57
66
|
And an empty file named "Downloads/Treme.S01E04.HDTV.XviD-NoTV.avi"
|
|
58
67
|
When I run "dexter --input Downloads --output Video"
|
|
59
|
-
Then the following
|
|
60
|
-
| Video/Dexter/S01
|
|
61
|
-
| Video/
|
|
62
|
-
| Video/Fringe/S01
|
|
63
|
-
| Video/
|
|
64
|
-
| Video/
|
|
68
|
+
Then the following files should exist:
|
|
69
|
+
| Video/Dexter/S01/Dexter S01E09.srt |
|
|
70
|
+
| Video/Dexter/S01/Dexter S01E09.avi |
|
|
71
|
+
| Video/Fringe/S01/Fringe S01E03.avi |
|
|
72
|
+
| Video/The Big Bang Theory/S01/The Big Bang Theory S01E09.avi |
|
|
73
|
+
| Video/My Name Is Earl/S08/My Name Is Earl S08E04.avi |
|
|
74
|
+
| Video/Treme/S01/Treme S01E04.avi |
|
data/lib/dexter.rb
CHANGED
|
@@ -35,7 +35,7 @@ module Dexter
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def self.matchers
|
|
38
|
-
[Matchers::Video]
|
|
38
|
+
[Matchers::Video, Matchers::Subtitle]
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def self.list_all_files_within_directory(path)
|
|
@@ -137,5 +137,8 @@ module Dexter
|
|
|
137
137
|
end
|
|
138
138
|
|
|
139
139
|
end
|
|
140
|
+
class Subtitle < Video
|
|
141
|
+
EXTENSIONS = ['srt', 'sub']
|
|
142
|
+
end
|
|
140
143
|
end
|
|
141
144
|
end
|
data/lib/dexter/version.rb
CHANGED
metadata
CHANGED
|
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
|
4
4
|
prerelease: false
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
|
+
- 1
|
|
7
8
|
- 0
|
|
8
|
-
|
|
9
|
-
version: 0.0.3
|
|
9
|
+
version: 0.1.0
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Josep Jaume Rey Peroy
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2010-
|
|
17
|
+
date: 2010-11-01 00:00:00 +01:00
|
|
18
18
|
default_executable: dexter
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
@@ -56,23 +56,10 @@ dependencies:
|
|
|
56
56
|
version: "0"
|
|
57
57
|
type: :development
|
|
58
58
|
version_requirements: *id003
|
|
59
|
-
- !ruby/object:Gem::Dependency
|
|
60
|
-
name: jeweler
|
|
61
|
-
prerelease: false
|
|
62
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
|
63
|
-
none: false
|
|
64
|
-
requirements:
|
|
65
|
-
- - ">="
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
segments:
|
|
68
|
-
- 0
|
|
69
|
-
version: "0"
|
|
70
|
-
type: :development
|
|
71
|
-
version_requirements: *id004
|
|
72
59
|
- !ruby/object:Gem::Dependency
|
|
73
60
|
name: trollop
|
|
74
61
|
prerelease: false
|
|
75
|
-
requirement: &
|
|
62
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
76
63
|
none: false
|
|
77
64
|
requirements:
|
|
78
65
|
- - ">="
|
|
@@ -81,7 +68,7 @@ dependencies:
|
|
|
81
68
|
- 0
|
|
82
69
|
version: "0"
|
|
83
70
|
type: :runtime
|
|
84
|
-
version_requirements: *
|
|
71
|
+
version_requirements: *id004
|
|
85
72
|
description: Dexter helps you organize your tv series with well, you know... Dexterity
|
|
86
73
|
email: josepjaume@gmail.com
|
|
87
74
|
executables:
|