cool_faker 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/cool_faker.gemspec +23 -0
- data/cool_faker/.gitignore +17 -0
- data/lib/cool_faker.rb +22 -0
- data/lib/cool_faker/data.yml +17 -0
- data/lib/cool_faker/name.yml +5 -0
- data/lib/cool_faker/version.rb +3 -0
- data/lib/name.rb +14 -0
- data/specs/data_spec.rspec +35 -0
- data/specs/method_spec.rb +13 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjViNDY0NTQ4ZDg0NzQzOTdmYTZkMDE1Mzc0NTM4ODkzODQ2YjE0YQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YTliYjI5NzhiYWFkMGIzYTE0ZTdmOWM4ZTJmZTk3Y2QyZTA4YjU2OA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NGYyYzBkMjRjM2VlNjZjNWFmMzhmYWY5N2I4MGUzYWM2MTY0YTNmNzlmZGJk
|
10
|
+
YjFlZGYzMmM3MzA1NDg1ODY0M2Y1OTdkM2I4ZDg4M2YwZjM0NGRjNTNhZDBi
|
11
|
+
NGJhZjQwODZjYmI3MWY3MTk2M2I0MzJhYTIyMzU5MmYzNDU2N2I=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZmVlNmRkZjZmOTZmOTNlMWY1Mzk4YWRiZDE3N2ZkNTg0MTE0YzllMTdkYjE0
|
14
|
+
ZmM1ZTE0NmI1YjBjOGE4NDI4NjUwYmM5NmZiYzAyYTdjYjRiMzQ0OTVhODA1
|
15
|
+
NDZlNzMxYTU5YmJjMWJlNjE0MmNmM2UzODU5MWQ0NGNhYjk1ZGQ=
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Nicholas Cu & Quentin Devauchelle & Armando Reed & Jamie McKenzie
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# CoolFaker
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'cool_faker'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install cool_faker
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( http://github.com/<my-github-username>/cool_faker/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/cool_faker.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cool_faker/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cool_faker"
|
8
|
+
spec.version = CoolFaker::VERSION
|
9
|
+
spec.authors = ["Nicholas Cu & Quentin Devauchelle & Armando Reed & Jamie McKenzie"]
|
10
|
+
spec.email = [""]
|
11
|
+
spec.summary = %q{generate a list of real movie character names}
|
12
|
+
spec.description = %q{Perfect for filling in tables to test how program treats data}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|specs|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
data/lib/cool_faker.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#getting an unknown error
|
2
|
+
# require_relative "../cool_faker/version"
|
3
|
+
|
4
|
+
|
5
|
+
require "yaml"
|
6
|
+
|
7
|
+
module CoolFaker
|
8
|
+
class Base
|
9
|
+
|
10
|
+
def self.parse(file)
|
11
|
+
YAML.load(File.open(file))
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.dir
|
15
|
+
File.expand_path(File.dirname(__FILE__))
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
require 'name'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
names:
|
2
|
+
friends: ["Rachel Green", "Monica Geller", "Phoebe Buffay", "Joey Francis Tribbiani", "Chandler Bing", "Ross Geller"]
|
3
|
+
entourage: ["Eric Murphy", "Vincent Chase", "Johnny 'Drama' Chase", "Turtle", "Ari Gold", "Lloyd"]
|
4
|
+
sex_and_the_city: ["Carrie Bradshaw", "Samantha Jones", "Miranda Hobbes", "Charlotte York Goldenblatt", "Mr. Big", "Stanford", "Steve Brady", "Harry Goldenblatt", "Louise, Carrie's assistant", "Smith Jerrod", "Anthony Marantino", "Bitsy von Muffling", "Magda", "Mary Brady", "Enid Frick", "Herself", "Lily York Goldenblatt", "Twenty-Something Girl Dreaming", "Brady", "Dante"]
|
5
|
+
batman: ["Batman", "Bruce Wayne", "Joker", "Two-Face", "Riddler", "Poison Ivy", "Rachel Dawes", "Harvey Dent", "Lt. James Gordon", "Alfred", "Scarecrow", "Lucius Fox", "Bruce Wayne", "Joker's henchman", "Engel", "Mayor of Gotham", "Lau", "Wuertz", "Salvatore Maroni", "Barbara Gordon", "Chechen", "Stephen", "Loeb"]
|
6
|
+
startrek: ["Captain Jean-Luc Picard", "Captain William T. Riker", "Lt. Commander Geordi La Forge", "Dr. Beverly Crusher", "Counselor Deanna Troi-Riker", "Praetor Shinzon", "The Reman Viceroy", "Senator Tal'aura", "Commander Donatra", "Lt. Commander Worf", "Admiral Janeway", "Wesley Crusher", "Guinan", "Scimitar Computer", "Praetor Hiren", "Lt. Commander Data"]
|
7
|
+
superman: ["Superman", "Clark Kent", "Jor-El", "Lex Luthor", "Lois Lane", "Otis", "Perry White", "Jonathan Kent", "1st Elder", "Eve Teschmacher", "Vond-Ah", "General Zod", "Martha Kent", "Lara", "Young Clark Kent"]
|
8
|
+
star_wars: ["Luke Skywalker", "Han Solo", "Princess Leia", "Lando Calrissian", "C-3PO", "Chewbacca", "Voice of Darth Vader", "Yoda", "The Emperor", "Anakin Skywalker", "Darth Vader", "Ben 'Obi-Wan' Kenobi", "R2-D2 ", "Paploo", "Wicket", "Mon Mothma"]
|
9
|
+
the_lord_of_the_rings: ["Frodo Baggins", "Gandalf the Grey", "Aragorn", "Arwen Evenstar", "Legolas", "Gimli", "Boromir", "Saruman", "Samwise 'Sam' Gamgee", "Peregrin 'Pippin' Took", "Meriadoc 'Merry' Brandybuck", "Elrond", "Galadriel", "Bilbo Baggins", "Haldir", "Lurtz", "Sauron", "Gollum", "Rose 'Rosie' Cotton", "Celeborn"]
|
10
|
+
napolean_dynamite: ["Napoleon Dynamite", "Kip Dynamite", "Uncle Rico", "Pedro Sanchez", "LaFawnduh", "Summer", "Deb", "Rex", "Grandma", "Don", "Trisha", "Ilene"]
|
11
|
+
snow_white: ["Huntsman", "Snow White", "Dopey", "Sleepy", "Grumpy", "Bird Sounds and Warbling", "Sneezy", "Happy", "Doc", "Queen ", " Witch", "Bashful", "Magic Mirror", "Prince", "Birds", "Yodeling Man"]
|
12
|
+
back_to_the_future: ["Marty McFly ", " Marty McFly Jr ", " Marlene McFly", "Dr. Emmett Brown", "Lorraine Baines McFly", "George McFly", "Biff Tannen", "Jennifer Parker", "Dave McFly", "Linda McFly"]
|
13
|
+
the_wizard_of_oz: ["Dorothy Gale", "Prof. Marvel", "Hunk", "Zeke", "Hickory", "Glinda, the Good Witch of the North", "Miss Gulch", "Uncle Henry", "Auntie Em", "Mayor of Munchkin City", "Coroner", "The cabbie", "The Wizard of Oz", "The Wizard's guard", "Emerald City doorman", "The Scarecrow", "The Wicked Witch of the East", "The Wicked Witch of the West", "The Cowardly Lion", "The Tin Man"]
|
14
|
+
toy_story: ["Woody", "Buzz Lightyear", "Mr. Potato Head", "Slinky Dog", "Rex", "Hamm", "Bo Peep", "Sid"]
|
15
|
+
the_simpsons: ["Homer", "Itchy ", "Barney", "Grampa", " Krusty the Clown", "Mayor Quimby", "Santa's Little Helper", "Marge Simpson ", " Selma ", " Patty", "Bart Simpson ", " Maggie Simpson ", " Ralph ", " Nelson ", " Todd Flanders ", " TV Daughter ", " Woman on Phone", "Lisa Simpson", "Professor Frink ", " Comic Book Guy ", " Moe ", " Chief Wiggum", "Lou", "Carl", "Apu", "Dr. Nick ", "Scratchy ", "Mr. Burns ", " Rev. Lovejoy", "Ned Flanders", " Lenny ", "President Arnold Schwarzenegger ", "Kent Brockman", "Principal Skinner", "Dr. Hibbert", "Smithers", "Otto", "Sideshow Bob", "Milhouse Van Houten ", "Rod Flanders", "Mrs. Krabappel", "Fat Tony", "Mrs. Skinner"]
|
16
|
+
futurama: ["Philip J. Fry", "Turanga Leela", "Bender", "Hermes Conrad", "Amy Wong", "Mom", "Doctor Who"]
|
17
|
+
monty_python: ["King Arthur", "Voice of God", "Middle Head", "Hiccoughing Guard", "Second Swallow-Savvy Guard", "The Black Knight", "Peasant 3", "Sir Lancelot the Brave", "Taunting French Guard", "Tim the Enchanter", "Dead Collector", "Peasant 1", "Sir Robin the Not-Quite-So-Brave-as-Sir Launcelot", "First Swamp Castle Guard", "Concorde", "Roger the Shrubber", "Brother Maynard", "Patsy", "Green Knight", "Old Man from Scene 24 (Bridgekeeper)", "Sir Bors", "Animator", "Gorrilla Hand", "Dennis's Mother", "Sir Bedevere", "Left Head", "Prince Herbert", "Cartoon Scribe (voice)", "First Swallow-Savvy Guard", "Dennis", "Peasant 2", "Right Head", "Sir Galahad the Pure", "Narrator", "King of Swamp Castle", "Brother Maynard's Brother", "Leader of The Knights Who Say NI!", "The Witch", "Zoot", "Dingo", "First Monk", "Singing Minstrel", "Page Crushed by the Rabbit", "Peasant #4", "Old Crone", "Dead Body", "Historian Frank", "Historian's Wife", "Dr. Piglet", "Dr. Winston", "Prisoner"]
|
@@ -0,0 +1,5 @@
|
|
1
|
+
names:
|
2
|
+
|
3
|
+
friends: ["Rachel Green", "Monica Geller", "Phoebe Buffay", "Joey Francis Tribbiani", "Chandler Bing", "Ross Geller"]
|
4
|
+
entourage: ["Eric Murphy", "Vincent Chase", "Johnny 'Drama' Chase", "Turtle", "Ari Gold", "Lloyd"]
|
5
|
+
sex_and_the_city: ["Carrie Bradshaw", "Samantha Jones", "Miranda Hobbes", "Charlotte York Goldenblatt", "Mr. Big", "Stanford", "Steve Brady", "Harry Goldenblatt", "Louise, Carrie's assistant", "Smith Jerrod", "Anthony Marantino", "Bitsy von Muffling", "Magda", "Mary Brady", "Enid Frick", "Herself", "Lily York Goldenblatt", "Twenty-Something Girl Dreaming", "Brady", "Dante"]
|
data/lib/name.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
|
5
|
+
describe "the file with all the data (data.yml)" do
|
6
|
+
FILE = '../lib/cool_faker/data.yml'
|
7
|
+
it "should exist" do
|
8
|
+
File.exist?(FILE).should be_true
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should be openable" do
|
12
|
+
File.open(FILE).should_not raise_error
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should be loadable by YAML" do
|
16
|
+
YAML.load_file(FILE).should_not raise_error
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should have a name node" do
|
20
|
+
YAML.load_file(FILE).should include("names")
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should have more than one subnode of names" do
|
24
|
+
YAML.load_file(FILE)["names"].length.should be > 2
|
25
|
+
end
|
26
|
+
|
27
|
+
# YAML.load_file(FILE)["names"].each { |node| p node }
|
28
|
+
|
29
|
+
it "should have at least 5 possible names in every subnode(theme)" do
|
30
|
+
YAML.load_file(FILE)["names"].each do |subnode|
|
31
|
+
subnode[1].length.should be > 5
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require_relative '../lib/name.rb'
|
3
|
+
|
4
|
+
describe CoolFaker::Character, "name class for famous faker" do
|
5
|
+
|
6
|
+
describe "name method" do
|
7
|
+
name = CoolFaker::Character
|
8
|
+
it "should return a string" do
|
9
|
+
name.name.should be_a String
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cool_faker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nicholas Cu & Quentin Devauchelle & Armando Reed & Jamie McKenzie
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Perfect for filling in tables to test how program treats data
|
42
|
+
email:
|
43
|
+
- ''
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- Gemfile
|
49
|
+
- LICENSE.txt
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- cool_faker.gemspec
|
53
|
+
- cool_faker/.gitignore
|
54
|
+
- lib/cool_faker.rb
|
55
|
+
- lib/cool_faker/data.yml
|
56
|
+
- lib/cool_faker/name.yml
|
57
|
+
- lib/cool_faker/version.rb
|
58
|
+
- lib/name.rb
|
59
|
+
- specs/data_spec.rspec
|
60
|
+
- specs/method_spec.rb
|
61
|
+
homepage: ''
|
62
|
+
licenses:
|
63
|
+
- MIT
|
64
|
+
metadata: {}
|
65
|
+
post_install_message:
|
66
|
+
rdoc_options: []
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubyforge_project:
|
81
|
+
rubygems_version: 2.1.5
|
82
|
+
signing_key:
|
83
|
+
specification_version: 4
|
84
|
+
summary: generate a list of real movie character names
|
85
|
+
test_files:
|
86
|
+
- specs/data_spec.rspec
|
87
|
+
- specs/method_spec.rb
|