sindex 0.2.2 → 0.2.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: c851af3fb80771e6d0a211547e1798c791c44adc
4
- data.tar.gz: 8bc79daa3b9a732d361ac3eec2a3238866ae8538
3
+ metadata.gz: bbc43040a3a6eebb9f7d7e82d35f31692b8cd800
4
+ data.tar.gz: 6fd7ee91bfcecbd424b8a847d21583762d3e759d
5
5
  SHA512:
6
- metadata.gz: 990c6a9a2702f66950bf0d43fb01ccb1b48190028906fc608c762fd82fbc4b5cc90e87f21a64258570450eb76aa7e2b77b0b2ebb007a42089b406983b288ff91
7
- data.tar.gz: e76ecfc54b68e9c4a4978b453ab19b153eae9038278ba94fd488dd560ad5d40e23a61ca964f98173ec3aa68b47b1a500e928ef8ee88d4f462147e0e37ffaafcd
6
+ metadata.gz: 2320984dfc8e448c07c75bdb59100de737899bfd979939dac4fc88f32d65601763e304beddb2c83721a44e74dfd48398d725d3a439a8abfcd84565719b9a4583
7
+ data.tar.gz: 291d7c433a459d9ac88fdd59ac4b36c15a75e641169bc3c3201169480dba17074d534bb48710f8ad1faac7270cd800420a087ebe46bcf74504844d530c960c60
@@ -296,11 +296,13 @@ module Sindex
296
296
  # Returns the seriesname in index or nil if it does not exist
297
297
  def series_name_in_index(name)
298
298
 
299
- matching_series = @series_data.keys.grep(/^#{name}$/i).first
299
+ escaped = Regexp.escape(name)
300
+
301
+ matching_series = @series_data.keys.grep(/^#{ escaped }$/i).first
300
302
  return matching_series if matching_series
301
303
 
302
304
  @series_aliases.each do |key, val|
303
- if key.match(/^#{name}$/i)
305
+ if key.match(/^#{ escaped }$/i)
304
306
  return val
305
307
  end
306
308
  end
@@ -391,5 +393,4 @@ module Sindex
391
393
  end
392
394
 
393
395
  end
394
-
395
396
  end
@@ -1,3 +1,3 @@
1
1
  module Sindex
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -77,6 +77,13 @@ class TestIndex < Test::Unit::TestCase
77
77
  "Community.S01E31.Bankgeheimnis.DL.German.HDTV.XviD-GDR")
78
78
  end
79
79
 
80
+ def test_that_invalid_series_data_does_not_crash_sindex
81
+ assert_nothing_raised {
82
+ @series_index.is_series_in_index?(
83
+ "Family.Guy.Presents.Its.a.Trap.2010.1080p.BluRay.DTS.DL.x264-HDC.(S09E18)")
84
+ }
85
+ end
86
+
80
87
  def test_that_an_index_can_be_dumped_right
81
88
  filename = Tempfile.new('dumped_index').path
82
89
  @series_index.dump_index_to_file(filename)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sindex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Böhm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-11 00:00:00.000000000 Z
11
+ date: 2013-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri