showfeature 0.1.2 → 0.1.3
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/README.md +2 -2
- data/lib/showfeature/processor.rb +4 -4
- data/lib/showfeature/version.rb +1 -1
- data/spec/showfeature_spec.rb +0 -1
- metadata +2 -2
data/README.md
CHANGED
|
@@ -7,10 +7,10 @@ module ShowFeature
|
|
|
7
7
|
# The main processor class is in charge of the parsing of tv show filename
|
|
8
8
|
class Processor
|
|
9
9
|
|
|
10
|
-
attr_reader :
|
|
10
|
+
attr_reader :name, :team, :episode, :season, :raw_name, :parsed
|
|
11
11
|
|
|
12
12
|
# Pattern used for the parsing process
|
|
13
|
-
PATTERN = /(^[\w\.\(\)]+)\.(\d{3}|s?\d{1,2}[ex]?\d{2})\..*-(.*)\.[\d\w]{3}$/i
|
|
13
|
+
PATTERN = /(^[\w\.\(\)-]+)\.(\d{3}|s?\d{1,2}[ex]?\d{2})\..*-(.*)\.[\d\w]{3}$/i
|
|
14
14
|
|
|
15
15
|
##
|
|
16
16
|
# Creates a new Processor instance for +raw_name+ parsing
|
|
@@ -81,9 +81,9 @@ module ShowFeature
|
|
|
81
81
|
|
|
82
82
|
def replace(arg)
|
|
83
83
|
raise ShowFeature::TypeError, 'argument must be of type String or Hash' unless
|
|
84
|
-
[String, Hash].any?{|type| arg.
|
|
84
|
+
[String, Hash].any?{|type| arg.is_a? type}
|
|
85
85
|
raise ShowFeature::NotParsedError, 'showfeature cannot complete replace if show is not parsed' unless parsed?
|
|
86
|
-
if arg.
|
|
86
|
+
if arg.is_a? String
|
|
87
87
|
if video_file_type?
|
|
88
88
|
@raw_name = arg if ShowFeature::Processor.video_file_type?(arg)
|
|
89
89
|
elsif subtitle_file_type?
|
data/lib/showfeature/version.rb
CHANGED
data/spec/showfeature_spec.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: showfeature
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-12-
|
|
12
|
+
date: 2012-12-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: mime-types
|