can_has_fixtures 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,17 @@ class Random
40
40
  end
41
41
 
42
42
  def dictionary
43
- @@dictionary ||= File.read("/usr/share/dict/words").split
43
+ @@dictionary ||= load_dictionary
44
+ end
45
+
46
+ def load_dictionary
47
+ if File.exists?("/usr/share/dict/words")
48
+ File.read("/usr/share/dict/words").split
49
+ elsif File.exists?("/usr/dict/words")
50
+ File.read("/usr/dict/words").split
51
+ else
52
+ raise "words file not found"
53
+ end
44
54
  end
45
55
 
46
56
  def boolean
@@ -1,3 +1,3 @@
1
1
  module CanHasFixtures
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: can_has_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-25 00:00:00 -05:00
12
+ date: 2008-03-26 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15