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

Add Quotes namespace #1504

Merged
merged 11 commits into from
Jan 6, 2019
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
- [PR #372](https://github.com/stympy/faker/pull/372) Add test_password_could_achieve_max_length [@oleksii-ti](https://github.com/oleksii-ti)

### Deprecation
- [PR #1503](https://github.com/stympy/faker/pull/1503) Add Quotes namespace [@vbrazo](https://github.com/vbrazo)
- Deprecates `::FamousLastWords`, `::Matz`, `::MostInterestingManInTheWorld`, `::Robin`, `::Shakespeare`, `::SingularSiegler`, `::Yoda`
- [PR #1480](https://github.com/stympy/faker/pull/1480) Add Music, Movies and TvShows namespaces [@vbrazo](https://github.com/vbrazo)
- Deprecates `::Hobbit`, `HitchhikersGuideToTheGalaxy`, `::HarryPotter`, `::RockBand`, `::MichaelScott`, `::RuPaul`
- [PR #1481](https://github.com/stympy/faker/pull/1481) Add Blockchain namespace [@vbrazo](https://github.com/vbrazo)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ Contents
- [Faker::RuPaul](doc/v1.9.1/rupaul.md)
- [Faker::Science](doc/v1.9.1/science.md)
- [Faker::Seinfeld](doc/v1.9.1/seinfeld.md)
- [Faker::Shakespeare](doc/v1.9.1/shakespeare.md)
- [Faker::SiliconValley](doc/v1.9.1/silicon_valley.md)
- [Faker::Simpsons](doc/v1.9.1/simpsons.md)
- [Faker::SingularSiegler](doc/v1.9.1/singular_siegler.md)
Expand Down
7 changes: 0 additions & 7 deletions doc/unreleased/default/famous_last_words.md

This file was deleted.

18 changes: 9 additions & 9 deletions doc/unreleased/default/greek_philosophers.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Faker::GreekPhilosophers
Available since version 1.9.0.
```ruby
Faker::GreekPhilosophers.name #=> "Socrates"
Faker::GreekPhilosophers.quote #=> "Only the educated are free."
```
# Faker::GreekPhilosophers

Available since version 1.9.0.

```ruby
Faker::GreekPhilosophers.name #=> "Socrates"

Faker::GreekPhilosophers.quote #=> "Only the educated are free."
```
7 changes: 0 additions & 7 deletions doc/unreleased/default/matz.md

This file was deleted.

6 changes: 0 additions & 6 deletions doc/unreleased/default/most_interesting_man_in_the_world.md

This file was deleted.

10 changes: 0 additions & 10 deletions doc/unreleased/default/robin.md

This file was deleted.

7 changes: 0 additions & 7 deletions doc/unreleased/default/singular_siegler.md

This file was deleted.

7 changes: 7 additions & 0 deletions doc/unreleased/quotes/famous_last_words.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::Quotes::FamousLastWords

Available since version 1.9.0.

```ruby
Faker::Quotes::FamousLastWords.last_words #=> "My vocabulary did this to me. Your love will let you go on…"
```
7 changes: 7 additions & 0 deletions doc/unreleased/quotes/matz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::Quotes::Matz

Available since version 1.8.0.

```ruby
Faker::Quotes::Matz.quote #=> "You want to enjoy life, don't you? If you get your job done quickly and your job is fun, that's good isn't it? That's the purpose of life, partly. Your life is better."
```
6 changes: 6 additions & 0 deletions doc/unreleased/quotes/most_interesting_man_in_the_world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Faker::Quotes::MostInterestingManInTheWorld

```ruby
# Random Most Interesting Man In The World quote
Faker::Quotes::MostInterestingManInTheWorld.quote #=> "He can speak Russian… in French"
```
7 changes: 7 additions & 0 deletions doc/unreleased/quotes/quota.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::Quote

Available since version 1.9.0.

```ruby
Faker::Quote.yoda #=> "Use your feelings, Obi-Wan, and find him you will."
```
7 changes: 7 additions & 0 deletions doc/unreleased/quotes/robin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::Quotes::Robin

Available since version 1.8.0.

```ruby
Faker::Quotes::Robin.quote #=> "Holy Razors Edge"
```
8 changes: 8 additions & 0 deletions doc/unreleased/quotes/shakespeare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Faker::Quotes::Shakespeare

```ruby
Faker::Quotes::Shakespeare.hamlet_quote # => "To be, or not to be: that is the question."
Faker::Quotes::Shakespeare.as_you_like_it_quote # => "Can one desire too much of a good thing?."
Faker::Quotes::Shakespeare.king_richard_iii_quote # => "Now is the winter of our discontent."
Faker::Quotes::Shakespeare.romeo_and_juliet_quote # => "O Romeo, Romeo! wherefore art thou Romeo?."
```
7 changes: 7 additions & 0 deletions doc/unreleased/quotes/singular_siegler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::Quotes::SingularSiegler

Available since version 1.9.0.

```ruby
Faker::Quotes::SingularSiegler.quote #=> "Texas!"
```
8 changes: 8 additions & 0 deletions doc/v1.9.1/shakespeare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Faker::Shakespeare

```ruby
Faker::Shakespeare.hamlet_quote # => "To be, or not to be: that is the question."
Faker::Shakespeare.as_you_like_it_quote # => "Can one desire too much of a good thing?."
Faker::Shakespeare.king_richard_iii_quote # => "Now is the winter of our discontent."
Faker::Shakespeare.romeo_and_juliet_quote # => "O Romeo, Romeo! wherefore art thou Romeo?."
```
11 changes: 0 additions & 11 deletions lib/faker/default/most_interesting_man_in_the_world.rb

This file was deleted.

11 changes: 0 additions & 11 deletions lib/faker/default/robin.rb

This file was deleted.

39 changes: 0 additions & 39 deletions lib/faker/default/shakespeare.rb

This file was deleted.

11 changes: 0 additions & 11 deletions lib/faker/default/singular_siegler.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ class FamousLastWords < Base
flexible :famous_last_words

class << self
extend Gem::Deprecate

def last_words
fetch('famous_last_words.last_words')
Faker::Quotes::FamousLastWords.last_words
end

deprecate :last_words, 'Faker::Quotes::FamousLastWords.last_words', 2018, 12
end
end
end
6 changes: 5 additions & 1 deletion lib/faker/default/matz.rb → lib/faker/deprecate/matz.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
module Faker
class Matz < Base
class << self
extend Gem::Deprecate

def quote
fetch('matz.quotes')
Faker::Quotes::Matz.quote
end

deprecate :quote, 'Faker::Quotes::Matz.quote', 2018, 12
end
end
end
15 changes: 15 additions & 0 deletions lib/faker/deprecate/most_interesting_man_in_the_world.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Faker
class MostInterestingManInTheWorld < Base
class << self
extend Gem::Deprecate

def quote
Faker::Quotes::MostInterestingManInTheWorld.quote
end

deprecate :quote, 'Faker::Quotes::MostInterestingManInTheWorld.quote', 2018, 12
end
end
end
15 changes: 15 additions & 0 deletions lib/faker/deprecate/robin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Faker
class Robin < Base
class << self
extend Gem::Deprecate

def quote
Faker::Quotes::Robin.quote
end

deprecate :quote, 'Faker::Quotes::Robin.quote', 2018, 12
end
end
end
50 changes: 50 additions & 0 deletions lib/faker/deprecate/shakespeare.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# frozen_string_literal: true

module Faker
class Shakespeare < Base
class << self
extend Gem::Deprecate

def hamlet_quote
Faker::Quotes::Shakespeare.hamlet_quote
end

def as_you_like_it_quote
Faker::Quotes::Shakespeare.as_you_like_it_quote
end

def king_richard_iii_quote
Faker::Quotes::Shakespeare.king_richard_iii_quote
end

def romeo_and_juliet_quote
Faker::Quotes::Shakespeare.romeo_and_juliet_quote
end

def hamlet
Faker::Quotes::Shakespeare.hamlet
end

def as_you_like_it
Faker::Quotes::Shakespeare.as_you_like_it
end

def king_richard_iii
Faker::Quotes::Shakespeare.king_richard_iii
end

def romeo_and_juliet
Faker::Quotes::Shakespeare.romeo_and_juliet
end

deprecate :hamlet_quote, 'Faker::Quotes::Shakespeare.hamlet_quote', 2018, 12
deprecate :as_you_like_it_quote, 'Faker::Quotes::Shakespeare.as_you_like_it_quote', 2018, 12
deprecate :king_richard_iii_quote, 'Faker::Quotes::Shakespeare.king_richard_iii_quote', 2018, 12
deprecate :romeo_and_juliet_quote, 'Faker::Quotes::Shakespeare.romeo_and_juliet_quote', 2018, 12
deprecate :hamlet, 'Faker::Quotes::Shakespeare.hamlet', 2018, 12
deprecate :as_you_like_it, 'Faker::Quotes::Shakespeare.as_you_like_it', 2018, 12
deprecate :king_richard_iii, 'Faker::Quotes::Shakespeare.king_richard_iii', 2018, 12
deprecate :romeo_and_juliet, 'Faker::Quotes::Shakespeare.romeo_and_juliet', 2018, 12
end
end
end
15 changes: 15 additions & 0 deletions lib/faker/deprecate/singular_siegler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Faker
class SingularSiegler < Base
class << self
extend Gem::Deprecate

def quote
Faker::Quotes::SingularSiegler.quote
end

deprecate :quote, 'Faker::Quotes::SingularSiegler.quote', 2018, 12
end
end
end
File renamed without changes.
16 changes: 16 additions & 0 deletions lib/faker/deprecate/yoda.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

module Faker
class Yoda < Base
class << self
extend Gem::Deprecate

# from: http://morecoolquotes.com/famous-yoda-quotes/
def quote
Faker::Quote.yoda
end

deprecate :quote, 'Faker::Quote.yoda', 2018, 12
end
end
end
15 changes: 15 additions & 0 deletions lib/faker/quotes/famous_last_words.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Faker
class Quotes
class FamousLastWords < Base
flexible :famous_last_words

class << self
def last_words
fetch('famous_last_words.last_words')
end
end
end
end
end
13 changes: 13 additions & 0 deletions lib/faker/quotes/matz.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

module Faker
class Quotes
class Matz < Base
class << self
def quote
fetch('matz.quotes')
end
end
end
end
end
Loading