Coder Social home page Coder Social logo

ffaker's Introduction

ffaker

ffaker is a rewrite of faker.

Usage

require 'ffaker'
Faker::Name.name => "Christophe Bartell"
Faker::Internet.email => "[email protected]"

ffaker vs faker

faker and ffaker APIs are mostly the same, although the API on ffaker keeps growing with its users additions. In general, the only difference is that you need to:

gem install ffaker

and then

require 'ffaker'

instead of "faker" with only one f.

ffaker is faster... does it really matter?

ffaker was initially written in an effort to speed up a slow spec suite. Bear in mind, if your spec suite is slow, chances are the generation of random data will not account for much of the run time.

Since then, the original faker gem has become faster. Nevertheless, ffaker is still about 20x faster than faker.

  N = 10_000

  Benchmark.bm do |rep|
    rep.report("generating #{ N } names") do
      N.times do
        Faker::Name.name
      end
    end
  end
ruby 1.8.7`
generating 10000 names (faker 0.9.5)  1.500000   0.000000   1.500000 (  1.506865)
generating 10000 names (ffaker 1.5.0)  0.070000   0.000000   0.070000 (  0.067526)

ruby 1.9.2p180
generating 10000 names (faker 0.9.5)  1.030000   0.020000   1.050000 (  1.046116)
generating 10000 names (ffaker 1.7.0)  0.040000   0.000000   0.040000 (  0.045917)

Contributors

A lot of people has contributed to ffaker. Check this list.

TODO

  • Even though the API is pretty simple, better rdoc documentation would not hurt.
  • Put all modules under its respective language (E.G. EducationUS instead of just Education)

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2013 Emmanuel Oga. See LICENSE for details. Copyright (c) 2007 Benjamin Curtis

ffaker's People

Contributors

kristjan avatar 7even avatar papepathe avatar rstacruz avatar swcool avatar kristianmandrup avatar steveclarke avatar chrisbloom7 avatar guapolo avatar teeparham avatar sanemat avatar tinogomes avatar inntran avatar simonrussell avatar rafaelss avatar addynaik avatar johnnymugs avatar tilljoel avatar jayshepherd avatar chrisberkhout avatar wiseleyb avatar ardavis avatar hmans avatar justinledwards avatar pusewicz avatar samirahmed avatar acolin avatar canhanhan avatar yaoquan avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.