serienrenamer 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,10 @@ module Serienrenamer
|
|
16
16
|
@episode_hash = {}
|
17
17
|
|
18
18
|
if File.file?(yaml_path)
|
19
|
-
|
19
|
+
serialized = YAML.load(File.new(yaml_path, "rb").read)
|
20
|
+
if serialized.is_a?(Hash)
|
21
|
+
@episode_hash = serialized
|
22
|
+
end
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
data/test/test_helper.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
require File.dirname(__FILE__) + '/test_helper.rb'
|
3
3
|
require 'fileutils'
|
4
|
+
require 'tempfile'
|
4
5
|
|
5
6
|
class TestInformationStore < Test::Unit::TestCase
|
6
7
|
|
@@ -13,6 +14,8 @@ class TestInformationStore < Test::Unit::TestCase
|
|
13
14
|
|
14
15
|
def setup
|
15
16
|
|
17
|
+
@empty_file = Tempfile.new('information_storage')
|
18
|
+
|
16
19
|
VCR.use_cassette("info_store_#{method_name}") do
|
17
20
|
TestHelper.create_test_files(@@files.values)
|
18
21
|
TestHelper.cwd
|
@@ -48,4 +51,10 @@ class TestInformationStore < Test::Unit::TestCase
|
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
54
|
+
def test_that_an_empty_information_storage_is_built_up_right
|
55
|
+
|
56
|
+
storage = Serienrenamer::InformationStore.new(@empty_file.path)
|
57
|
+
assert_equal storage.episode_hash, Hash.new
|
58
|
+
end
|
59
|
+
|
51
60
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serienrenamer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
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: 2013-01-
|
12
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: wlapi
|
@@ -162,9 +162,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
- - ! '>='
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
|
+
segments:
|
166
|
+
- 0
|
167
|
+
hash: 190241555
|
165
168
|
requirements: []
|
166
169
|
rubyforge_project:
|
167
|
-
rubygems_version: 1.8.
|
170
|
+
rubygems_version: 1.8.25
|
168
171
|
signing_key:
|
169
172
|
specification_version: 3
|
170
173
|
summary: Ruby Script that brings your series into an appropriate format like \"S01E01
|
@@ -180,4 +183,3 @@ test_files:
|
|
180
183
|
- test/test_plugin_serienjunkies_feed.rb
|
181
184
|
- test/test_plugin_serienjunkies_org.rb
|
182
185
|
- test/test_plugin_textfile.rb
|
183
|
-
has_rdoc:
|