diff --git a/doc/music/opera.md b/doc/music/opera.md index b3b9aae5f9..dbca8614fd 100644 --- a/doc/music/opera.md +++ b/doc/music/opera.md @@ -8,4 +8,40 @@ Faker::Music::Opera.rossini #=> "Il Barbiere di Siviglia" Faker::Music::Opera.donizetti #=> "Lucia di Lammermoor" Faker::Music::Opera.bellini #=> "Norma" -``` + +Faker::Music::Opera.mozart #=> "Die Zauberfloete" + +Faker::Music::Opera.mozart_italian #=> "Cosi fan tutte" + +Faker::Music::Opera.mozart_german #=> "Die Zauberfloete" + +Faker::Music::Opera.gluck #=> "Orfeo ed Euridice" + +Faker::Music::Opera.gluck_italian #=> "Orfeo ed Euridice" + +Faker::Music::Opera.gluck_french #=> "Orphee et Euridice" + +Faker::Music::Opera.beethoven #=> "Fidelio" + +Faker::Music::Opera.weber #=> "Der Freischuetz" + +Faker::Music::Opera.strauss #=> "Elektra" + +Faker::Music::Opera.wagner #=> "Tristan und Isolde" + +Faker::Music::Opera.schumann #=> "Genoveva" + +Faker::Music::Opera.schubert #=> "Alfonso und Estrella" + +Faker::Music::Opera.berg #=> "Wozzeck" + +Faker::Music::Opera.ravel #=> "L'enfant et les sortileges" + +Faker::Music::Opera.berlioz #=> "Les Troyens" + +Faker::Music::Opera.bizet #=> "Carmen" + +Faker::Music::Opera.gounod #=> "Faust" + +Faker::Music::Opera.saint_saens #=> "Samson and Delilah" +``` \ No newline at end of file diff --git a/lib/faker/music/opera.rb b/lib/faker/music/opera.rb index 6be7d6cbb9..4e09b24efb 100644 --- a/lib/faker/music/opera.rb +++ b/lib/faker/music/opera.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Faker - # A generator of titles of operas by Verdi, Rossini, Donizetti and Bellini + # A generator of titles of operas by various composers class Music class Opera < Base class << self @@ -56,6 +56,242 @@ def donizetti def bellini fetch('opera.italian.by_vincenzo_bellini') end + + ## + # Produces the title of an opera by Wolfgang Amadeus Mozart. + # + # @return [String] + # + # @example + # Faker::Music::Opera.mozart #=> "Die Zauberfloete" + # + # @faker.version next + def mozart + fetch('opera.italian.by_wolfgang_amadeus_mozart') + + fetch('opera.german.by_wolfgang_amadeus_mozart') + end + + ## + # Produces the title of an Italian opera by Wolfgang Amadeus Mozart. + # + # @return [String] + # + # @example + # Faker::Music::Opera.mozart_it #=> "Cosi fan tutte" + # + # @faker.version next + def mozart_italian + fetch('opera.italian.by_wolfgang_amadeus_mozart') + end + + ## + # Produces the title of a German opera by Wolfgang Amadeus Mozart. + # + # @return [String] + # + # @example + # Faker::Music::Opera.mozart_ger #=> "Die Zauberfloete" + # + # @faker.version next + def mozart_german + fetch('opera.german.by_wolfgang_amadeus_mozart') + end + + ## + # Produces the title of an opera by Christoph Willibald Gluck. + # + # @return [String] + # + # @example + # Faker::Music::Opera.gluck #=> "Orfeo ed Euridice" + # + # @faker.version next + def gluck + fetch('opera.italian.by_christoph_willibald_gluck') + + fetch('opera.french.by_christoph_willibald_gluck') + end + + ## + # Produces the title of an Italian opera by Christoph Willibald Gluck. + # + # @return [String] + # + # @example + # Faker::Music::Opera.gluck_it #=> "Orfeo ed Euridice" + # + # @faker.version next + def gluck_italian + fetch('opera.italian.by_christoph_willibald_gluck') + end + + ## + # Produces the title of a French opera by Christoph Willibald Gluck. + # + # @return [String] + # + # @example + # Faker::Music::Opera.gluck_fr #=> "Orphee et Euridice" + # + # @faker.version next + def gluck_french + fetch('opera.french.by_christoph_willibald_gluck') + end + + ## + # Produces the title of an opera by Ludwig van Beethoven. + # + # @return [String] + # + # @example + # Faker::Music::Opera.beethoven #=> "Fidelio" + # + # @faker.version next + def beethoven + fetch('opera.german.by_ludwig_van_beethoven') + end + + ## + # Produces the title of an opera by Carl Maria von Weber. + # + # @return [String] + # + # @example + # Faker::Music::Opera.weber #=> "Der Freischuetz" + # + # @faker.version next + def weber + fetch('opera.german.by_carl_maria_von_weber') + end + + ## + # Produces the title of an opera by Richard Strauss. + # + # @return [String] + # + # @example + # Faker::Music::Opera.strauss #=> "Elektra" + # + # @faker.version next + def strauss + fetch('opera.german.by_richard_strauss') + end + + ## + # Produces the title of an opera by Richard Wagner. + # + # @return [String] + # + # @example + # Faker::Music::Opera.wagner #=> "Tristan und Isolde" + # + # @faker.version next + def wagner + fetch('opera.german.by_richard_wagner') + end + + ## + # Produces the title of an opera by Robert Schumann. + # + # @return [String] + # + # @example + # Faker::Music::Opera.schumann #=> "Genoveva" + # + # @faker.version next + def schumann + fetch('opera.german.by_robert_schumann') + end + + ## + # Produces the title of an opera by Franz Schubert. + # + # @return [String] + # + # @example + # Faker::Music::Opera.schubert #=> "Alfonso und Estrella" + # + # @faker.version next + def schubert + fetch('opera.german.by_franz_schubert') + end + + ## + # Produces the title of an opera by Alban Berg. + # + # @return [String] + # + # @example + # Faker::Music::Opera.berg #=> "Wozzeck" + # + # @faker.version next + def berg + fetch('opera.german.by_alban_berg') + end + + ## + # Produces the title of an opera by Maurice Ravel. + # + # @return [String] + # + # @example + # Faker::Music::Opera.ravel #=> "L'enfant et les sortileges" + # + # @faker.version next + def ravel + fetch('opera.french.by_maurice_ravel') + end + + ## + # Produces the title of an opera by Hector Berlioz. + # + # @return [String] + # + # @example + # Faker::Music::Opera.berlioz #=> "Les Troyens" + # + # @faker.version next + def berlioz + fetch('opera.french.by_hector_berlioz') + end + + ## + # Produces the title of an opera by Georges Bizet. + # + # @return [String] + # + # @example + # Faker::Music::Opera.bizet #=> "Carmen" + # + # @faker.version next + def bizet + fetch('opera.french.by_georges_bizet') + end + + ## + # Produces the title of an opera by Charles Gounod. + # + # @return [String] + # + # @example + # Faker::Music::Opera.gounod #=> "Faust" + # + # @faker.version next + def gounod + fetch('opera.french.by_charles_gounod') + end + + ## + # Produces the title of an opera by Camille Saint-Saens. + # + # @return [String] + # + # @example + # Faker::Music::Opera.saint_saens #=> "Samson and Delilah" + # + # @faker.version next + def saint_saens + fetch('opera.french.by_camille_saint_saens') + end end end end diff --git a/lib/locales/en/opera.yml b/lib/locales/en/opera.yml index 1820e55f03..68dee1c163 100644 --- a/lib/locales/en/opera.yml +++ b/lib/locales/en/opera.yml @@ -170,3 +170,171 @@ en: - Norma - Beatrice di Tenda - I puritani + by_christoph_willibald_gluck: + - Artaserse + - Demetrio + - Demofoonte + - Il Tigrane + - La Sofonisba + - Ipermestra + - Poro + - Ippolito + - La caduta de' giganti + - Artamene + - Le nozze d'Ercole e d'Ebe + - La Semiramide riconosciuta + - La contesa de' numi + - Ezio + - Issipile + - La clemenza di Tito + - Le cinesi + - La danza + - L'innocenza giustificata + - Antigono + - Il re pastore + - Tetide + - Orfeo ed Euridice + - Il trionfo di Clelia + - Il Parnaso confuso + - Telemaco, ossia L'isola di Circe + - La corona + - Alceste + - Le feste d'Apollo + - Paride ed Elena + by_wolfgang_amadeus_mozart: + - Cosi fan tutte + - Le nozze di Figaro + - La finta Giardiniera + - Don Giovanni + - Idomeneo, re di Creta + - La finta semplice + - Mitridate, re di Ponto + - Ascanio in Alba + - Il sogno di Scipione + - Lucio Silla + - Il re pastore + - La ciemenza di Tito + german: + by_wolfgang_amadeus_mozart: + - Bastien und Bastienne + - Thamos, König in ­Ägypten + - Die Entführung aus dem Serail + - Der Schauspieldirektor + - Die Zauberflöte + by_ludwig_van_beethoven: + - Fidelio + by_carl_maria_von_weber: + - Silvana + - Abu Hassan + - Der Freischütz + - Euryanthe + by_richard_strauss: + - Guntram + - Feuersnot + - Salome + - Elektra + - Der Rosenkavalier + - Ariadne auf Naxos + - Die Frau ohne Schatten + - Die ägyptische Helena + - Arabella + - Die schweigsame Frau + - Friedenstag + - Daphne + - Die Liebe der Danae + - Capriccio + - Intermezzo + by_richard_wagner: + - Die Feen + - Das Liebesverbot + - Rienzi, der Letzte der Tribunen + - Der fliegende Holländer + - Tannhäuser + - Lohengrin + - Das Rheingold + - Die Walküre + - Siegfried + - Götterdämmerung + - Tristan und Isolde + - Die Meistersinger + - Parsifal + by_robert_schumann: + - Genoveva + by_franz_schubert: + - Sakuntala + - Alfonso und Estrella + - Fierrabras + - Der Graf von Gleichen + by_alban_berg: + - Wozzeck + - Lulu + french: + by_christoph_willibald_gluck: + - La fausse esclave + - L'île de Merlin, ou Le monde renversé + - La Cythère assiégée + - Le diable à quatre, ou La double métamorphose + - L'arbre enchanté, ou Le tuteur dupé + - L'ivrogne corrigé ou le mariage du diable + - Le cadi dupé + - La rencontre imprévue + - Iphigénie en Aulide + - Orphée et Euridice + - L'arbre enchanté + - Armide + - Iphigénie en Tauride + - Echo et Narcisse + by_maurice_ravel: + - L'heure espagnole + - L'enfant et les sortilèges + by_hector_berlioz: + - Benvenuto Cellini + - Les Troyens + - Béatrice et Bénédict + by_georges_bizet: + - La maison du docteur + - Le docteur Miracle + - Don Procopio + - La Prêtresse + - La Guzla de l'émir + - Ivan IV + - Les pêcheurs de perles + - La jolie fille de Perth + - Marlbrough s'en va-t-en guerre + - La Coupe du roi de Thulé + - Noé + - Clarisse Harlowe + - Grisélidis + - Djamileh + - Sol-si-ré-pif-pan + - L'Arlésienne + - Don Rodrigue + - Carmen + by_charles_gounod: + - Sapho + - La nonne sanglante + - Le médecin malgrélui + - Faust + - Philémon et Baucis + - La colombe + - La reine de Saba + - Mireille + - Roméo et Juliette + - Cinq-Mars + - Maître Pierre + - Polyeucte + - Le tribut de Zamora + by_camille_saint_saëns: + - L'ancêtre + - Ascanio + - Les barbares + - Déjanire + - Étienne Marcel + - Frédégonde + - Hélène + - Henry VIII + - Phryné + - La princesse jaune + - Proserpine + - Samson and Delilah + - Le timbre d'argent \ No newline at end of file diff --git a/test/faker/music/test_faker_opera.rb b/test/faker/music/test_faker_opera.rb index a05b0fcd3f..5ac6242540 100644 --- a/test/faker/music/test_faker_opera.rb +++ b/test/faker/music/test_faker_opera.rb @@ -22,4 +22,76 @@ def donizetti def bellini assert @tester.bellini.match(/\w+/i) end + + def mozart + assert @tester.mozart.match(/\w+/i) + end + + def mozart_italian + assert @tester.mozart_italian.match(/\w+/i) + end + + def mozart_german + assert @tester.mozart_german.match(/\w+/i) + end + + def gluck + assert @tester.gluck.match(/\w+/i) + end + + def gluck_italian + assert @tester.gluck_italian.match(/\w+/i) + end + + def gluck_french + assert @tester.gluck_french.match(/\w+/i) + end + + def beethoven + assert @tester.beethoven.match(/\w+/i) + end + + def weber + assert @tester.weber.match(/\w+/i) + end + + def strauss + assert @tester.strauss.match(/\w+/i) + end + + def wagner + assert @tester.wagner.match(/\w+/i) + end + + def schumann + assert @tester.schumann.match(/\w+/i) + end + + def schubert + assert @tester.schubert.match(/\w+/i) + end + + def berg + assert @tester.berg.match(/\w+/i) + end + + def ravel + assert @tester.ravel.match(/\w+/i) + end + + def berlioz + assert @tester.berlioz.match(/\w+/i) + end + + def bizet + assert @tester.bizet.match(/\w+/i) + end + + def gounod + assert @tester.gounod.match(/\w+/i) + end + + def saint_saens + assert @tester.saint_saens.match(/\w+/i) + end end