From 3ca91f76312ac04bb87d8c9fb2b54dff73f82338 Mon Sep 17 00:00:00 2001 From: Gauth-ier Date: Wed, 25 Apr 2018 14:25:51 +0200 Subject: [PATCH 1/3] - Adding more space company and space launch vehicule --- doc/space.md | 3 +++ lib/faker/space.rb | 4 ++++ lib/locales/en/space.yml | 3 ++- test/test_faker_space.rb | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/space.md b/doc/space.md index e9a13e268a..d980392b2b 100644 --- a/doc/space.md +++ b/doc/space.md @@ -39,4 +39,7 @@ Faker::Space.distance_measurement #=> "15 parsecs" # Random meteorite name Faker::Space.meteorite #=> "Ensisheim" + +# Random launch vehicule name +Faker::Space.launch_vehicule #=> "Saturn IV" ``` diff --git a/lib/faker/space.rb b/lib/faker/space.rb index 8b8a0e7bf6..a143f33ea3 100644 --- a/lib/faker/space.rb +++ b/lib/faker/space.rb @@ -53,6 +53,10 @@ def distance_measurement def meteorite fetch('space.meteorite') end + + def launch_vehicule + fetch('space.launch_vehicule') + end end end end diff --git a/lib/locales/en/space.yml b/lib/locales/en/space.yml index 5503139aa1..ee6fc85793 100644 --- a/lib/locales/en/space.yml +++ b/lib/locales/en/space.yml @@ -11,6 +11,7 @@ en: agency: ['National Aeronautics and Space Administration', 'European Space Agency', 'German Aerospace Center', 'Indian Space Research Organization', 'China National Space Administration', 'UK Space Agency', 'Brazilian Space Agency', 'Mexican Space Agency', 'Israeli Space Agency', 'Italian Space Agency', 'Japan Aerospace Exploration Agency', 'National Space Agency of Ukraine', 'Russian Federal Space Agency', 'Swedish National Space Board'] agency_abv: ['NASA', 'AEM', 'AEB', 'UKSA', 'CSA', 'CNSA', 'ESA', 'DLR', 'ISRO', 'JAXA', 'ISA', 'CNES', 'NSAU', 'ROSCOSMOS', 'SNSB'] nasa_space_craft: ['Orion', 'Mercury', 'Gemini', 'Apollo', 'Enterprise', 'Columbia', 'Challenger', 'Discovery', 'Atlantis', 'Endeavour'] - company: ['SpaceX', 'Blue Origin', 'Virgin Galactic', 'SpaceDev', 'Bigelow Aerospace', 'Orbital Sciences', 'JPL', 'NASA Jet Propulsion Laboratory'] + company: ['Rocket Lab', SpaceX', 'Blue Origin', 'Virgin Galactic', 'SpaceDev', 'Bigelow Aerospace', 'Orbital Sciences', 'JPL', 'NASA Jet Propulsion Laboratory'] distance_measurement: ['light years', 'AU', 'parsecs', 'kiloparsecs', 'megaparsecs'] meteorite: ['Aarhus', 'Abee', 'Adelie Land', 'Adhi Kot', 'Adzhi-Bogdo', 'Santa Rosa de Viterbo', 'Agen', 'Akbarpur', 'Albareto', 'Allan Hills 84001', 'Allan Hills A81005', 'Allegan', 'Allende', 'Ambapur Nagla', 'Andura', 'Angers', 'Angra dos Reis', 'Ankober', 'Anlong', 'Annaheim', 'Appley Bridge', 'Arbol Solo', 'Archie', 'Arroyo Aguiar', 'Assisi', 'Atoka', 'Avanhandava', 'Bacubirito', 'Baszkówka','Beardsley', 'Bellsbank', 'Bench Crater', 'Benton', 'Białystok', 'Blithfield','Block Island', 'Bovedy', 'Brachina', 'Brahin', 'Brenham', 'Buzzard Coulee','Campo del Cielo', 'Canyon Diablo', 'Cape York', 'Carancas', 'Chambord','Chassigny', 'Chelyabinsk', 'Chergach', 'Chinga', 'Chinguetti', 'Claxton','Coahuila', 'Cranbourne', 'D''Orbigny', 'Dronino', 'Eagle Station', 'Elbogen','Ensisheim', 'Esquel', 'Fukang', 'Gancedo', 'Gao–Guenie', 'Gay Gulch', 'Gebel Kamil', 'Gibeon', 'Goose Lake', 'Grant', 'Hadley Rille', 'Heat Shield Rock','Hoba', 'Homestead', 'Hraschina', 'Huckitta', 'Imilac', 'Itqiy', 'Kaidun','Kainsaz', 'Karoonda', 'Kesen', 'Krasnojarsk', 'L''Aigle', 'Lac Dodon', 'Lake Murray', 'Loreto', 'Los Angeles', 'Łowicz', 'Mackinac Island', 'Mbozi','Middlesbrough', 'Millbillillie', 'Mineo', 'Monte Milone', 'Moss','Mundrabilla', 'Muonionalusta', 'Murchison', 'Nakhla', 'Nantan','Neuschwanstein', 'Northwest Africa 7034', 'Northwest Africa 7325', 'Norton County', 'Novato', 'Northwest Africa 3009', 'Oileán Ruaidh (Martian)', 'Old Woman', 'Oldenburg', 'Omolon', 'Orgueil', 'Ornans', 'Osseo', 'Österplana 065','Ourique', 'Pallasovka', 'Paragould', 'Park Forest', 'Pavlovka', 'Peace River','Peekskill', 'Penouille', 'Polonnaruwa', 'High Possil', 'Příbram', 'Pultusk','Qidong', 'Richardton', 'Santa Vitoria do Palmar', 'Sayh al Uhaymir 169','Seymchan', 'Shelter Island', 'Shergotty', 'Sikhote-Alin', 'Sołtmany','Springwater', 'St-Robert', 'Stannern', 'Sulagiri', 'Sutter''s Mill','Sylacauga', 'Tagish Lake', 'Tamdakht', 'Tenham', 'Texas Fireball', 'Tissint','Tlacotepec', 'Toluca', 'Treysa', 'Twannberg', 'Veliky Ustyug', 'Vermillion','Weston', 'Willamette', 'Winona', 'Wold Cottage', 'Yamato 000593','Yamato 691','Yamato 791197', 'Yardymly', 'Zagami', 'Zaisho', 'Zaklodzie'] + launch_vehicule: ['Antares', 'Ariane 5', 'Atlas', 'Diamant', 'Dnepr', 'Delta', 'Electron', 'Energia', 'Europa', 'Falcon 9', 'Falcon Heavy', 'GSLV', 'Juno', 'Long March', 'Mercury-Redstone', 'Minotaur', 'Pegasus', 'Proton', 'PSLV', 'Safir', 'Shavit', 'Saturn IV', 'Semiorka', 'Soyouz', 'Titan', 'Vega', 'Veronique', 'Zenit'] diff --git a/test/test_faker_space.rb b/test/test_faker_space.rb index d03070ec99..df785c9e7e 100644 --- a/test/test_faker_space.rb +++ b/test/test_faker_space.rb @@ -56,4 +56,8 @@ def test_distance_measurement def test_meteorite assert @tester.meteorite.match(/(\w+\.? ?){2,3}/) end + + def test_launch_vehicule + assert @tester.launch_vehicule.match(/(\w+\.? ?){2,3}/) + end end From 5384eefc9125edaeb7a85732e6740f8fc48e3373 Mon Sep 17 00:00:00 2001 From: Gauth-ier Date: Wed, 25 Apr 2018 14:25:51 +0200 Subject: [PATCH 2/3] - Adding more space company and space launch vehicule --- doc/space.md | 3 +++ lib/faker/space.rb | 4 ++++ lib/locales/en/space.yml | 3 ++- test/test_faker_space.rb | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/space.md b/doc/space.md index e9a13e268a..d980392b2b 100644 --- a/doc/space.md +++ b/doc/space.md @@ -39,4 +39,7 @@ Faker::Space.distance_measurement #=> "15 parsecs" # Random meteorite name Faker::Space.meteorite #=> "Ensisheim" + +# Random launch vehicule name +Faker::Space.launch_vehicule #=> "Saturn IV" ``` diff --git a/lib/faker/space.rb b/lib/faker/space.rb index 8b8a0e7bf6..a143f33ea3 100644 --- a/lib/faker/space.rb +++ b/lib/faker/space.rb @@ -53,6 +53,10 @@ def distance_measurement def meteorite fetch('space.meteorite') end + + def launch_vehicule + fetch('space.launch_vehicule') + end end end end diff --git a/lib/locales/en/space.yml b/lib/locales/en/space.yml index 5503139aa1..ee6fc85793 100644 --- a/lib/locales/en/space.yml +++ b/lib/locales/en/space.yml @@ -11,6 +11,7 @@ en: agency: ['National Aeronautics and Space Administration', 'European Space Agency', 'German Aerospace Center', 'Indian Space Research Organization', 'China National Space Administration', 'UK Space Agency', 'Brazilian Space Agency', 'Mexican Space Agency', 'Israeli Space Agency', 'Italian Space Agency', 'Japan Aerospace Exploration Agency', 'National Space Agency of Ukraine', 'Russian Federal Space Agency', 'Swedish National Space Board'] agency_abv: ['NASA', 'AEM', 'AEB', 'UKSA', 'CSA', 'CNSA', 'ESA', 'DLR', 'ISRO', 'JAXA', 'ISA', 'CNES', 'NSAU', 'ROSCOSMOS', 'SNSB'] nasa_space_craft: ['Orion', 'Mercury', 'Gemini', 'Apollo', 'Enterprise', 'Columbia', 'Challenger', 'Discovery', 'Atlantis', 'Endeavour'] - company: ['SpaceX', 'Blue Origin', 'Virgin Galactic', 'SpaceDev', 'Bigelow Aerospace', 'Orbital Sciences', 'JPL', 'NASA Jet Propulsion Laboratory'] + company: ['Rocket Lab', SpaceX', 'Blue Origin', 'Virgin Galactic', 'SpaceDev', 'Bigelow Aerospace', 'Orbital Sciences', 'JPL', 'NASA Jet Propulsion Laboratory'] distance_measurement: ['light years', 'AU', 'parsecs', 'kiloparsecs', 'megaparsecs'] meteorite: ['Aarhus', 'Abee', 'Adelie Land', 'Adhi Kot', 'Adzhi-Bogdo', 'Santa Rosa de Viterbo', 'Agen', 'Akbarpur', 'Albareto', 'Allan Hills 84001', 'Allan Hills A81005', 'Allegan', 'Allende', 'Ambapur Nagla', 'Andura', 'Angers', 'Angra dos Reis', 'Ankober', 'Anlong', 'Annaheim', 'Appley Bridge', 'Arbol Solo', 'Archie', 'Arroyo Aguiar', 'Assisi', 'Atoka', 'Avanhandava', 'Bacubirito', 'Baszkówka','Beardsley', 'Bellsbank', 'Bench Crater', 'Benton', 'Białystok', 'Blithfield','Block Island', 'Bovedy', 'Brachina', 'Brahin', 'Brenham', 'Buzzard Coulee','Campo del Cielo', 'Canyon Diablo', 'Cape York', 'Carancas', 'Chambord','Chassigny', 'Chelyabinsk', 'Chergach', 'Chinga', 'Chinguetti', 'Claxton','Coahuila', 'Cranbourne', 'D''Orbigny', 'Dronino', 'Eagle Station', 'Elbogen','Ensisheim', 'Esquel', 'Fukang', 'Gancedo', 'Gao–Guenie', 'Gay Gulch', 'Gebel Kamil', 'Gibeon', 'Goose Lake', 'Grant', 'Hadley Rille', 'Heat Shield Rock','Hoba', 'Homestead', 'Hraschina', 'Huckitta', 'Imilac', 'Itqiy', 'Kaidun','Kainsaz', 'Karoonda', 'Kesen', 'Krasnojarsk', 'L''Aigle', 'Lac Dodon', 'Lake Murray', 'Loreto', 'Los Angeles', 'Łowicz', 'Mackinac Island', 'Mbozi','Middlesbrough', 'Millbillillie', 'Mineo', 'Monte Milone', 'Moss','Mundrabilla', 'Muonionalusta', 'Murchison', 'Nakhla', 'Nantan','Neuschwanstein', 'Northwest Africa 7034', 'Northwest Africa 7325', 'Norton County', 'Novato', 'Northwest Africa 3009', 'Oileán Ruaidh (Martian)', 'Old Woman', 'Oldenburg', 'Omolon', 'Orgueil', 'Ornans', 'Osseo', 'Österplana 065','Ourique', 'Pallasovka', 'Paragould', 'Park Forest', 'Pavlovka', 'Peace River','Peekskill', 'Penouille', 'Polonnaruwa', 'High Possil', 'Příbram', 'Pultusk','Qidong', 'Richardton', 'Santa Vitoria do Palmar', 'Sayh al Uhaymir 169','Seymchan', 'Shelter Island', 'Shergotty', 'Sikhote-Alin', 'Sołtmany','Springwater', 'St-Robert', 'Stannern', 'Sulagiri', 'Sutter''s Mill','Sylacauga', 'Tagish Lake', 'Tamdakht', 'Tenham', 'Texas Fireball', 'Tissint','Tlacotepec', 'Toluca', 'Treysa', 'Twannberg', 'Veliky Ustyug', 'Vermillion','Weston', 'Willamette', 'Winona', 'Wold Cottage', 'Yamato 000593','Yamato 691','Yamato 791197', 'Yardymly', 'Zagami', 'Zaisho', 'Zaklodzie'] + launch_vehicule: ['Antares', 'Ariane 5', 'Atlas', 'Diamant', 'Dnepr', 'Delta', 'Electron', 'Energia', 'Europa', 'Falcon 9', 'Falcon Heavy', 'GSLV', 'Juno', 'Long March', 'Mercury-Redstone', 'Minotaur', 'Pegasus', 'Proton', 'PSLV', 'Safir', 'Shavit', 'Saturn IV', 'Semiorka', 'Soyouz', 'Titan', 'Vega', 'Veronique', 'Zenit'] diff --git a/test/test_faker_space.rb b/test/test_faker_space.rb index d03070ec99..df785c9e7e 100644 --- a/test/test_faker_space.rb +++ b/test/test_faker_space.rb @@ -56,4 +56,8 @@ def test_distance_measurement def test_meteorite assert @tester.meteorite.match(/(\w+\.? ?){2,3}/) end + + def test_launch_vehicule + assert @tester.launch_vehicule.match(/(\w+\.? ?){2,3}/) + end end From 71b9f24906ecff559eb556bbe97c5e0066899165 Mon Sep 17 00:00:00 2001 From: Gauth-ier Date: Thu, 17 May 2018 14:53:29 +0200 Subject: [PATCH 3/3] - add info in the changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa344ae886..d17dca785d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Additions** +- [PR #1192](https://github.com/stympy/faker/pull/1192) Space: Added space launch vehicule [@gauth-ier](https://github.com/Gauth-ier) - [PR #1198](https://github.com/stympy/faker/pull/1135) Rename methods on Faker::Types to avoid shadowing ruby standard methods [@MarcPer](https://github.com/MarcPer) - [PR #1135](https://github.com/stympy/faker/pull/1135) Added documentation for dumb and dumber [@cnharris10](https://github.com/cnharris10) - [PR #1142](https://github.com/stympy/faker/pull/1142) Missing i18n jobs fix [@PuZZleDucK](https://github.com/PuZZleDucK)