Skip to content

Commit

Permalink
Add Books::KingkillerChronicle
Browse files Browse the repository at this point in the history
Add Patrick Rothfuss's Kingkiller Chronicle books.
  • Loading branch information
k1bs committed Aug 15, 2019
1 parent 6d9ef88 commit dc2305d
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
- [Faker::Book](doc/books/book.md)
- [Faker::Books::CultureSeries](doc/books/culture_series.md)
- [Faker::Books::Dune](doc/books/dune.md)
- [Faker::Books::KingkillerChronicle](doc/books/kingkiller_chronicle.md)
- [Faker::Books::Lovecraft](doc/books/lovecraft.md)

### Creature
Expand Down
9 changes: 9 additions & 0 deletions doc/books/kingkiller_chronicle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Faker::Books::KingkillerChronicle

```ruby
Faker::Books::KingkillerChronicle.quote #=> "The boy grows upward, but the girl grows up."

Faker::Books::KingkillerChronicle.character #=> "Bast"

Faker::Books::KingkillerChronicle.city #=> "Imre"
```
21 changes: 21 additions & 0 deletions lib/faker/books/kingkiller_chronicle.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

module Faker
class Books
class KingkillerChronicle < Base
class << self
def character
fetch('kingkiller_chronicle.character')
end

def city
fetch('kingkiller_chronicle.city')
end

def quote
fetch('kingkiller_chronicle.quote')
end
end
end
end
end
39 changes: 39 additions & 0 deletions lib/locales/en/kingkiller_chronicle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
en:
faker:
kingkiller_chronicle:
character:
- Kvothe
- Bast
- Kilvin
- Auri
- Ambrose
- Felurian
- Denna
- Devi
- Elodin
- Fela
- Manet
- Simmon
- Tempi
- Willem
city:
- Abbott's Ford
- Levinshir
- Myr Tariniel
- Newarre
- Severen
- Hallowfell
- Imre
- Tarbean
- Trebon
- Tenuë
quote:
- "There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man."
- "It's like everyone tells a story about themselves inside their own head. Always. All the time. That story makes you what you are. We build ourselves out of that story."
- "Words are pale shadows of forgotten names. As names have power, words have power. Words can light fires in the minds of men. Words can wring tears from the hardest hearts."
- "Half of seeming clever is keeping your mouth shut at the right times."
- "We love what we love. Reason does not enter into it. In many ways, unwise love is the truest love. Anyone can love a thing because. That's as easy as putting a penny in your pocket. But to love something despite. To know the flaws and love them too. That is rare and pure and perfect."
- "Bones mend. Regret stays with you forever."
- "Books are a poor substitute for female companionship, but they are easier to find."
- "Only priests and fools are fearless and I've never been on the best of terms with God."
- "The boy grows upward, but the girl grows up."
21 changes: 21 additions & 0 deletions test/faker/books/test_kingkiller_chronicle.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerBooksKingkillerChronicle < Test::Unit::TestCase
def setup
@tester = Faker::Books::KingkillerChronicle
end

def test_character
assert @tester.character.match(/\w+/)
end

def test_city
assert @tester.city.match(/\w+/)
end

def test_quote
assert @tester.quote.match(/\w+/)
end
end

0 comments on commit dc2305d

Please sign in to comment.