From 551642c1299fe94da40e598d44efd875ae9dc29c Mon Sep 17 00:00:00 2001 From: Vitor Oliveira Date: Fri, 12 Oct 2018 00:36:41 -0300 Subject: [PATCH] Faker::GratefulDead => Faker::Movies::GratefulDead (#1401) * Faker::GratefulDead => Faker::Movies::GratefulDead * Update CHANGELOG.md --- CHANGELOG.md | 1 + README.md | 2 +- doc/grateful_dead.md | 6 +++--- lib/faker/grateful_dead.rb | 16 +++++++++------- test/test_faker_grateful_dead.rb | 4 ++-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a31f9c55..e533ab504e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - [PR #1310](https://github.com/stympy/faker/pull/1310) Add alias for middle_name and remove locale [@vbrazo](https://github.com/vbrazo) ### Chores +- [PR #1401](https://github.com/stympy/faker/pull/1401) Faker::GratefulDead => Faker::Movies::GratefulDead [@vbrazo](https://github.com/vbrazo) - [PR #1362](https://github.com/stympy/faker/pull/1362) Faker::Types minor cleanup [@stephengroat](https://github.com/stephengroat) - [PR #1347](https://github.com/stympy/faker/pull/1347) Remove launchy dependency [@vbrazo](https://github.com/vbrazo) - [PR #1311](https://github.com/stympy/faker/pull/1311) Target Ruby 2.3 [@tagliala](https://github.com/tagliala) diff --git a/README.md b/README.md index efa061fcaa..d23c56dadb 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,6 @@ Contents - [Faker::Games::HalfLife](doc/half_life.md) - [Faker::Games::HeroesOfTheStorm](doc/heroes_of_the_storm.md) - [Faker::Gender](doc/gender.md) - - [Faker::GratefulDead](doc/grateful_dead.md) - [Faker::GreekPhilosophers](doc/greek_philosophers.md) - [Faker::Hacker](doc/hacker.md) - [Faker::HarryPotter](doc/harry_potter.md) @@ -121,6 +120,7 @@ Contents - [Faker::MostInterestingManInTheWorld](doc/most_interesting_man_in_the_world.md) - [Faker::Movie](doc/movie.md) - [Faker::Movies::Ghostbusters](doc/ghostbusters.md) + - [Faker::Movies::GratefulDead](doc/grateful_dead.md) - [Faker::Music](doc/music.md) - [Faker::Myst](doc/myst.md) - [Faker::Name](doc/name.md) diff --git a/doc/grateful_dead.md b/doc/grateful_dead.md index c51da98a02..7f3d441827 100644 --- a/doc/grateful_dead.md +++ b/doc/grateful_dead.md @@ -1,9 +1,9 @@ -# Faker::GratefulDead +# Faker::Movies::GratefulDead It might be available in the next version. ```ruby - Faker::GratefulDead.player #=> "Jerry Garcia" + Faker::Movies::GratefulDead.player #=> "Jerry Garcia" - Faker::GratefulDead.song #=> "China Cat Sunflower" + Faker::Movies::GratefulDead.song #=> "China Cat Sunflower" ``` diff --git a/lib/faker/grateful_dead.rb b/lib/faker/grateful_dead.rb index 46f68f630e..60bf6ce47a 100644 --- a/lib/faker/grateful_dead.rb +++ b/lib/faker/grateful_dead.rb @@ -1,14 +1,16 @@ # frozen_string_literal: true module Faker - class GratefulDead < Base - class << self - def player - fetch('grateful_dead.players') - end + module Movies + class GratefulDead < Base + class << self + def player + fetch('grateful_dead.players') + end - def song - fetch('grateful_dead.songs') + def song + fetch('grateful_dead.songs') + end end end end diff --git a/test/test_faker_grateful_dead.rb b/test/test_faker_grateful_dead.rb index 03f692c177..cd3ddcbaf1 100644 --- a/test/test_faker_grateful_dead.rb +++ b/test/test_faker_grateful_dead.rb @@ -2,9 +2,9 @@ require_relative 'test_helper' -class TestFakerGratefulDead < Test::Unit::TestCase +class TestFakerMoviesGratefulDead < Test::Unit::TestCase def setup - @tester = Faker::GratefulDead + @tester = Faker::Movies::GratefulDead end def test_player