imposter 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{imposter}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robert Hall"]
12
- s.date = %q{2009-12-22}
12
+ s.date = %q{2009-12-24}
13
13
  s.description = %q{Add generator and rake tasks via YAML based imposters for schema level data faking}
14
14
  s.email = %q{robert.hall@itatc.com}
15
15
  s.extra_rdoc_files = [
@@ -13,7 +13,6 @@ require 'imposter/mineral'
13
13
  require 'imposter/csz'
14
14
 
15
15
  module Imposter
16
-
17
16
  def self.gencsv(filename,cnt,fields,values)
18
17
  puts " #{filename.sub(/.csv/,'')}..."
19
18
  vl = values
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'sqlite3'
3
3
  require 'pathname'
4
+ require 'active_support'
4
5
 
5
6
  db_file = Pathname.new(__FILE__).dirname + "//"
6
7
  $csz_db =SQLite3::Database.new(db_file + "csz.db")
@@ -39,4 +40,32 @@ class CSZ
39
40
  end
40
41
  end
41
42
  end
43
+ class Street
44
+ class << self
45
+ Names = %w(1st First 2nd 3rd Third 4th Fourth 5th Fifth 6th Sixth 7th Seventh 8th Eighth 9th Nineth 10th Tenth Maple Kennedy Central Elm Washngton State Country Acres Douglas Laurel Jefferson Wall Street Main Roosevelt Walnut Tyler Hickory Market Broadway Forest Park Birch Spruce Taylor Beech Oak Sycamore Wood Grant Lincoln Taft Poplar)
46
+ Types = %w(Highway Hwy Expressway Expy Freeway Fwy Motorway Mtrwy Avenue Ave Boulevard Blvd Road Rd Street St Alley Aly Bay Drive Dr Fairway Gardens Gdns Gate Grove Grv Heights Hts Highlands Knoll Knl Lane Ln Manor Mnr Mews Passage Psge Pathway Pthwy Place Pl Row Terrace Ter Trail Trl View Vw Way Close Court Ct Cove Cv Croft Garth Green Grn Lawn Nook Place Pl Circle Cir Crescent Cres Loop Oval Quadrant Square Sq Canyon Cyn Causeway Cswy Grade Hill Hl Mount Mt Parkway Pkwy Rise Vale)
47
+ Directions = %w(N. S. E. W. NE. NW. SE. SW.)
48
+ def name
49
+ Names.shuffle[0,1]
50
+ end
51
+
52
+ def type
53
+ return_type=Types.shuffle[0,1]
54
+ end
55
+
56
+ def direction
57
+ Directions.shuffle[0,1]
58
+ end
59
+
60
+ def full
61
+ st_num = (100+rand(99999))
62
+ rnd_addr = st_num.to_s+(['_']+name + ['_'] + type).to_s
63
+ if (1+rand(5))<2 then
64
+ rnd_addr += (['_']+direction).to_s.upcase
65
+ end
66
+ return rnd_addr.titleize
67
+ end
68
+ end
69
+ end
70
+
42
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imposter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Hall
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-22 00:00:00 -05:00
12
+ date: 2009-12-24 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency