source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
faker-ruby/faker
https://github.com/faker-ruby/faker
test/faker/games/test_faker_touhou.rb
Ruby
mit
11,598
main
521
# frozen_string_literal: true require_relative '../../test_helper' class TestFakerTouhou < Test::Unit::TestCase def setup @tester = Faker::Games::Touhou end def test_game assert_match(/\w+\.?/, @tester.game) end def test_character assert_match(/\w+\.?/, @tester.character) end def test_loc...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
test/support/assert_email_regex.rb
Ruby
mit
11,598
main
422
# frozen_string_literal: true def assert_email_regex(first_name, last_name, email) sanitized_first_name = first_name&.gsub("'", '') sanitized_last_name = last_name&.gsub("'", '') regex = email_regex(sanitized_first_name, sanitized_last_name) assert_match(regex, email) end def email_regex(first_name, last_na...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
test/support/deprecation.rb
Ruby
mit
11,598
main
1,112
# frozen_string_literal: true # Based on Rails Testing Deprecator # https://github.com/rails/rails/blob/main/activesupport/lib/active_support/testing/deprecation.rb # Asserts that a matching deprecation warning was emitted during the execution of the yielded block. # # assert_deprecated do # DeprecatedGenerator...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
test/helpers/test_faker_deprecator.rb
Ruby
mit
11,598
main
1,190
# frozen_string_literal: true require_relative '../test_helper' class TestFakerDeprecation < Test::Unit::TestCase def test_using_a_deprecated_generator_returns_a_warning_message assert_deprecated do Faker::Dogs.say end assert_equal 'meow', Faker::Dogs.say end def test_using_a_non_deprecated_...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker.rb
Ruby
mit
11,598
main
11,323
# frozen_string_literal: true mydir = __dir__ require 'psych' require 'i18n' autoload(:OpenSSL, 'openssl') Dir.glob(File.join(mydir, 'helpers', '*.rb')).each { |file| require file } I18n.load_path += Dir[File.join(mydir, 'locales', '**/*.yml')] module Faker module Config @default_locale = nil class << ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/helpers/unique_generator.rb
Ruby
mit
11,598
main
1,696
# frozen_string_literal: true module Faker class UniqueGenerator def initialize(generator, max_retries) @generator = generator @max_retries = max_retries end def method_missing(name, *arguments) self.class.marked_unique.add(self) @max_retries.times do result = @generator...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/helpers/positional_generator.rb
Ruby
mit
11,598
main
13,324
# frozen_string_literal: true ## # A high level way to generate a list of generated values that fit a specific # format, such as an ID, postal code, or phone number. # # It provides generators for random digits and letters, hardcoded literal # strings, computed values based on previously-generated values, union (one-o...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/helpers/deprecator.rb
Ruby
mit
11,598
main
4,092
# frozen_string_literal: true # Based on Rails ActiveSupport Deprecator # https://github.com/rails/rails/blob/main/activesupport/lib/active_support/deprecation/constant_accessor.rb # rubocop:disable Style/ClassVars module Faker # Provides a way to rename generators, including their namespaces, with a deprecation cy...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/helpers/char.rb
Ruby
mit
11,598
main
3,055
# frozen_string_literal: true module Faker module Char def self.prepare(string) result = romanize_cyrillic string result = fix_umlauts result result.gsub(/[^\w-]/, '').downcase end def self.fix_umlauts(string) string.gsub(/[äöüß]/i) do |match| case match.downcase ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/helpers/base58.rb
Ruby
mit
11,598
main
500
# frozen_string_literal: true module Faker module Base58 def self.encode(str) alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' base = alphabet.size lv = 0 str.chars.reverse.each_with_index { |v, i| lv += v.unpack1('C') * 256**i } ret = +'' while lv.pos...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/internet.rb
Ruby
mit
11,598
main
22,728
# frozen_string_literal: true module Faker class Internet < Base if Faker::Config.lazy_loading? Faker.lazy_load(self) end # Private, Host, and Link-Local network address blocks as defined in https://en.wikipedia.org/wiki/IPv4#Special-use_addresses PRIVATE_IPV4_ADDRESS_RANGES = [ [10..10,...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/music.rb
Ruby
mit
11,598
main
3,149
# frozen_string_literal: true module Faker class Music < Base if Faker::Config.lazy_loading? Faker.lazy_load(self) end class << self NOTE_LETTERS = %w[C D E F G A B].freeze ACCIDENTAL_SIGNS = ['b', '#', ''].freeze KEY_TYPES = ['', 'm'].freeze CHORD_TYPES = ['', 'maj', '6', ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/creature/cat.rb
Ruby
mit
11,598
main
1,034
# frozen_string_literal: true module Faker class Creature class Cat < Base flexible :cat class << self ## # Produces a random name for a cat # # @return [String] # # @example # Faker::Creature::Cat.name #=> "Felix" # # @faker....
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/creature/bird.rb
Ruby
mit
11,598
main
5,676
# frozen_string_literal: true module Faker class Creature class Bird < Base flexible :bird class << self ## # Produces a random common family name of a bird. # # @return [String] # # @example # Faker::Creature::Bird.common_family_name #=> "Ow...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/creature/animal.rb
Ruby
mit
11,598
main
411
# frozen_string_literal: true module Faker class Creature class Animal < Base class << self ## # Produces a random animal name # # @return [String] # # @example # Faker::Creature::Animal.name #=> "fly" # # @faker.version 1.9.2 ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/creature/horse.rb
Ruby
mit
11,598
main
741
# frozen_string_literal: true module Faker class Creature class Horse < Base flexible :horse class << self ## # Produces a random name for a horse # # @return [String] # # @example # Faker::Creature::Horse.name #=> "Noir" # # ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/creature/dog.rb
Ruby
mit
11,598
main
2,430
# frozen_string_literal: true module Faker class Creature class Dog < Base flexible :dog class << self ## # Produces a random name for a dog # # @return [String] # # @example # Faker::Creature::Dog.name #=> "Spike" # # @faker....
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/the_room.rb
Ruby
mit
11,598
main
1,391
# frozen_string_literal: true module Faker class Movies class TheRoom < Base class << self ## # Produces an actor from The Room (2003). # # @return [String] # # @example # Faker::Movies::Room.actor #=> "Tommy Wiseau" # # @faker.versi...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/departed.rb
Ruby
mit
11,598
main
1,082
# frozen_string_literal: true module Faker class Movies class Departed < Base class << self ## # Produces an actor from The Departed. # # @return [String] # # @example # Faker::Movies::Departed.actor #=> "Matt Damon" # # @faker.versi...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/star_wars.rb
Ruby
mit
11,598
main
6,578
# frozen_string_literal: true module Faker class Movies class StarWars < Base class << self ## # Produces a call squadron from Star Wars. # # @return [String] # # @example # Faker::Movies::StarWars.call_squadron #=> "Green" # # @fake...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/tron.rb
Ruby
mit
11,598
main
3,712
# frozen_string_literal: true module Faker class Movies class Tron < Base class << self ## # Produces a character from Tron. # # @return [String] # # @example # Faker::Movies::Tron.character #=> "Bit" # # @faker.version next ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/harry_potter.rb
Ruby
mit
11,598
main
1,988
# frozen_string_literal: true module Faker class Movies class HarryPotter < Base class << self ## # Produces a character from Harry Potter. # # @return [String] # # @example # Faker::Movies::HarryPotter.character #=> "Harry Potter" # ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/hitchhikers_guide_to_the_galaxy.rb
Ruby
mit
11,598
main
2,963
# frozen_string_literal: true module Faker class Movies class HitchhikersGuideToTheGalaxy < Base class << self ## # Produces a character from The Hitchhiker's Guide to the Galaxy. # # @return [String] # # @example # Faker::Movies::HitchhikersGuideTo...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/hackers.rb
Ruby
mit
11,598
main
1,029
# frozen_string_literal: true module Faker class Movies class Hackers < Base class << self ## # Produces a real character name from Hackers. # # @return [String] # # @example # Faker::Movies::Hackers.character #=> "Dade Murphy" # # @...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/v_for_vendetta.rb
Ruby
mit
11,598
main
1,299
# frozen_string_literal: true module Faker class Movies class VForVendetta < Base class << self ## # Produces a character from V For Vendetta. # # @return [String] # # @example # Faker::Movies::VForVendetta.character #=> "V" # # @fak...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/lord_of_the_rings.rb
Ruby
mit
11,598
main
1,190
# frozen_string_literal: true module Faker class Movies class LordOfTheRings < Base class << self ## # Produces a character from Lord of the Rings. # # @return [String] # # @example # Faker::Movies::LordOfTheRings.character #=> "Legolas" # ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/princess_bride.rb
Ruby
mit
11,598
main
849
# frozen_string_literal: true module Faker class Movies class PrincessBride < Base class << self ## # Produces a character from The Princess Bride. # # @return [String] # # @example # Faker::Movies::PrincessBride.character #=> "Dread Pirate Roberts"...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/how_to_train_your_dragon.rb
Ruby
mit
11,598
main
1,150
# frozen_string_literal: true module Faker class Movies class HowToTrainYourDragon < Base class << self ## # Produces a character from How To Train Your Dragon. # # @return [String] # # @example # Faker::Movies::HowToTrainYourDragon.character #=> "H...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/back_to_the_future.rb
Ruby
mit
11,598
main
1,144
# frozen_string_literal: true module Faker class Movies class BackToTheFuture < Base class << self ## # Produces a character from Back to the Future. # # @return [String] # # @example # Faker::Movies::BackToTheFuture.character #=> "Marty McFly" ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/avatar.rb
Ruby
mit
11,598
main
1,026
# frozen_string_literal: true module Faker class Movies class Avatar < Base class << self ## # Produces a character from Avatar. # # @return [String] # # @example # Faker::Movies::Avatar.character #=> "Jake Sully" # # @faker.version ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/ghostbusters.rb
Ruby
mit
11,598
main
1,205
# frozen_string_literal: true module Faker class Movies class Ghostbusters < Base class << self ## # Produces an actor from Ghostbusters. # # @return [String] # # @example # Faker::Movies::Ghostbusters.actor #=> "Bill Murray" # # @fa...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/lebowski.rb
Ruby
mit
11,598
main
1,070
# frozen_string_literal: true module Faker class Movies class Lebowski < Base class << self ## # Produces an actor from The Big Lebowski. # # @return [String] # # @example # Faker::Movies::Lebowski.actor #=> "John Goodman" # # @faker...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/movies/hobbit.rb
Ruby
mit
11,598
main
1,481
# frozen_string_literal: true module Faker class Movies class Hobbit < Base class << self ## # Produces the name of a character from The Hobbit. # # @return [String] # # @example # Faker::Movies::Hobbit.character #=> "Gandalf the Grey" # ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/fantasy/tolkien.rb
Ruby
mit
11,598
main
1,448
# frozen_string_literal: true module Faker class Fantasy class Tolkien < Base flexible :tolkien class << self ## # Produces a character from Tolkien's legendarium # # @return [String] # # @example # Faker::Fantasy::Tolkien.character #...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/religion/bible.rb
Ruby
mit
11,598
main
1,054
# frozen_string_literal: true module Faker class Religion class Bible < Base flexible :bible class << self ## # Returns a random bible character. # # @return [String] # # @example # Faker::Religion::Bible.character #=> "Jesus" # ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/food.rb
Ruby
mit
11,598
main
2,745
# frozen_string_literal: true module Faker class Food < Base flexible :food class << self ## # Retrieves an allergen. # # @return [String] # # @example # Faker::Food.allergen #=> "Peanuts" # # @faker.version next def allergen fetch('food....
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/greek_philosophers.rb
Ruby
mit
11,598
main
689
# frozen_string_literal: true module Faker class GreekPhilosophers < Base class << self ## # Produces the name of a Greek philosopher. # # @return [String] # # @example # Faker::GreekPhilosophers.name #=> "Socrates" # # @faker.version 1.9.0 def name ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/code.rb
Ruby
mit
11,598
main
8,859
# frozen_string_literal: true module Faker class Code < Base flexible :code class << self ## # Produces a random NPI (National Provider Identifier) code. # # @return [String] # # @example # Faker::Code.npi #=> "9804062802" # # @faker.version 1.9.4 ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/electrical_components.rb
Ruby
mit
11,598
main
1,067
# frozen_string_literal: true module Faker class ElectricalComponents < Base flexible :electrical_components class << self ## # Produces an active electrical component. # # @return [String] # # @example # Faker::ElectricalComponents.active #=> "Transistor" #...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/space.rb
Ruby
mit
11,598
main
3,819
# frozen_string_literal: true module Faker class Space < Base flexible :space class << self ## # Produces the name of a planet. # # @return [String] # # @example # Faker::Space.planet #=> "Venus" # # @faker.version 1.6.4 def planet fetch(...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/string.rb
Ruby
mit
11,598
main
1,851
# frozen_string_literal: true module Faker class String < Base class << self ## # Produces a random UTF-8 string with optional nested length selectors. # # @param length [Integer, Range, Array<Integer, Range, nil>] The length of produced string and/or specific UTF-8 characters to use. ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/university.rb
Ruby
mit
11,598
main
1,562
# frozen_string_literal: true module Faker class University < Base flexible :university class << self ## # Produces a random university name. # # @return [String] # # @example # Faker::University.name #=> "Eastern Mississippi Academy" # # @faker.versio...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/hobby.rb
Ruby
mit
11,598
main
376
# frozen_string_literal: true module Faker class Hobby < Base flexible :hobby class << self ## # Retrieves a typical hobby activity. # # @return [String] # # @example # Faker::Hobby.activity #=> "Cooking" # # @faker.version next def activity ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/military.rb
Ruby
mit
11,598
main
2,136
# frozen_string_literal: true module Faker class Military < Base class << self ## # Produces a rank in the U.S. Army. # # @return [String] # # @example # Faker::Military.army_rank #=> "Staff Sergeant" # # @faker.version 1.9.0 def army_rank fet...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/source.rb
Ruby
mit
11,598
main
1,808
# frozen_string_literal: true module Faker class Source < Base class << self ## # Produces source code for Hello World in a given language. # # @param lang [Symbol] The programming language to use # @return [String] # # @example # Faker::Source.hello_world #=> "p...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/currency.rb
Ruby
mit
11,598
main
834
# frozen_string_literal: true module Faker class Currency < Base class << self ## # Produces the name of a currency. # # @return [String] # # @example # Faker::Currency.name #=> "Swedish Krona" # # @faker.version 1.9.0 def name fetch('currency...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/coin.rb
Ruby
mit
11,598
main
597
# frozen_string_literal: true module Faker class Coin < Base class << self ## # Retrieves a random coin from any country. # # @return [String] # # @example # Faker::Coin.name #=> "Brazilian Real" # # @faker.version 1.9.2 def name fetch('curren...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/markdown.rb
Ruby
mit
11,598
main
5,963
# frozen_string_literal: true module Faker class Markdown < Base class << self ## # Produces a random header format. # # @return [String] # # @example # Faker::Markdown.headers #=> "##### Autem" # # @faker.version 1.8.0 def headers "#{fetch('m...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/gender.rb
Ruby
mit
11,598
main
895
# frozen_string_literal: true module Faker class Gender < Base class << self ## # Produces the name of a gender identity. # # @return [String] # # @example # Faker::Gender.type #=> "Non-binary" # # @faker.version 1.9.0 def type fetch('gender.t...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/file.rb
Ruby
mit
11,598
main
2,934
# frozen_string_literal: true module Faker class File < Base class << self ## # Produces a random directory name. # # @param segment_count [Integer] Specifies the number of nested folders in the generated string. # @param root [String] Specifies the root of the generated string. ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/invoice.rb
Ruby
mit
11,598
main
3,968
# frozen_string_literal: true module Faker class Invoice < Base flexible :invoice class << self ## # Produces a random amount between values with 2 decimals # # @param from [Integer] Specifies lower limit. # @param to [Integer] Specifies upper limit. # @return [Integer] ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/vulnerability_identifier.rb
Ruby
mit
11,598
main
675
# frozen_string_literal: true module Faker class VulnerabilityIdentifier < Base class << self ## # Produces a Common Vulnerabilities and Exposures (CVE) identifier. # # @param year [Integer] The year-part of the CVE identifier (defaults to the current year) # @return [String] ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/book.rb
Ruby
mit
11,598
main
1,102
# frozen_string_literal: true module Faker class Book < Base flexible :book class << self ## # Produces a random book title # # @return [String] # # @example # Faker::Book.title #=> "The Odd Sister" # # @faker.version 1.9.3 def title fetc...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/alphanumeric.rb
Ruby
mit
11,598
main
2,345
# frozen_string_literal: true module Faker class Alphanumeric < Base ## # List of characters allowed for alphanumeric strings # @private ALPHANUMS = LLetters + Numbers class << self ## # Produces a random string of alphabetic characters (no digits) # # @param number [Inte...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/world_cup.rb
Ruby
mit
11,598
main
1,729
# frozen_string_literal: true module Faker class WorldCup < Base class << self ## # Produces a national team name. # # @return [String] # # @example # Faker::WorldCup.team #=> "Iran" # # @faker.version 1.9.0 def team fetch('world_cup.teams') ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/nation.rb
Ruby
mit
11,598
main
1,480
# frozen_string_literal: true module Faker class Nation < Base flexible :nation class << self ## # Produces a random nationality. # # @return [String] # # @example # Faker::Nation.nationality #=> "Nepalese" # # @faker.version 1.9.0 def nationality...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/placeholdit.rb
Ruby
mit
11,598
main
3,004
# frozen_string_literal: true module Faker class Placeholdit < Base class << self SUPPORTED_FORMATS = %w[png jpg gif jpeg].freeze ## # Produces a random placeholder image from https://via.placeholder.com. # # @param size [String] Specifies the image's size, dimensions separated by ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/lorem.rb
Ruby
mit
11,598
main
10,186
# frozen_string_literal: true module Faker # Based on Perl's Text::Lorem class Lorem < Base class << self ## # Returs the random word # @return [String] # # @example # Faker::Lorem.word #=> "soluto" # Faker::Lorem.word(exclude_words: 'error') #=> "nisi" # ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/relationship.rb
Ruby
mit
11,598
main
1,967
# frozen_string_literal: true module Faker class Relationship < Base flexible :relationship class << self ## # Produces a random family relationship. # # @return [String] # # @example # Faker::Relationship.familial #=> "Grandfather" # # @faker.version ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/crypto.rb
Ruby
mit
11,598
main
2,017
# frozen_string_literal: true module Faker class Crypto < Base class << self # Setting the lorem character number lower than the default of # 255 reduces the time complexity of each hash algorithm while # still returning deterministically unique values. See # https://github.com/faker-ruby...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/measurement.rb
Ruby
mit
11,598
main
4,881
# frozen_string_literal: true module Faker class Measurement < Base class << self ALL = 'all' NONE = 'none' ## # Produces a random height measurement. # # @param amount [Integer] Specifies the random height value. # @return [String] # # @example # Fa...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/artist.rb
Ruby
mit
11,598
main
349
# frozen_string_literal: true module Faker class Artist < Base class << self ## # Produces the name of an artist. # # @return [String] # # @example # Faker::Artist.name #=> "Michelangelo" # # @faker.version 1.8.8 def name fetch('artist.names')...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/theater.rb
Ruby
mit
11,598
main
989
# frozen_string_literal: true module Faker class Theater < Base class << self ## # Produces the name of a musical for an older audience # # @return [String] # # @example # Faker::Theater.adult_musical # #=> "Mamma Mia!" # # @faker.version 2.13.0 ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/drone.rb
Ruby
mit
11,598
main
7,316
# frozen_string_literal: true module Faker class Drone < Base class << self ## # Returns random drone name with company # # @return [string] # # @example # Faker::Drone.name #=> "DJI Mavic Air 2" # # @faker.version 2.14.0 def name fetch('drone...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/finance.rb
Ruby
mit
11,598
main
3,643
# frozen_string_literal: true module Faker class Finance < Base CREDIT_CARD_TYPES = %i[visa mastercard discover american_express diners_club jcb switch solo dankort maestro forbrugsforeningen laser].freeze MARKET_LIST = %i[nyse nasdaq].freeze class ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/cannabis.rb
Ruby
mit
11,598
main
2,557
# frozen_string_literal: true module Faker class Cannabis < Base ## # Produces a random strain. # # @return [String] # # @example # Faker::Cannabis.strain #=> "Super Glue" # # @faker.version 1.9.1 def self.strain fetch('cannabis.strains') end ## # Produces...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/sport.rb
Ruby
mit
11,598
main
3,105
# frozen_string_literal: true module Faker class Sport < Base class << self ## # Produces a sport from the modern olympics or paralympics, summer or winter. # # @param include_ancient [Boolean] If true, may produce a sport from the ancient olympics # @param include_unusual [Boolean]...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/south_africa.rb
Ruby
mit
11,598
main
3,464
# frozen_string_literal: true module Faker class SouthAfrica < Base class << self ## # Produces a South African ID number. # # @return [String] # # @example # Faker::SouthAfrica.id_number #=> "6110311856083" # # @faker.version 1.9.2 def id_number ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/number.rb
Ruby
mit
11,598
main
6,544
# frozen_string_literal: true module Faker class Number < Base class << self ## # Produce a random number. # # @param digits [Integer] Number of digits that the generated number should have. # @return [Integer] # # @example # Faker::Number.number(digits: 10) #=> ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/boolean.rb
Ruby
mit
11,598
main
583
# frozen_string_literal: true module Faker class Boolean < Base class << self ## # Produces a boolean # # @param true_ratio [Float] The likelihood (as a float, out of 1.0) for the method to return `true`. # @return [Boolean] # # @example # Faker::Boolean.boolean ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/omniauth.rb
Ruby
mit
11,598
main
15,864
# frozen_string_literal: true module Faker class Omniauth < Base require 'time' attr_reader :name, :first_name, :last_name, :email def initialize(name: nil, email: nil) super() @name = name || "#{Faker::Name.first_name} #{Faker::Name.last_name...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/driving_licence.rb
Ruby
mit
11,598
main
4,585
# frozen_string_literal: true module Faker class DrivingLicence < Base GB_PADDING = '9999' NI_CHANCE = 0.03 # NI Pop is about 3% of total UK population class << self ## # Produces a random British driving licence number. # # @param last_name [String] The last name of the driving ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/chile_rut.rb
Ruby
mit
11,598
main
3,015
# frozen_string_literal: true module Faker class ChileRut < Base class << self @last_rut = nil ## # Produces a random Chilean RUT (Rol Unico Tributario, ID with 8 digits). # # @param min_rut [Integer] Specifies the minimum value of the RUT. # @param max_rut [Integer] Specifie...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/hipster.rb
Ruby
mit
11,598
main
9,095
# frozen_string_literal: true module Faker class Hipster < Base class << self ## # Produces a random hipster word. # # @return [String] # # @example # Faker::Hipster.word #=> "irony" # # @faker.version 1.6.0 def word random_word = sample(trans...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/commerce.rb
Ruby
mit
11,598
main
4,119
# frozen_string_literal: true module Faker class Commerce < Base class << self ## # Produces a random color. # # @return [String] # # @example # Faker::Commerce.color #=> "lavender" # # @faker.version 1.2.0 def color fetch('color.name') ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/science.rb
Ruby
mit
11,598
main
4,278
# frozen_string_literal: true module Faker class Science < Base class << self BRANCHES = { empirical: %i[empirical_natural_basic empirical_natural_applied empirical_social_basic empirical_social_applied], formal: %i[formal_basic formal_applied], natural: %i[empirical_natural_basic e...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/address.rb
Ruby
mit
11,598
main
8,890
# frozen_string_literal: true module Faker class Address < Base flexible :address class << self ## # Produces the name of a city. # # @param options [Hash] # @option with_state [Boolean] Whether to include the state name in the output. # @return [String] # # @...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/phone_number.rb
Ruby
mit
11,598
main
4,534
# frozen_string_literal: true module Faker class PhoneNumber < Base class << self ## # Produces a phone number in a random format without the country code and it can have different dividers. # # @return [String] # # @example # Faker::PhoneNumber.phone_number #=> "(504)...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/avatar.rb
Ruby
mit
11,598
main
2,094
# frozen_string_literal: true module Faker class Avatar < Base class << self # @private SUPPORTED_FORMATS = %w[png jpg bmp].freeze ## # Produces a URL for an avatar from robohash.org # # @param slug [String, nil] # @param size [String] image size in pixels, in the forma...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/types.rb
Ruby
mit
11,598
main
4,439
# frozen_string_literal: true module Faker class Types < Base CHARACTERS = ('0'..'9').to_a + ('a'..'z').to_a SIMPLE_TYPES = %i[string fixnum].freeze COMPLEX_TYPES = %i[hash array].freeze class << self ## # Produces a random String created from word (Faker::Lorem.word) # # @re...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/national_health_service.rb
Ruby
mit
11,598
main
1,760
# frozen_string_literal: true module Faker class NationalHealthService < Base class << self ## # Produces a random British NHS number. # # The NHS sets aside a range of numbers from 999 000 0000 to 999 999 9999 # for test purposes. # # @return [String] # # @e...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/ancient.rb
Ruby
mit
11,598
main
1,127
# frozen_string_literal: true module Faker class Ancient < Base class << self ## # Produces a god from ancient mythology. # # @return [String] # # @example # Faker::Ancient.god #=> "Zeus" # # @faker.version 1.7.0 def god fetch('ancient.god') ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/game.rb
Ruby
mit
11,598
main
909
# frozen_string_literal: true module Faker class Game < Base flexible :game class << self ## # Produces the name of a video game. # # @return [String] # # @example # Faker::Game.title #=> "Half-Life 2" # # @faker.version 1.9.4 def title f...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/verb.rb
Ruby
mit
11,598
main
1,413
# frozen_string_literal: true module Faker class Verb < Base class << self ## # Produces the base form of a random verb. # # @return [String] # # @example # Faker::Verb.base #=> "hurt" # # @faker.version 1.9.0 def base fetch('verbs.base') ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/compass.rb
Ruby
mit
11,598
main
4,282
# frozen_string_literal: true module Faker class Compass < Base class << self ## # Produces a random cardinal. # # @return [String] # # @example # Faker::Compass.cardinal #=> "north" # # @faker.version 1.8.0 def cardinal fetch('compass.cardina...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/hacker.rb
Ruby
mit
11,598
main
2,900
# frozen_string_literal: true module Faker # Port of http://shinytoylabs.com/jargon/ # Are you having trouble writing tech-savvy dialogue for your latest screenplay? # Worry not! Hollywood-grade technical talk is ready to fill out any form where you need to look smart. class Hacker < Base flexible :hacker ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/device.rb
Ruby
mit
11,598
main
1,737
# frozen_string_literal: true module Faker class Device < Base class << self ## # Produces a build number between 1 and 500. # # @return [Integer] # # @example # Faker::Device.build_number #=> 5 # # @faker.version 1.9.0 def build_number Faker:...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/educator.rb
Ruby
mit
11,598
main
2,089
# frozen_string_literal: true module Faker class Educator < Base flexible :educator class << self ## # Produces a university name. # # @return [String] # # @example # Faker::Educator.university #=> "Mallowtown Technical College" # # @faker.version 1.6....
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/mountain.rb
Ruby
mit
11,598
main
608
# frozen_string_literal: true module Faker class Mountain < Base class << self ## # Produces a name of a mountain # # @return [String] # # @example # Faker::Mountain.name #=> "Mount Everest" # # @faker.version next def name fetch('mountain.na...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/nato_phonetic_alphabet.rb
Ruby
mit
11,598
main
422
# frozen_string_literal: true module Faker class NatoPhoneticAlphabet < Base class << self ## # Produces a code word from the NATO phonetic alphabet. # # @return [String] # # @example # Faker::NatoPhoneticAlphabet.code_word #=> "Hotel" # # @faker.version 1....
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/marketing.rb
Ruby
mit
11,598
main
410
# frozen_string_literal: true module Faker class Marketing < Base flexible :marketing class << self ## # Produces a few marketing buzzwords. # # @return [String] # # @example # Faker::Marketing.buzzwords #=> "rubber meets the road" # # @faker.version 1...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/beer.rb
Ruby
mit
11,598
main
2,081
# frozen_string_literal: true module Faker class Beer < Base flexible :beer class << self ## # Produces a random beer name. # # @return [String] # # @example # Faker::Beer.name #=> "Pliny The Elder" # # @faker.version 1.6.2 def name fetch...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/job.rb
Ruby
mit
11,598
main
1,105
# frozen_string_literal: true module Faker class Job < Base flexible :job class << self ## # Produces a random job title. # # @return [String] # # @example # Faker::Job.title #=> "Construction Manager" # # @faker.version 1.7.0 def title p...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/app.rb
Ruby
mit
11,598
main
1,718
# frozen_string_literal: true module Faker class App < Base class << self ## # Produces an app name. # # @return [String] # # @example # Faker::App.name #=> "Treeflex" # # @faker.version 1.4.3 def name fetch('app.name') end ## ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/adjective.rb
Ruby
mit
11,598
main
641
# frozen_string_literal: true module Faker class Adjective < Base flexible :adjective class << self ## # Produces a positive adjective. # # @return [String] # # @example # Faker::Adjective.positive #=> "Kind" # # @faker.version next def positive ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/stripe.rb
Ruby
mit
11,598
main
3,603
# frozen_string_literal: true module Faker class Stripe < Base class << self ## # Produces a random valid card number. # # @param card_type [String] Specific valid card type. # @return [String] # # @example # Faker::Stripe.valid_card #=> "4242424242424242" ...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/business.rb
Ruby
mit
11,598
main
1,065
# frozen_string_literal: true require 'date' module Faker class Business < Base flexible :business class << self ## # Produces a credit card number. # # @return [String] # # @example # Faker::Business.credit_card_number #=> "1228-1221-1221-1431" # # @...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/bank.rb
Ruby
mit
11,598
main
5,841
# frozen_string_literal: true module Faker class Bank < Base flexible :bank class << self ## # Produces a bank account number. # # @param digits [Integer] Number of digits that the generated account number should have. # @return [String] # # @example # Faker...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/emotion.rb
Ruby
mit
11,598
main
602
# frozen_string_literal: true module Faker class Emotion < Base class << self ## # Produces an emotion noun. # # @return [String] # # @example # Faker::Emotion.noun #=> "amazement" # # @faker.version next def noun fetch('emotion.noun') e...
github
faker-ruby/faker
https://github.com/faker-ruby/faker
lib/faker/default/esport.rb
Ruby
mit
11,598
main
1,384
# frozen_string_literal: true module Faker class Esport < Base class << self ## # Produces the name of a professional eSports player. # # @return [String] # # @example # Faker::Esport.player #=> "Crimsix" # # @faker.version 1.7.0 def player fe...