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.
- data/lib/can_has_fixtures/random.rb +11 -1
- data/lib/can_has_fixtures/version.rb +1 -1
- metadata +2 -2
@@ -40,7 +40,17 @@ class Random
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def dictionary
|
43
|
-
@@dictionary ||=
|
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
|
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.
|
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-
|
12
|
+
date: 2008-03-26 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|