-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfe998c
commit 8568945
Showing
5 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Faker::Cosmere | ||
|
||
```ruby | ||
Faker::Cosmere.aon #=> "Rao" | ||
|
||
Faker::Cosmere.shard_world #=> "Yolen" | ||
|
||
Faker::Cosmere.shard #=> "Ambition" | ||
|
||
Faker::Cosmere.surge #=> "Progression" | ||
|
||
Faker::Cosmere.knight_radiant #=> "Truthwatcher" | ||
|
||
Faker::Cosmere.metal #=> "Brass" | ||
|
||
Faker::Cosmere.allomancer #=> "Coinshot" | ||
|
||
Faker::Cosmere.feruchemist #=> "Archivist" | ||
|
||
Faker::Cosmere.herald #=> "Ishar" | ||
|
||
Faker::Cosmere.spren #=> "Flamespren" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
module Faker | ||
class Cosmere < Base | ||
flexible :cosmere | ||
class << self | ||
def aon | ||
sample(aons) | ||
end | ||
|
||
def shard_world | ||
sample(shard_worlds) | ||
end | ||
|
||
def shard | ||
sample(shards) | ||
end | ||
|
||
def surge | ||
sample(surges) | ||
end | ||
|
||
def knight_radiant | ||
sample(knights_radiant) | ||
end | ||
|
||
def metal | ||
sample(metals) | ||
end | ||
|
||
def allomancer | ||
sample(allomancers) | ||
end | ||
|
||
def feruchemist | ||
sample(feruchemists) | ||
end | ||
|
||
def herald | ||
sample(heralds) | ||
end | ||
|
||
def spren | ||
sample(sprens) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
en: | ||
faker: | ||
cosmere: | ||
aons: [ | ||
'Aon', 'Aan', 'Aeo', 'Aha', 'Ake', 'Ala', 'Aor', 'Are', 'Ashe', 'Ata', | ||
'Ate', 'Ati', 'Ato', 'Daa', 'Dao', 'Dii', 'Dio', 'Eda', 'Edo', 'Ehe', | ||
'Ela', 'Ena', 'Ene', 'Eno', 'Eon', 'Eshe', 'Eto', 'Iad', 'Ido', 'Ien', | ||
'Iir', 'Ire', 'Kaa', 'Kae', 'Kai', 'Kie', 'Kii', 'Mae', 'Mai', 'Mea', | ||
'Nae', 'Oed', 'Omi', 'Opa', 'Ope', 'Ore', 'Rao', 'Reo', 'Rii', 'Sao', | ||
'Sea', 'Seo', 'Shao', 'Sheo', 'Soi', 'Tae', 'Tia', 'Tii', 'Toa' | ||
] | ||
shard_worlds: [ | ||
'Ashyn', 'Braize', 'First of the Sun', 'Nalthis', 'Obrodai', 'Roshar', | ||
'Scadrial', 'Sel', 'Taldain', 'Threnody', 'Vax', 'Yolen' | ||
] | ||
shards: [ | ||
'Devotion', 'Dominion', 'Preservation', 'Ruin', 'Odium', 'Cultivation', | ||
'Honor', 'Endowment', 'Autonomy', 'Ambition', 'Harmony' | ||
] | ||
surges: [ | ||
'Abrasion', 'Adhesion', 'Cohesion', 'Division', 'Gravitation', | ||
'Illumination', 'Progression', 'Transformation', 'Transportation', 'Tension' | ||
] | ||
knights_radiant: [ | ||
'Bondsmith', 'Dustbringer', 'Edgedancer', 'Elsecaller', 'Lightweaver', | ||
'Skybreaker', 'Stoneward', 'Truthwatcher', 'Willshaper', 'Windrunner' | ||
] | ||
metals: [ | ||
'Steel', 'Iron', 'Pewter', 'Tin', 'Zinc', 'Brass', 'Copper', Bronze', | ||
'Duralumin', 'Aluminum', 'Nicrosil', 'Chromium', 'Gold', 'Electrum', | ||
'Cadmium', 'Bendalloy', 'Atium', 'Lerasium', 'Ettmetal', 'Malatium' | ||
] | ||
allomancers: [ | ||
'Mistborn', 'Coinshot', 'Lurcher', 'Pewterarm', 'Tineye', 'Rioter', | ||
'Soother', 'Smoker', 'Seeker', 'Duralumin Gnat', 'Aluminum Gnat', | ||
'Nicroburst', 'Leecher', 'Augur', 'Oracle', 'Pulser', 'Slider', 'Seer' | ||
] | ||
feruchemists: [ | ||
'Feruchemist', 'Skimmer', 'Steelrunner', 'Windwhisper', 'Brute', 'Sparker', | ||
'Firesoul', 'Archivist', 'Sentry', 'Spinner', 'Soulbearer', 'Trueself', | ||
'Connector', 'Gasper', 'Subsumer', 'Bloodmaker', 'Pinnacle' | ||
] | ||
heralds: [ | ||
'Jezrien', 'Nale', 'Chanarach', 'Vedel', 'Pailiah', 'Shalash', 'Battar', | ||
'Kalak', 'Talanel', 'Ishar' | ||
] | ||
sprens: [ | ||
'Alespren', 'Angerspren', 'Anticipationspren', 'Awespren', 'Bindspren', | ||
'Captivityspren', 'Coldspren', 'Concentrationspren', 'Creationspren', | ||
'Cryptic', 'Cultivationspren', 'Deathspren', 'Decayspren', 'Exhaustionspren', | ||
'Fearspren', 'Flamespren', 'Gloomspren', 'Gloryspren', 'Gravityspren', | ||
'Groundspren', 'Heatspren', 'Highspren', 'Honorspren', 'Hungerspren', | ||
'Inkspren', 'Joyspren', 'Keenspren', 'Laughterspren', 'Liespren', | ||
'Lifespren', 'Logicspren', 'Luckspren', 'Mistspren', 'Musicspren', | ||
'Painspren', 'Passionspren', 'Rainspren', 'Riverspren', 'Rotspren', | ||
'Shamespren', 'Shockspren', 'Stormspren' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') | ||
|
||
class TestFakerCosmere < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Cosmere | ||
end | ||
|
||
def test_aon | ||
assert @tester.aon.match(/\w+\.?/) | ||
end | ||
|
||
def test_shard_world | ||
assert @tester.shard_world.match(/\w+\.?/) | ||
end | ||
|
||
def test_shard | ||
assert @tester.shard.match(/\w+\.?/) | ||
end | ||
|
||
def test_surge | ||
assert @tester.surge.match(/\w+\.?/) | ||
end | ||
|
||
def test_knight_radiant | ||
assert @tester.knight_radiant.match(/\w+\.?/) | ||
end | ||
|
||
def test_metal | ||
assert @tester.metal.match(/\w+\.?/) | ||
end | ||
|
||
def test_allomancer | ||
assert @tester.allomancer.match(/\w+\.?/) | ||
end | ||
|
||
def test_herald | ||
assert @tester.herald.match(/\w+\.?/) | ||
end | ||
|
||
def test_spren | ||
assert @tester.spren.match(/\w+\.?/) | ||
end | ||
end |