arcadian_animal 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/arcadian_animal.gemspec +1 -1
- data/lib/animals.txt +141 -141
- data/lib/arcadian_animal.rb +4 -9
- data/spec/arcadian_animal_spec.rb +2 -2
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19dad319e6c9ee38bbb53b542ad9d415f20f8810
|
4
|
+
data.tar.gz: 14a4f15399a6e98e56f2573bdede7f6901ac90c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35cd700209c98058fef969eca43a5b0018e098be9315fe40335411d33836779481953d594ec127e0a644408b32fa878960f89c13f9005cf71173fab8e1cbdd7c
|
7
|
+
data.tar.gz: bf312cd6fa0004cbb13a4ef4ef54a74fdef86f477b9e3fcd6c16c0d87fbd421e2ae8ebd9a21b27b76eb5970d4a790fd29e186e9f8a2bc6cd1c76b3d48ab67586
|
data/arcadian_animal.gemspec
CHANGED
data/lib/animals.txt
CHANGED
@@ -1,163 +1,163 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
raccoon
|
7
|
-
turkey
|
8
|
-
raven
|
9
|
-
swallow
|
1
|
+
ant
|
2
|
+
ape
|
3
|
+
aphid
|
4
|
+
asp
|
5
|
+
baboon
|
10
6
|
badger
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
bat
|
8
|
+
bear
|
9
|
+
beaver
|
10
|
+
bee
|
11
|
+
beetle
|
12
|
+
bilby
|
13
|
+
bird
|
14
|
+
boa
|
15
|
+
boar
|
16
|
+
bug
|
17
|
+
bull
|
18
|
+
bullfrog
|
19
|
+
bunny
|
20
|
+
camel
|
21
|
+
carp
|
22
|
+
cat
|
14
23
|
centaur
|
15
|
-
|
16
|
-
|
24
|
+
cheetah
|
25
|
+
chick
|
26
|
+
chicken
|
27
|
+
chipmunk
|
28
|
+
clam
|
29
|
+
cobra
|
30
|
+
cock
|
31
|
+
cod
|
32
|
+
colt
|
33
|
+
cow
|
34
|
+
crab
|
35
|
+
crane
|
36
|
+
crow
|
37
|
+
deer
|
38
|
+
dhole
|
39
|
+
dog
|
40
|
+
dolphin
|
41
|
+
donkey
|
42
|
+
dove
|
43
|
+
dragon
|
44
|
+
duck
|
45
|
+
eagle
|
46
|
+
eel
|
47
|
+
elk
|
17
48
|
emu
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
49
|
+
falcon
|
50
|
+
ferret
|
51
|
+
finch
|
52
|
+
fish
|
53
|
+
flea
|
54
|
+
fly
|
55
|
+
fox
|
56
|
+
frog
|
57
|
+
gnat
|
58
|
+
gnu
|
59
|
+
goat
|
60
|
+
goose
|
24
61
|
groundhog
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
viper
|
32
|
-
beetle
|
33
|
-
chipmunk
|
34
|
-
panda
|
62
|
+
grouse
|
63
|
+
gull
|
64
|
+
hare
|
65
|
+
hawk
|
66
|
+
hedgehog
|
67
|
+
hen
|
35
68
|
hippo
|
36
|
-
|
69
|
+
hog
|
70
|
+
hornet
|
71
|
+
horse
|
72
|
+
hydra
|
73
|
+
jackal
|
74
|
+
jaguar
|
75
|
+
kraken
|
76
|
+
lamb
|
77
|
+
lark
|
78
|
+
leech
|
37
79
|
leopard
|
80
|
+
lion
|
38
81
|
lizard
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
hedgehog
|
43
|
-
walrus
|
44
|
-
swordfish
|
45
|
-
stingray
|
82
|
+
llama
|
83
|
+
lobster
|
84
|
+
lynx
|
46
85
|
mantis
|
86
|
+
marmot
|
87
|
+
minx
|
88
|
+
mole
|
47
89
|
mollusk
|
48
|
-
squirrel
|
49
|
-
osprey
|
50
|
-
lion
|
51
|
-
ferret
|
52
|
-
tiger
|
53
|
-
beaver
|
54
|
-
spider
|
55
|
-
donkey
|
56
90
|
monkey
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
91
|
+
moose
|
92
|
+
moth
|
93
|
+
mouse
|
94
|
+
mule
|
95
|
+
newt
|
96
|
+
osprey
|
97
|
+
ostrich
|
98
|
+
otter
|
99
|
+
owl
|
100
|
+
ox
|
101
|
+
oyster
|
102
|
+
panda
|
103
|
+
panther
|
104
|
+
parrot
|
105
|
+
peacock
|
63
106
|
penguin
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
camel
|
69
|
-
dragon
|
70
|
-
raptor
|
71
|
-
rabbit
|
72
|
-
baboon
|
73
|
-
cod
|
74
|
-
minx
|
75
|
-
skink
|
107
|
+
perch
|
108
|
+
pig
|
109
|
+
pigeon
|
110
|
+
pony
|
76
111
|
pug
|
112
|
+
pup
|
113
|
+
quail
|
114
|
+
rabbit
|
115
|
+
raccoon
|
116
|
+
ram
|
117
|
+
raptor
|
118
|
+
rat
|
119
|
+
raven
|
120
|
+
rhino
|
77
121
|
roo
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
122
|
+
seal
|
123
|
+
serpent
|
124
|
+
shark
|
125
|
+
sheep
|
126
|
+
shrew
|
83
127
|
shrimp
|
128
|
+
skink
|
84
129
|
skunk
|
85
|
-
goat
|
86
|
-
flea
|
87
|
-
mule
|
88
|
-
quail
|
89
|
-
trout
|
90
|
-
finch
|
91
|
-
perch
|
92
|
-
stork
|
93
|
-
crane
|
94
|
-
goose
|
95
|
-
gnu
|
96
130
|
sloth
|
97
|
-
dhole
|
98
|
-
yak
|
99
|
-
shrew
|
100
|
-
worm
|
101
131
|
slug
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
duck
|
110
|
-
hog
|
111
|
-
asp
|
112
|
-
fly
|
113
|
-
boar
|
132
|
+
snail
|
133
|
+
snake
|
134
|
+
spider
|
135
|
+
squid
|
136
|
+
squirrel
|
137
|
+
squirrel
|
138
|
+
stingray
|
114
139
|
stoat
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
140
|
+
stork
|
141
|
+
swallow
|
142
|
+
swan
|
143
|
+
swordfish
|
144
|
+
tapir
|
145
|
+
tiger
|
121
146
|
toad
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
147
|
+
toucan
|
148
|
+
trout
|
149
|
+
tuna
|
150
|
+
turkey
|
151
|
+
turtle
|
152
|
+
viper
|
153
|
+
vole
|
154
|
+
walrus
|
127
155
|
wasp
|
128
|
-
crow
|
129
|
-
ant
|
130
|
-
cock
|
131
|
-
cow
|
132
|
-
chick
|
133
|
-
pup
|
134
|
-
bird
|
135
|
-
bull
|
136
|
-
gull
|
137
|
-
fox
|
138
|
-
frog
|
139
|
-
seal
|
140
|
-
dove
|
141
|
-
eel
|
142
|
-
lark
|
143
|
-
ox
|
144
156
|
whale
|
145
|
-
squirrel
|
146
|
-
crab
|
147
|
-
fish
|
148
157
|
wolf
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
hare
|
156
|
-
bug
|
157
|
-
squid
|
158
|
-
horse
|
159
|
-
ape
|
160
|
-
bee
|
161
|
-
bear
|
162
|
-
cat
|
163
|
-
dog
|
158
|
+
wombat
|
159
|
+
woodchuck
|
160
|
+
worm
|
161
|
+
wren
|
162
|
+
yak
|
163
|
+
zebra
|
data/lib/arcadian_animal.rb
CHANGED
@@ -1,26 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
class ArcadianAnimal
|
4
|
-
|
5
|
-
GEM_ROOT = File.expand_path("../..", __FILE__)
|
6
|
-
|
7
2
|
def self.random
|
8
|
-
"#{adjectives.sample}
|
3
|
+
"#{adjectives.sample}-#{animals.sample}"
|
9
4
|
end
|
10
5
|
|
11
6
|
def self.illiterative
|
12
7
|
adj = adjectives.sample
|
13
8
|
ani = animals.select { |a| a[0] == adj[0] }.sample
|
14
|
-
"#{adj}
|
9
|
+
"#{adj}-#{ani}"
|
15
10
|
end
|
16
11
|
|
17
12
|
protected
|
18
13
|
|
19
14
|
def self.animals
|
20
|
-
File.read(File.expand_path(
|
15
|
+
File.read(File.expand_path('lib/animals.txt')).split("\n")
|
21
16
|
end
|
22
17
|
|
23
18
|
def self.adjectives
|
24
|
-
File.read(File.expand_path(
|
19
|
+
File.read(File.expand_path('lib/adjectives.txt')).split("\n")
|
25
20
|
end
|
26
21
|
end
|
@@ -2,10 +2,10 @@ require_relative '../lib/arcadian_animal'
|
|
2
2
|
|
3
3
|
RSpec.describe ArcadianAnimal do
|
4
4
|
it 'returns a random name' do
|
5
|
-
expect(ArcadianAnimal.random).to match(/[a-z]
|
5
|
+
expect(ArcadianAnimal.random).to match(/[a-z]+-[a-z]+/)
|
6
6
|
end
|
7
7
|
|
8
8
|
it 'returns an illiterative name' do
|
9
|
-
expect(ArcadianAnimal.illiterative).to match(/([a-z])[a-z]
|
9
|
+
expect(ArcadianAnimal.illiterative).to match(/([a-z])[a-z]+-\1[a-z]+/)
|
10
10
|
end
|
11
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arcadian_animal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Shaw
|
@@ -49,4 +49,3 @@ specification_version: 4
|
|
49
49
|
summary: ArcadianAnimal
|
50
50
|
test_files:
|
51
51
|
- spec/arcadian_animal_spec.rb
|
52
|
-
has_rdoc:
|