New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Faker::Music::Opera #1619
Merged
Merged
Add Faker::Music::Opera #1619
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
239c59f
added tests and corrected yaml
Adsidera dcbb3a0
corrected test
Adsidera 6be89ad
fixed missing magic comment and missing spaces
Adsidera e89812a
added dashed array in yml and doc
Adsidera b904e65
moved opera.md to doc/music/opera.md and added link to it in urelease…
Adsidera d8631f9
updated master and fixed conflicts
Adsidera 51918ce
moved test_faker_opera to faker/music directory
Adsidera 0af72c8
corrected path to test_helper in test_faker_opera.rb
Adsidera 6515d09
moved opera.md to doc unreleased
Adsidera b226262
restarted pr
Adsidera File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,8 @@ | ||
# Faker::Music::Opera | ||
|
||
```ruby | ||
Faker::Music::Opera.verdi #=> "Il Trovatore" | ||
Faker::Music::Opera.rossini #=> "Il Barbiere di Siviglia" | ||
Faker::Music::Opera.donizetti #=> "Lucia di Lammermoor" | ||
Faker::Music::Opera.bellini #=> "Norma" | ||
``` |
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,26 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
# A generator of titles of operas by Verdi, Rossini, Donizetti and Bellini | ||
class Music | ||
class Opera < Base | ||
class << self | ||
def verdi | ||
fetch('opera.italian.by_giuseppe_verdi') | ||
end | ||
|
||
def rossini | ||
fetch('opera.italian.by_gioacchino_rossini') | ||
end | ||
|
||
def donizetti | ||
fetch('opera.italian.by_gaetano_donizetti') | ||
end | ||
|
||
def bellini | ||
fetch('opera.italian.by_vincenzo_bellini') | ||
end | ||
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,172 @@ | ||
en: | ||
faker: | ||
opera: | ||
italian: | ||
by_giuseppe_verdi: | ||
- Oberto Conte di San Bonifacio | ||
- Un Giorno di Regno | ||
- Nabucco | ||
- Lombardi alla Prima Crociata | ||
- Ernani | ||
- I due Foscari | ||
- Giovanna d'Arco | ||
- Alzira | ||
- Attila | ||
- Macbeth | ||
- I Masnadieri | ||
- Jérusalem | ||
- Il Corsaro | ||
- La Battaglia di Legnano | ||
- Luisa Miller | ||
- Stiffelio | ||
- Rigoletto | ||
- Il Trovatore | ||
- Simon Boccanegra | ||
- Aroldo | ||
- Un Ballo in Maschera | ||
- La Forza del Destino | ||
- Don Carlos | ||
- Aida | ||
- Otello | ||
- Falstaff | ||
- I Vespri Siciliani | ||
- La Traviat | ||
by_gioacchino_rossini: | ||
- Demetrio e Polibio | ||
- La cambiale di matrimonio | ||
- L'equivoco stravagante | ||
- L'inganno felice | ||
- Ciro in Babilonia ossia La caduta di Baldassare | ||
- La scala di seta | ||
- La pietra del paragone | ||
- L'occasione fa il ladro ossia Il cambio della valigia | ||
- Il signor Bruschino ossia Il figlio per azzardo | ||
- Tancredi | ||
- L'italiana in Algeri | ||
- Aureliano in Palmira | ||
- Il turco in Italia | ||
- Sigismondo | ||
- Elisabetta regina d'Inghilterra | ||
- Torvaldo e Dorliska | ||
- Il barbiere di Siviglia ossia L'inutile precauzione | ||
- La gazzetta ossia Il matrimonio per concorso | ||
- Otello ossia Il Moro di Venezia | ||
- La Cenerentola ossia La bontà in trionfo | ||
- La gazza ladra | ||
- Armida | ||
- Adelaide di Borgogna ossia Ottone re d'Italia | ||
- Mosè in Egitto | ||
- Adina ossia Il califfo di Bagdad | ||
- Ricciardo e Zoraide | ||
- Ermione | ||
- Eduardo e Cristina | ||
- La donna del lago | ||
- Bianca e Falliero ossia Il consiglio dei tre | ||
- Maometto II | ||
- Matilde di Shabran | ||
- Zelmira | ||
- Semiramide | ||
- Ugo re d'Italia | ||
- Il viaggio a Reims ossia L'albergo del Giglio d'Oro | ||
- Le siège de Corinthe | ||
- Moïse et Pharaon ou Le passage de la mer rouge | ||
- Le comte Ory | ||
- Guillaume Tell | ||
by_gaetano_donizetti: | ||
- Olimpiade | ||
- L'ira di Achille | ||
- Enrico di Borgogna | ||
- Una follia | ||
- I piccioli virtuosi ambulanti | ||
- Il falegname di Livonia o Pietro il grande czar delle Russie | ||
- Le nozze in villa | ||
- Zoraida di Granata | ||
- La zingara | ||
- La lettera anonima | ||
- Chiara e Serafina o Il pirata | ||
- Alfredo il grande | ||
- Il fortunato inganno | ||
- L'ajo nell'imbarazzo | ||
- Emilia di Liverpool or L'eremitaggio di Liverpool | ||
- Alahor in Granata | ||
- Don Gregorio | ||
- Elvida | ||
- Gabriella di Vergy | ||
- Olivo e Pasquale | ||
- Otto mesi in due ore ossia Gli esiliati in Siberia | ||
- Il borgomastro di Saardam | ||
- Le convenienze teatrali | ||
- L'esule di Roma ossia Il proscritto | ||
- L'eremitaggio di Liverpool | ||
- Alina regina di Golconda | ||
- Gianni di Calais | ||
- Il paria | ||
- Il giovedì grasso o Il nuovo Pourceaugnac | ||
- Elisabetta al castello di Kenilworth | ||
- Alina regina di Golconda[rev] | ||
- I pazzi per progetto | ||
- Il diluvio universale | ||
- Imelda de' Lambertazzi | ||
- Anna Bolena | ||
- Gianni di Parigi | ||
- Le convenienze ed inconvenienze teatrali | ||
- Francesca di Foix | ||
- La romanziera e l'uomo nero | ||
- Fausta | ||
- Ugo conte di Parigi | ||
- L'elisir d'amore | ||
- Sancia di Castiglia | ||
- Il furioso all'isola di San Domingo | ||
- Otto mesi in due ore | ||
- Parisina | ||
- Torquato Tasso | ||
- Lucrezia Borgia | ||
- Il diluvio universale | ||
- Rosmonda d'Inghilterra | ||
- Maria Stuarda | ||
- Buondelmonte | ||
- Gemma di Vergy | ||
- Marino Faliero | ||
- Lucia di Lammermoor | ||
- Belisario | ||
- Il campanello di notte | ||
- Betly o La capanna svizzera | ||
- L'assedio di Calais | ||
- Pia de' Tolomei | ||
- Pia de' Tolomei | ||
- Betly | ||
- Roberto Devereux | ||
- Maria de Rudenz | ||
- Gabriella di Vergy | ||
- Poliuto | ||
- Pia de' Tolomei | ||
- Lucie de Lammermoor | ||
- Le duc d'Albe | ||
- L'ange de Nisida | ||
- Lucrezia Borgia | ||
- Les Martyrs | ||
- La fille du régiment | ||
- Lucrezia Borgia | ||
- La favorite | ||
- Adelia | ||
- Rita | ||
- Maria Padilla | ||
- Linda di Chamounix | ||
- Caterina Cornaro | ||
- Don Pasquale | ||
- Maria di Rohan | ||
- Dom Sébastien roi de Portugal | ||
- Dom Sebastian von Portugal | ||
- Il duca d'Alba | ||
by_vincenzo_bellini: | ||
- Adelson e Salvini | ||
- Bianca e Gernando | ||
- Il pirata | ||
- Bianca e Fernando | ||
- La straniera | ||
- Zaira | ||
- I Capuleti e i Montecchi | ||
- La sonnambula | ||
- Norma | ||
- Beatrice di Tenda | ||
- I puritani |
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,25 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerOpera < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Music::Opera | ||
end | ||
|
||
def verdi | ||
assert @tester.verdi.match(/\w+/i) | ||
end | ||
|
||
def rossini | ||
assert @tester.rossini.match(/\w+/i) | ||
end | ||
|
||
def donizetti | ||
assert @tester.donizetti.match(/\w+/i) | ||
end | ||
|
||
def bellini | ||
assert @tester.bellini.match(/\w+/i) | ||
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file should be inside the
doc/unreleased
folderThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we add it to the
doc
folder directly, people will think it's in the current version and it's not yetThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vbrazo ok! Btw, can all these informations and guidelines be added to the Contributing page as well? They are yet missing from that page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed :) What do you say @vbrazo and @stympy