faker-medical 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,10 @@
1
1
  = faker-medical
2
2
 
3
- Description goes here.
3
+ You can generate the following data elements:
4
+
5
+ Faker::Ssn.en_ssn - generates a Social Security Number
6
+ Faker::Dea.dea - genearates a DEA Number
7
+ Faker::Patient.gender - generates a patient gender (M|F)
4
8
 
5
9
  == Note on Patches/Pull Requests
6
10
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{faker-medical}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tom & Russell"]
@@ -25,8 +25,10 @@ Gem::Specification.new do |s|
25
25
  "faker-medical.gemspec",
26
26
  "lib/faker_dea.rb",
27
27
  "lib/faker_npi.rb",
28
+ "lib/faker_patient.rb",
28
29
  "lib/faker_ssn.rb",
29
30
  "spec/lib/faker_dea_spec.rb",
31
+ "spec/lib/faker_patient_spec.rb",
30
32
  "spec/lib/faker_ssn_spec.rb",
31
33
  "spec/spec.opts",
32
34
  "spec/spec_helper.rb",
@@ -41,6 +43,7 @@ Gem::Specification.new do |s|
41
43
  s.summary = %q{Faker Extension for Medical Numbers}
42
44
  s.test_files = [
43
45
  "spec/lib/faker_dea_spec.rb",
46
+ "spec/lib/faker_patient_spec.rb",
44
47
  "spec/lib/faker_ssn_spec.rb",
45
48
  "spec/spec_helper.rb",
46
49
  "test/helper.rb",
@@ -0,0 +1,12 @@
1
+ module Faker
2
+ class Patient
3
+ class << self
4
+ # English social security number has the format xxx-xx-xxxx
5
+ def gender
6
+ gender = ['M','F']
7
+ gender[rand(2)]
8
+ end
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/../spec_helper.rb'
2
+
3
+ describe Faker::Patient do
4
+
5
+ it "should return a patient gender" do
6
+ puts Faker::Patient.gender
7
+ Faker::Patient.gender.should match(/^[M|F]$/)
8
+ end
9
+
10
+
11
+ end
data/spec/spec_helper.rb CHANGED
@@ -2,4 +2,4 @@ require 'spec'
2
2
  require 'faker'
3
3
  require 'faker_dea'
4
4
  require 'faker_ssn'
5
- require 'faker_npi'
5
+ require 'faker_patient'
data/version.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 0
3
+ :patch: 1
4
4
  :build:
5
5
  :major: 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faker-medical
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom & Russell
@@ -40,8 +40,10 @@ files:
40
40
  - faker-medical.gemspec
41
41
  - lib/faker_dea.rb
42
42
  - lib/faker_npi.rb
43
+ - lib/faker_patient.rb
43
44
  - lib/faker_ssn.rb
44
45
  - spec/lib/faker_dea_spec.rb
46
+ - spec/lib/faker_patient_spec.rb
45
47
  - spec/lib/faker_ssn_spec.rb
46
48
  - spec/spec.opts
47
49
  - spec/spec_helper.rb
@@ -78,6 +80,7 @@ specification_version: 3
78
80
  summary: Faker Extension for Medical Numbers
79
81
  test_files:
80
82
  - spec/lib/faker_dea_spec.rb
83
+ - spec/lib/faker_patient_spec.rb
81
84
  - spec/lib/faker_ssn_spec.rb
82
85
  - spec/spec_helper.rb
83
86
  - test/helper.rb