ffaker 1.17.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
data/ffaker.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'ffaker'
7
- s.version = '1.17.0'
7
+ s.version = '1.18.0'
8
8
  s.date = '2013-08-06'
9
9
  s.rubyforge_project = 'ffaker'
10
10
 
data/lib/ffaker.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Faker
2
- VERSION = "1.17.0"
2
+ VERSION = "1.18.0"
3
3
 
4
4
  require 'ffaker/utils/array_utils'
5
5
  require 'ffaker/utils/module_utils'
@@ -16,6 +16,10 @@ module Faker
16
16
  STATE_ABBR.rand
17
17
  end
18
18
 
19
+ def state_and_territories_abbr
20
+ STATE_AND_TERRITORIES_ABBR.rand
21
+ end
22
+
19
23
  ZIP_FORMATS = k ['#####', '#####-####']
20
24
 
21
25
  STATE = k ['Alabama', 'Alaska', 'Arizona', 'Arkansas',
@@ -29,9 +33,14 @@ module Faker
29
33
  'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington',
30
34
  'West Virginia', 'Wisconsin', 'Wyoming']
31
35
 
32
- STATE_ABBR = k %w(AL AK AS AZ AR CA CO CT DE DC FM FL GA GU HI ID IL IN IA
36
+ STATE_AND_TERRITORIES_ABBR = k %w(AL AK AS AZ AR CA CO CT DE DC FM FL GA GU HI ID IL IN IA
33
37
  KS KY LA ME MH MD MA MI MN MS MO MT NE NV NH NJ NM NY NC
34
38
  ND MP OH OK OR PW PA PR RI SC SD TN TX UT VT VI VA WA WV
35
39
  WI WY AE AA AP)
40
+
41
+ STATE_ABBR = k %w(AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA
42
+ KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM
43
+ NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA
44
+ WV WI WY)
36
45
  end
37
46
  end
@@ -9,6 +9,10 @@ class TestAddressUSUS < Test::Unit::TestCase
9
9
  assert_match /[A-Z]/, Faker::AddressUS.state_abbr
10
10
  end
11
11
 
12
+ def test_us_state_and_territories_abbr
13
+ assert_match /[A-Z]/, Faker::AddressUS.state_and_territories_abbr
14
+ end
15
+
12
16
  def test_zip_code
13
17
  assert_match /[0-9]/, Faker::AddressUS.zip_code
14
18
  end
metadata CHANGED
@@ -1,61 +1,57 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ffaker
3
- version: !ruby/object:Gem::Version
4
- hash: 83
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.18.0
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 17
9
- - 0
10
- version: 1.17.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Emmanuel Oga
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-08-06 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-08-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :development
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: test-unit
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: test-unit
32
+ requirement: !ruby/object:Gem::Requirement
38
33
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
46
38
  type: :development
47
- version_requirements: *id002
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
48
46
  description: Faster Faker, generates dummy data.
49
47
  email: EmmanuelOga@gmail.com
50
48
  executables: []
51
-
52
49
  extensions: []
53
-
54
- extra_rdoc_files:
50
+ extra_rdoc_files:
55
51
  - README.md
56
52
  - LICENSE
57
53
  - Changelog.md
58
- files:
54
+ files:
59
55
  - Changelog.md
60
56
  - Gemfile
61
57
  - LICENSE
@@ -177,38 +173,30 @@ files:
177
173
  - test/test_venue.rb
178
174
  homepage: http://github.com/emmanueloga/ffaker
179
175
  licenses: []
180
-
181
176
  post_install_message:
182
- rdoc_options:
177
+ rdoc_options:
183
178
  - --charset=UTF-8
184
- require_paths:
179
+ require_paths:
185
180
  - lib
186
- required_ruby_version: !ruby/object:Gem::Requirement
181
+ required_ruby_version: !ruby/object:Gem::Requirement
187
182
  none: false
188
- requirements:
189
- - - ">="
190
- - !ruby/object:Gem::Version
191
- hash: 3
192
- segments:
193
- - 0
194
- version: "0"
195
- required_rubygems_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
196
188
  none: false
197
- requirements:
198
- - - ">="
199
- - !ruby/object:Gem::Version
200
- hash: 3
201
- segments:
202
- - 0
203
- version: "0"
189
+ requirements:
190
+ - - ! '>='
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
204
193
  requirements: []
205
-
206
194
  rubyforge_project: ffaker
207
195
  rubygems_version: 1.8.25
208
196
  signing_key:
209
197
  specification_version: 2
210
198
  summary: Faster Faker, generates dummy data.
211
- test_files:
199
+ test_files:
212
200
  - test/test_address.rb
213
201
  - test/test_address_au.rb
214
202
  - test/test_address_ca.rb