magic_model_generator 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +0 -0
- data/README +3 -0
- data/Rakefile +96 -0
- data/examples/singleview/account.rb +94 -0
- data/examples/singleview/account_history.rb +21 -0
- data/examples/singleview/account_reservation.rb +26 -0
- data/examples/singleview/account_type.rb +54 -0
- data/examples/singleview/account_type_aging.rb +17 -0
- data/examples/singleview/account_type_variable.rb +8 -0
- data/examples/singleview/address.rb +8 -0
- data/examples/singleview/address_format.rb +49 -0
- data/examples/singleview/address_history.rb +28 -0
- data/examples/singleview/adjustment.rb +97 -0
- data/examples/singleview/adjustment_batch.rb +42 -0
- data/examples/singleview/adjustment_invoice.rb +17 -0
- data/examples/singleview/adjustment_type.rb +54 -0
- data/examples/singleview/adjustment_type_variable.rb +8 -0
- data/examples/singleview/archive_lock_t.rb +11 -0
- data/examples/singleview/archive_result.rb +15 -0
- data/examples/singleview/archive_type.rb +31 -0
- data/examples/singleview/archive_type_table_list.rb +15 -0
- data/examples/singleview/atai_error_name.rb +7 -0
- data/examples/singleview/atlanta_form.rb +23 -0
- data/examples/singleview/atlanta_form_field.rb +12 -0
- data/examples/singleview/atlanta_group.rb +285 -0
- data/examples/singleview/atlanta_help_entry.rb +32 -0
- data/examples/singleview/atlanta_operator.rb +356 -0
- data/examples/singleview/atlanta_profile.rb +47 -0
- data/examples/singleview/atlanta_profile_func_map.rb +8 -0
- data/examples/singleview/atlanta_profile_group_map.rb +10 -0
- data/examples/singleview/atlanta_profile_role_map.rb +8 -0
- data/examples/singleview/atlanta_profile_wf_map.rb +10 -0
- data/examples/singleview/atlanta_role.rb +23 -0
- data/examples/singleview/atlanta_table_partition.rb +39 -0
- data/examples/singleview/attribute_type.rb +75 -0
- data/examples/singleview/attribute_type_variable.rb +8 -0
- data/examples/singleview/bill_run.rb +93 -0
- data/examples/singleview/bill_run_operation.rb +54 -0
- data/examples/singleview/bill_run_type.rb +39 -0
- data/examples/singleview/bill_run_type_status.rb +12 -0
- data/examples/singleview/bill_run_type_task.rb +12 -0
- data/examples/singleview/cache.rb +23 -0
- data/examples/singleview/cache_field.rb +13 -0
- data/examples/singleview/can_act_charge.rb +16 -0
- data/examples/singleview/charge.rb +67 -0
- data/examples/singleview/charge_category.rb +45 -0
- data/examples/singleview/charge_output_defn.rb +13 -0
- data/examples/singleview/charge_output_defn_history.rb +22 -0
- data/examples/singleview/charge_output_defn_var.rb +10 -0
- data/examples/singleview/configuration_attr_type.rb +22 -0
- data/examples/singleview/configuration_attribute.rb +11 -0
- data/examples/singleview/configuration_item.rb +26 -0
- data/examples/singleview/configuration_item_type.rb +29 -0
- data/examples/singleview/contract.rb +35 -0
- data/examples/singleview/contract_history.rb +48 -0
- data/examples/singleview/contract_type.rb +58 -0
- data/examples/singleview/contract_type_product.rb +11 -0
- data/examples/singleview/conversion_rate.rb +14 -0
- data/examples/singleview/currency.rb +118 -0
- data/examples/singleview/currency_history.rb +28 -0
- data/examples/singleview/customer_contact.rb +12 -0
- data/examples/singleview/customer_node.rb +166 -0
- data/examples/singleview/customer_node_bill_run.rb +12 -0
- data/examples/singleview/customer_node_charge_cat.rb +22 -0
- data/examples/singleview/customer_node_correspond.rb +12 -0
- data/examples/singleview/customer_node_da.rb +11 -0
- data/examples/singleview/customer_node_da_array.rb +35 -0
- data/examples/singleview/customer_node_history.rb +86 -0
- data/examples/singleview/customer_node_inv_format.rb +33 -0
- data/examples/singleview/customer_node_type.rb +89 -0
- data/examples/singleview/customer_node_type_cc.rb +18 -0
- data/examples/singleview/customer_node_type_da.rb +8 -0
- data/examples/singleview/customer_node_type_var.rb +8 -0
- data/examples/singleview/customer_query.rb +80 -0
- data/examples/singleview/customer_query_progress.rb +20 -0
- data/examples/singleview/customer_query_type.rb +49 -0
- data/examples/singleview/customer_query_type_var.rb +8 -0
- data/examples/singleview/delete_cascade.rb +13 -0
- data/examples/singleview/delete_cascade_group.rb +21 -0
- data/examples/singleview/delete_constraint.rb +9 -0
- data/examples/singleview/derived_attribute.rb +32 -0
- data/examples/singleview/derived_attribute_array.rb +32 -0
- data/examples/singleview/derived_attribute_history.rb +41 -0
- data/examples/singleview/derived_attribute_index.rb +13 -0
- data/examples/singleview/derived_attribute_value.rb +19 -0
- data/examples/singleview/dil.rb +18 -0
- data/examples/singleview/dil_history.rb +24 -0
- data/examples/singleview/dil_reference.rb +9 -0
- data/examples/singleview/dil_validation_t.rb +6 -0
- data/examples/singleview/dil_variable.rb +10 -0
- data/examples/singleview/dunning_t.rb +14 -0
- data/examples/singleview/entity_mapping.rb +11 -0
- data/examples/singleview/entity_remap.rb +22 -0
- data/examples/singleview/entity_validation.rb +70 -0
- data/examples/singleview/entity_validation_list.rb +15 -0
- data/examples/singleview/entity_validation_variable.rb +8 -0
- data/examples/singleview/equipment.rb +28 -0
- data/examples/singleview/equipment_history.rb +62 -0
- data/examples/singleview/equipment_type.rb +57 -0
- data/examples/singleview/equipment_type_variable.rb +8 -0
- data/examples/singleview/error_group.rb +18 -0
- data/examples/singleview/error_message.rb +65 -0
- data/examples/singleview/evs_address_equiv.rb +17 -0
- data/examples/singleview/evs_alias.rb +12 -0
- data/examples/singleview/evs_attribute_type_key.rb +7 -0
- data/examples/singleview/evt_equipment_changeover.rb +9 -0
- data/examples/singleview/expression_list.rb +27 -0
- data/examples/singleview/expression_list_value.rb +17 -0
- data/examples/singleview/fac_group_compatibility.rb +11 -0
- data/examples/singleview/fac_group_instance.rb +19 -0
- data/examples/singleview/fac_group_instance_hist.rb +16 -0
- data/examples/singleview/facility.rb +9 -0
- data/examples/singleview/facility_group.rb +21 -0
- data/examples/singleview/facility_group_history.rb +21 -0
- data/examples/singleview/foreign_key.rb +9 -0
- data/examples/singleview/function_defn.rb +16 -0
- data/examples/singleview/function_defn_history.rb +35 -0
- data/examples/singleview/function_role.rb +24 -0
- data/examples/singleview/function_role_map.rb +10 -0
- data/examples/singleview/gl_code.rb +65 -0
- data/examples/singleview/gl_code_history.rb +20 -0
- data/examples/singleview/gl_upload.rb +10 -0
- data/examples/singleview/icon.rb +64 -0
- data/examples/singleview/inv_loop_t.rb +4 -0
- data/examples/singleview/inv_report_accounts_t.rb +25 -0
- data/examples/singleview/invoice.rb +134 -0
- data/examples/singleview/invoice_contents.rb +14 -0
- data/examples/singleview/invoice_format.rb +31 -0
- data/examples/singleview/invoice_format_history.rb +29 -0
- data/examples/singleview/invoice_message.rb +17 -0
- data/examples/singleview/invoice_message_history.rb +31 -0
- data/examples/singleview/invoice_message_variable.rb +10 -0
- data/examples/singleview/invoice_receivable_type.rb +13 -0
- data/examples/singleview/invoice_type.rb +23 -0
- data/examples/singleview/invoice_type_history.rb +26 -0
- data/examples/singleview/invoice_type_variable.rb +10 -0
- data/examples/singleview/isp_email_address.rb +17 -0
- data/examples/singleview/licence_current_values.rb +12 -0
- data/examples/singleview/menu_role_map.rb +10 -0
- data/examples/singleview/normalised_event.rb +119 -0
- data/examples/singleview/normalised_event_error.rb +91 -0
- data/examples/singleview/normalised_event_file.rb +75 -0
- data/examples/singleview/normalised_event_ft.rb +18 -0
- data/examples/singleview/normalised_event_ft_hist.rb +25 -0
- data/examples/singleview/normalised_event_ft_var.rb +10 -0
- data/examples/singleview/normalised_event_type.rb +54 -0
- data/examples/singleview/output_device.rb +37 -0
- data/examples/singleview/output_method.rb +32 -0
- data/examples/singleview/output_method_type.rb +38 -0
- data/examples/singleview/output_select.rb +17 -0
- data/examples/singleview/payment.rb +102 -0
- data/examples/singleview/payment_batch.rb +43 -0
- data/examples/singleview/payment_invoice.rb +17 -0
- data/examples/singleview/payment_item.rb +15 -0
- data/examples/singleview/payment_type.rb +57 -0
- data/examples/singleview/payment_type_variable.rb +8 -0
- data/examples/singleview/person.rb +60 -0
- data/examples/singleview/person_history.rb +69 -0
- data/examples/singleview/person_type.rb +39 -0
- data/examples/singleview/plan_table.rb +27 -0
- data/examples/singleview/product.rb +45 -0
- data/examples/singleview/product_compatibility.rb +13 -0
- data/examples/singleview/product_derived_attribute.rb +10 -0
- data/examples/singleview/product_facility_group.rb +16 -0
- data/examples/singleview/product_group.rb +12 -0
- data/examples/singleview/product_group_history.rb +20 -0
- data/examples/singleview/product_history.rb +35 -0
- data/examples/singleview/product_in_product_group.rb +12 -0
- data/examples/singleview/product_instance.rb +41 -0
- data/examples/singleview/product_instance_equip.rb +21 -0
- data/examples/singleview/product_instance_history.rb +37 -0
- data/examples/singleview/product_instance_service.rb +17 -0
- data/examples/singleview/product_payment_item.rb +19 -0
- data/examples/singleview/product_service_type.rb +32 -0
- data/examples/singleview/product_service_type_equip.rb +20 -0
- data/examples/singleview/product_subtotal.rb +14 -0
- data/examples/singleview/product_tariff.rb +16 -0
- data/examples/singleview/racr_clec_t1.rb +12 -0
- data/examples/singleview/racr_clec_t2.rb +12 -0
- data/examples/singleview/racr_clec_t3.rb +28 -0
- data/examples/singleview/racr_t.rb +29 -0
- data/examples/singleview/ragd_clec_t.rb +47 -0
- data/examples/singleview/ragd_t.rb +28 -0
- data/examples/singleview/rapc_t.rb +27 -0
- data/examples/singleview/rdfd_cmn_t.rb +17 -0
- data/examples/singleview/rdfd_t.rb +16 -0
- data/examples/singleview/receivable_type.rb +49 -0
- data/examples/singleview/receivable_type_history.rb +25 -0
- data/examples/singleview/reference_code.rb +17 -0
- data/examples/singleview/reference_type.rb +32 -0
- data/examples/singleview/release_info.rb +10 -0
- data/examples/singleview/report_reference_type.rb +14 -0
- data/examples/singleview/report_reference_type_defs.rb +12 -0
- data/examples/singleview/reprocessed_file.rb +32 -0
- data/examples/singleview/rgp_file.rb +22 -0
- data/examples/singleview/rgp_normalised_event.rb +78 -0
- data/examples/singleview/rmag_t.rb +32 -0
- data/examples/singleview/rpmr_t.rb +27 -0
- data/examples/singleview/rpsi_t.rb +24 -0
- data/examples/singleview/rser_t.rb +13 -0
- data/examples/singleview/rshu_cmn_t.rb +31 -0
- data/examples/singleview/schedule.rb +91 -0
- data/examples/singleview/schedule_task_type.rb +43 -0
- data/examples/singleview/service.rb +88 -0
- data/examples/singleview/service_bill_run_t.rb +12 -0
- data/examples/singleview/service_charge_category.rb +22 -0
- data/examples/singleview/service_da.rb +11 -0
- data/examples/singleview/service_da_array.rb +35 -0
- data/examples/singleview/service_duplicate.rb +4 -0
- data/examples/singleview/service_history.rb +59 -0
- data/examples/singleview/service_type.rb +54 -0
- data/examples/singleview/service_type_cc.rb +18 -0
- data/examples/singleview/service_type_da.rb +8 -0
- data/examples/singleview/service_type_equip_type.rb +11 -0
- data/examples/singleview/subtotal.rb +48 -0
- data/examples/singleview/subtotal_history.rb +59 -0
- data/examples/singleview/subtotal_rating_delta.rb +20 -0
- data/examples/singleview/subtotal_rating_value.rb +21 -0
- data/examples/singleview/subtotal_term.rb +16 -0
- data/examples/singleview/subtotal_value.rb +18 -0
- data/examples/singleview/summary_of_change.rb +31 -0
- data/examples/singleview/summary_of_change_ev.rb +18 -0
- data/examples/singleview/summary_of_change_view.rb +22 -0
- data/examples/singleview/t2_anumber_france.rb +22 -0
- data/examples/singleview/t2_anumber_italy.rb +22 -0
- data/examples/singleview/t2_anumber_netherlands.rb +24 -0
- data/examples/singleview/t2_anumber_portugal.rb +22 -0
- data/examples/singleview/t2_anumber_spain.rb +22 -0
- data/examples/singleview/t2_anumber_switzerland.rb +24 -0
- data/examples/singleview/t2_bankreference_austria.rb +7 -0
- data/examples/singleview/t2_bankreference_belgium.rb +6 -0
- data/examples/singleview/t2_bankreference_france.rb +7 -0
- data/examples/singleview/t2_bankreference_germany.rb +7 -0
- data/examples/singleview/t2_bankreference_italy.rb +7 -0
- data/examples/singleview/t2_bankreference_portugal.rb +7 -0
- data/examples/singleview/t2_cc_provrequests.rb +19 -0
- data/examples/singleview/t2_emf_info.rb +12 -0
- data/examples/singleview/t2_ev_column_label_mapping.rb +9 -0
- data/examples/singleview/t2_historytable.rb +26 -0
- data/examples/singleview/t2_inv_revoked_invoice.rb +11 -0
- data/examples/singleview/t2_inv_suppress_invoice.rb +13 -0
- data/examples/singleview/t2_national_number_plan.rb +8 -0
- data/examples/singleview/t2_pay_statement.rb +28 -0
- data/examples/singleview/t2_prov_req_action.rb +22 -0
- data/examples/singleview/t2_prov_request.rb +32 -0
- data/examples/singleview/t2_rep_brr_t.rb +19 -0
- data/examples/singleview/t2_rep_trr_t.rb +19 -0
- data/examples/singleview/t2_rep_ubr_t.rb +19 -0
- data/examples/singleview/t2_taxclass.rb +8 -0
- data/examples/singleview/t2_zipcode_austria.rb +8 -0
- data/examples/singleview/t2_zipcode_france.rb +8 -0
- data/examples/singleview/t2_zipcode_germany.rb +8 -0
- data/examples/singleview/t2_zipcode_hungary.rb +8 -0
- data/examples/singleview/t2_zipcode_luxembourg.rb +8 -0
- data/examples/singleview/t2_zipcode_netherlands.rb +8 -0
- data/examples/singleview/t2_zipcode_portugal.rb +9 -0
- data/examples/singleview/t2_zipcode_spain.rb +8 -0
- data/examples/singleview/t2_zipcode_switzerland.rb +8 -0
- data/examples/singleview/table_import_order.rb +6 -0
- data/examples/singleview/tariff.rb +51 -0
- data/examples/singleview/tariff_charge.rb +33 -0
- data/examples/singleview/tariff_charge_defn.rb +18 -0
- data/examples/singleview/tariff_condition_defn.rb +19 -0
- data/examples/singleview/tariff_history.rb +70 -0
- data/examples/singleview/tariff_recurring.rb +36 -0
- data/examples/singleview/task_queue.rb +130 -0
- data/examples/singleview/task_queue_result.rb +10 -0
- data/examples/singleview/template.rb +18 -0
- data/examples/singleview/template_history.rb +30 -0
- data/examples/singleview/template_reference.rb +9 -0
- data/examples/singleview/template_variable.rb +10 -0
- data/examples/singleview/trt_clec_treatment.rb +13 -0
- data/examples/singleview/variable_defn.rb +48 -0
- data/examples/singleview/variable_defn_dependency.rb +11 -0
- data/examples/singleview/variable_defn_direct.rb +15 -0
- data/examples/singleview/variable_defn_history.rb +22 -0
- data/examples/singleview/work_force.rb +25 -0
- data/examples/singleview/xpsi_addr_val_commtax21.rb +24 -0
- data/examples/singleview/xpsi_addr_val_msag.rb +24 -0
- data/examples/singleview/xpsi_addr_val_zip.rb +14 -0
- data/examples/singleview/xpsi_ne_batch.rb +20 -0
- data/examples/singleview/xpsi_product_batch.rb +18 -0
- data/examples/singleview/xpsi_product_status.rb +14 -0
- data/examples/singleview/xpsi_tax_error.rb +34 -0
- data/examples/singleview/xpsi_trt_revoke.rb +68 -0
- data/examples/singleview/xpsi_trt_revoke_prod_inst.rb +12 -0
- data/examples/singleview/xpsi_update_capture.rb +35 -0
- data/lib/activerecord/base.rb +12 -0
- data/lib/hash_tricks.rb +21 -0
- data/lib/magic_model_generator.rb +8 -0
- data/lib/magic_model_generator/schema.rb +205 -0
- data/lib/magic_model_generator/validations.rb +48 -0
- data/lib/magic_model_generator/version.rb +9 -0
- data/lib/rails/generator/dynamic_named_base.rb +99 -0
- data/lib/rails/generator/manifest.rb +8 -0
- data/magic_model_generator.rb +88 -0
- data/templates/model.rb +3 -0
- data/test/magic_model_generator_test.rb +11 -0
- data/test/test_helper.rb +2 -0
- metadata +366 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
module MagicModelsGenerator
|
2
|
+
module Validations
|
3
|
+
|
4
|
+
# Returns an array of strings describing validations for this class
|
5
|
+
def self.generate_validations(klass)
|
6
|
+
|
7
|
+
logger = MagicModelsGenerator.logger
|
8
|
+
|
9
|
+
# Code reworked from http://www.redhillconsulting.com.au/rails_plugins.html
|
10
|
+
# Thanks Red Hill Consulting for using an MIT licence :o)
|
11
|
+
|
12
|
+
validations = []
|
13
|
+
klass.columns.
|
14
|
+
reject { |column| column.name =~ /(?i)^(((created|updated)_(at|on))|position|type|id)$/ }.
|
15
|
+
each do |column|
|
16
|
+
|
17
|
+
# Active record seems to interpolate booleans anyway to either true, false or nil...
|
18
|
+
if column.type == :boolean
|
19
|
+
validations << "validates_inclusion_of :#{column.name}, :in => [true, false], :allow_nil => #{column.null}, :message => ActiveRecord::Errors.default_error_messages[:blank]"
|
20
|
+
logger.debug validations.last
|
21
|
+
elsif !column.null
|
22
|
+
validations << "validates_presence_of :#{column.name}"
|
23
|
+
logger.debug validations.last
|
24
|
+
end
|
25
|
+
|
26
|
+
if column.type == :integer
|
27
|
+
validations << "validates_numericality_of :#{column.name}, :allow_nil => #{column.null.inspect}, :only_integer => true"
|
28
|
+
logger.debug validations.last
|
29
|
+
elsif column.number?
|
30
|
+
validations << "validates_numericality_of :#{column.name}, :allow_nil => #{column.null.inspect}"
|
31
|
+
logger.debug validations.last
|
32
|
+
elsif column.text? && column.limit
|
33
|
+
validations << "validates_length_of :#{column.name}, :allow_nil => #{column.null.inspect}, :maximum => #{column.limit}"
|
34
|
+
logger.debug validations.last
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
# Single-column UNIQUE indexes
|
40
|
+
klass.get_unique_index_columns.each do |col|
|
41
|
+
validations << "validates_uniqueness_of :#{col}"
|
42
|
+
logger.debug validations.last
|
43
|
+
end
|
44
|
+
|
45
|
+
validations
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
#require 'rails/generator/base'
|
2
|
+
|
3
|
+
module Rails
|
4
|
+
module Generator
|
5
|
+
class DynamicNamedBase < Rails::Generator::Base
|
6
|
+
attr_reader :all_attrs,
|
7
|
+
:name, :class_name, :singular_name, :plural_name, :table_name,
|
8
|
+
:class_path, :file_path, :class_nesting, :class_nesting_depth
|
9
|
+
attr_accessor :superklass, :class_contents
|
10
|
+
alias_method :file_name, :singular_name
|
11
|
+
attr_reader :controller_name,
|
12
|
+
:controller_class_path,
|
13
|
+
:controller_file_path,
|
14
|
+
:controller_class_nesting,
|
15
|
+
:controller_class_nesting_depth,
|
16
|
+
:controller_class_name,
|
17
|
+
:controller_singular_name,
|
18
|
+
:controller_plural_name
|
19
|
+
alias_method :controller_file_name, :controller_singular_name
|
20
|
+
alias_method :controller_table_name, :controller_plural_name
|
21
|
+
#alias_method :base_controller_file_path, :controller_file_path
|
22
|
+
|
23
|
+
@@model_attrs = %w(name class_name singular_name plural_name
|
24
|
+
table_name class_path file_path class_nesting
|
25
|
+
class_nesting_depth file_name singular_name
|
26
|
+
superklass class_contents)
|
27
|
+
@@controller_attrs = %w(controller_name controller_class_path
|
28
|
+
controller_file_path controller_class_nesting
|
29
|
+
controller_class_nesting_depth controller_class_name
|
30
|
+
controller_singular_name controller_plural_name)
|
31
|
+
|
32
|
+
def initialize(runtime_args, runtime_options = {})
|
33
|
+
super
|
34
|
+
|
35
|
+
# No arguments are required.
|
36
|
+
usage if runtime_args.length > 0
|
37
|
+
|
38
|
+
@all_attrs = {}
|
39
|
+
end
|
40
|
+
|
41
|
+
protected
|
42
|
+
def load_attrs(key)
|
43
|
+
all_attrs[key] = {} if not all_attrs[key]
|
44
|
+
@@model_attrs.concat(@@controller_attrs).each do |attr|
|
45
|
+
instance_variable_set "@#{attr.to_s}", all_attrs[key][attr]
|
46
|
+
end
|
47
|
+
all_attrs[key]
|
48
|
+
end
|
49
|
+
|
50
|
+
def store_attrs(key)
|
51
|
+
all_attrs[key] = instance_values.pass(@@model_attrs.concat(@@controller_attrs))
|
52
|
+
end
|
53
|
+
|
54
|
+
def assign_names!(name)
|
55
|
+
@superklass ||= ActiveRecord::Base
|
56
|
+
@name = name
|
57
|
+
base_name, @class_path, @file_path, @class_nesting, @class_nesting_depth = extract_modules(@name)
|
58
|
+
@class_name_without_nesting, @singular_name, @plural_name = inflect_names(base_name)
|
59
|
+
@table_name = ActiveRecord::Base.pluralize_table_names ? plural_name : singular_name
|
60
|
+
if @class_nesting.empty?
|
61
|
+
@class_name = @class_name_without_nesting
|
62
|
+
else
|
63
|
+
@class_name = "#{@class_nesting}::#{@class_name_without_nesting}"
|
64
|
+
end
|
65
|
+
|
66
|
+
@controller_name ||= ActiveRecord::Base.pluralize_table_names ? @name.pluralize : @name
|
67
|
+
|
68
|
+
base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name)
|
69
|
+
@controller_class_name_without_nesting, @controller_singular_name, @controller_plural_name = inflect_names(base_name)
|
70
|
+
|
71
|
+
if @controller_class_nesting.empty?
|
72
|
+
@controller_class_name = @controller_class_name_without_nesting
|
73
|
+
else
|
74
|
+
@controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Extract modules from filesystem-style or ruby-style path:
|
79
|
+
# good/fun/stuff
|
80
|
+
# Good::Fun::Stuff
|
81
|
+
# produce the same results.
|
82
|
+
def extract_modules(name)
|
83
|
+
modules = name.include?('/') ? name.split('/') : name.split('::')
|
84
|
+
name = modules.pop
|
85
|
+
path = modules.map { |m| m.underscore }
|
86
|
+
file_path = (path + [name.underscore]).join('/')
|
87
|
+
nesting = modules.map { |m| m.camelize }.join('::')
|
88
|
+
[name, path, file_path, nesting, modules.size]
|
89
|
+
end
|
90
|
+
|
91
|
+
def inflect_names(name)
|
92
|
+
camel = name.camelize
|
93
|
+
under = camel.underscore
|
94
|
+
plural = under.pluralize
|
95
|
+
[camel, under, plural]
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'pp'
|
3
|
+
require 'dr_nic_magic_models'
|
4
|
+
require 'rails/generator/dynamic_named_base'
|
5
|
+
require 'rails/generator/manifest'
|
6
|
+
|
7
|
+
class MagicModelGenerator < Rails::Generator::DynamicNamedBase
|
8
|
+
default_options :skip_migration => true
|
9
|
+
|
10
|
+
attr_reader :models
|
11
|
+
|
12
|
+
def initialize(runtime_args, runtime_options = {})
|
13
|
+
super
|
14
|
+
begin
|
15
|
+
require destination_root + '/config/boot'
|
16
|
+
|
17
|
+
require 'magic_model_generator'
|
18
|
+
superklass ||= ActiveRecord::Base
|
19
|
+
MagicModelsGenerator::Schema.superklass = superklass
|
20
|
+
@models = MagicModelsGenerator::Schema.models.keys.sort
|
21
|
+
|
22
|
+
@models.each do |base_name|
|
23
|
+
puts "Preparing #{base_name}..."
|
24
|
+
load_attrs(base_name)
|
25
|
+
assign_names!(base_name)
|
26
|
+
store_attrs(base_name)
|
27
|
+
end
|
28
|
+
rescue
|
29
|
+
puts $!
|
30
|
+
puts $@
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def manifest
|
35
|
+
record do |m|
|
36
|
+
load_attrs(@models.first)
|
37
|
+
|
38
|
+
# Model, test, and fixture directories.
|
39
|
+
m.directory File.join('app/models', class_path)
|
40
|
+
#m.directory File.join('test/unit', class_path)
|
41
|
+
#m.directory File.join('test/fixtures', class_path)
|
42
|
+
|
43
|
+
@models.each do |model_name|
|
44
|
+
begin
|
45
|
+
attrs = load_attrs(model_name)
|
46
|
+
|
47
|
+
begin
|
48
|
+
klass = class_name.constantize
|
49
|
+
rescue
|
50
|
+
puts $!
|
51
|
+
puts $@
|
52
|
+
next
|
53
|
+
end
|
54
|
+
puts "Building model #{model_name}..."
|
55
|
+
commands = MagicModelsGenerator::Schema.associations(klass)
|
56
|
+
commands += MagicModelsGenerator::Validations.generate_validations(klass)
|
57
|
+
attrs['class_contents'] = commands.join("\n ")
|
58
|
+
|
59
|
+
# Check for class naming collisions.
|
60
|
+
m.class_collisions class_path, class_name, "#{class_name}Test"
|
61
|
+
|
62
|
+
# Model class, unit test, and fixtures.
|
63
|
+
m.template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb"), :assigns => attrs
|
64
|
+
#m.template 'unit_test.rb', File.join('test/unit', class_path, "#{file_name}_test.rb"), :assigns => attrs
|
65
|
+
#m.template 'fixtures.yml', File.join('test/fixtures', class_path, "#{table_name}.yml"), :assigns => attrs
|
66
|
+
rescue
|
67
|
+
puts $!
|
68
|
+
puts $@
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
@models.each {|model| Object.send(:remove_const, model) rescue nil }
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
protected
|
77
|
+
def banner
|
78
|
+
"Usage: #{$0} magic_model"
|
79
|
+
end
|
80
|
+
|
81
|
+
def add_options!(opt)
|
82
|
+
opt.separator ''
|
83
|
+
opt.separator 'Options:'
|
84
|
+
opt.on("--no-throughs",
|
85
|
+
"Don't generate has_many :though relations") { |v| options[:no_throughs] = v }
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
data/templates/model.rb
ADDED
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,366 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.11
|
3
|
+
specification_version: 1
|
4
|
+
name: magic_model_generator
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.3.0
|
7
|
+
date: 2006-11-14 00:00:00 +01:00
|
8
|
+
summary: Generates Rails models from the target database... magically! Validations and associations included.
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: drnicwilliams@gmail.com
|
12
|
+
homepage: http://magicmodels.rubyforge.org
|
13
|
+
rubyforge_project: magicmodels
|
14
|
+
description: Generates Rails models from the target database... magically! Validations and associations included.
|
15
|
+
autorequire: magic_model_generator
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.8.4
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
authors:
|
29
|
+
- Dr Nic Williams
|
30
|
+
files:
|
31
|
+
- README
|
32
|
+
- CHANGELOG
|
33
|
+
- Rakefile
|
34
|
+
- magic_model_generator.rb
|
35
|
+
- test/test_helper.rb
|
36
|
+
- test/magic_model_generator_test.rb
|
37
|
+
- lib/magic_model_generator.rb
|
38
|
+
- lib/hash_tricks.rb
|
39
|
+
- lib/rails
|
40
|
+
- lib/activerecord
|
41
|
+
- lib/magic_model_generator
|
42
|
+
- lib/rails/generator
|
43
|
+
- lib/rails/generator/manifest.rb
|
44
|
+
- lib/rails/generator/dynamic_named_base.rb
|
45
|
+
- lib/activerecord/base.rb
|
46
|
+
- lib/magic_model_generator/version.rb
|
47
|
+
- lib/magic_model_generator/validations.rb
|
48
|
+
- lib/magic_model_generator/schema.rb
|
49
|
+
- templates/model.rb
|
50
|
+
- examples/singleview/payment.rb
|
51
|
+
- examples/singleview/adjustment.rb
|
52
|
+
- examples/singleview/product.rb
|
53
|
+
- examples/singleview/t2_inv_suppress_invoice.rb
|
54
|
+
- examples/singleview/trt_clec_treatment.rb
|
55
|
+
- examples/singleview/payment_type_variable.rb
|
56
|
+
- examples/singleview/tariff_charge.rb
|
57
|
+
- examples/singleview/customer_query_type.rb
|
58
|
+
- examples/singleview/dil_history.rb
|
59
|
+
- examples/singleview/tariff_recurring.rb
|
60
|
+
- examples/singleview/gl_code.rb
|
61
|
+
- examples/singleview/tariff_history.rb
|
62
|
+
- examples/singleview/configuration_attr_type.rb
|
63
|
+
- examples/singleview/function_defn_history.rb
|
64
|
+
- examples/singleview/attribute_type.rb
|
65
|
+
- examples/singleview/invoice_contents.rb
|
66
|
+
- examples/singleview/atlanta_profile_group_map.rb
|
67
|
+
- examples/singleview/adjustment_batch.rb
|
68
|
+
- examples/singleview/summary_of_change_ev.rb
|
69
|
+
- examples/singleview/atlanta_table_partition.rb
|
70
|
+
- examples/singleview/t2_anumber_netherlands.rb
|
71
|
+
- examples/singleview/summary_of_change.rb
|
72
|
+
- examples/singleview/xpsi_trt_revoke.rb
|
73
|
+
- examples/singleview/t2_zipcode_netherlands.rb
|
74
|
+
- examples/singleview/atlanta_operator.rb
|
75
|
+
- examples/singleview/rpsi_t.rb
|
76
|
+
- examples/singleview/atlanta_role.rb
|
77
|
+
- examples/singleview/delete_cascade.rb
|
78
|
+
- examples/singleview/isp_email_address.rb
|
79
|
+
- examples/singleview/charge_output_defn_var.rb
|
80
|
+
- examples/singleview/dil_variable.rb
|
81
|
+
- examples/singleview/equipment_type_variable.rb
|
82
|
+
- examples/singleview/output_device.rb
|
83
|
+
- examples/singleview/racr_clec_t1.rb
|
84
|
+
- examples/singleview/t2_taxclass.rb
|
85
|
+
- examples/singleview/equipment_history.rb
|
86
|
+
- examples/singleview/t2_inv_revoked_invoice.rb
|
87
|
+
- examples/singleview/normalised_event.rb
|
88
|
+
- examples/singleview/t2_prov_request.rb
|
89
|
+
- examples/singleview/service_type_equip_type.rb
|
90
|
+
- examples/singleview/evs_alias.rb
|
91
|
+
- examples/singleview/attribute_type_variable.rb
|
92
|
+
- examples/singleview/customer_node_da.rb
|
93
|
+
- examples/singleview/t2_zipcode_luxembourg.rb
|
94
|
+
- examples/singleview/product_group_history.rb
|
95
|
+
- examples/singleview/facility_group.rb
|
96
|
+
- examples/singleview/entity_validation_list.rb
|
97
|
+
- examples/singleview/product_in_product_group.rb
|
98
|
+
- examples/singleview/t2_zipcode_germany.rb
|
99
|
+
- examples/singleview/product_instance_history.rb
|
100
|
+
- examples/singleview/t2_rep_ubr_t.rb
|
101
|
+
- examples/singleview/charge_category.rb
|
102
|
+
- examples/singleview/person_history.rb
|
103
|
+
- examples/singleview/customer_node_bill_run.rb
|
104
|
+
- examples/singleview/rdfd_cmn_t.rb
|
105
|
+
- examples/singleview/account_type_aging.rb
|
106
|
+
- examples/singleview/product_derived_attribute.rb
|
107
|
+
- examples/singleview/normalised_event_error.rb
|
108
|
+
- examples/singleview/tariff.rb
|
109
|
+
- examples/singleview/payment_type.rb
|
110
|
+
- examples/singleview/function_defn.rb
|
111
|
+
- examples/singleview/product_instance_service.rb
|
112
|
+
- examples/singleview/evt_equipment_changeover.rb
|
113
|
+
- examples/singleview/expression_list_value.rb
|
114
|
+
- examples/singleview/xpsi_product_status.rb
|
115
|
+
- examples/singleview/entity_mapping.rb
|
116
|
+
- examples/singleview/charge.rb
|
117
|
+
- examples/singleview/payment_item.rb
|
118
|
+
- examples/singleview/t2_prov_req_action.rb
|
119
|
+
- examples/singleview/product_history.rb
|
120
|
+
- examples/singleview/derived_attribute_array.rb
|
121
|
+
- examples/singleview/service_da.rb
|
122
|
+
- examples/singleview/invoice_message_variable.rb
|
123
|
+
- examples/singleview/xpsi_update_capture.rb
|
124
|
+
- examples/singleview/racr_t.rb
|
125
|
+
- examples/singleview/variable_defn_direct.rb
|
126
|
+
- examples/singleview/table_import_order.rb
|
127
|
+
- examples/singleview/archive_lock_t.rb
|
128
|
+
- examples/singleview/gl_code_history.rb
|
129
|
+
- examples/singleview/variable_defn_dependency.rb
|
130
|
+
- examples/singleview/tariff_charge_defn.rb
|
131
|
+
- examples/singleview/racr_clec_t2.rb
|
132
|
+
- examples/singleview/t2_anumber_switzerland.rb
|
133
|
+
- examples/singleview/derived_attribute_history.rb
|
134
|
+
- examples/singleview/t2_zipcode_switzerland.rb
|
135
|
+
- examples/singleview/currency.rb
|
136
|
+
- examples/singleview/adjustment_invoice.rb
|
137
|
+
- examples/singleview/t2_zipcode_spain.rb
|
138
|
+
- examples/singleview/conversion_rate.rb
|
139
|
+
- examples/singleview/plan_table.rb
|
140
|
+
- examples/singleview/rdfd_t.rb
|
141
|
+
- examples/singleview/customer_node_charge_cat.rb
|
142
|
+
- examples/singleview/equipment.rb
|
143
|
+
- examples/singleview/rmag_t.rb
|
144
|
+
- examples/singleview/t2_anumber_portugal.rb
|
145
|
+
- examples/singleview/tariff_condition_defn.rb
|
146
|
+
- examples/singleview/invoice_type_history.rb
|
147
|
+
- examples/singleview/archive_result.rb
|
148
|
+
- examples/singleview/reference_code.rb
|
149
|
+
- examples/singleview/configuration_attribute.rb
|
150
|
+
- examples/singleview/template_history.rb
|
151
|
+
- examples/singleview/normalised_event_file.rb
|
152
|
+
- examples/singleview/error_message.rb
|
153
|
+
- examples/singleview/ragd_t.rb
|
154
|
+
- examples/singleview/output_method.rb
|
155
|
+
- examples/singleview/invoice_message.rb
|
156
|
+
- examples/singleview/rshu_cmn_t.rb
|
157
|
+
- examples/singleview/product_service_type_equip.rb
|
158
|
+
- examples/singleview/customer_node_correspond.rb
|
159
|
+
- examples/singleview/task_queue_result.rb
|
160
|
+
- examples/singleview/error_group.rb
|
161
|
+
- examples/singleview/customer_node.rb
|
162
|
+
- examples/singleview/cache_field.rb
|
163
|
+
- examples/singleview/customer_query_progress.rb
|
164
|
+
- examples/singleview/customer_node_type_da.rb
|
165
|
+
- examples/singleview/atlanta_profile_func_map.rb
|
166
|
+
- examples/singleview/customer_node_type_var.rb
|
167
|
+
- examples/singleview/t2_zipcode_france.rb
|
168
|
+
- examples/singleview/t2_bankreference_germany.rb
|
169
|
+
- examples/singleview/archive_type.rb
|
170
|
+
- examples/singleview/atlanta_profile_role_map.rb
|
171
|
+
- examples/singleview/charge_output_defn_history.rb
|
172
|
+
- examples/singleview/t2_zipcode_austria.rb
|
173
|
+
- examples/singleview/expression_list.rb
|
174
|
+
- examples/singleview/contract_history.rb
|
175
|
+
- examples/singleview/output_select.rb
|
176
|
+
- examples/singleview/normalised_event_ft_var.rb
|
177
|
+
- examples/singleview/derived_attribute_value.rb
|
178
|
+
- examples/singleview/facility_group_history.rb
|
179
|
+
- examples/singleview/function_role.rb
|
180
|
+
- examples/singleview/customer_node_type.rb
|
181
|
+
- examples/singleview/rapc_t.rb
|
182
|
+
- examples/singleview/product_compatibility.rb
|
183
|
+
- examples/singleview/subtotal_rating_delta.rb
|
184
|
+
- examples/singleview/xpsi_addr_val_commtax21.rb
|
185
|
+
- examples/singleview/summary_of_change_view.rb
|
186
|
+
- examples/singleview/racr_clec_t3.rb
|
187
|
+
- examples/singleview/archive_type_table_list.rb
|
188
|
+
- examples/singleview/normalised_event_ft.rb
|
189
|
+
- examples/singleview/bill_run_type_task.rb
|
190
|
+
- examples/singleview/release_info.rb
|
191
|
+
- examples/singleview/t2_national_number_plan.rb
|
192
|
+
- examples/singleview/work_force.rb
|
193
|
+
- examples/singleview/product_service_type.rb
|
194
|
+
- examples/singleview/derived_attribute.rb
|
195
|
+
- examples/singleview/dil_validation_t.rb
|
196
|
+
- examples/singleview/t2_ev_column_label_mapping.rb
|
197
|
+
- examples/singleview/service_charge_category.rb
|
198
|
+
- examples/singleview/address_history.rb
|
199
|
+
- examples/singleview/customer_node_type_cc.rb
|
200
|
+
- examples/singleview/adjustment_type.rb
|
201
|
+
- examples/singleview/configuration_item_type.rb
|
202
|
+
- examples/singleview/entity_validation.rb
|
203
|
+
- examples/singleview/template_reference.rb
|
204
|
+
- examples/singleview/product_subtotal.rb
|
205
|
+
- examples/singleview/invoice_type.rb
|
206
|
+
- examples/singleview/account_type.rb
|
207
|
+
- examples/singleview/output_method_type.rb
|
208
|
+
- examples/singleview/receivable_type.rb
|
209
|
+
- examples/singleview/variable_defn_history.rb
|
210
|
+
- examples/singleview/invoice_format.rb
|
211
|
+
- examples/singleview/atlanta_form.rb
|
212
|
+
- examples/singleview/xpsi_tax_error.rb
|
213
|
+
- examples/singleview/atlanta_form_field.rb
|
214
|
+
- examples/singleview/currency_history.rb
|
215
|
+
- examples/singleview/template.rb
|
216
|
+
- examples/singleview/contract_type_product.rb
|
217
|
+
- examples/singleview/t2_zipcode_portugal.rb
|
218
|
+
- examples/singleview/schedule_task_type.rb
|
219
|
+
- examples/singleview/t2_emf_info.rb
|
220
|
+
- examples/singleview/atai_error_name.rb
|
221
|
+
- examples/singleview/fac_group_instance.rb
|
222
|
+
- examples/singleview/customer_node_inv_format.rb
|
223
|
+
- examples/singleview/account.rb
|
224
|
+
- examples/singleview/invoice.rb
|
225
|
+
- examples/singleview/address_format.rb
|
226
|
+
- examples/singleview/service.rb
|
227
|
+
- examples/singleview/xpsi_addr_val_zip.rb
|
228
|
+
- examples/singleview/service_da_array.rb
|
229
|
+
- examples/singleview/rpmr_t.rb
|
230
|
+
- examples/singleview/atlanta_profile.rb
|
231
|
+
- examples/singleview/service_type_da.rb
|
232
|
+
- examples/singleview/charge_output_defn.rb
|
233
|
+
- examples/singleview/delete_constraint.rb
|
234
|
+
- examples/singleview/gl_upload.rb
|
235
|
+
- examples/singleview/t2_bankreference_portugal.rb
|
236
|
+
- examples/singleview/t2_anumber_france.rb
|
237
|
+
- examples/singleview/contract.rb
|
238
|
+
- examples/singleview/subtotal_history.rb
|
239
|
+
- examples/singleview/payment_batch.rb
|
240
|
+
- examples/singleview/fac_group_instance_hist.rb
|
241
|
+
- examples/singleview/template_variable.rb
|
242
|
+
- examples/singleview/invoice_message_history.rb
|
243
|
+
- examples/singleview/t2_pay_statement.rb
|
244
|
+
- examples/singleview/bill_run_operation.rb
|
245
|
+
- examples/singleview/t2_bankreference_austria.rb
|
246
|
+
- examples/singleview/customer_node_history.rb
|
247
|
+
- examples/singleview/t2_cc_provrequests.rb
|
248
|
+
- examples/singleview/derived_attribute_index.rb
|
249
|
+
- examples/singleview/normalised_event_type.rb
|
250
|
+
- examples/singleview/t2_bankreference_belgium.rb
|
251
|
+
- examples/singleview/rgp_normalised_event.rb
|
252
|
+
- examples/singleview/bill_run.rb
|
253
|
+
- examples/singleview/dil.rb
|
254
|
+
- examples/singleview/equipment_type.rb
|
255
|
+
- examples/singleview/inv_loop_t.rb
|
256
|
+
- examples/singleview/reprocessed_file.rb
|
257
|
+
- examples/singleview/t2_historytable.rb
|
258
|
+
- examples/singleview/address.rb
|
259
|
+
- examples/singleview/ragd_clec_t.rb
|
260
|
+
- examples/singleview/xpsi_addr_val_msag.rb
|
261
|
+
- examples/singleview/rgp_file.rb
|
262
|
+
- examples/singleview/service_duplicate.rb
|
263
|
+
- examples/singleview/report_reference_type.rb
|
264
|
+
- examples/singleview/schedule.rb
|
265
|
+
- examples/singleview/atlanta_profile_wf_map.rb
|
266
|
+
- examples/singleview/fac_group_compatibility.rb
|
267
|
+
- examples/singleview/t2_zipcode_hungary.rb
|
268
|
+
- examples/singleview/t2_anumber_italy.rb
|
269
|
+
- examples/singleview/invoice_type_variable.rb
|
270
|
+
- examples/singleview/account_type_variable.rb
|
271
|
+
- examples/singleview/facility.rb
|
272
|
+
- examples/singleview/t2_rep_trr_t.rb
|
273
|
+
- examples/singleview/service_type_cc.rb
|
274
|
+
- examples/singleview/task_queue.rb
|
275
|
+
- examples/singleview/bill_run_type.rb
|
276
|
+
- examples/singleview/customer_node_da_array.rb
|
277
|
+
- examples/singleview/atlanta_help_entry.rb
|
278
|
+
- examples/singleview/variable_defn.rb
|
279
|
+
- examples/singleview/xpsi_product_batch.rb
|
280
|
+
- examples/singleview/configuration_item.rb
|
281
|
+
- examples/singleview/dil_reference.rb
|
282
|
+
- examples/singleview/t2_anumber_spain.rb
|
283
|
+
- examples/singleview/subtotal_value.rb
|
284
|
+
- examples/singleview/payment_invoice.rb
|
285
|
+
- examples/singleview/entity_validation_variable.rb
|
286
|
+
- examples/singleview/service_type.rb
|
287
|
+
- examples/singleview/xpsi_ne_batch.rb
|
288
|
+
- examples/singleview/service_bill_run_t.rb
|
289
|
+
- examples/singleview/inv_report_accounts_t.rb
|
290
|
+
- examples/singleview/t2_bankreference_france.rb
|
291
|
+
- examples/singleview/account_reservation.rb
|
292
|
+
- examples/singleview/product_facility_group.rb
|
293
|
+
- examples/singleview/delete_cascade_group.rb
|
294
|
+
- examples/singleview/menu_role_map.rb
|
295
|
+
- examples/singleview/t2_rep_brr_t.rb
|
296
|
+
- examples/singleview/receivable_type_history.rb
|
297
|
+
- examples/singleview/licence_current_values.rb
|
298
|
+
- examples/singleview/subtotal_term.rb
|
299
|
+
- examples/singleview/adjustment_type_variable.rb
|
300
|
+
- examples/singleview/dunning_t.rb
|
301
|
+
- examples/singleview/invoice_format_history.rb
|
302
|
+
- examples/singleview/icon.rb
|
303
|
+
- examples/singleview/evs_attribute_type_key.rb
|
304
|
+
- examples/singleview/report_reference_type_defs.rb
|
305
|
+
- examples/singleview/product_group.rb
|
306
|
+
- examples/singleview/subtotal_rating_value.rb
|
307
|
+
- examples/singleview/subtotal.rb
|
308
|
+
- examples/singleview/t2_bankreference_italy.rb
|
309
|
+
- examples/singleview/cache.rb
|
310
|
+
- examples/singleview/product_instance.rb
|
311
|
+
- examples/singleview/person.rb
|
312
|
+
- examples/singleview/product_instance_equip.rb
|
313
|
+
- examples/singleview/xpsi_trt_revoke_prod_inst.rb
|
314
|
+
- examples/singleview/bill_run_type_status.rb
|
315
|
+
- examples/singleview/product_tariff.rb
|
316
|
+
- examples/singleview/account_history.rb
|
317
|
+
- examples/singleview/normalised_event_ft_hist.rb
|
318
|
+
- examples/singleview/invoice_receivable_type.rb
|
319
|
+
- examples/singleview/contract_type.rb
|
320
|
+
- examples/singleview/service_history.rb
|
321
|
+
- examples/singleview/customer_query.rb
|
322
|
+
- examples/singleview/product_payment_item.rb
|
323
|
+
- examples/singleview/rser_t.rb
|
324
|
+
- examples/singleview/reference_type.rb
|
325
|
+
- examples/singleview/customer_query_type_var.rb
|
326
|
+
- examples/singleview/atlanta_group.rb
|
327
|
+
- examples/singleview/entity_remap.rb
|
328
|
+
- examples/singleview/can_act_charge.rb
|
329
|
+
- examples/singleview/foreign_key.rb
|
330
|
+
- examples/singleview/function_role_map.rb
|
331
|
+
- examples/singleview/person_type.rb
|
332
|
+
- examples/singleview/evs_address_equiv.rb
|
333
|
+
- examples/singleview/customer_contact.rb
|
334
|
+
test_files: []
|
335
|
+
|
336
|
+
rdoc_options:
|
337
|
+
- --quiet
|
338
|
+
- --title
|
339
|
+
- magic_model_generator documentation
|
340
|
+
- --opname
|
341
|
+
- index.html
|
342
|
+
- --line-numbers
|
343
|
+
- --main
|
344
|
+
- README
|
345
|
+
- --inline-source
|
346
|
+
- --exclude
|
347
|
+
- ^(examples|extras)/
|
348
|
+
extra_rdoc_files:
|
349
|
+
- README
|
350
|
+
- CHANGELOG
|
351
|
+
executables: []
|
352
|
+
|
353
|
+
extensions: []
|
354
|
+
|
355
|
+
requirements: []
|
356
|
+
|
357
|
+
dependencies:
|
358
|
+
- !ruby/object:Gem::Dependency
|
359
|
+
name: dr_nic_magic_models
|
360
|
+
version_requirement:
|
361
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
362
|
+
requirements:
|
363
|
+
- - ">="
|
364
|
+
- !ruby/object:Gem::Version
|
365
|
+
version: 0.9.0
|
366
|
+
version:
|