-
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.
Add Faker::Mountain
- Loading branch information
Showing
3 changed files
with
208 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class Mountain < Base | ||
class << self | ||
## | ||
# Produces a name of a mountain | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Mountain.name #=> "Mount Everest" | ||
# | ||
# @faker.version next | ||
def name | ||
fetch('mountain.name') | ||
end | ||
|
||
## | ||
# Produces a name of a range | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Mountain.range #=> "Dhaulagiri Himalaya" | ||
# | ||
# @faker.version next | ||
def range | ||
fetch('mountain.range') | ||
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,158 @@ | ||
en: | ||
faker: | ||
mountain: | ||
name: | ||
- Abi Gamin | ||
- Annapurna Dakshin | ||
- Annapurna I | ||
- Annapurna II | ||
- Annapurna III | ||
- Apsarasas Kangri | ||
- Baintha Brakk | ||
- Baltistan Peak | ||
- Baltoro Kangri | ||
- Batura Sar | ||
- Broad Peak | ||
- Chamlang | ||
- Changtse | ||
- Cho Oyu | ||
- Chogolisa | ||
- Chomo Lonzo | ||
- Chongtar | ||
- Churen Himal | ||
- Dhaulagiri I | ||
- Dhaulagiri II | ||
- Dhaulagiri IV | ||
- Dhaulagiri V | ||
- Dhaulagiri VI | ||
- Diran | ||
- Distaghil Sar | ||
- Gangapurna | ||
- Gangkhar Puensum | ||
- Gasherbrum I | ||
- Gasherbrum II | ||
- Gasherbrum III | ||
- Gasherbrum IV | ||
- Ghent Kangri | ||
- Gimmigela | ||
- Gongga Shan | ||
- Gurla Mandhata | ||
- Gyachung Kang | ||
- Gyala Peri | ||
- Haramosh Peak | ||
- Himalchuli | ||
- Ismoil Somoni Peak | ||
- Istor-o-Nal | ||
- Jengish Chokusu | ||
- Pk Pobeda | ||
- Jomolhari | ||
- Jongsong Peak | ||
- K12 | ||
- K2 | ||
- Kabru N | ||
- Kamet | ||
- Kangchenjunga | ||
- Kangpenqing | ||
- Kangphu Kang | ||
- Kanjut Sar | ||
- Karjiang | ||
- Khartaphu | ||
- Khunyang Chhish | ||
- Kirat Chuli | ||
- Kongur Tagh | ||
- Kongur Tiube | ||
- Kula Kangri | ||
- Kumbhakarna | ||
- Labuche Kang | ||
- Labuche Kang III | ||
- Langtang Lirung | ||
- Langtang Ri | ||
- Lhotse | ||
- Lupghar Sar | ||
- Makalu | ||
- Malangutti Sar | ||
- Malubiting | ||
- Mamostong Kangri | ||
- Mana Peak | ||
- Manaslu | ||
- Masherbrum | ||
- Molamenqing | ||
- Momhil Sar | ||
- Mount Everest | ||
- Mukut Parbat | ||
- Muztagh Ata | ||
- Muztagh Tower | ||
- Namcha Barwa | ||
- Nanda Devi | ||
- Nanga Parbat | ||
- Nangpai Gosum | ||
- Ngadi Chuli | ||
- Noijin Kangsang | ||
- Noshaq | ||
- Nuptse | ||
- Passu Sar | ||
- Porong Ri | ||
- Pumari Chhish | ||
- Putha Hiunchuli | ||
- Rakaposhi | ||
- Rimo I | ||
- Rimo III | ||
- Saltoro Kangri | ||
- Saraghrar | ||
- Saser Kangri I | ||
- Saser Kangri II E | ||
- Saser Kangri III | ||
- Sherpi Kangri | ||
- Shishapangma | ||
- Shispare | ||
- Sia Kangri | ||
- Siguang Ri | ||
- Singhi Kangri | ||
- Skil Brum | ||
- Skyang Kangri | ||
- Sunanda Devi | ||
- Teram Kangri I | ||
- Teram Kangri III | ||
- The Crown | ||
- Tirich Mir | ||
- Tongshanjiabu | ||
- Trivor | ||
- Ultar | ||
- Ganesh I | ||
- Yukshin Gardan Sar | ||
- Yutmaru Sar | ||
range: | ||
- Annapurna Himalaya | ||
- Assam Himalaya | ||
- Baiku Himalaya | ||
- Baltoro Karakoram | ||
- Batura Karakoram | ||
- Daxue Shan | ||
- Dhaulagiri Himalaya | ||
- Ganesh Himalaya | ||
- Hindu Kush | ||
- Hispar Karakoram | ||
- Jomolhari Himalaya | ||
- Jugal Himalaya | ||
- Kangchenjunga Himalaya | ||
- Kongur Shan | ||
- Kula Kangri Himalaya | ||
- Labuche Himalaya | ||
- Langtang Himalaya | ||
- Lunana Himalaya | ||
- Mahalangur Himalaya | ||
- Manaslu Himalaya | ||
- Masherbrum Karakoram | ||
- Muztagata | ||
- Nagarze Himalaya | ||
- Nalakankar Himalaya | ||
- Nanga Parbat Himalaya | ||
- Pamir | ||
- Panmah Karakoram | ||
- Rakaposhi-Haramosh Karakoram | ||
- Rimo Karakoram | ||
- Saltoro Karakoram | ||
- Saser Karakoram | ||
- Siachen Karakoram | ||
- Tian Shan | ||
- Yengisogat Karakoram |
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,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerMountain < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Mountain | ||
end | ||
|
||
def test_name | ||
assert @tester.name.match(/\w+/) | ||
end | ||
|
||
def test_range | ||
assert @tester.range.match(/\w+/) | ||
end | ||
end |