addic7ed 0.3.1 → 0.3.2

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: a7695d89505a4b3101ed7331b0b03c83097499ef
4
- data.tar.gz: 6d6d50f6121a1a4cd386cd7657001bdb998ca92f
3
+ metadata.gz: 01387dc94bdca35f99fb2b23d6758dabf22aa10d
4
+ data.tar.gz: 9a4dbff972a206ba5c62e18ec407d0da1cf52179
5
5
  SHA512:
6
- metadata.gz: 3e0e3b55b45d2d9d321abae69bf5abe55406231cccd12f5db73a7b98ce9fbb8a4f227af4ae3a5b2050ca71c15f5dbefc48bd3cbe97459507bb62ecae8d6046d8
7
- data.tar.gz: 5f2ad30c9f074d03675c89eaade1ecb8608d6c47b3a7580f38efb796510a5f2d573b541711e9c918f514d64f0a852e373d2138ab61643403a8f7bc4150854e8f
6
+ metadata.gz: e169d4ce3aeb73c28647f808f01208fe17d2f5b9e8bef402cb3bc49c4990b58bf8891728e6ebc5590faac50b8749dc20b27132e540fbd131468abd0b7c3e5b5f
7
+ data.tar.gz: 0c4c6d47c3743c7465f5bab7e6da9a1d258067710a887ec1e95e2d20ee8119bb5f760aa6d36a78a554428997b16c6b18ee4a792ba8405252cc01c95a1e325358
@@ -22,10 +22,10 @@ module Addic7ed
22
22
  def encoded_showname
23
23
  @showname.
24
24
  gsub(/ /, '_').
25
- gsub(/_US$/, '_(US)').
26
- gsub(/_US_/, '_(US)_').
27
- gsub(/_UK$/, '').
28
- gsub(/_UK_/, '_').
25
+ gsub(/_(US)$/i, '_(\1)').
26
+ gsub(/_(US)_/i, '_(\1)_').
27
+ gsub(/_UK$/i, '').
28
+ gsub(/_UK_/i, '_').
29
29
  gsub(/_\d{4}$/, '').
30
30
  gsub(/_\d{4}_/, '_')
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module Addic7ed
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -32,6 +32,7 @@ describe Addic7ed::Filename do
32
32
  # Filename with special tags
33
33
  @filename_showname_US = 'Shameless.US.S03E06.720p.HDTV.x264-IMMERSE.mkv'
34
34
  @filename_showname_UK = 'Shameless.UK.S09E11.720p.HDTV.x264-TLA.mkv'
35
+ @filename_showname_US_lowercase = 'shameless.us.s04e01.720p.hdtv.x264-2hd.mkv'
35
36
  @filename_showname_UK_year = 'The.Hour.UK.2011.S01E03.REPACK.HDTV.XviD-FoV.avi'
36
37
  @filename_showname_year_UK = 'The.Hour.2011.UK.S01E03.REPACK.HDTV.XviD-FoV.avi'
37
38
  @filename_showname_US_year = 'The.Hour.US.2011.S01E03.REPACK.HDTV.XviD-FoV.avi'
@@ -276,6 +277,10 @@ describe Addic7ed::Filename do
276
277
  Addic7ed::Filename.new(@filename_showname_US).encoded_showname.should == 'Shameless_(US)'
277
278
  end
278
279
 
280
+ it 'should detect country code even in lowercase' do
281
+ Addic7ed::Filename.new(@filename_showname_US_lowercase).encoded_showname.should == 'shameless_(us)'
282
+ end
283
+
279
284
  it 'should remove country code for the original show (usually UK)' do
280
285
  Addic7ed::Filename.new(@filename_showname_UK).encoded_showname.should == 'Shameless'
281
286
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addic7ed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Baudino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-10 00:00:00.000000000 Z
11
+ date: 2014-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec