gotfaker 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +3 -0
- data/Gemfile +5 -0
- data/README.md +34 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/gotfaker-0.1.0.gem +0 -0
- data/gotfaker.gemspec +26 -0
- data/lib/gotfaker/character.rb +27 -0
- data/lib/gotfaker/geography.rb +48 -0
- data/lib/gotfaker/house.rb +39 -0
- data/lib/gotfaker/quote.rb +37 -0
- data/lib/gotfaker/religion.rb +30 -0
- data/lib/gotfaker/version.rb +3 -0
- data/lib/gotfaker.rb +10 -0
- metadata +92 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: db296e09ce42ff6ef94e3d7629d2c01b1f7ee3d6
|
4
|
+
data.tar.gz: da3f8d583bc50d2df5e485796f49902574a11d44
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fa4f484f926c6e6a6459bf39db6913059eea8d8e9afc1e1727167548b55e510e46f2fe83559a56c363e07eaf01eae2672b763cba9ef8aa6ef5ced63f47a1ec20
|
7
|
+
data.tar.gz: 703bf797de49ca2606618e29c4938846d31a3cbeb1aabf399b503ad4bd62044935b758649e075ec666010647d7a329079f462721d52d8cbe5974eba09d62b599
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Gotfaker
|
2
|
+
|
3
|
+
A GOT Faker gem that provides random data from Game of Thrones.
|
4
|
+
|
5
|
+
Here are the available methods:
|
6
|
+
|
7
|
+
|
8
|
+
**GOTFaker::Character**
|
9
|
+
|
10
|
+
* #full_name
|
11
|
+
* #first_name
|
12
|
+
* #last_name
|
13
|
+
|
14
|
+
**GOTFaker::House**
|
15
|
+
|
16
|
+
* #name
|
17
|
+
* #description
|
18
|
+
|
19
|
+
**GOTFaker::Geography**
|
20
|
+
|
21
|
+
* #continent
|
22
|
+
* #region
|
23
|
+
* #island
|
24
|
+
* #sea
|
25
|
+
* #river
|
26
|
+
* #ruin
|
27
|
+
* #road
|
28
|
+
* #forest
|
29
|
+
* #mountain
|
30
|
+
|
31
|
+
**GOTFaker::Quote**
|
32
|
+
|
33
|
+
* #tyrion_lannister
|
34
|
+
* #bad_ass
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "gotfaker"
|
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
ADDED
data/gotfaker-0.1.0.gem
ADDED
Binary file
|
data/gotfaker.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'gotfaker/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "gotfaker"
|
8
|
+
spec.version = Gotfaker::VERSION
|
9
|
+
spec.authors = ["Tony Mai","Andrew Dye","Kevin Ceballos","Mikhail Delos Trinos"]
|
10
|
+
spec.email = ["sf.sea.lions.2015@devbootcamp.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Easily generate fake Game of Thrones data}
|
13
|
+
spec.description = %q{Faker, but for Game of Thrones fake data}
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
|
+
spec.bindir = "exe"
|
17
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
if spec.respond_to?(:metadata)
|
21
|
+
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
|
22
|
+
end
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'open-uri'
|
3
|
+
|
4
|
+
module GOTFaker
|
5
|
+
class Character
|
6
|
+
noko = Nokogiri::HTML(open("http://awoiaf.westeros.org/index.php/List_of_characters"))
|
7
|
+
@names = noko.search('#mw-content-text > ul >li> a:first-child').map{|name| name.inner_text}
|
8
|
+
|
9
|
+
def self.full_name
|
10
|
+
@names.sample
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.first_name
|
14
|
+
name = @names.sample.split
|
15
|
+
return name[0]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.last_name
|
19
|
+
name = @names.sample.split
|
20
|
+
while name.length < 1
|
21
|
+
name = @names.sample
|
22
|
+
end
|
23
|
+
return name[-1]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module GOTFaker
|
2
|
+
class Geography
|
3
|
+
def self.continent
|
4
|
+
%w(Westoros Essos Sothoryos).sample
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.region
|
8
|
+
westeros = ['Beyond the Wall', 'The North', 'Iron Islands', 'The Vale', 'The Riberlands', 'The Westerlands', 'The Reach', 'The Stormlands', 'The Crownlands', 'Dorne']
|
9
|
+
essos = ['The Free Cities', 'Kingdom of Sarnor', 'The Dothraki Sea', 'The Shivering Sea', 'Valyrian Peninsula', 'Slaver\'s Bay and Ghiscar', 'Lhazar', 'Qarth', 'Eastern Essos']
|
10
|
+
sothoryos = ['Naath', 'Isle of Tears', 'Basilisk Point']
|
11
|
+
|
12
|
+
(westeros + essos + sothoryos).sample
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.island
|
16
|
+
['Iron Islands', 'Summer Islands', 'Tarth', 'Bear Island', 'Dragonstone (island)', 'Ibben', 'Naath', 'Stepstones', 'The Arbor', 'Skagos', 'Isle of Faces', 'Basilisk Isles', 'Three Sisters', 'Pyke (island)', 'Skane', 'Greak Wyk', 'Dragonstone'].sample
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.sea
|
20
|
+
['Narrow Sea', 'The Jade Sea', 'Smoking Sea', 'Blackwater Bay', 'Summer Sea', 'Sunset Sea', 'Shivering Sea', 'Ironman\'s Bay', 'Bay of Ice', 'The Bite', 'Bay of Seals', 'The Sea of Sighs', 'Gulf of Grief', 'Shipbreaker Bay', 'Sea of Dorne', 'Sea of Myrth', 'Redwyne Straits', 'Blazewater Bay', 'Ghiscari Strait'].sample
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.river
|
24
|
+
['The Trident', 'Rhoyne', 'Weeper Water', 'Milkwater', 'Blackwater Rush', 'Last River', 'White Knife', 'Mander', 'Greenblood', 'Thumblestone', 'Skahazadhan', 'Scourge', 'Blueburn', 'Yellow Fork', 'Honeywine', 'Wendwater', 'Brimstone', 'Torentine', 'Vaith (river)', 'Cockleswhent', 'Broken Branch', 'Qhoyne'].sample
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.ruin
|
28
|
+
['Harrenhal', 'Moat Cailin', 'Castamere', 'Old Valyria', 'Old Ghis', 'Summerhall', 'Chroyane', 'Bhorash', 'Oros', 'Tyria', 'Vulture\'s Roost', 'Ny Sar', 'The Whispers', 'Sar Mell', 'Ar Noy'].sample
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.road
|
32
|
+
['Kingsroad', 'Roseroad', 'Prince\'s Pass', 'Eastern Road', 'Boneway', 'Goldroad', 'Searoad', 'River Road'].sample
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.forest
|
36
|
+
['Haunted Forest', 'Wolfswood', 'Kingswood', 'The Footprint', 'Whispering Wood', 'Forest of Qohor', 'Rainwood'].sample
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.mountain
|
40
|
+
['Frostfangs', 'Mountains of the Moon', 'Red Mountains', 'Mother of Mountains'].sample
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module GOTFaker
|
2
|
+
class House
|
3
|
+
def self.name
|
4
|
+
['House Arryn',
|
5
|
+
"House Baratheon of King's Landing",
|
6
|
+
"House Baratheon of Dragonstone",
|
7
|
+
'House Bolton',
|
8
|
+
'House Frey',
|
9
|
+
'House Greyjoy',
|
10
|
+
'House Lannister',
|
11
|
+
'House Martell',
|
12
|
+
'House Tyrell',
|
13
|
+
'House Stark',
|
14
|
+
'House Targaryen',
|
15
|
+
'House Tully',
|
16
|
+
'House Durrandon',
|
17
|
+
'House Gardener',
|
18
|
+
'House Hoare'].sample
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.description
|
22
|
+
[ "rulers of the Vale of Arryn from the castle of the Eyrie",
|
23
|
+
"rulers of the Crownlands from the castle of the Red Keep in King's Landing, and the de facto royal house",
|
24
|
+
"rulers of the Stormlands from the castle of Dragonstone, claiming the Iron Throne",
|
25
|
+
"rulers of the North from the castle of the Dreadfort",
|
26
|
+
"rulers of the Riverlands from the castle of Riverrun",
|
27
|
+
"rulers of the Iron Islands from the castle of Pyke",
|
28
|
+
"rulers of the Westerlands from the castle of Casterly Rock",
|
29
|
+
"rulers of Dorne from the castle of Sunspear",
|
30
|
+
"rulers of the Reach from the castle of Highgarden",
|
31
|
+
"the former rulers of the North",
|
32
|
+
"the former royal house, currently in exile",
|
33
|
+
"the former rulers of the Riverlands, ruling from Riverrun",
|
34
|
+
"the former and now extinct rulers of the Stormlands",
|
35
|
+
"former and now extinct rulers of the Reach",
|
36
|
+
"former and now extinct rulers of the Iron Islands and the Riverlands"].sample
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module GOTFaker
|
2
|
+
class Quote
|
3
|
+
def self.tyrion_lannister
|
4
|
+
["I will hurt you for this. A day will come when your joy will turn to ashes and you will know the debt is paid.",
|
5
|
+
"A fair enough repayment for putting your spear through my would-be killer's face, wouldn't you say? Now, as it happens Marei is quite the spear-handler herself. She's here to thank you for staying by my side as the battle raged all around us.",
|
6
|
+
"Oh, ‘monster.’ Perhaps you should speak to me more softly then. Monsters are dangerous and, just now, kings are dying like flies.",
|
7
|
+
"It's not easy being drunk all the time. If it were easy, everyone would do it.",
|
8
|
+
"What do I want from you? I want you to share my tent. I want you to pour my wine, laugh at my jokes, rub my legs when they're sore after a day's ride. I want you to take no other man to bed as long as we're together. And I want you to fu**ck me like it's my last night in this world. Which it may well be.",
|
9
|
+
"It's hard to put a leash on a dog once you've put a crown on its head.",
|
10
|
+
"I just want to stand on top of the Wall and piss off the edge of the world.",
|
11
|
+
"If you want justice, you've come to the wrong place.",
|
12
|
+
"You once said that without me, the city would have faced certain defeat. You said the histories would never mention me, but you would not forget. Have you forgotten, Lord Varys?",
|
13
|
+
"Grand Maester Pycelle made the same joke. You must be proud to be as funny as a man whose balls brush his knees.",
|
14
|
+
"I have a tender spot in my heart for cripples and bastards and broken things.",
|
15
|
+
"I'm guilty of a far more monstrous crime. I'm guilty of being a dwarf.",
|
16
|
+
"The King is a lost cause, it's the rest of us I'm worried about.",
|
17
|
+
"Someone threw a cow pie at you so you decide to kill them all! They're starving, you fool! All because of a war you started!",
|
18
|
+
"We've had vicious kings, and we've had idiot kings...but I don't know if we've ever been cursed with a vicious idiot for a king!",
|
19
|
+
"You might find it difficult to rule over millions who want you dead.",
|
20
|
+
"When you tear out a man's tongue, you are not proving him a liar, you're only telling the world that you fear what he might say.",
|
21
|
+
"Yes. Until my brother killed him. Life is full of these little ironies. My sister married the new king, and my repulsive nephew will be king after him. I must do my part for the honor of my house; wouldn't you agree? But how? Well, my brother has his sword, and I have my mind. And a mind needs books like a sword needs a whetstone. That's why I read so much, Jon Snow.",
|
22
|
+
"Let me give you some advice, bastard. Never forget what you are. The rest of the world will not. Wear it like armor, and it can never be used to hurt you.",
|
23
|
+
"Don't fight for a king. Don't fight for his kingdoms. Don't fight for honor, don't fight for glory, don't fight for riches, because you won't get any. This is your city Stannis means to sack. That's your gate he's ramming. If he gets in it will be your house that burns. Your gold he steals, your women he rapes. Those are brave men knocking at our door. Let's go kill them!",
|
24
|
+
"I did not kill Joffrey but I wish that I had. Watching your vicious bastard die gave me more relief than a thousand lying whores. I wish I was the monster you think I am. I wish I had enough poison for the whole pack of you. I would gladly give my life to watch you all swallow it. I will not give my life for Joffrey's murder. And I know I'll get no justice here, so I'll let the gods decide my fate. I demand a trial by combat!"].sample
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.bad_ass
|
28
|
+
["The man who passes the sentence should swing the sword.",
|
29
|
+
"A dying mind is a demented mind, Lord Stark. For all the weight they're given, last words are usually as significant as first words.",
|
30
|
+
"People have been swinging at me for years, they always seem to miss.",
|
31
|
+
"Anyone who isn't us is our enemy",
|
32
|
+
"It's the family name that lives on. That's all that lives on. Not your personal glory, not your honor, but family.",
|
33
|
+
"A Lannister always pays his debts.",
|
34
|
+
"There are no men like me. Only me."].sample
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module GOTFaker
|
2
|
+
class Religion
|
3
|
+
def self.name
|
4
|
+
['Old Gods of the Forest',
|
5
|
+
'Faith of the Seven',
|
6
|
+
'Drowned God',
|
7
|
+
'R\'hllor, the Lord of Light',
|
8
|
+
'The Many-faced God of Death',
|
9
|
+
'Great Stallion',
|
10
|
+
'Great Shepherd',
|
11
|
+
'Ghiscari religion',
|
12
|
+
'Summer Islands religion',
|
13
|
+
'Lion of Night'].sample
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.description
|
17
|
+
[ 'The Old Gods of the Forest are a collection of innumerable and unnamed spirits of nature, which are worshiped by many people of the North and small numbers elsewhere in Westeros. ',
|
18
|
+
'The Faith of the Seven is the main religion of the Seven Kingdoms. It is little-practiced beyond its borders. ',
|
19
|
+
'The Drowned God is the deity worshiped on the Iron Islands. ',
|
20
|
+
'R\'hllor, alternatively known as the Lord of Light and the Red God, as well as the Heart of Fire and the God of Flame and Shadow, is a deity widely worshiped in the continent of Essos. ',
|
21
|
+
'The Many-Faced God, alternatively known as the God of Death, is a deity worshipped predominantly in the Free City of Braavos.',
|
22
|
+
'The Great Stallion ("vezhof"[1]) is a horse god revered as the deity of the Dothraki religion, mirroring the importance of these creatures in Dothraki culture. ',
|
23
|
+
'The Great Shepherd is the deity worshiped by the Lhazareen, mirroring the importance of shepherding in Lhazareen culture. ',
|
24
|
+
'The Ghiscari religion is followed in Slaver\'s Bay, where the slaver-cities Meereen, Yunkai, and Astapor descend from the ancient Ghiscari Empire.',
|
25
|
+
'The Summer Islands religion considers sex to be a holy and life-affirming act. One of the deities they worship is a fertility goddess with sixteen teats.',
|
26
|
+
'The Lion of Night is a deity worshipped in Essos. He is depicted as a man with the head of a male lion, sitting on a throne.'
|
27
|
+
].sample
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/gotfaker.rb
ADDED
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gotfaker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tony Mai
|
8
|
+
- Andrew Dye
|
9
|
+
- Kevin Ceballos
|
10
|
+
- Mikhail Delos Trinos
|
11
|
+
autorequire:
|
12
|
+
bindir: exe
|
13
|
+
cert_chain: []
|
14
|
+
date: 2015-04-12 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: bundler
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.9'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.9'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ~>
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '10.0'
|
37
|
+
type: :development
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '10.0'
|
44
|
+
description: Faker, but for Game of Thrones fake data
|
45
|
+
email:
|
46
|
+
- sf.sea.lions.2015@devbootcamp.com
|
47
|
+
executables: []
|
48
|
+
extensions: []
|
49
|
+
extra_rdoc_files: []
|
50
|
+
files:
|
51
|
+
- .gitignore
|
52
|
+
- .travis.yml
|
53
|
+
- Gemfile
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
56
|
+
- bin/console
|
57
|
+
- bin/setup
|
58
|
+
- gotfaker-0.1.0.gem
|
59
|
+
- gotfaker.gemspec
|
60
|
+
- lib/gotfaker.rb
|
61
|
+
- lib/gotfaker/character.rb
|
62
|
+
- lib/gotfaker/geography.rb
|
63
|
+
- lib/gotfaker/house.rb
|
64
|
+
- lib/gotfaker/quote.rb
|
65
|
+
- lib/gotfaker/religion.rb
|
66
|
+
- lib/gotfaker/version.rb
|
67
|
+
homepage:
|
68
|
+
licenses: []
|
69
|
+
metadata:
|
70
|
+
allowed_push_host: 'TODO: Set to ''http://mygemserver.com'' to prevent pushes to
|
71
|
+
rubygems.org, or delete to allow pushes to any server.'
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options: []
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
requirements: []
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 2.0.14
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
91
|
+
summary: Easily generate fake Game of Thrones data
|
92
|
+
test_files: []
|