Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added title translator

  • Loading branch information...
commit 26720ae667860a0906130c16c8f478f03915f4b3 1 parent cb74ced
Jeff Morgan authored
6 ChangeLog
View
@@ -1,4 +1,8 @@
-==- Version 0.10 / 2012-12-8
+=== Version 0.11
+* Enhancements
+ * Added title translator
+
+=== Version 0.10 / 2012-12-8
* Enhancements
* Added randomize translator to return random selection from Array or Range
* Added mask translator which accepts a mask. Will replace # with number, A with upper case letter, and a with lower case letter
1  features/data_magic.feature
View
@@ -14,6 +14,7 @@ Feature: Functionality of the data_magic gem
And the value for "last_name" should be 1 word long
And the value for "name_prefix" should be 1 word long
And the value for "name_suffix" should be 1 word long
+ And the value for "title" should have a minimum of 3 words
Scenario: Getting addresses from the yaml
Then the value for "street" should have a minimum of 2 words
1  features/yaml/example.yml
View
@@ -29,6 +29,7 @@ dm:
random: ~randomize ['Tom', 'Dick', 'Harry']
range: ~randomize 1..5
mask: ~mask "###-AAA_aaa"
+ title: ~title
other:
name: Cheezy
7 lib/data_magic/translation.rb
View
@@ -36,6 +36,13 @@ def name_suffix
end
#
+ # return a random title
+ #
+ def title
+ Faker::Name.title
+ end
+
+ #
# return a random street address
#
def street_address
Please sign in to comment.
Something went wrong with that request. Please try again.