ion_orders_engine_mockingjay 1.0.1.SNAPSHOT

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +0 -0
  3. data/Rakefile +4 -0
  4. data/app/assets/images/rails.png +0 -0
  5. data/app/assets/javascripts/application.js +16 -0
  6. data/app/assets/javascripts/bootstrap_additions.js.coffee +4 -0
  7. data/app/assets/javascripts/interchange/patients.js.coffee +3 -0
  8. data/app/assets/javascripts/interchange/physicians.js.coffee +3 -0
  9. data/app/assets/javascripts/mock/allergies.js.coffee +3 -0
  10. data/app/assets/javascripts/mock/appointments.js.coffee +3 -0
  11. data/app/assets/javascripts/mock/assignments.js.coffee +17 -0
  12. data/app/assets/javascripts/mock/chart_reviews.js.coffee +3 -0
  13. data/app/assets/javascripts/mock/comments.js.coffee +3 -0
  14. data/app/assets/javascripts/mock/conditions.js.coffee +3 -0
  15. data/app/assets/javascripts/mock/diagnoses.js.coffee +3 -0
  16. data/app/assets/javascripts/mock/documents.js.coffee +3 -0
  17. data/app/assets/javascripts/mock/employments.js.coffee +3 -0
  18. data/app/assets/javascripts/mock/encounters.js.coffee +3 -0
  19. data/app/assets/javascripts/mock/family_contacts.js.coffee +3 -0
  20. data/app/assets/javascripts/mock/family_histories.js.coffee +3 -0
  21. data/app/assets/javascripts/mock/guarantors.js.coffee +3 -0
  22. data/app/assets/javascripts/mock/insurance_plans.js.coffee +3 -0
  23. data/app/assets/javascripts/mock/lab_concepts.js.coffee +4 -0
  24. data/app/assets/javascripts/mock/lab_results.js.coffee +3 -0
  25. data/app/assets/javascripts/mock/locations.js.coffee +3 -0
  26. data/app/assets/javascripts/mock/medical_record_numbers.js.coffee +3 -0
  27. data/app/assets/javascripts/mock/metadata_keywords.js.coffee +3 -0
  28. data/app/assets/javascripts/mock/pharmacies.js.coffee +3 -0
  29. data/app/assets/javascripts/mock/phone_numbers.js.coffee +3 -0
  30. data/app/assets/javascripts/mock/physicians.js.coffee +3 -0
  31. data/app/assets/javascripts/mock/procedure_histories.js.coffee +3 -0
  32. data/app/assets/javascripts/mock/providers.js.coffee +14 -0
  33. data/app/assets/javascripts/mock/questions.js.coffee +3 -0
  34. data/app/assets/javascripts/mock/reference_range.js.coffee +3 -0
  35. data/app/assets/javascripts/mock/sections.js.coffee +3 -0
  36. data/app/assets/javascripts/mock/social_histories.js.coffee +3 -0
  37. data/app/assets/javascripts/mock/state_health_identifiers.js.coffee +3 -0
  38. data/app/assets/javascripts/mock/statistics.js.coffee +3 -0
  39. data/app/assets/javascripts/mock/test_assertions.js.coffee +3 -0
  40. data/app/assets/javascripts/mock/visit.js.coffee +3 -0
  41. data/app/assets/javascripts/mock/vitals_measurement.js.coffee +3 -0
  42. data/app/assets/javascripts/reference/data_elements.js.coffee +3 -0
  43. data/app/assets/javascripts/reference/data_lists.js.coffee +3 -0
  44. data/app/assets/javascripts/reference/data_sets.js.coffee +3 -0
  45. data/app/assets/stylesheets/application.css.scss +13 -0
  46. data/app/assets/stylesheets/bootstrap_and_overrides.css.scss +79 -0
  47. data/app/assets/stylesheets/forms.css.scss +67 -0
  48. data/app/assets/stylesheets/interchange/patients.css.scss +3 -0
  49. data/app/assets/stylesheets/interchange/physicians.css.scss +3 -0
  50. data/app/assets/stylesheets/mock/allergies.css.scss +3 -0
  51. data/app/assets/stylesheets/mock/appointments.css.scss +3 -0
  52. data/app/assets/stylesheets/mock/chart_reviews.css.scss +3 -0
  53. data/app/assets/stylesheets/mock/comments.css.scss +3 -0
  54. data/app/assets/stylesheets/mock/conditions.css.scss +3 -0
  55. data/app/assets/stylesheets/mock/diagnoses.css.scss +3 -0
  56. data/app/assets/stylesheets/mock/documents.css.scss +3 -0
  57. data/app/assets/stylesheets/mock/employments.css.scss +3 -0
  58. data/app/assets/stylesheets/mock/encounters.css.scss +3 -0
  59. data/app/assets/stylesheets/mock/family_contacts.css.scss +3 -0
  60. data/app/assets/stylesheets/mock/family_histories.css.scss +3 -0
  61. data/app/assets/stylesheets/mock/guarantors.css.scss +3 -0
  62. data/app/assets/stylesheets/mock/insurance_plans.css.scss +3 -0
  63. data/app/assets/stylesheets/mock/lab_concepts.css.scss +3 -0
  64. data/app/assets/stylesheets/mock/lab_results.css.scss +3 -0
  65. data/app/assets/stylesheets/mock/locations.css.scss +3 -0
  66. data/app/assets/stylesheets/mock/medical_record_numbers.css.scss +3 -0
  67. data/app/assets/stylesheets/mock/metadata_keywords.css.scss +3 -0
  68. data/app/assets/stylesheets/mock/pharmacies.css.scss +3 -0
  69. data/app/assets/stylesheets/mock/phone_numbers.css.scss +3 -0
  70. data/app/assets/stylesheets/mock/physicians.css.scss +3 -0
  71. data/app/assets/stylesheets/mock/procedure_histories.css.scss +3 -0
  72. data/app/assets/stylesheets/mock/providers.css.scss +3 -0
  73. data/app/assets/stylesheets/mock/questions.css.scss +3 -0
  74. data/app/assets/stylesheets/mock/reference_range.css.scss +3 -0
  75. data/app/assets/stylesheets/mock/sections.css.scss +3 -0
  76. data/app/assets/stylesheets/mock/social_histories.css.scss +3 -0
  77. data/app/assets/stylesheets/mock/state_health_identifiers.css.scss +3 -0
  78. data/app/assets/stylesheets/mock/statistics.css.scss +3 -0
  79. data/app/assets/stylesheets/mock/test_assertions.css.scss +3 -0
  80. data/app/assets/stylesheets/mock/visit.css.scss +3 -0
  81. data/app/assets/stylesheets/mock/vitals_measurement.css.scss +3 -0
  82. data/app/assets/stylesheets/reference/data_elements.css.scss +3 -0
  83. data/app/assets/stylesheets/reference/data_lists.css.scss +3 -0
  84. data/app/assets/stylesheets/reference/data_sets.css.scss +3 -0
  85. data/app/assets/stylesheets/scaffolds.css.scss +66 -0
  86. data/app/controllers/api/base_controller.rb +78 -0
  87. data/app/controllers/api/ion_orders_engine/order_by_id/order_by_id_controller.rb +3220 -0
  88. data/app/controllers/api/ion_orders_engine/order_profile/inpatient_order_profile_controller.rb +3156 -0
  89. data/app/controllers/application_controller.rb +25 -0
  90. data/app/controllers/crud/base_controller.rb +90 -0
  91. data/app/controllers/interchange/base_controller.rb +63 -0
  92. data/app/controllers/interchange/data_sets_controller.rb +40 -0
  93. data/app/controllers/interchange/exports_controller.rb +120 -0
  94. data/app/controllers/interchange/imports_controller.rb +141 -0
  95. data/app/controllers/reference/base_controller.rb +7 -0
  96. data/app/controllers/reference/data_lists_controller.rb +177 -0
  97. data/app/controllers/reference/data_options_controller.rb +147 -0
  98. data/app/controllers/reference/data_sets_controller.rb +160 -0
  99. data/app/helpers/application_helper.rb +389 -0
  100. data/app/helpers/error_messages_helper.rb +23 -0
  101. data/app/helpers/interchange/exports_helper.rb +9 -0
  102. data/app/helpers/interchange/imports_helper.rb +31 -0
  103. data/app/helpers/layout_helper.rb +40 -0
  104. data/app/helpers/reference/data_elements_helper.rb +2 -0
  105. data/app/helpers/reference/data_lists_helper.rb +2 -0
  106. data/app/helpers/reference/data_sets_helper.rb +2 -0
  107. data/app/views/interchange/common/_database_info.json.jbuilder +6 -0
  108. data/app/views/interchange/common/_metadata_keywords.json.jbuilder +13 -0
  109. data/app/views/interchange/common/_test_assertions.json.jbuilder +17 -0
  110. data/app/views/interchange/data_sets/_data_list.json.jbuilder +14 -0
  111. data/app/views/interchange/data_sets/_data_option.json.jbuilder +12 -0
  112. data/app/views/interchange/data_sets/_data_set.json.jbuilder +17 -0
  113. data/app/views/interchange/data_sets/_nested_data_list.json.jbuilder +12 -0
  114. data/app/views/interchange/data_sets/show.json.jbuilder +10 -0
  115. data/app/views/interchange/document_templates/_document_template.json.jbuilder +23 -0
  116. data/app/views/interchange/document_templates/_section.json.jbuilder +11 -0
  117. data/app/views/interchange/document_templates/show.json.jbuilder +10 -0
  118. data/app/views/interchange/exports/_export_summary.html.erb +49 -0
  119. data/app/views/interchange/exports/show.html.erb +35 -0
  120. data/app/views/interchange/imports/_import_summary.html.erb +72 -0
  121. data/app/views/interchange/imports/show.html.erb +37 -0
  122. data/app/views/layouts/_flashbar.html.erb +6 -0
  123. data/app/views/layouts/_navbar.html.erb +38 -0
  124. data/app/views/layouts/_protected_warning.html.erb +7 -0
  125. data/app/views/layouts/_root_model_layout.erb +33 -0
  126. data/app/views/layouts/application.html.erb +39 -0
  127. data/app/views/layouts/reference/data_sets.html.erb +5 -0
  128. data/app/views/reference/data_lists/_data_options.html.erb +31 -0
  129. data/app/views/reference/data_lists/_form.html.erb +23 -0
  130. data/app/views/reference/data_lists/edit.html.erb +6 -0
  131. data/app/views/reference/data_lists/index.html.erb +31 -0
  132. data/app/views/reference/data_lists/new.html.erb +6 -0
  133. data/app/views/reference/data_lists/show.html.erb +55 -0
  134. data/app/views/reference/data_options/_form.html.erb +23 -0
  135. data/app/views/reference/data_options/edit.html.erb +5 -0
  136. data/app/views/reference/data_options/index.html.erb +38 -0
  137. data/app/views/reference/data_options/new.html.erb +5 -0
  138. data/app/views/reference/data_options/show.html.erb +33 -0
  139. data/app/views/reference/data_sets/_form.html.erb +25 -0
  140. data/app/views/reference/data_sets/edit.html.erb +5 -0
  141. data/app/views/reference/data_sets/index.html.erb +40 -0
  142. data/app/views/reference/data_sets/new.html.erb +5 -0
  143. data/app/views/reference/data_sets/show.html.erb +38 -0
  144. data/config/application.rb +100 -0
  145. data/config/boot.rb +6 -0
  146. data/config/database.yml +25 -0
  147. data/config/environment.rb +5 -0
  148. data/config/environments/development.rb +42 -0
  149. data/config/environments/production.rb +64 -0
  150. data/config/environments/test.rb +35 -0
  151. data/config/initializers/backtrace_silencers.rb +7 -0
  152. data/config/initializers/extensions/active_record.rb +13 -0
  153. data/config/initializers/extensions/hash.rb +11 -0
  154. data/config/initializers/extensions/string.rb +15 -0
  155. data/config/initializers/inflections.rb +15 -0
  156. data/config/initializers/mime_types.rb +5 -0
  157. data/config/initializers/reference.rb +77 -0
  158. data/config/initializers/secret_token.rb +7 -0
  159. data/config/initializers/session_store.rb +8 -0
  160. data/config/initializers/simple_form.rb +142 -0
  161. data/config/initializers/simple_form_bootstrap.rb +45 -0
  162. data/config/initializers/wrap_parameters.rb +10 -0
  163. data/config/locales/en.yml +207 -0
  164. data/config/locales/simple_form.en.yml +26 -0
  165. data/config/mongo.yml +18 -0
  166. data/config/routes.rb +4 -0
  167. data/db/schema.rb +16 -0
  168. data/db/seeds.rb +66 -0
  169. data/lib/ion_orders_engine_mockingjay/engine.rb +13 -0
  170. data/lib/ion_orders_engine_mockingjay/version.rb +3 -0
  171. data/lib/ion_orders_engine_mockingjay.rb +4 -0
  172. data/lib/tasks/ion_orders_engine_mockingjay_tasks.rake +4 -0
  173. metadata +215 -0
