Skip to content
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

Faker::GratefulDead => Faker::Movies::GratefulDead #1401

Merged
merged 2 commits into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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