handler301 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG.rdoc +4 -0
  2. data/lib/handler301.rb +5 -2
  3. metadata +3 -3
@@ -1,3 +1,7 @@
1
+ 0.2.2 (June 3, 2010)
2
+
3
+ * Fix bug when handler301.yml is empty
4
+
1
5
  0.2.1 (Apr 21, 2010)
2
6
 
3
7
  * Works on ruby 1.9.2-head
@@ -49,8 +49,11 @@ public
49
49
 
50
50
  def self.load_301_file(file)
51
51
  h = YAML.load_file(file) rescue {}
52
- puts "[Handler301] Error in loading '#{file}', this file is empty or not valid." if h.size == 0
53
- Hash301.merge!(h)
52
+ if Hash === h and h.size > 0
53
+ Hash301.merge!(h)
54
+ else
55
+ puts "[Handler301] Error in loading '#{file}', this file is empty or not valid."
56
+ end
54
57
  end
55
58
 
56
59
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Guillaume Luccisano
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-21 00:00:00 +02:00
17
+ date: 2010-06-03 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20