addic7ed 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Ruby command-line script to fetch subtitles on Addic7ed
5
5
 
6
- Current version: **0.1.5**
6
+ Current version: **0.1.6**
7
7
 
8
8
  ### Is it working ?
9
9
 
@@ -68,7 +68,8 @@ There's some work remaining:
68
68
 
69
69
  ### Changelog
70
70
 
71
- * 0.1.5: Enhanced subtitles version string filters
71
+ * 0.1.6: Enhanced subtitles version string filters (remove heading and trailing dashes)
72
+ * 0.1.5: Enhanced subtitles version string filters (remove heading and trailing spaces and dots)
72
73
  * 0.1.4: Fixed a bug in require paths which made 0.1.3 unusable
73
74
  * 0.1.3: Fixed bugs with show names containing country code or production year
74
75
  * 0.1.2: Fixed how the daily download limit reach is detected
@@ -23,8 +23,8 @@ module Addic7ed
23
23
  gsub(/720p/i, '').
24
24
  gsub(/hdtv/i, '').
25
25
  gsub(/x\.?264/i, '').
26
- gsub(/^[ \.]*/, '').
27
- gsub(/[ \.]*$/, '').
26
+ gsub(/^[- \.]*/, '').
27
+ gsub(/[- \.]*$/, '').
28
28
  upcase
29
29
  end
30
30
 
@@ -1,3 +1,3 @@
1
1
  module Addic7ed
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
@@ -22,6 +22,12 @@ describe Addic7ed::Subtitle do
22
22
  Addic7ed::Subtitle.new(' DIMENSION ', '', '', '', '0').version.should == 'DIMENSION'
23
23
  end
24
24
 
25
+ it 'should remove heading and trailing dashes' do
26
+ Addic7ed::Subtitle.new('-DIMENSION', '', '', '', '0').version.should == 'DIMENSION'
27
+ Addic7ed::Subtitle.new('DIMENSION-', '', '', '', '0').version.should == 'DIMENSION'
28
+ Addic7ed::Subtitle.new('-DIMENSION-', '', '', '', '0').version.should == 'DIMENSION'
29
+ end
30
+
25
31
  it 'should automatically remove "720p" in version string' do
26
32
  Addic7ed::Subtitle.new('720p DIMENSION', '', '', '', '0').version.should == 'DIMENSION'
27
33
  Addic7ed::Subtitle.new('720P DIMENSION', '', '', '', '0').version.should == 'DIMENSION'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addic7ed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: