ffaker 1.12.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -76,6 +76,7 @@ $ cat scripts/benchmark.rb
76
76
  * kichiro (https://github.com/kichiro)
77
77
  * doctorbh (https://github.com/doctorbh)
78
78
  * Ben Wisleey ( https://github.com/wiseleyb )
79
+ * Simon Russel ( https://github.com/simonrussell )
79
80
 
80
81
  * See complete list: https://github.com/EmmanuelOga/ffaker/network
81
82
 
data/ffaker.gemspec CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.rubygems_version = '1.3.5'
6
6
 
7
7
  s.name = 'ffaker'
8
- s.version = '1.12.0'
9
- s.date = '2012-01-07'
8
+ s.version = '1.12.1'
9
+ s.date = '2012-01-09'
10
10
  s.rubyforge_project = 'ffaker'
11
11
 
12
12
  s.summary = "Faster Faker, generates dummy data."
data/lib/ffaker.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Faker
2
- VERSION = "1.12.0"
2
+ VERSION = "1.12.1"
3
3
 
4
4
  require 'ffaker/utils/array_utils'
5
5
  require 'ffaker/utils/module_utils'
@@ -11,6 +11,8 @@ module Faker
11
11
  ZIP_CODE[st_abbr][rand(ZIP_CODE[st_abbr].size)]
12
12
  end
13
13
 
14
+ alias :postcode :zip_code
15
+
14
16
  def state
15
17
  STATE.rand
16
18
  end
@@ -26,7 +28,7 @@ module Faker
26
28
 
27
29
  def full_address(st_abbr = nil)
28
30
  st_abbr ||= state_abbr
29
- "#{Faker::Address.street_address}, #{city(st_abbr)}, #{st_abbr} #{zip_code}"
31
+ "#{Faker::Address.street_address}, #{city(st_abbr)} #{st_abbr} #{zip_code}"
30
32
  end
31
33
 
32
34
  ZIP_FORMATS = k ['####']
@@ -38,7 +40,7 @@ module Faker
38
40
 
39
41
  # based on http://en.wikipedia.org/wiki/List_of_cities_in_Australia
40
42
  CITY = {
41
- "ACT" => ["Canberra"],
43
+ "ACT" => ["Canberra", "Ainslie", "Braddon", "O'Connor"],
42
44
  "NSW" => ["Albury", "Armidale", "Bankstown", "Bathurst", "Blacktown", "Blue Mountains", "Botany Bay",
43
45
  "Broken Hill", "Campbelltown", "Canada Bay", "Canterbury", "Cessnock", "Coffs Harbour", "Dubbo",
44
46
  "Fairfield", "Gosford", "Goulburn", "Grafton", "Greater Taree", "Griffith", "Hawkesbury", "Holroyd",
@@ -26,6 +26,10 @@ class TestAddressAU < Test::Unit::TestCase
26
26
  assert_match /\d{4}/, Faker::AddressAU.zip_code
27
27
  end
28
28
 
29
+ def test_postcode
30
+ assert_match /\d{4}/, Faker::AddressAU.postcode
31
+ end
32
+
29
33
  def test_full_address
30
34
  assert_match /[\, a-z]/, Faker::AddressAU.full_address
31
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.12.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-07 00:00:00.000000000 Z
12
+ date: 2012-01-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Faster Faker, generates dummy data.
15
15
  email: EmmanuelOga@gmail.com