0.0
No commit activity in last 3 years
No release in over 3 years
Provides datasets to application stored in YAML files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.2.0
>= 2.12.0

Runtime

>= 1.9
 Project Readme

data_magic (updated version)

This gem is ported from the original data_magic gem -> here. Please read the original documentation first. I created this to make sure the gem stays updated with its dependencies. (The original gem seems to be unmaintained)

How to Use

Requirement:

  • Ruby >= 2.5.1
  • Faker >= 1.9

Update your Gemfile to

gem 'new_data_magic'

Then run

bundle install

Any other configuration is exactly same as the original gem.

NOTE: If you have previously used older version of Faker, I suggest you to install rubocop-faker to automatically update from positional arguments to named arguments.

New & Updated Generator

Here is a list of the new and updated methods:

new methods added updated methods replaced methods
color_hex job_title1 title
color_name
number(digits=5, leading_zero=true)
decimal(before_decimal=5, after_decimal=3)
merge(separator='_', [first_name, city, number(digits=3)])
date_between(from='01/01/2021', to='31/01/2021', format='%d/%m/%Y')

1 In newer version of Faker, Faker::Name.title is changed to Faker::Job.title

Copyright

Copyright (c) 2012-2021 Jeffrey S. Morgan. See LICENSE for details.