Skip to content

Commit

Permalink
Faker::GratefulDead => Faker::Movies::GratefulDead (#1401)
Browse files Browse the repository at this point in the history
* Faker::GratefulDead => Faker::Movies::GratefulDead

* Update CHANGELOG.md
  • Loading branch information
vbrazo authored Oct 12, 2018
1 parent b4d1579 commit 551642c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions doc/grateful_dead.md
Original file line number Diff line number Diff line change
@@ -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"
```
16 changes: 9 additions & 7 deletions lib/faker/grateful_dead.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/test_faker_grateful_dead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 551642c

Please sign in to comment.