Code Monkey home page Code Monkey logo

dummy's Introduction

= Dummy

Making dummy and semi-random content. Suitable for creating baseline data for integration or performance testing.

Requires the file '/usr/share/dict/words' for now. :-/

= Examples

  Post.title = Dummy::Content.words(50, 140) 

Returns a string of words within specified minimum and maximum length.

  Post.summary = Dummy::Content.string(64)

Returns a string of text of the specified length. (The same as Dummy::Content.words(x,x)

  Post.body = Dummy::Content.text(2048, 4096) 

Returns a block of text within specified minimum and maximum length. This differs from .words() in that it includes randomly inserted paragraph breaks.

  Post.release_date = Dummy::Content.date(1990, 2000)
  Post.release_date = Dummy::Content.date(1990)
  Post.release_date = Dummy::Content.date()

Returns a random Time object initialized with a random date between the beginning and the end year. The beginning year defaults to 1970 and the the ending year defaults to the current year.

  Dummy::User.new()

Returns a dummy user record with related values for first_name, last_name, login and email. For example:
  #<Dummy::User:0xb7acc56c @last_name="sampson", @full_name="andrew sampson", @login="andrew.s.5547", @first_name="andrew", @email_address="[email protected]">

= Additional Info

Author: Steven Hilton
Contact: [email protected]
License: MIT
Home: http://github.com/mshiltonj/dummy

Copyright (c) 2009 Steven Hilton. All Rights Reserved.


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.