medivo 0.0.11 → 0.0.12

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.
@@ -1,36 +1,6 @@
1
1
  require_relative 'resource'
2
2
 
3
3
  module Medivo
4
-
5
- class PrimaryInsurance
6
- include ActiveModel::Validations
7
-
8
- validates_presence_of :relationship, :company_name, :policy_number, :group_number
9
- validates :relationship, :inclusion => { :in => 1..2 }
10
-
11
- def initialize(attributes = {})
12
- @attributes = attributes
13
- end
14
-
15
- def read_attribute_for_validation(key)
16
- @attributes[key]
17
- end
18
-
19
- def to_hash
20
- @attributes
21
- end
22
-
23
- def validate(record)
24
- primary_insurance = record.attributes[:primary_insurance]
25
- record.errors.add(:primary_insurance, "primary_insurance field must be present") and return unless primary_insurance
26
- record.errors.add(:primary_insurance, "primary_insurance field must be of PrimaryInsurance class") unless primary_insurance.is_a? PrimaryInsurance
27
- primary_insurance.valid?
28
- primary_insurance.errors.messages.each do |field,value|
29
- record.errors.add(:"primary_insurance.#{field}", value.first)
30
- end
31
- end
32
- end
33
-
34
4
  class InsuranceOrder < Order
35
5
  set_element_name 'customer'
36
6
  set_collection_name 'customers'
@@ -0,0 +1,30 @@
1
+ module Medivo
2
+ class PrimaryInsurance
3
+ include ActiveModel::Validations
4
+
5
+ validates_presence_of :relationship, :company_name, :policy_number, :group_number
6
+ validates :relationship, :inclusion => {:in => 1..2}
7
+
8
+ def initialize(attributes = {})
9
+ @attributes = attributes
10
+ end
11
+
12
+ def read_attribute_for_validation(key)
13
+ @attributes[key]
14
+ end
15
+
16
+ def to_hash
17
+ @attributes
18
+ end
19
+
20
+ def validate(record)
21
+ primary_insurance = record.attributes[:primary_insurance]
22
+ record.errors.add(:primary_insurance, "primary_insurance field must be present") and return unless primary_insurance
23
+ record.errors.add(:primary_insurance, "primary_insurance field must be of PrimaryInsurance class") unless primary_insurance.is_a? PrimaryInsurance
24
+ primary_insurance.valid?
25
+ primary_insurance.errors.messages.each do |field, value|
26
+ record.errors.add(:"primary_insurance.#{field}", value.first)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module Medivo
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -1102,3 +1102,38 @@ Served asset /medivo/markerB.png - 200 OK (3ms)
1102
1102
 
1103
1103
  Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-10-28 15:11:11 +0100
1104
1104
  Served asset /medivo/arrow.png - 200 OK (4ms)
1105
+
1106
+
1107
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-28 17:44:21 +0100
1108
+ Processing by Medivo::LabsController#lab_data as HTML
1109
+ Parameters: {"zip_code"=>"90210"}
1110
+ Completed 200 OK in 303ms (Views: 0.9ms)
1111
+
1112
+
1113
+ Started GET "/labs/search?zip_code=90210" for 127.0.0.1 at 2011-10-28 17:44:23 +0100
1114
+ Processing by LabsController#search as HTML
1115
+ Parameters: {"zip_code"=>"90210"}
1116
+ Completed 200 OK in 384ms (Views: 117.6ms)
1117
+
1118
+
1119
+ Started GET "/assets/application.css" for 127.0.0.1 at 2011-10-28 17:44:24 +0100
1120
+ Served asset /application.css - 200 OK (3ms)
1121
+
1122
+
1123
+ Started GET "/assets/application.js" for 127.0.0.1 at 2011-10-28 17:44:24 +0100
1124
+ Compiled application.js (6ms) (pid 19743)
1125
+ Compiled medivo/lab_list/application.js (6ms) (pid 19743)
1126
+ Compiled medivo/lab_list/views.js (194ms) (pid 19743)
1127
+ Served asset /application.js - 200 OK (227ms)
1128
+
1129
+
1130
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-10-28 17:44:24 +0100
1131
+ Served asset /medivo/markerA.png - 200 OK (2ms)
1132
+
1133
+
1134
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-10-28 17:44:24 +0100
1135
+ Served asset /medivo/markerB.png - 200 OK (2ms)
1136
+
1137
+
1138
+ Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-10-28 17:44:24 +0100
1139
+ Served asset /medivo/arrow.png - 200 OK (1ms)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: medivo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &2168816240 !ruby/object:Gem::Requirement
17
+ requirement: &2153135520 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.1.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2168816240
25
+ version_requirements: *2153135520
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: jquery-rails
28
- requirement: &2168815820 !ruby/object:Gem::Requirement
28
+ requirement: &2153135100 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2168815820
36
+ version_requirements: *2153135100
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: coffee-script
39
- requirement: &2168815360 !ruby/object:Gem::Requirement
39
+ requirement: &2153134640 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2168815360
47
+ version_requirements: *2153134640
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: haml-rails
50
- requirement: &2168814920 !ruby/object:Gem::Requirement
50
+ requirement: &2153134220 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2168814920
58
+ version_requirements: *2153134220
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: mysql2
61
- requirement: &2168814420 !ruby/object:Gem::Requirement
61
+ requirement: &2153133720 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.3.7
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *2168814420
69
+ version_requirements: *2153133720
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: geocoder
72
- requirement: &2168814000 !ruby/object:Gem::Requirement
72
+ requirement: &2153133300 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '0'
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *2168814000
80
+ version_requirements: *2153133300
81
81
  description: Use the medivo platform to make a lab order or find a lab location
82
82
  email:
83
83
  - dsudol@medivo.com
@@ -114,6 +114,7 @@ files:
114
114
  - app/models/medivo/insurance_order.rb
115
115
  - app/models/medivo/lab.rb
116
116
  - app/models/medivo/order.rb
117
+ - app/models/medivo/primary_insurance.rb
117
118
  - app/models/medivo/resource.rb
118
119
  - app/views/layouts/medivo/application.html.erb
119
120
  - config/routes.rb
@@ -223,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
223
224
  version: '0'
224
225
  segments:
225
226
  - 0
226
- hash: -2527215648807221307
227
+ hash: -860239742356801024
227
228
  required_rubygems_version: !ruby/object:Gem::Requirement
228
229
  none: false
229
230
  requirements:
@@ -232,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
233
  version: '0'
233
234
  segments:
234
235
  - 0
235
- hash: -2527215648807221307
236
+ hash: -860239742356801024
236
237
  requirements: []
237
238
  rubyforge_project:
238
239
  rubygems_version: 1.6.2