cryptozoologist 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +17 -1
- data/lib/cryptozoologist.rb +22 -1
- data/lib/cryptozoologist/configuration.rb +20 -0
- data/lib/cryptozoologist/dictionaries.rb +13 -3
- data/lib/cryptozoologist/dictionaries/animals/common.rb +528 -526
- data/lib/cryptozoologist/dictionaries/animals/mythical.rb +86 -83
- data/lib/cryptozoologist/errors.rb +5 -0
- data/lib/cryptozoologist/version.rb +1 -1
- data/spec/cryptozoologist/configuration_spec.rb +28 -0
- data/spec/cryptozoologist/dictionaries_spec.rb +19 -0
- data/spec/cryptozoologist/dictionary_spec.rb +21 -0
- data/spec/cryptozoologist_spec.rb +17 -0
- data/spec/spec_helper.rb +13 -0
- metadata +45 -13
- data/.gitignore +0 -10
- data/.rspec +0 -2
- data/.ruby-version +0 -1
- data/.travis.yml +0 -6
- data/Gemfile +0 -4
- data/Rakefile +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/cryptozoologist.gemspec +0 -25
@@ -2,89 +2,92 @@ module Cryptozoologist
|
|
2
2
|
module Dictionaries
|
3
3
|
module Animals
|
4
4
|
module Mythical
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
5
|
+
def self.list
|
6
|
+
[
|
7
|
+
"abraxan",
|
8
|
+
"aethonan",
|
9
|
+
"alicorn",
|
10
|
+
"banshee",
|
11
|
+
"basilisk",
|
12
|
+
"bigfoot",
|
13
|
+
"blast ended skrewt",
|
14
|
+
"bogeyman",
|
15
|
+
"bogle",
|
16
|
+
"bowtruckle",
|
17
|
+
"brownie",
|
18
|
+
"centaur",
|
19
|
+
"cerberus",
|
20
|
+
"charybdis",
|
21
|
+
"chimera",
|
22
|
+
"cockatrice",
|
23
|
+
"crumple horned snorkack",
|
24
|
+
"cyclops",
|
25
|
+
"cynocephalus",
|
26
|
+
"dementor",
|
27
|
+
"demon",
|
28
|
+
"doppelganger",
|
29
|
+
"doxy",
|
30
|
+
"dragon",
|
31
|
+
"dwarf",
|
32
|
+
"elf",
|
33
|
+
"fairy",
|
34
|
+
"flobberworm",
|
35
|
+
"ghost",
|
36
|
+
"ghoul",
|
37
|
+
"giant squid",
|
38
|
+
"gnome",
|
39
|
+
"goblin",
|
40
|
+
"golem",
|
41
|
+
"gorgon",
|
42
|
+
"granian",
|
43
|
+
"griffin",
|
44
|
+
"grindylow",
|
45
|
+
"hippogriff",
|
46
|
+
"hobgoblin",
|
47
|
+
"hydra",
|
48
|
+
"imp",
|
49
|
+
"kneazle",
|
50
|
+
"ladon",
|
51
|
+
"leprechaun",
|
52
|
+
"loch ness monster",
|
53
|
+
"manticore",
|
54
|
+
"medusa",
|
55
|
+
"mermaid",
|
56
|
+
"minotaur",
|
57
|
+
"moke",
|
58
|
+
"mothman",
|
59
|
+
"niffler",
|
60
|
+
"nymph",
|
61
|
+
"ogre",
|
62
|
+
"orthros",
|
63
|
+
"pegasus",
|
64
|
+
"phoenix",
|
65
|
+
"pixie",
|
66
|
+
"puffskein",
|
67
|
+
"pygmy puff",
|
68
|
+
"sasquatch",
|
69
|
+
"satyr",
|
70
|
+
"scylla",
|
71
|
+
"shade",
|
72
|
+
"shapeshifter",
|
73
|
+
"siren",
|
74
|
+
"sphinx",
|
75
|
+
"sprite",
|
76
|
+
"sylph",
|
77
|
+
"thestral",
|
78
|
+
"thunderbird",
|
79
|
+
"troll",
|
80
|
+
"typhon",
|
81
|
+
"unicorn",
|
82
|
+
"valkyrie",
|
83
|
+
"vampire",
|
84
|
+
"wendigo",
|
85
|
+
"will o the wisp",
|
86
|
+
"werewolf",
|
87
|
+
"wraith",
|
88
|
+
"zombie"
|
89
|
+
]
|
90
|
+
end
|
88
91
|
end
|
89
92
|
end
|
90
93
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe Cryptozoologist::Configuration do
|
4
|
+
context 'without configuration block' do
|
5
|
+
it 'returns an empty Configuration' do
|
6
|
+
expect(Cryptozoologist.configuration).to be_instance_of(Cryptozoologist::Configuration)
|
7
|
+
expect(Cryptozoologist.configuration.exclude).to eq([])
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'exclusions' do
|
12
|
+
it 'filters out invalid exclusions' do
|
13
|
+
Cryptozoologist.configure do |config|
|
14
|
+
config.exclude = [:common, :tacos]
|
15
|
+
end
|
16
|
+
|
17
|
+
expect(Cryptozoologist.configuration.exclude).to eq([:common])
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'requires an array' do
|
21
|
+
expect {
|
22
|
+
Cryptozoologist.configure do |config|
|
23
|
+
config.exclude = 1
|
24
|
+
end
|
25
|
+
}.to raise_error(Cryptozoologist::Errors::Configuration)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe Cryptozoologist::Dictionaries do
|
4
|
+
context '#words' do
|
5
|
+
it 'has a word list' do
|
6
|
+
expect(Cryptozoologist::Dictionaries.animals.length).to be > 1
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'contains Common animals' do
|
10
|
+
common = Cryptozoologist::Dictionaries::Animals::Common.list
|
11
|
+
expect(Cryptozoologist::Dictionaries.animals.include?(common.sample)).to be true
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'contains Mythical creatures' do
|
15
|
+
mythical = Cryptozoologist::Dictionaries::Animals::Mythical.list
|
16
|
+
expect(Cryptozoologist::Dictionaries.animals.include?(mythical.sample)).to be true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe Cryptozoologist::Dictionary do
|
4
|
+
before do
|
5
|
+
@dictionary = Cryptozoologist::Dictionary.new
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'has an animal list' do
|
9
|
+
expect(@dictionary.animals.length).to be > 1
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'contains Common animals' do
|
13
|
+
common = Cryptozoologist::Dictionaries::Animals::Common.list
|
14
|
+
expect(@dictionary.animals.include?(common.sample)).to be true
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'contains Mythical creatures' do
|
18
|
+
mythical = Cryptozoologist::Dictionaries::Animals::Mythical.list
|
19
|
+
expect(@dictionary.animals.include?(mythical.sample)).to be true
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Cryptozoologist do
|
4
|
+
it 'has a version number' do
|
5
|
+
expect(Cryptozoologist::VERSION).not_to be nil
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'resets configuration' do
|
9
|
+
Cryptozoologist.configure do |config|
|
10
|
+
config.exclude = [:common]
|
11
|
+
end
|
12
|
+
expect(Cryptozoologist.configuration.exclude).to eq([:common])
|
13
|
+
|
14
|
+
Cryptozoologist.reset
|
15
|
+
expect(Cryptozoologist.configuration.exclude).to eq([])
|
16
|
+
end
|
17
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
+
|
3
|
+
require 'pry'
|
4
|
+
require 'pry-nav'
|
5
|
+
require 'cryptozoologist'
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
|
9
|
+
# reset configuration globally
|
10
|
+
config.before(:all) do
|
11
|
+
Cryptozoologist.reset
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptozoologist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liz Abinante
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,34 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.10.3
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.10.3
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry-nav
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.2.4
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.2.4
|
55
83
|
description: Cryptozoologist generates random strings from animal, clothing item,
|
56
84
|
and color pairings. You could get something like 'orange-clownfish-turtleneck' or
|
57
85
|
'magenta-three-toed-sloth-shoe-horn'. It's fun and silly - it's also very simple,
|
@@ -62,24 +90,23 @@ executables: []
|
|
62
90
|
extensions: []
|
63
91
|
extra_rdoc_files: []
|
64
92
|
files:
|
65
|
-
-
|
66
|
-
- ".rspec"
|
67
|
-
- ".ruby-version"
|
68
|
-
- ".travis.yml"
|
93
|
+
- CHANGELOG.md
|
69
94
|
- CODE_OF_CONDUCT.md
|
70
|
-
- Gemfile
|
71
95
|
- LICENSE.txt
|
72
96
|
- README.md
|
73
|
-
- Rakefile
|
74
|
-
- bin/console
|
75
|
-
- bin/setup
|
76
|
-
- cryptozoologist.gemspec
|
77
97
|
- lib/cryptozoologist.rb
|
98
|
+
- lib/cryptozoologist/configuration.rb
|
78
99
|
- lib/cryptozoologist/dictionaries.rb
|
79
100
|
- lib/cryptozoologist/dictionaries/animals/common.rb
|
80
101
|
- lib/cryptozoologist/dictionaries/animals/mythical.rb
|
81
102
|
- lib/cryptozoologist/dictionary.rb
|
103
|
+
- lib/cryptozoologist/errors.rb
|
82
104
|
- lib/cryptozoologist/version.rb
|
105
|
+
- spec/cryptozoologist/configuration_spec.rb
|
106
|
+
- spec/cryptozoologist/dictionaries_spec.rb
|
107
|
+
- spec/cryptozoologist/dictionary_spec.rb
|
108
|
+
- spec/cryptozoologist_spec.rb
|
109
|
+
- spec/spec_helper.rb
|
83
110
|
homepage: https://github.com/feministy/cryptozoologist
|
84
111
|
licenses:
|
85
112
|
- MIT
|
@@ -104,4 +131,9 @@ rubygems_version: 2.5.1
|
|
104
131
|
signing_key:
|
105
132
|
specification_version: 4
|
106
133
|
summary: Generates random strings from animal, clothing item, and color pairings.
|
107
|
-
test_files:
|
134
|
+
test_files:
|
135
|
+
- spec/cryptozoologist/configuration_spec.rb
|
136
|
+
- spec/cryptozoologist/dictionaries_spec.rb
|
137
|
+
- spec/cryptozoologist/dictionary_spec.rb
|
138
|
+
- spec/cryptozoologist_spec.rb
|
139
|
+
- spec/spec_helper.rb
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.3.0
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "cryptozoologist"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|