cryptozoologist 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,89 +2,92 @@ module Cryptozoologist
2
2
  module Dictionaries
3
3
  module Animals
4
4
  module Mythical
5
- LIST = [
6
- "abraxan",
7
- "aethonan",
8
- "alicorn",
9
- "banshee",
10
- "basilisk",
11
- "bigfoot",
12
- "blast ended skrewt",
13
- "bogeyman",
14
- "bogle",
15
- "bowtruckle",
16
- "brownie",
17
- "centaur",
18
- "cerberus",
19
- "charybdis",
20
- "chimera",
21
- "cockatrice",
22
- "cyclops",
23
- "cynocephalus",
24
- "dementor",
25
- "demon",
26
- "doppelganger",
27
- "doxy",
28
- "dragon",
29
- "dwarf",
30
- "elf",
31
- "fairy",
32
- "flobberworm",
33
- "ghost",
34
- "ghoul",
35
- "giant squid",
36
- "gnome",
37
- "goblin",
38
- "golem",
39
- "gorgon",
40
- "granian",
41
- "griffin",
42
- "grindylow",
43
- "hippogriff",
44
- "hobgoblin",
45
- "hydra",
46
- "imp",
47
- "kneazle",
48
- "ladon",
49
- "leprechaun",
50
- "loch ness monster",
51
- "manticore",
52
- "medusa",
53
- "mermaid",
54
- "minotaur",
55
- "moke",
56
- "mothman",
57
- "niffler",
58
- "nymph",
59
- "ogre",
60
- "orthros",
61
- "pegasus",
62
- "phoenix",
63
- "pixie",
64
- "puffskein",
65
- "pygmy puff",
66
- "sasquatch",
67
- "satyr",
68
- "scylla",
69
- "shade",
70
- "shapeshifter",
71
- "siren",
72
- "sphinx",
73
- "sprite",
74
- "sylph",
75
- "thestral",
76
- "thunderbird",
77
- "troll",
78
- "typhon",
79
- "unicorn",
80
- "valkyrie",
81
- "vampire",
82
- "wendigo",
83
- "will o the wisp",
84
- "werewolf",
85
- "wraith",
86
- "zombie"
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,5 @@
1
+ module Cryptozoologist
2
+ module Errors
3
+ class Configuration < StandardError; end
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Cryptozoologist
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  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
@@ -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.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liz Abinante
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
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
- - ".gitignore"
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
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.gem
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
@@ -1 +0,0 @@
1
- 2.3.0
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.0
4
- before_install: gem install bundler -v 1.11.2
5
- notifications:
6
- email: false
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in cryptozoologist.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -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
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here