mockdata 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2839f1eb6263fee95464c6c32072b9bccafbad76
4
+ data.tar.gz: ca46d6aed757d3d57faa1e312a2ee9f00c0dc650
5
+ SHA512:
6
+ metadata.gz: 6c3076e687b6529ea2a0bb590fdc2dfe204f2612937bd19eb48a6934685802ed90e8e9c58b9a05d5e88d2878b32639a57eec4740b79cb049660893e072456cbc
7
+ data.tar.gz: 2f654756e8a743561fdff6e6995d4fa2dcc0fa9400669adf3547e8a399b641637f51d0ed92f9c29a631fcc83cad61bb3aea12e73d064f1d87ee093e0df885880
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mockdata.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mockdata (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (10.5.0)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ mockdata!
16
+ bundler (~> 1.11)
17
+ rake (~> 10.0)
18
+
19
+ BUNDLED WITH
20
+ 1.11.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Erik van Eykelen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1 @@
1
+ See https://github.com/evaneykelen/mockdata/wiki/Documentation for documentation.
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+ desc "Run tests"
7
+ task :default => :test
@@ -0,0 +1,44 @@
1
+ module Mockdata
2
+ class Locations
3
+ # Location, Latitude, Longitude
4
+ RND_LOCATIONS = [
5
+ ["Pagosa Springs", "37.26945", "-107.0097617"],
6
+ ["Durango", "37.27528", "-107.8800667"],
7
+ ["Cortez", "37.355967684576406", "-108.60260009765625"],
8
+ ["Farmington", "36.74108512094412", "-108.1658935546875"],
9
+ ["Denver", "39.7391536", "-104.9847034"],
10
+ ["Boulder", "40.000267972646796", "-105.28472900390625"],
11
+ ["Fort Collins", "40.58058466412761", "-105.15838623046875"],
12
+ ["Cheyenne", "41.15797827873605", "-104.8480224609375"],
13
+ ["Grand Island", "40.925964939514294", "-98.3660888671875"],
14
+ ["Lincoln", "40.80965166748853", "-96.6851806640625"],
15
+ ["Omaha", "41.253032440653186", "-95.9051513671875"],
16
+ ["Des Moines", "41.56203190200195", "-93.504638671875"],
17
+ ["Cedar Rapids", "41.96765920367816", "-91.77978515625"],
18
+ ["Milwaukee", "43.04480541304368", "-87.923583984375"],
19
+ ["Mineapolis", "44.98811302615805", "-93.251953125"],
20
+ ["South Fork", "37.67512527892127", "-106.6497802734375"],
21
+ ["Creede", "37.8553385894982", "-106.9354248046875"],
22
+ ["Bayfield", "37.234701971668144", "-107.60147094726562"],
23
+ ["Arboles", "37.03763967977139", "-107.42156982421875"],
24
+ ["Dulce", "36.94111143010769", "-106.99859619140625"],
25
+ ["Chama", "36.910372213522535", "-106.58111572265625"],
26
+ ["Salt Lake City", "40.70562793820592", "-111.566162109375"],
27
+ ["Reno", "39.54641191968671", "-119.8388671875"],
28
+ ["Santa Fe", "35.7019167328534", "-105.963134765625"],
29
+ ["Albuquerque", "35.092945313732635", "-106.666259765625"],
30
+ ["Philadelphia", "39.9602803542957", "-75.16845703125"],
31
+ ["New York City", "40.730608477796636", "-74.036865234375"],
32
+ ["Ocala", "29.209713225868185", "-82.15576171875"],
33
+ ["Miami", "25.809781975840405", "-80.255126953125"],
34
+ ["San Diego", "32.74108223150125", "-117.169189453125"],
35
+ ["San Francisco", "37.69251435532741", "-122.508544921875"]
36
+ ]
37
+
38
+ def self.pick
39
+ # Cannot rely on .sample or .choice because of 1.8.7 and 1.9.x
40
+ location = RND_LOCATIONS[rand(RND_LOCATIONS.size)]
41
+ return location[0], location[1], location[2] # name, latitude, longitude
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,38 @@
1
+ module Mockdata
2
+ class Names
3
+ RND_FIRST_NAMES = %w{Jack Joshua William Thomas Riley James Cooper Ethan Noah Ali Muhammed Hussein Hydar Ahmed Omar Hasan Kathem Abdullah Ammar Hiroto Ren Yuto Satoshi Kei Hiroki Kenjirou Kenshirou Kenji Tatsuhiko Jens Peter Lars Michael Henrik Niels Hans Oliver Harry Alfie Charlie Daniel Enzo Mathis Lucas Nolan Killian Raphael Tom Nathan Lena Leonie Anna Sarah Julia Hannah Laura Katharina Sophie Lisa Emma Freja Caroline Ida Sofie Mathilde Sara Olivia Ruby Grace Emily Jessica Chloe Lily Mia Lucy Lea Manon Clara Ines Camille Jade Elena Olga Tatiana Irina Natalia Svetlana Maria Marina Ludmilla Aiden Kaden Jayden Logan Liam Jacob Caden Jackson Matthew John Robert David Richard Charles Joseph Mikayla Sophia Maya Danica Ava Isabella Constanza Martina Catalina Valentina Sofia Javiera Antonia Isidora Francisca Mary Patricia Linda Barbara Elizabeth Jennifer Susan Margaret}
4
+
5
+ RND_LAST_NAME = %w{Alexander Ali Allen Amar Andersen Anderson Avraham Azulai Bakker Bauer Berg Bernard Biton Brown Byrne Calderon Chadad Christensen Claes Clark Clarke Cohen Cox Dahan David Davies Davis Dijk Dubois Durand Friedman Gabai Garcia Gonzalez Goossens Green Gruber Gutierrez Hall Hansen Harris Hernandez Huber Ivanov Jackson Jacobs James Jansen Janssen Janssens Jensen Jimenez Johnson Jones Katz Kelly Khan King Kozlov Kuznetsov Larsen Lebedev Lee Leroy Levi Lewis Lopez Maes Malcah Martin Martinez Mason Mayer Mertens Meyer Miller Mitchell Mizrachi Moore Mora Morales Moser Muller Murphy Nielsen Novikov Ochion Patel Pedersen Peeters Peretz Perez Petit Phillips Pichler Popov Ramirez Rasmussen Richard Robert Roberts Robinson Rodriguez Rojas Rose Ryan Sanchez Scott Smirnov Smit Smith Sokolov Sorensen Steiner Taylor Thomas Thompson Visser Wagner Walker Walsh White Willems Williams Wilson Wouters Wright Young}
6
+
7
+ # Contact erik.van.eykelen@bitgain.com if you think I violate a trademark
8
+ RND_COMPANY_NAMES = [ "Bitoptic, Inc.", "Buzzarray Ltd", "Gigasink SA", "Objectfiber GmbH", "Riffpoint Corp", "Snapath, Inc.", "Babbletweet BV", "Brightsquawk AS", "Bubblememo Ltd", "Dynacable Holding", "Flipgram Corporation", "Blackchilla Works", "Bluelope.com", "Purplegale Limited", "Yellowolf.com" ]
9
+
10
+ RND_PROJECT_NAMES = [ "Anaconda Warp", "Bleeding Moon", "Brave Neutron", "Steep Curb", "Cool Artificial", "Dead Crystal", "Electric Spark", "Front Street", "Frozen Sunshine", "Furious Skunk", "Global Yard", "Green Emerald", "Gray Vulture", "Insane Steel", "Ivory Tuba", "Lucky Morning", "Moving Vegetable", "Navy Mountain", "Mars Mission", "Next Square", "Maroon Nitrogen", "Northernmost Galaxy", "Olive Monkey", "Permanent Albatross", "Pure Spider", "Purple Panther", "Ice Ruby", "Remote Cloud", "Running Creek", "Rusty Beacon", "Serious Summer", "Sienna Compass", "Stony Sound", "Straw Plastic", "Swift Burst", "Tainted Torpedo", "Tasty Comic" ]
11
+
12
+ RND_HORSE_NAMES = [ "Amber", "Annie", "Badal", "Beast", "Beauty", "Bella", "Belle", "Blaze", "Blue", "Bob", "Buck", "Buddy", "Buttercup", "Casey", "Chance", "Charger", "Cherokee", "Chester", "Cheyenne", "Chief", "Coco", "Cocoa", "Colton", "Cowboy", "Cricket", "Daisy", "Dakota", "Dallas", "Dani", "Dixie", "Dolly", "Dreamer", "Duke", "Dusty", "Emily", "Emma", "Estrellita", "Gypsy", "Harley", "Honey", "Jack", "Jake", "Kidd", "Lady", "Lucky", "Luna", "Magic", "Mariah", "Max", "Midnight", "Midnight storm", "Milo", "Minnie", "Missy", "Misty", "Mojo", "Molly", "Monkey", "Moon", "Morgan", "Nikita", "Nikki", "Nutmeg", "Prince", "Princess", "Rain", "Ranger", "Red", "Rocky", "Roger", "Rosalia", "Rosie", "Sally", "Sassy", "Shiloh", "Sky", "Smokey", "Spirit", "Star", "Stormy", "Sugar", "Sultan", "Sundance", "Taz", "Telly", "Thor", "Tinker", "Toby", "Tom", "Tony", "Tornado", "Tucker", "Twister", "Whisper", "Willow", "Yankee" ]
13
+
14
+ def self.first_name
15
+ RND_FIRST_NAMES[rand(RND_FIRST_NAMES.size)]
16
+ end
17
+
18
+ def self.last_name
19
+ RND_LAST_NAME[rand(RND_LAST_NAME.size)]
20
+ end
21
+
22
+ def self.first_and_last_name
23
+ "#{first_name} #{last_name}"
24
+ end
25
+
26
+ def self.company_name
27
+ RND_COMPANY_NAMES[rand(RND_COMPANY_NAMES.size)]
28
+ end
29
+
30
+ def self.project_name
31
+ RND_PROJECT_NAMES[rand(RND_PROJECT_NAMES.size)]
32
+ end
33
+
34
+ def self.horse_name
35
+ RND_HORSE_NAMES[rand(RND_HORSE_NAMES.size)]
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,22 @@
1
+ module Mockdata
2
+ class Numbers
3
+ # random_between(2..6) # => 2
4
+ def self.random_between(_range)
5
+ rand((_range.max-_range.min)+1)+_range.min # 2..6 => (6-2)+1=5 => 0,1,2,3,4 => +2 => 2,3,4,5,6
6
+ end
7
+
8
+ # random_number_array(1..3, 5) # => [2, 3, 1, 3, 1]
9
+ def self.random_number_array(_range, _nr)
10
+ arr = []
11
+ 1.upto(_nr) { arr << random_between(_range) }
12
+ return arr
13
+ end
14
+
15
+ # choose_from_array([1,2,3,4], 3) # => [4, 2, 3]
16
+ def self.choose_from_array(_arr, _nr)
17
+ arr = []
18
+ 1.upto(_nr) { arr << _arr[rand(_arr.size)] }
19
+ return arr
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,17 @@
1
+ module Mockdata
2
+ class TimeZones
3
+ # Selection of time-zones
4
+ RND_TIME_ZONES = [ "Alaska", "Pacific Time (US &amp; Canada)", "Arizona", "Mountain Time (US &amp; Canada)", "Central Time (US &amp; Canada)", "Eastern Time (US &amp; Canada)", "Indiana (East)", "International Date Line West", "Midway Island", "Samoa", "Tijuana", "Chihuahua", "Mazatlan", "Central America", "Guadalajara", "Mexico City", "Monterrey", "Saskatchewan", "Bogota", "Lima", "Quito", "Caracas", "Atlantic Time (Canada)", "Georgetown", "La Paz", "Santiago", "Newfoundland", "Brasilia", "Buenos Aires", "Greenland", "Mid-Atlantic", "Azores", "Cape Verde Is.", "Casablanca", "Dublin", "Edinburgh", "Lisbon", "London", "Monrovia", "UTC", "Amsterdam", "Belgrade", "Berlin", "Bern", "Bratislava", "Brussels", "Budapest", "Copenhagen", "Ljubljana", "Madrid", "Paris", "Prague", "Rome", "Sarajevo", "Skopje", "Stockholm", "Vienna", "Warsaw", "West Central Africa", "Zagreb", "Athens", "Bucharest", "Cairo", "Harare", "Helsinki", "Istanbul", "Jerusalem", "Kyiv", "Minsk", "Pretoria", "Riga", "Sofia", "Tallinn", "Vilnius", "Baghdad", "Kuwait", "Moscow", "Nairobi", "Riyadh", "St. Petersburg", "Volgograd", "Tehran", "Abu Dhabi", "Baku", "Muscat", "Tbilisi", "Yerevan", "Kabul", "Ekaterinburg", "Islamabad", "Karachi", "Tashkent", "Chennai", "Kolkata", "Mumbai", "New Delhi", "Sri Jayawardenepura", "Kathmandu", "Almaty", "Astana", "Dhaka", "Novosibirsk", "Rangoon", "Bangkok", "Hanoi", "Jakarta", "Krasnoyarsk", "Beijing", "Chongqing", "Hong Kong", "Irkutsk", "Kuala Lumpur", "Perth", "Singapore", "Taipei", "Ulaan Bataar", "Urumqi", "Osaka", "Sapporo", "Seoul", "Tokyo", "Yakutsk", "Adelaide", "Darwin", "Brisbane", "Canberra", "Guam", "Hobart", "Melbourne", "Port Moresby", "Sydney", "Vladivostok", "Kamchatka", "Magadan", "New Caledonia", "Solomon Is.", "Auckland", "Fiji", "Marshall Is.", "Wellington", "Nuku'alofa" ]
5
+
6
+ # Ruby on Rails time-zones
7
+ RND_TIME_ZONES_HASH = [{"International Date Line West"=>"Pacific/Midway"}, {"Midway Island"=>"Pacific/Midway"}, {"Samoa"=>"Pacific/Pago_Pago"}, {"Hawaii"=>"Pacific/Honolulu"}, {"Alaska"=>"America/Juneau"}, {"Pacific Time (US & Canada)"=>"America/Los_Angeles"}, {"Tijuana"=>"America/Tijuana"}, {"Mountain Time (US & Canada)"=>"America/Denver"}, {"Arizona"=>"America/Phoenix"}, {"Chihuahua"=>"America/Chihuahua"}, {"Mazatlan"=>"America/Mazatlan"}, {"Central Time (US & Canada)"=>"America/Chicago"}, {"Saskatchewan"=>"America/Regina"}, {"Guadalajara"=>"America/Mexico_City"}, {"Mexico City"=>"America/Mexico_City"}, {"Monterrey"=>"America/Monterrey"}, {"Central America"=>"America/Guatemala"}, {"Eastern Time (US & Canada)"=>"America/New_York"}, {"Indiana (East)"=>"America/Indiana/Indianapolis"}, {"Bogota"=>"America/Bogota"}, {"Lima"=>"America/Lima"}, {"Quito"=>"America/Lima"}, {"Atlantic Time (Canada)"=>"America/Halifax"}, {"Caracas"=>"America/Caracas"}, {"La Paz"=>"America/La_Paz"}, {"Santiago"=>"America/Santiago"}, {"Newfoundland"=>"America/St_Johns"}, {"Brasilia"=>"America/Sao_Paulo"}, {"Buenos Aires"=>"America/Argentina/Buenos_Aires"}, {"Georgetown"=>"America/Guyana"}, {"Greenland"=>"America/Godthab"}, {"Mid-Atlantic"=>"Atlantic/South_Georgia"}, {"Azores"=>"Atlantic/Azores"}, {"Cape Verde Is."=>"Atlantic/Cape_Verde"}, {"Dublin"=>"Europe/Dublin"}, {"Edinburgh"=>"Europe/London"}, {"Lisbon"=>"Europe/Lisbon"}, {"London"=>"Europe/London"}, {"Casablanca"=>"Africa/Casablanca"}, {"Monrovia"=>"Africa/Monrovia"}, {"UTC"=>"Etc/UTC"}, {"Belgrade"=>"Europe/Belgrade"}, {"Bratislava"=>"Europe/Bratislava"}, {"Budapest"=>"Europe/Budapest"}, {"Ljubljana"=>"Europe/Ljubljana"}, {"Prague"=>"Europe/Prague"}, {"Sarajevo"=>"Europe/Sarajevo"}, {"Skopje"=>"Europe/Skopje"}, {"Warsaw"=>"Europe/Warsaw"}, {"Zagreb"=>"Europe/Zagreb"}, {"Brussels"=>"Europe/Brussels"}, {"Copenhagen"=>"Europe/Copenhagen"}, {"Madrid"=>"Europe/Madrid"}, {"Paris"=>"Europe/Paris"}, {"Amsterdam"=>"Europe/Amsterdam"}, {"Berlin"=>"Europe/Berlin"}, {"Bern"=>"Europe/Berlin"}, {"Rome"=>"Europe/Rome"}, {"Stockholm"=>"Europe/Stockholm"}, {"Vienna"=>"Europe/Vienna"}, {"West Central Africa"=>"Africa/Algiers"}, {"Bucharest"=>"Europe/Bucharest"}, {"Cairo"=>"Africa/Cairo"}, {"Helsinki"=>"Europe/Helsinki"}, {"Kyiv"=>"Europe/Kiev"}, {"Riga"=>"Europe/Riga"}, {"Sofia"=>"Europe/Sofia"}, {"Tallinn"=>"Europe/Tallinn"}, {"Vilnius"=>"Europe/Vilnius"}, {"Athens"=>"Europe/Athens"}, {"Istanbul"=>"Europe/Istanbul"}, {"Minsk"=>"Europe/Minsk"}, {"Jerusalem"=>"Asia/Jerusalem"}, {"Harare"=>"Africa/Harare"}, {"Pretoria"=>"Africa/Johannesburg"}, {"Moscow"=>"Europe/Moscow"}, {"St. Petersburg"=>"Europe/Moscow"}, {"Volgograd"=>"Europe/Moscow"}, {"Kuwait"=>"Asia/Kuwait"}, {"Riyadh"=>"Asia/Riyadh"}, {"Nairobi"=>"Africa/Nairobi"}, {"Baghdad"=>"Asia/Baghdad"}, {"Tehran"=>"Asia/Tehran"}, {"Abu Dhabi"=>"Asia/Muscat"}, {"Muscat"=>"Asia/Muscat"}, {"Baku"=>"Asia/Baku"}, {"Tbilisi"=>"Asia/Tbilisi"}, {"Yerevan"=>"Asia/Yerevan"}, {"Kabul"=>"Asia/Kabul"}, {"Ekaterinburg"=>"Asia/Yekaterinburg"}, {"Islamabad"=>"Asia/Karachi"}, {"Karachi"=>"Asia/Karachi"}, {"Tashkent"=>"Asia/Tashkent"}, {"Chennai"=>"Asia/Kolkata"}, {"Kolkata"=>"Asia/Kolkata"}, {"Mumbai"=>"Asia/Kolkata"}, {"New Delhi"=>"Asia/Kolkata"}, {"Kathmandu"=>"Asia/Kathmandu"}, {"Astana"=>"Asia/Dhaka"}, {"Dhaka"=>"Asia/Dhaka"}, {"Sri Jayawardenepura"=>"Asia/Colombo"}, {"Almaty"=>"Asia/Almaty"}, {"Novosibirsk"=>"Asia/Novosibirsk"}, {"Rangoon"=>"Asia/Rangoon"}, {"Bangkok"=>"Asia/Bangkok"}, {"Hanoi"=>"Asia/Bangkok"}, {"Jakarta"=>"Asia/Jakarta"}, {"Krasnoyarsk"=>"Asia/Krasnoyarsk"}, {"Beijing"=>"Asia/Shanghai"}, {"Chongqing"=>"Asia/Chongqing"}, {"Hong Kong"=>"Asia/Hong_Kong"}, {"Urumqi"=>"Asia/Urumqi"}, {"Kuala Lumpur"=>"Asia/Kuala_Lumpur"}, {"Singapore"=>"Asia/Singapore"}, {"Taipei"=>"Asia/Taipei"}, {"Perth"=>"Australia/Perth"}, {"Irkutsk"=>"Asia/Irkutsk"}, {"Ulaan Bataar"=>"Asia/Ulaanbaatar"}, {"Seoul"=>"Asia/Seoul"}, {"Osaka"=>"Asia/Tokyo"}, {"Sapporo"=>"Asia/Tokyo"}, {"Tokyo"=>"Asia/Tokyo"}, {"Yakutsk"=>"Asia/Yakutsk"}, {"Darwin"=>"Australia/Darwin"}, {"Adelaide"=>"Australia/Adelaide"}, {"Canberra"=>"Australia/Melbourne"}, {"Melbourne"=>"Australia/Melbourne"}, {"Sydney"=>"Australia/Sydney"}, {"Brisbane"=>"Australia/Brisbane"}, {"Hobart"=>"Australia/Hobart"}, {"Vladivostok"=>"Asia/Vladivostok"}, {"Guam"=>"Pacific/Guam"}, {"Port Moresby"=>"Pacific/Port_Moresby"}, {"Magadan"=>"Asia/Magadan"}, {"Solomon Is."=>"Asia/Magadan"}, {"New Caledonia"=>"Pacific/Noumea"}, {"Fiji"=>"Pacific/Fiji"}, {"Kamchatka"=>"Asia/Kamchatka"}, {"Marshall Is."=>"Pacific/Majuro"}, {"Auckland"=>"Pacific/Auckland"}, {"Wellington"=>"Pacific/Auckland"}, {"Nuku'alofa"=>"Pacific/Tongatapu"}]
8
+
9
+ def self.pick
10
+ RND_TIME_ZONES[rand(RND_TIME_ZONES.size)]
11
+ end
12
+
13
+ def self.pick_hash
14
+ RND_TIME_ZONES_HASH[rand(RND_TIME_ZONES_HASH.size)]
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,3 @@
1
+ module Mockdata
2
+ VERSION = "0.1.1"
3
+ end
@@ -0,0 +1,37 @@
1
+ module Mockdata
2
+ class Words
3
+ # Workplace suitable words
4
+ RND_WORDS = %w{mitt that with they this have from word what were when your said there each which their will other about many then them these some would make like into time look more write number could people than first water been call find long down come made part over sound take only little work know place year live back give most very after thing just name good sentence think great where help through much before line right mean same tell follow came want show also around farm three small does another well large must even such because turn here went read need land different home move kind hand picture again change play spell away animal house point page letter mother answer found study still learn should America world high every near food between below country plant last school father keep tree never start city earth light thought head under story left don't while along might chose something seem next hard open example begin life always those both paper together group often important until children side feet mile night walk white began grow took river four carry state once book hear stop without second late miss idea enough face watch Indian really almost above girl sometimes mountain young talk soon list song being leave family it's best better black blue bring brown clean cold done draw drink eight fall fast five full funny gave giving goes green hold hurt jump laugh myself pick please pretty pull ride round seven shall sing sleep thank today upon warm wash wish yellow bake band bank bell belt bend bent Bess bike bite blast bled blend blimp blink bliss block blond blot bluff blunt bone brag brand brass brat bred bride brig brim broke brunt brute bump bunt bust camp cane can't cape cast clad clam clamp clan clap clasp class cliff cling clink clip close clot club clump clung cone crab craft cram cramp crib crime crisp crop crust cure cute damp dent dime dine dire dive dope draft drag drank dress drift drill drip drop drove drug drum dump dust fact fade fell felt file fill film fine fire fist flag flap flat fled fling flip flop flung flunk frame frank frill frisk frog frost froze fume gasp gaze glad gland glass glint globe glum golf grab grade gram gramp grand grant grape grasp grass grill grim grin grip gripe grump grunt gulp gust hate held hide hint hire hole honk hope hose hung hunt Jane joke junk kept kite lamp lick lift lime limp lock luck lump Mack mask mass mast mate melt mend Mick Mike milk mill mint mist mite mope mule mute neck nest nine nose note pane pant pass past pest Pete pike pile pill pine plan plane plank plate plop plot plug plum plump plus poke pole pomp pond pope prank press pride prime print prize prop punk pure raft ripe robe rock rode romp rope rose Runs runt rust sack sake sand sank save scab scale scalp scan scare scat scope scram scrap script self sell send sent sick site size skate skid skill skim skin skip skit skunk slam slang slant slap slat slate slave sled slept slide slim sling slip slob slope slot slug slum slump smack smell smile smog smoke smug snack snag snake snap sniff snip snipe snub snug sock soft span spank spat sped spend spent spill spin spine spit spite splat splint split spoke spot spun spunk stab stack stale stamp stand stem step stiff sting stink stomp stone stove strand strap strip stripe struck strung stuck stump stun suck sung swam swang swell swift swim swing swung tack tame tape tent test tide tile till tilt trade tramp trap trend trick trim trip trot trunk trust twang twig twin twist vane wave weld wind wine wire yoke absent admit album ball bang banging basket bathtub bedbug bench bill blank blasted blended blush bobsled branch brave brush bunch camping care case catnip cave chest chill chin chip chipmunk chop chunk clock cloth contest crack crash crashing crept cross crush cuff dash deck dentist dish disrupt disrupted drinking dusted expanded fang finishing fish flute Fran fuss gift goblin hall hang Hank himself hotrod huff hunted index insisted insisting insulted invent invented Jack jumping king kiss lane lapdog lasted lending loft lost lunch lung mall mascot math mess napkin pack path picnic pigpen pinball pinch planted plastic problem public publishing puff punishing quake rake rash rented rest rested rich ring ringing safe sale sang sash shack shed shelf shell shifted shine ship shop shrimp shrinking shrunk shut sink sinking sits splash splashing squinted standing Steve stub stuff stunt sunfish sunk sunlit sunset suntan swishing talented tall tank throne thud tick tilted tiptop toss trusted twisted upset vent vest wall whiff whip whiplash wing wink wipe wise yell zigzag called circle friend Mrs. nothing says Beth Bing Blanch bong Buck burnt Burt Carmen Cass caterpillar Chad cheer chomp Chuck chuckle chug Clark click climb clown cluck coal complain croak crunch Curtis curve darts dinner diver doctor doll door Doris Ellen fellow fiddle firm fishing Fitch foam forever forgot forth front Gert gobble gone gosh granddad grandpa grinned grumble hatch Herb hill horse hush insect Jeff jiggle Jill Jill's Josh jumble kick Kirk larch library lived lives market Mitch napper nibble Nick Norm onto owner patch peck perfect ping pong quick quill quilt Quinn quit reward Rick Rivera roam ruff Sanchez served Seth sister Sloan smash snort snuggle soup sparkle sprinkle squirt stick sudden sunburn surprise swimmer tadpole Tess Texas tickle toad Todd turf twinkle twitch umbrella uncle wham whirl whisper whistle wiggle window Winkle writing York zing able added afraid afternoon ahead annoy anything anyway anywhere applaud artist attack attic auto avoid awesome awful awning babble baby baffle bald ballplayer bark base baseball basin basketball batch bath battle beach bead beam bean beanstalk beast beat bedtime beef beehive beet begging behind bird birthday bleach blew blind bloom blow blown bluebird blueprint blur boast boat body boil bold bonnet bonus boost boot born bottle bowl brace braid brain brainstorm brake brawl bread breakfast breath brick bright broil broiler broom bruise bubble buddy built bundle bunk bunny burn burst buses butterfly button buzz cabin cage cake camel candle candy careful cart catch cattle cell cent chain chalk champ charge chart chase chat check cheerful cheese chess chew chick child chime chirp choice chore church churn claim classmate clay clerk clever clue clutch coach coat coax coil coin collect colorful cool core cork corn cowboy cozy crate crawl cream crew crinkle crow cruise cuddle cupcake curb curl daddy dangle Danny dark dart date dawn daylight dead deaf dealt decent deep delight desk dimple dirt ditch doghouse double dragon dragonfly drain dread dream drew driveway droop duck dunk dusk easel easy elbow enjoy ever evergreen everyone everything everywhere explore fabric fail faithful fame fault fawn feast feed feel fence fern fetch fifty fight finish firefighter flagpole flash flashlight flaunt flaw flight float flow fluffy foal foil fold fool forest forget fork form fort fraud fray free fresh Friday fried fright frozen fruit game garden gate germ giggle ginger giraffe gleam glean glow gluestick goat going gold goose Grace graceful grain grapefruit grasshopper grateful gray grew groan grown grown-up growth gumball habit hail handwriting happen happy harm harmful harp haul haunt hawk health heat heavy heel hello helpful herself hidden highway hoist homemade homework hoot hopeful hopscotch horn host houseboat housefly huddle human humid hummingbird hump hungry hunk hurdle hurl inch inside instead itch Jake Jean jeep jelly jellyfish jerk Jimmy jingle Joan join joint juggle juice jungle kickball kingfish kits kitten kitty knack knee kneecap kneel knelt knew knife knight knit knob knock knockout knot knothole known lace lack lake latch launch lawn lazy leap leather lemon less lighthouse limit link lipstick living load loaf loop loose lunchbox Mabel mail main mane march mark match Matt meant meat meet mice middle mild mind mine mitten moan model moist mold moment Monday mood motel munch music muzzle nail nanny Nate neat necktie nerve newscast newspaper nice nickname nighttime nips noise noon north nowhere oatmeal object oink ooze outside pace paddle pail pain painful paint pancake paperback park pause pawn peace peaceful peach peak peddle peep pencil pennies penny perch piano pillow pilot pink pipe pitch ploy poison pony pooch poodle pool popcorn porch port post poster potpie pretzel price proof pupil puppy purple purse puzzle quack queen quicksand rabbit race rack rage rail rain rainbow ranch rang rattle reach ready recycle refund renew restful return ribbon rice riddle rind rink rise road roast robin robot room roost royal ruled rumble runway rush saddle sail sailboat salad sample sandbox sandpaper sandy Saturday sauce saucer scarf scold scorch score scrape scratch scream screen screw scrub seal seat serve settle shade shadow shake shaking shameful shape share shark sharp sheep shipwreck shirt shore short shrink shrub shrug sidewalk sigh sight silence silly simple sips siren slice slick slight slow slur smart smiling smooth snail sneak snooze snore snow snowball snowflake snowman soak soap sofa soil someone somewhere sore sort space spark speak splendid splotch spoil spool spoon sport sprain sprawl spray spread spring sprint spruce spur squawk stage star startle stay steam steep stern stiffer stir stool store stork storm strain strange straw stray stream street stretch strict strike string strong stung suit suitcase sunblock Sunday sunflower sunny sunrise sunshine surf sway sweat sweep sweet swerve swimming swirl switch tablet tail taps tattle taught teach teacher team tease teeth tennis thankful thick thigh thimble thin thinner thinnest third thirst thorn thread threat thrill throat throw Thursday tiger tight tired toast toil told tool tooth topcoat torch torn trace traffic train trash travel tray tread treetop trouble truck trumpet Tuesday tugboat tulip tumble tummy turtle tusk twirl ugly unzip useful value vanish verb verse vine visit visitor voice void vote waddle wage wagon wait wake waves wealth weather weave Wednesday weed week weekend wettest whack whale whatever wheat wheel whenever whisk whiz wide wife wild windmill wonderful wore worn wrap wreath wreck wrench wriggle wrinkle wrist wristwatch written wrong wrote yard yardstick yarn yawn Zack zebra zoom winter wear mitten bait barn bawl beak birth blab blade blame blaze bleed bless blip blurb blurt bond books booth boys brad bran brawn brisk brook broth brother card cash cask cheap cheek chow clack clang clash claw cloak clod coast code cook coop cord cost count crane crick crock crook crown crude crumb cube dear disk dock doze drake drape drawn drive dude east faint flake flame flesh flick flirt flit flock floor flour flown flush fond foot fowl Fred fret frizz frying fuse gang glade glaze glee glen glide glob gloss goal gown grate greet grit grouch growl gruff heal heap hike hood hoof hook hoop howl huge husk intern jail June laid lame leak lend lent lien lint loan loin lone loot lord loud lurk lute maid maze meal mirth mock mole moon mouse mouth murk musk nook nurse paid peek peel pelt perk plain plants player plod plow plums pork prance pray prayer present prim prince probe prod program proud prowl punt raid rant real rent risk Rome roof rude rung scald scar scoop scoot scout scowl scuff scum seek seen shawl sheet shirk shook shoot shot shout shown sift silk sixth skips skirt skull slash slaw slay slid slit slop smear smith smock smoky snare snatch sneeze snob snoop snuff soot sour south speck speech speed spike spry spud spurn spurt stain stall Stan steal stood sulk swamp swan swap swarm swat swatch swept swig swine swish swoop sworn swum tale task tend tenth term thumb tint tock town toys track trail tram trek tribe trod Troy tune tweed tweet twelve twenty twice twine twitter urge uses vase wade wept west whine whir wick wilt woke wood woof wool wove zest zone against American among asked course days didn't during eyes general given however later order possible president rather since states system things though toward united used years color suddenly zipper ache aunt bare bear boom busy dare lose love none rule sure tire tube copy edge else fizz glue hair half hour I'll I've July kill lady lamb leaf liar lion mama mash meow mush obey okay ouch oven papa pour push roll shoe soda tiny worm true U.S. agree alive apple April awake blood break chair cloud cough cover dance erase phone piece whole whose adult angry belly death eagle empty extra hurry maybe money movie nasty party pizza quiet sorry stair sugar table taste threw touch towel truth waist waste woman women won't worse anyone arrive asleep August avenue behave bridge carpet cereal choose cookie corner crayon danger minute banana bucket carrot dollar finger flower gentle handle listen mirror monkey nickel nobody orange parent person pocket potato puppet rocket search secret seesaw shovel shower silent spider sponge squash squeak sticky summer supper they'd ticket tiptoe tissue tomato tongue turkey unfair wonder U.S.A. airport anybody balloon bedroom bicycle brownie cartoon ceiling channel chicken garbage promise squeeze address blanket earache excited good-bye grandma grocery indoors January kitchen lullaby monster morning naughty October pajamas pretend quarter shampoo stomach there's they'll they're they've tonight unhappy airplane alphabet bathroom favorite medicine December dinosaur elephant February football forehead headache hospital lollipop November outdoors question railroad remember sandwich scissors shoulder softball tomorrow upstairs vacation restroom astronaut beautiful bumblebee cardboard chocolate Christmas classroom cranberry drugstore furniture milkshake nightmare telephone difficult everybody hamburger September spaceship spaghetti stoplight underwear yesterday ice cream automobile blackboard downstairs photograph strawberry television toothbrush toothpaste baby-sitter post office grandfather grandmother potato chip upside down kindergarten refrigerator Thanksgiving hide-and-seek United States pumpkin salt melted handed printed landed wanted filled showed hugged tugged planned jogged spilled smelled grilled slammed rushed spelled saved baked named lined smiled closed helped jumped looked clapped tapped kicked dropped zipped wished pitched missed walked worked she'll you'll he'll we're she's he's you're we're jazz}
5
+
6
+ def self.one
7
+ RND_WORDS[rand(RND_WORDS.size)]
8
+ end
9
+
10
+ def self.two
11
+ return "#{one} #{one}"
12
+ end
13
+
14
+ def self.three
15
+ return "#{one} #{two}"
16
+ end
17
+
18
+ def self.four
19
+ return "#{two} #{two}"
20
+ end
21
+
22
+ # Return _nr words
23
+ def self.pick(_nr)
24
+ arr = []
25
+ 1.upto(_nr) { arr << one() }
26
+ return arr.join(" ")
27
+ end
28
+
29
+ # Return _range (x..y) words
30
+ def self.some(_range)
31
+ arr = []
32
+ nr = rand((_range.max-_range.min)+1)+_range.min
33
+ 1.upto(nr) { arr << one() }
34
+ return arr.join(" ")
35
+ end
36
+ end
37
+ end
data/lib/mockdata.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "mockdata/version"
2
+ require 'mockdata/locations'
3
+ require 'mockdata/names'
4
+ require 'mockdata/numbers'
5
+ require 'mockdata/time_zones'
6
+ require 'mockdata/words'
data/mockdata.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mockdata/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "mockdata"
8
+ spec.version = Mockdata::VERSION
9
+ spec.authors = ["Erik van Eykelen"]
10
+ spec.email = ["erik.van.eykelen@bitgain.com"]
11
+
12
+ spec.summary = %q{Random data generator for test purposes}
13
+ spec.description = %q{Generates random first and last names, company names, numbers, time-zones and words}
14
+ spec.homepage = "https://github.com/evaneykelen/mockdata/wiki/Documentation"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.11"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mockdata
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Erik van Eykelen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-07-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.11'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.11'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Generates random first and last names, company names, numbers, time-zones
42
+ and words
43
+ email:
44
+ - erik.van.eykelen@bitgain.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - Gemfile.lock
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - lib/mockdata.rb
56
+ - lib/mockdata/locations.rb
57
+ - lib/mockdata/names.rb
58
+ - lib/mockdata/numbers.rb
59
+ - lib/mockdata/time_zones.rb
60
+ - lib/mockdata/version.rb
61
+ - lib/mockdata/words.rb
62
+ - mockdata.gemspec
63
+ homepage: https://github.com/evaneykelen/mockdata/wiki/Documentation
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.5.1
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: Random data generator for test purposes
87
+ test_files: []