@@ -0,0 +1,23 @@
1
+ <%= simple_form_for [:reference, @data_listable, @data_list], html: { class: 'form-horizontal' } do |f| %>
2
+
3
+ <%= f.error_notification %>
4
+
5
+ <div class="form-inputs">
6
+ <%= f.input :display_name, hint: 'This is the display friendly name you would see beside a drop down list as a label.' %>
7
+ <%= f.input :option_class_name, hint: 'This is the name of the class each option in this list should be instantiated as, such as "LabGroup" or "AllergyReactionType", etc.' %>
8
+ <%= f.input :code_name, hint: 'An internal code or tag name for this list.' %>
9
+ <%= f.input :code_number, hint: 'A generic holder for a numeric code or sequence number.' %>
10
+
11
+ <h4>Metadata</h4>
12
+
13
+ <%= f.input :metadata_description, as: :text, label: 'Description', input_html: { rows: 6 },
14
+ hint: 'Provide your notes for testing here, such as why this Data List exists.' %>
15
+
16
+ </div>
17
+
18
+ <div class="form-actions">
19
+ <%= submit_button(f, @data_list) %>
20
+ <%= cancel_button [:reference, @data_listable, @data_list] %>
21
+ </div>
22
+
23
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <div class="page-header">
2
+ <h1><%= edit_resource_heading DataList %></h1>
3
+ </div>
4
+
5
+ <%= render :partial => 'form' %>
6
+
@@ -0,0 +1,31 @@
1
+ <div class="page-header">
2
+ <h1><%= index_resource_heading DataList %></h1>
3
+ </div>
4
+ <table class="table table-striped">
5
+ <thead>
6
+ <tr>
7
+ <th>Display Name</th>
8
+ <th>Code Name</th>
9
+ <th>Code Number</th>
10
+ <th><%= actions_table_heading %></th>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <% @data_lists.each do |data_list| %>
15
+ <tr>
16
+ <td><%= data_list.display_name %></td>
17
+ <td><%= data_list.code_name %></td>
18
+ <td><%= data_list.code_number %></td>
19
+ <td>
20
+ <%= show_button_link [:reference, @data_listable, data_list], as_mini: true %>
21
+ <%= edit_button_link [:edit, :reference, @data_listable, data_list], as_mini: true %>
22
+ <%= destroy_button_link [:reference, @data_listable, data_list], as_mini: true %>
23
+ </td>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+
29
+ <%= back_button_link [:reference, @data_listable] %>
30
+ <%= new_button_link [:new, :reference, @data_listable, :data_list] %>
31
+
@@ -0,0 +1,6 @@
1
+ <div class="page-header">
2
+ <h1><%= new_resource_heading DataList %></h1>
3
+ </div>
4
+
5
+ <%= render :partial => 'form' %>
6
+
@@ -0,0 +1,55 @@
1
+ <div class="page-header">
2
+ <h1><%= if @data_list
3
+ show_resource_heading(DataList, @data_list.short_title)
4
+ else
5
+ show_resource_heading(DataList, 'nested list')
6
+ end %>
7
+ </h1>
8
+ </div>
9
+
10
+ <% if @data_list %>
11
+
12
+ <dl class="dl-horizontal">
13
+ <% display_for @data_list do | r |%>
14
+ <%= r.attribute :display_name %>
15
+ <%= r.attribute :option_class_name %>
16
+ <%= r.attribute :code_name %>
17
+ <%= r.attribute :code_number %>
18
+ <%= r.attribute :metadata_description %>
19
+ <% end %>
20
+ </dl>
21
+
22
+
23
+ <div class="form-actions">
24
+ <%= if @data_listable.instance_of?(DataOption)
25
+ back_button_link [:reference, @data_listable.data_list, @data_listable]
26
+ else
27
+ back_button_link [:reference, @data_listable, :data_lists]
28
+ end
29
+ %>
30
+ <%= edit_button_link [:edit, :reference, @data_listable, @data_list] %>
31
+ <%= destroy_button_link [:reference, @data_listable, @data_list] %>
32
+ <%= add_another_button_link([:new, :reference, @data_listable, :data_list], class: 'pull-right') unless @data_listable.instance_of?(DataOption) %>
33
+
34
+ </div>
35
+
36
+ <br/><br/>
37
+ <%= render partial: 'data_options', locals: {data_options: @data_list.data_options} %>
38
+
39
+
40
+ <% else %>
41
+
42
+ Currently, there is no nested Data List for this <%= @data_listable.class.to_s.titleize %>.
43
+ <br/><br/>
44
+ You can use nested lists to effectively build a tree of lists and options to describe your
45
+ reference data structure hierarchy.
46
+
47
+ <br/><br/>
48
+
49
+ <%= add_button_link [:new, :reference, @data_listable, :nested_data_list] %>
50
+ <%= cancel_button [:reference, @data_listable.data_list, @data_listable] %>
51
+
52
+ <% end %>
53
+
54
+
55
+
@@ -0,0 +1,23 @@
1
+ <%= simple_form_for [:reference, @data_list, @data_option], html: { class: 'form-horizontal' } do |f| %>
2
+
3
+ <%= f.error_notification %>
4
+
5
+ <div class="form-inputs">
6
+ <%= f.input :display_name %>
7
+ <%= f.input :code_name %>
8
+ <%= f.input :code_number %>
9
+
10
+ <h4>Metadata</h4>
11
+
12
+ <%= f.input :metadata_description, as: :text, label: 'Description', input_html: { rows: 6 },
13
+ hint: 'Provide your notes for testing here, such as why this Data Option exists.' %>
14
+
15
+ </div>
16
+
17
+
18
+ <div class="form-actions">
19
+ <%= submit_button(f, @data_option) %>
20
+ <%= cancel_button [:reference, @data_list, @data_option] %>
21
+ </div>
22
+
23
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <div class="page-header">
2
+ <h1><%= edit_resource_heading DataOption %></h1>
3
+ </div>
4
+
5
+ <%= render :partial => 'form' %>
@@ -0,0 +1,38 @@
1
+ <div class="page-header">
2
+ <h1><%= index_resource_heading(DataOption) %></h1>
3
+ </div>
4
+ <table class="table table-striped">
5
+ <thead>
6
+ <tr>
7
+ <th>Display Name</th>
8
+ <th>Code Name</th>
9
+ <th>Code Number</th>
10
+ <th><%= actions_table_heading %></th>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <% @data_options.each do |data_option| %>
15
+ <tr>
16
+ <td><%= data_option.display_name %></td>
17
+ <td><%= data_option.code_name %></td>
18
+ <td><%= data_option.code_number %></td>
19
+ <td>
20
+ <%= show_button_link [:reference, @data_list, data_option], as_mini: true %>
21
+ <%= edit_button_link [:edit, :reference, @data_list, data_option], as_mini: true %>
22
+ <%= destroy_button_link [:reference, @data_list, data_option], as_mini: true %>
23
+ </td>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+
29
+ <br/><br/>
30
+
31
+ <%= if @data_list.data_listable.instance_of?(DataOption)
32
+ back_button_link [:reference, @data_list.data_listable, :nested_data_list]
33
+ else
34
+ back_button_link [:reference, @data_list]
35
+ end
36
+ %>
37
+ <%= new_button_link [:new, :reference, @data_list, :data_option] %>
38
+
@@ -0,0 +1,5 @@
1
+ <div class="page-header">
2
+ <h1><%= new_resource_heading DataOption %></h1>
3
+ </div>
4
+
5
+ <%= render :partial => 'form' %>
@@ -0,0 +1,33 @@
1
+ <div class="page-header">
2
+ <h1><%= show_resource_heading(DataOption, @data_option.short_title) %></h1>
3
+ </div>
4
+
5
+ <dl class="dl-horizontal">
6
+ <% display_for @data_option do | r |%>
7
+ <%= r.attribute :display_name %>
8
+ <%= r.attribute :code_name %>
9
+ <%= r.attribute :code_number %>
10
+ <%= r.attribute :metadata_description %>
11
+ <% end %>
12
+
13
+ </dl>
14
+
15
+
16
+ <div class="form-actions">
17
+ <%= back_button_link [:reference, @data_list, :data_options] %>
18
+ <%= edit_button_link [:edit, :reference, @data_list, @data_option] %>
19
+ <%= destroy_button_link [:reference, @data_list, @data_option] %>
20
+ </div>
21
+
22
+ <div class="btn-group">
23
+ <%= link_to 'Nested Data List', [:reference, @data_option, :nested_data_list], class: 'btn' %>
24
+ </div>
25
+
26
+
27
+ <br/>
28
+ <br/>
29
+
30
+ <%= add_another_button_link [:new, :reference, @data_list, :data_option] %>
31
+
32
+
33
+
@@ -0,0 +1,25 @@
1
+ <%= simple_form_for [:reference, @data_set], html: { class: 'form-horizontal' } do |f| %>
2
+
3
+ <%= f.error_notification %>
4
+
5
+ <div class="form-inputs">
6
+
7
+ <%= f.input :protected_record, as: :radio_buttons %>
8
+
9
+ <%= f.input :active, label: 'Active?', as: :radio_buttons %>
10
+
11
+ <%= f.input :name %>
12
+
13
+ <h4>Metadata</h4>
14
+
15
+ <%= f.input :metadata_description, as: :text, label: 'Description', input_html: { rows: 6 },
16
+ hint: 'Provide your notes for testing here, such as why this Data Set exists.' %>
17
+
18
+ </div>
19
+
20
+ <div class="form-actions">
21
+ <%= submit_button(f, @data_set) %>
22
+ <%= cancel_button [:reference, @data_set] %>
23
+ </div>
24
+
25
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <div class="page-header">
2
+ <h1><%= edit_resource_heading(DataSet) %></h1>
3
+ </div>
4
+
5
+ <%= render :partial => 'form' %>
@@ -0,0 +1,40 @@
1
+ <div class="page-header">
2
+ <h1><%= index_resource_heading(DataSet) %></h1>
3
+ </div>
4
+
5
+ <br/><br/>
6
+
7
+ <table class="table table-striped">
8
+ <thead>
9
+ <tr>
10
+ <th>DataSet ID</th>
11
+ <th>Name</th>
12
+ <th>Active</th>
13
+ <th><%= actions_table_heading %></th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <% @data_sets.each do |data_set| %>
18
+ <tr>
19
+ <td>
20
+ <%=data_set.id %>
21
+ <% if data_set.protected_record? %>
22
+ <span class="label label-warning">protected</span>
23
+ <% end %>
24
+ </td>
25
+ <td><%=data_set.name %></td>
26
+ <td><%=data_set.active? %></td>
27
+ <td>
28
+ <%= show_button_link [:reference, data_set], as_mini: true %>
29
+ <%= edit_button_link [:edit, :reference, data_set], as_mini: true %>
30
+ <%= destroy_button_link [:reference, data_set], as_mini: true %>
31
+ </td>
32
+ </tr>
33
+ <% end %>
34
+ </tbody>
35
+ </table>
36
+
37
+ <%= new_button_link [:new, :reference, :data_set] %>
38
+
39
+ <br/>
40
+
@@ -0,0 +1,5 @@
1
+ <div class="page-header">
2
+ <h1><%= new_resource_heading(DataSet) %></h1>
3
+ </div>
4
+
5
+ <%= render :partial => 'form' %>
@@ -0,0 +1,38 @@
1
+ <div class="page-header">
2
+ <h1><%= show_resource_heading(DataSet, @data_set.name) %></h1>
3
+ </div>
4
+
5
+ <dl class="dl-horizontal">
6
+ <% display_for @data_set do | r |%>
7
+ <%= r.attribute :protected_record? %>
8
+ <%= r.attribute :active, label: 'Active?' %>
9
+ <%= r.attribute :name %>
10
+
11
+ <h4>Metadata</h4>
12
+ <%#= go_button_link([:reference, @data_set, :metadata_keywords], as_mini: true, title: 'All Keywords') %>
13
+ <%#= r.attribute :metadata_keywords_csv, label: 'Keywords' %>
14
+ <%= r.attribute :metadata_description, label: 'Description' %>
15
+ <% end %>
16
+ </dl>
17
+
18
+
19
+ <div class="form-actions">
20
+ <%= back_button_link [:reference, :data_sets] %>
21
+ <%= edit_button_link [:edit, :reference, @data_set] %>
22
+ <%= destroy_button_link [:reference, @data_set] %>
23
+ </div>
24
+
25
+ <div class="btn-group">
26
+ <%= link_to 'Data Lists', [:reference, @data_set, :data_lists], class: 'btn related' %>
27
+ </div>
28
+
29
+
30
+
31
+ <br/><br/>
32
+
33
+ <%#= export_button @data_set %>
34
+
35
+ <br/>
36
+
37
+
38
+
@@ -0,0 +1,100 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ # require "active_record/railtie"
5
+ # require "action_controller/railtie"
6
+ # require "action_mailer/railtie"
7
+ # require "active_resource/railtie"
8
+ # require "sprockets/railtie"
9
+ # require "rails/test_unit/railtie"
10
+ require 'rails/all'
11
+
12
+ if defined?(Bundler)
13
+ # If you precompile assets before deploying to production, use this line
14
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
15
+ # If you want your assets lazily compiled in production, use this line
16
+ # Bundler.require(:default, :assets, Rails.env)
17
+ end
18
+
19
+ module Mockingjay
20
+ class Application < Rails::Application
21
+ # Settings in config/environments/* take precedence over those specified here.
22
+ # Application configuration should go into files in config/initializers
23
+ # -- all .rb files in that directory are automatically loaded.
24
+
25
+ # Custom directories with classes and modules you want to be autoloadable.
26
+ # Allow our modules of Concerns to be auto-loaded, per: https://gist.github.com/1014971
27
+ config.autoload_paths += %W(#{config.root}/app/models/concerns)
28
+ #config.autoload_paths += %W(#{config.root}/app/models/reference)
29
+ config.autoload_paths += Dir["#{config.root}/lib/"] # lib folder contents, like breadcrumbs builder
30
+
31
+ # Only load the plugins named here, in the order given (default is alphabetical).
32
+ # :all can be used as a placeholder for all plugins not explicitly named.
33
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
34
+
35
+ # Activate observers that should always be running.
36
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
37
+
38
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
39
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
40
+ config.active_record.default_timezone = :local
41
+ config.active_record.time_zone_aware_attributes = false
42
+
43
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
44
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
45
+ # config.i18n.default_locale = :de
46
+
47
+ # Configure the default encoding used in templates for Ruby 1.9.
48
+ config.encoding = "utf-8"
49
+
50
+ # Configure sensitive parameters which will be filtered from the log file.
51
+ config.filter_parameters += [:password]
52
+
53
+ # Enable escaping HTML in JSON.
54
+ config.active_support.escape_html_entities_in_json = true
55
+
56
+ # Use SQL instead of Active Record's schema dumper when creating the database.
57
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
58
+ # like if you have constraints or database-specific column types
59
+ # config.active_record.schema_format = :sql
60
+
61
+ # Enforce whitelist mode for mass assignment.
62
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
63
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
64
+ # parameters by using an attr_accessible or attr_protected declaration.
65
+ config.active_record.whitelist_attributes = false
66
+
67
+ # Enable the asset pipeline
68
+ config.assets.enabled = true # c07090: turned on since some resources were missing
69
+
70
+ # Version of your assets, change this if you want to expire all your assets
71
+ config.assets.version = '1.0'
72
+
73
+ config.generators do |g|
74
+ g.orm :active_record
75
+ g.template_engine :erb # :haml
76
+ g.test_framework :rspec, :fixture => true, :views => false
77
+ g.fixture_replacement :factory_girl, :dir => "spec/factories"
78
+ end
79
+
80
+ # We need to wait until after initialization to load new reference data into the database
81
+ # and then create Ruby reference class instances from that data. We wait until after
82
+ # initialization so that ActiveRecord and all our models are ready to go.
83
+ # Post initialization hook courtesy of: http://stackoverflow.com/a/10974025/535054
84
+ config.after_initialize do
85
+ if Reference::has_reference_tables? and !defined?(::Rake)
86
+ # --- LOAD THE DATA SET FLAT FILES INTO THE DATABASE ---
87
+ Rails.logger.info "Initializer: reference.rb: Loading reference data into database."
88
+ loader = Reference::Loader.new
89
+ loader.perform_import
90
+
91
+ # --- KICK OFF THE LOADING PROCESS ---
92
+ Rails.logger.info "Initializer: reference.rb: Loading reference model classes from database."
93
+ Reference::DataTypes.reload
94
+ end
95
+ end
96
+
97
+ end
98
+ end
99
+
100
+
data/config/boot.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Mockingjay::Application.initialize!
@@ -0,0 +1,42 @@
1
+ Mockingjay::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
26
+ # config.force_ssl = true
27
+
28
+ # Do not compress assets
29
+ config.assets.compress = false
30
+
31
+ # Expands the lines which load the assets
32
+ config.assets.debug = false
33
+
34
+ #config.serve_static_assets = false #c07090: setting this back to false b/c static resources weren't being generated
35
+
36
+ config.to_prepare do
37
+ # Set class instance variable values again, which are dropped in development mode.
38
+ # See Q&A on this at: http://railsforum.com/viewtopic.php?pid=106274#p106274
39
+ Reference::DataTypes.reload if ActiveRecord::Base.connection.table_exists? 'reference_data_lists'
40
+ end
41
+
42
+ end
@@ -0,0 +1,64 @@
1
+ Mockingjay::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to nil and saved in location specified by config.assets.prefix
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ end
@@ -0,0 +1,35 @@
1
+ Mockingjay::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,13 @@
1
+ # We open up this class so that all of our models have convenient logging
2
+ # methods available at both the instance and class level.
3
+ class ActiveRecord::Base
4
+
5
+ # Mixins: Logging
6
+ include ::Mixins::Logging
7
+ extend ::Mixins::Logging
8
+
9
+ # Mixins: Model Behaviors
10
+ include Mock::ResourceAncestorsConcern
11
+ include Mock::ImportConcern
12
+
13
+ end