rtml 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +396 -0
- data/PostInstall.txt +2 -0
- data/README.rdoc +42 -0
- data/Rakefile +33 -0
- data/app_generators/rtml/USAGE +5 -0
- data/app_generators/rtml/rtml_generator.rb +78 -0
- data/app_generators/rtml/templates/rails_template.rb +36 -0
- data/app_generators/rtml/templates/rtml/MIT-LICENSE +20 -0
- data/app_generators/rtml/templates/rtml/README +109 -0
- data/app_generators/rtml/templates/rtml/Rakefile +38 -0
- data/app_generators/rtml/templates/rtml/app/controllers/beryl_controller.rb +70 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/magcard_demo_controller.rb +9 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/oe/btmlpa_controller.rb +158 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/rtml_app_controller.rb +252 -0
- data/app_generators/rtml/templates/rtml/app/controllers/rtml/tml_app_controller.rb +418 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_helper.rb +72 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/auth_result.rb +56 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/common.rb +19 -0
- data/app_generators/rtml/templates/rtml/app/helpers/beryl_tml_helpers/index.rb +82 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/authorized.rb +10 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/common.rb +20 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/magcard_demo_tml_helpers/index.rb +33 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/auth_result.rb +23 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/common.rb +23 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/dynamic.rb +11 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/icc.rb +384 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/index.rb +191 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/oe/btmlpa_tml_helpers/receipt.rb +152 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/rtml_app_helper.rb +74 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/rtml_app_tml_helpers/common.rb +9 -0
- data/app_generators/rtml/templates/rtml/app/helpers/rtml/tml_app_helper.rb +43 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card.rb +83 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_avs.rb +14 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_cvv.rb +14 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_parser.rb +21 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/card_pin.rb +18 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/emv_card_data.rb +25 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/mag_card_data.rb +21 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/reference_code.rb +26 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/state.rb +12 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/terminal.rb +8 -0
- data/app_generators/rtml/templates/rtml/app/models/rtml/transaction.rb +68 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/another_rcpt.rtml.erb +15 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/receipt.rtml.erb +108 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/auth_result/receipt_single_column.rtml.erb +106 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/about.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/admin.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/construction.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/idle.rtml.erb +13 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/main_menu.rtml.erb +12 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/menu_credit.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/beryl/index/menu_debit.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/beryl_color.rtml.erb +24 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/beryl_mono.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/magcard_demo_color.rtml.erb +24 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/magcard_demo_mono.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/oe/btmlpa_i5100.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/oe/btmlpa_i8550.rtml.erb +17 -0
- data/app_generators/rtml/templates/rtml/app/views/layouts/rtml/uml.html.erb +11 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/authorized.html.erb +15 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/authorized/main.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index.html.erb +15 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/_error.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/enter_amount.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/magcard_demo/index/main.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/dynamic/response.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/icc.rtml.erb +760 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_enter_amount.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_about.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_duplicate.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_examples.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_logo.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_other.rtml.erb +20 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_refund.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_reversal.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_sale.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/_menu_sale_cashback.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/about.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/assert.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/card_nmb.rtml.erb +19 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/compl_txn.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/confirm_rev.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/duplicate_na.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/error_scr.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/main_menu.rtml.bak +31 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/main_menu.rtml.erb +40 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/print_pf.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/rd_sale_disp.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/read_refund.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/read_scb.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/reject_trans.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/remove_card.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/rev_bad.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/scb_check_f.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/sign_check.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/subm_err.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/to_man_entry.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/trans_abrt.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/index/void_trans.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/receipt/_receipt.rtml.erb +29 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/oe/btmlpa/receipt/error_paper.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_development.html.erb +167 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_header.html.erb +12 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/_default_production.html.erb +8 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/rtml_app/charts.html.erb +14 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/do_tml_redirect.rtml.erb +7 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/get_terminal_info.rtml.erb +26 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/rescue_action_in_public.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/app/views/rtml/tml_app/rescue_action_locally.rtml.erb +42 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/common.rb +303 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/force.rb +46 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/return.rb +22 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/sale.rb +49 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_confirmation.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_agreement.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_footer.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/_receipt_header.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/ask_cashback.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/card_imprint.rtml.erb +7 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/check_cb.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/conf_debit.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/confirm_sale.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/confrm_force.rtml.erb +4 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/cvv_skipped.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/disp_avs.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/do_avs_zip.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_amount.rtml.erb +12 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_card.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_cashbk.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_cvv2.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/enter_expiry.rtml.erb +9 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/fraud_check1.rtml.erb +6 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/fraud_check2.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_aprvl.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_avs_zip.rtml.erb +8 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frc_bad_aprv.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/frd_chk_fail.rtml.erb +5 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/invalid_exp.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/no_entr_crd.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/remove_card.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/swipe_card.rtml.erb +7 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/trans_abort.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/trans_reject.rtml.erb +1 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/views/void_ref.rtml.erb +10 -0
- data/app_generators/rtml/templates/rtml/components/rtml/features/void.rb +30 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/card_parser_widget.rb +90 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/display_widget.rb +66 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/element_builder_widget.rb +123 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/emv_support_widget.rb +365 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/form_submit_widget.rb +65 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/get_transaction_variables_widget.rb +33 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/get_variable_widget.rb +39 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/receipt_widget.rb +66 -0
- data/app_generators/rtml/templates/rtml/components/rtml/widgets/screen_builder_widget.rb +49 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825132217_create_rtml_states.rb +15 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825132401_create_rtml_terminals.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825132530_create_rtml_transactions.rb +24 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825134118_create_rtml_cards.rb +23 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825134622_create_rtml_emv_card_data.rb +20 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825134629_create_rtml_mag_card_data.rb +17 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090825135838_create_rtml_card_parsers.rb +19 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090826103509_create_reference_codes.rb +14 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090915030044_add_batch_to_rtml_transactions.rb +10 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090915031155_add_additional_data_to_rtml_transactions.rb +10 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20090915031156_add_hidden_data_to_rtml_transactions.rb +10 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016133313_create_rtml_card_avs.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016135800_create_rtml_card_cvvs.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016135810_create_rtml_card_pins.rb +16 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20091016135820_reverse_card_transaction_relationship.rb +11 -0
- data/app_generators/rtml/templates/rtml/db/migrate/20100127115105_convert_rtml_migrations_to_rails_migrations.rb +31 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/USAGE +25 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/rtml_controller_generator.rb +49 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/common_tml_helper.rb +20 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/controller.rb +3 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/css_color.css +37 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/css_mono.css +12 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/functional_test.rb +11 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/layout_color.rtml.erb +24 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/layout_mono.rtml.erb +3 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/tml_helper.rb +16 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/view.html.erb +15 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/view.rtml.erb +2 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/USAGE +8 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/rtml_document_generator.rb +45 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/controller.rb +7 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/functional_test.rb +10 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/helper.rb +2 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_document/templates/view.rtml.erb +11 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/USAGE +8 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/rtml_widget_generator.rb +66 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/templates/basic_widget.rb +57 -0
- data/app_generators/rtml/templates/rtml/generators/rtml_widget/templates/basic_widget_no_help.rb +27 -0
- data/app_generators/rtml/templates/rtml/init.rb +40 -0
- data/app_generators/rtml/templates/rtml/install.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/environment.rb +61 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_controller/request.rb +9 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_controller/routing/route_set.rb +34 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_view/base.rb +74 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/action_view/partial_template.rb +24 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/active_record.rb +13 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/active_support/dependencies.rb +25 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/array.rb +15 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/attr_boolean.rb +10 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/hash.rb +28 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/nil_class.rb +20 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/rake.rb +19 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/regexp.rb +16 -0
- data/app_generators/rtml/templates/rtml/lib/extensions/string.rb +37 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins.rb +23 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/MIT-LICENSE +20 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/README +36 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/Rakefile +44 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/init.rb +25 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/action_controller/filters/before_render_filter.rb +30 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/before_render.rb +43 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/before_render_instance.rb +45 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/filter_chain_has_many_types_of_filters.rb +87 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/lib/filter_has_before_render.rb +26 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/tasks/before_render_tasks.rake +25 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/test/before_render_test.rb +29 -0
- data/app_generators/rtml/templates/rtml/lib/other_plugins/before_render/test/test_helper.rb +24 -0
- data/app_generators/rtml/templates/rtml/lib/rtml.rb +77 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/beryl/constants.rb +12 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/beryl/version.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/common/renderable.rb +13 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/include.rb +30 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/layout.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/next.rb +188 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen.rb +91 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/iterators.rb +63 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/next_screen_methods.rb +70 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/screen/variable_methods.rb +73 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/support/importer.rb +55 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document.rb +318 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document/screen_methods.rb +79 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/tml_document/variable_methods.rb +83 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/core/variable.rb +123 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/browser_emulator.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/rtml_controller_test_case.rb +7 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/rtml_core_unit_test.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/debug/unit_test.rb +3 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/delegation.rb +8 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/doc.rb +12 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/element.rb +75 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/errors/widget_accessor_failure.rb +9 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/event_handler.rb +79 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/event_processor.rb +106 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/processors.rb +10 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/processors/defaults_processor.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/events/processors/key_processor.rb +21 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/feature.rb +32 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/feature_config.rb +195 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features/array_of_feature_instances.rb +17 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features/controller_class_methods.rb +30 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/features/controller_instance_methods.rb +35 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers.rb +21 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/controller_helpers.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/controller_helpers/menu_helpers.rb +193 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/action_view_wrapper.rb +23 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/event_helpers.rb +28 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/layout_helpers.rb +47 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/widget_support.rb +181 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/widget_support/class_methods.rb +28 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/core_helpers/yield_helpers.rb +33 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/proxy_helpers/feature_helpers.rb +17 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/render_helper.rb +71 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/terminal_helpers.rb +21 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers.rb +6 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers/tml_validation_assertions.rb +10 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/test_helpers/variable_assertions.rb +27 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/view_helpers/form_helpers.rb +70 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/helpers/view_helpers/rtml_form_builder.rb +174 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/oe/btmlpa_constants.rb +48 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/proxying/method_missing_methods.rb +14 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/proxying/rtml_interface.rb +33 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/proxying/sandbox.rb +18 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/text_utils.rb +51 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/tml_param_parser.rb +95 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/dom_rule_parser.rb +61 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/dom_tag.rb +52 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/predefined_variable_rule_parser.rb +97 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/validation/tml_validator.rb +16 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/version.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/property.rb +11 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/property_accessors.rb +59 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/widget.rb +251 -0
- data/app_generators/rtml/templates/rtml/lib/rtml/widgets/widget_class_methods.rb +213 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/dot.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_can.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_cand.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_en.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_end.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_i.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icd.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icl.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icr.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_ics.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icsw.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_icv.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_int.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_int2.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_men.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_mend.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_next.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_no.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_nod.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_ok.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_okd.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic1.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic2.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic3.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_pic4.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_top.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_txn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_yes.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/btmlpa/nbg_yesd.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/btmlpa.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/can_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/can_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/conf.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/iccemv.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/images.lib +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/magcard.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/no_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/no_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/ok_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/ok_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/top.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/yes_dn.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/images/rtml/oe/examples/yes_up.gif +0 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/beryl_color.css +37 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/beryl_mono.css +17 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/charts.css +0 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/i5100.css +12 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/i8550.css +37 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/btmlpa/receipt.css +4 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/examples/i5100.css +12 -0
- data/app_generators/rtml/templates/rtml/public/stylesheets/rtml/oe/examples/i8550.css +37 -0
- data/app_generators/rtml/templates/rtml/reporting/110409 +227 -0
- data/app_generators/rtml/templates/rtml/reporting/linecount.rb +42 -0
- data/app_generators/rtml/templates/rtml/rules/predefined_tml_variables.rb +63 -0
- data/app_generators/rtml/templates/rtml/rules/tml_document_structure.rb +84 -0
- data/app_generators/rtml/templates/rtml/rules/varns/audio.rb +30 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card.rb +17 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/emv.rb +31 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/mag.rb +8 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/parser.rb +7 -0
- data/app_generators/rtml/templates/rtml/rules/varns/card/pin.rb +6 -0
- data/app_generators/rtml/templates/rtml/rules/varns/cfgm.rb +15 -0
- data/app_generators/rtml/templates/rtml/rules/varns/com.rb +9 -0
- data/app_generators/rtml/templates/rtml/rules/varns/err.rb +14 -0
- data/app_generators/rtml/templates/rtml/rules/varns/gma/event.rb +13 -0
- data/app_generators/rtml/templates/rtml/rules/varns/gprs.rb +8 -0
- data/app_generators/rtml/templates/rtml/rules/varns/imager.rb +8 -0
- data/app_generators/rtml/templates/rtml/rules/varns/ip.rb +15 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr.rb +42 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/3rdparty.rb +7 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/backlight.rb +4 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/cache.rb +1 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/connect.rb +5 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/connection.rb +5 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oebr/offline.rb +5 -0
- data/app_generators/rtml/templates/rtml/rules/varns/oegw.rb +12 -0
- data/app_generators/rtml/templates/rtml/rules/varns/payment.rb +21 -0
- data/app_generators/rtml/templates/rtml/rules/varns/ppp.rb +11 -0
- data/app_generators/rtml/templates/rtml/rules/varns/terminal.rb +29 -0
- data/app_generators/rtml/templates/rtml/tasks/rtml_tasks.rake +78 -0
- data/app_generators/rtml/templates/rtml/template.rb +64 -0
- data/app_generators/rtml/templates/rtml/test/core/element_test.rb +17 -0
- data/app_generators/rtml/templates/rtml/test/core/screen_test.rb +91 -0
- data/app_generators/rtml/templates/rtml/test/core/tml_document_test.rb +53 -0
- data/app_generators/rtml/templates/rtml/test/functional/beryl_controller_test.rb +13 -0
- data/app_generators/rtml/templates/rtml/test/functional/btmlpa_controller_test.rb +13 -0
- data/app_generators/rtml/templates/rtml/test/functional/magcard_demo_controller_test.rb +20 -0
- data/app_generators/rtml/templates/rtml/test/functional/rtml_app_controller_test.rb +9 -0
- data/app_generators/rtml/templates/rtml/test/functional/rtml_routing_test.rb +19 -0
- data/app_generators/rtml/templates/rtml/test/functional/tml_controller_params_test.rb +20 -0
- data/app_generators/rtml/templates/rtml/test/rtml_test_helper.rb +44 -0
- data/app_generators/rtml/templates/rtml/test/validation/predefined_variable_rule_parser_test.rb +11 -0
- data/app_generators/rtml/templates/rtml/uninstall.rb +1 -0
- data/app_generators/rtml/templates/rtml/update.rb +57 -0
- data/bin/rtml +36 -0
- data/lib/rtml.rb +4 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/tasks/reglob.rake +28 -0
- data/test/test_generator_helper.rb +29 -0
- data/test/test_helper.rb +3 -0
- data/test/test_rtml.rb +11 -0
- data/test/test_rtml_generator.rb +43 -0
- metadata +516 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateRtmlCardAvs < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_card_avs do |t|
|
4
|
+
t.string :zip
|
5
|
+
t.string :address
|
6
|
+
|
7
|
+
t.references :card
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :rtml_card_avs
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateRtmlCardCvvs < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_card_cvvs do |t|
|
4
|
+
t.string :value
|
5
|
+
t.string :reason_skipped
|
6
|
+
|
7
|
+
t.references :card
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :rtml_card_cvvs
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateRtmlCardPins < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :rtml_card_pins do |t|
|
4
|
+
t.string :block
|
5
|
+
t.string :smid
|
6
|
+
|
7
|
+
t.references :card
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :rtml_card_pins
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class ReverseCardTransactionRelationship < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
# won't worry about deleting the card's transaction_id column yet.
|
4
|
+
add_column :rtml_transactions, :card_id, :integer
|
5
|
+
rescue # because of the move from Rtml::Migrator to ActiveRecord::Migrator
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :rtml_transactions, :card_id
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class ConvertRtmlMigrationsToRailsMigrations < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
# So I've updated the code to use ActiveRecord::Migration directly instead of subclassing it.
|
4
|
+
# Apparently, that was all I needed to do to begin with. In any case, now there's this
|
5
|
+
# extra "rtml_schema_migrations" table floating around, and it's not used for anything.
|
6
|
+
#
|
7
|
+
# The thing to keep in mind is that this only goes for existing users. New RTML users will use
|
8
|
+
# the Rails migrator by default, and won't have this issue. That's why we rescue silently
|
9
|
+
# if it fails.
|
10
|
+
#
|
11
|
+
# Also, since this is a result of a code change more than of a DB change, there's no "down"
|
12
|
+
# for this migration. Because even if we need to revert, the code will still use
|
13
|
+
# ActiveRecord::Migrator to accomplish said reversion. It'd be dumb to rebuild
|
14
|
+
# rtml_schema_migrations.
|
15
|
+
|
16
|
+
# Since the original class (Rtml::Migrator) has been removed from RTML, we have to rebuild
|
17
|
+
# the schema table name the hard way. This is identical to calling the
|
18
|
+
# Rtml::Migrator#schema_migrations_table_name method.
|
19
|
+
schema_migrations_table_name = ActiveRecord::Base.table_name_prefix +
|
20
|
+
'rtml_schema_migrations' +
|
21
|
+
ActiveRecord::Base.table_name_suffix
|
22
|
+
|
23
|
+
# Again, per the Rtml::Migrator#drop_schema_migrations_table method.
|
24
|
+
ActiveRecord::Base.connection.drop_table(schema_migrations_table_name)
|
25
|
+
|
26
|
+
rescue
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.down
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Description:
|
2
|
+
Generates a Rails controller interfaced with RTML for generation of TML documents.
|
3
|
+
|
4
|
+
Example:
|
5
|
+
./script/generate rtml_controller MagCard index authorized
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
exists app/controllers/
|
9
|
+
exists app/helpers/
|
10
|
+
create app/views/mag_card
|
11
|
+
exists app/views/layouts/rtml/
|
12
|
+
exists test/functional/
|
13
|
+
exists public/stylesheets/rtml/
|
14
|
+
create app/helpers/mag_card_tml_helpers
|
15
|
+
create app/controllers/mag_card_controller.rb
|
16
|
+
create test/functional/mag_card_controller_test.rb
|
17
|
+
create app/helpers/mag_card_helper.rb
|
18
|
+
create app/views/layouts/rtml/mag_card_graphic.rtml.erb
|
19
|
+
create app/views/layouts/rtml/mag_card_text.rtml.erb
|
20
|
+
create public/stylesheets/rtml/mag_card_graphic.css
|
21
|
+
create public/stylesheets/rtml/mag_card_text.css
|
22
|
+
create app/views/mag_card/index
|
23
|
+
create app/views/mag_card/index/main.rtml.erb
|
24
|
+
create app/helpers/mag_card_tml_helpers/index.rb
|
25
|
+
create app/helpers/mag_card_tml_helpers/common.rb
|
data/app_generators/rtml/templates/rtml/generators/rtml_controller/rtml_controller_generator.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
class RtmlControllerGenerator < Rails::Generator::NamedBase
|
2
|
+
def manifest
|
3
|
+
tml_helper_path = File.join("app/helpers", class_path, "#{file_name}_tml_helpers")
|
4
|
+
|
5
|
+
record do |m|
|
6
|
+
# Check for class naming collisions.
|
7
|
+
m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
|
8
|
+
|
9
|
+
# Check action length -- 12 characters per TML restrictions
|
10
|
+
actions.each { |action| raise "action #{action} is longer than 12 characters" if action.length > 12 }
|
11
|
+
|
12
|
+
# Controller, helper, views, and test directories.
|
13
|
+
m.directory File.join('app/controllers', class_path)
|
14
|
+
m.directory File.join('app/helpers', class_path)
|
15
|
+
m.directory File.join('app/views', class_path, file_name)
|
16
|
+
m.directory File.join("app/views/layouts/rtml", class_path)
|
17
|
+
m.directory File.join('test/functional', class_path)
|
18
|
+
m.directory File.join("public/stylesheets/rtml", class_path)
|
19
|
+
m.directory tml_helper_path
|
20
|
+
|
21
|
+
# Controller class, functional test, and helper class.
|
22
|
+
m.template 'controller.rb', File.join('app/controllers', class_path, "#{file_name}_controller.rb")
|
23
|
+
m.template 'functional_test.rb', File.join('test/functional', class_path, "#{file_name}_controller_test.rb")
|
24
|
+
m.template 'helper.rb', File.join('app/helpers', class_path, "#{file_name}_helper.rb")
|
25
|
+
|
26
|
+
# Layout files
|
27
|
+
m.template 'layout_color.rtml.erb', File.join("app/views/layouts/rtml", class_path, "#{file_name}_color.rtml.erb")
|
28
|
+
m.template 'layout_mono.rtml.erb', File.join("app/views/layouts/rtml", class_path, "#{file_name}_mono.rtml.erb")
|
29
|
+
|
30
|
+
# Stylesheets
|
31
|
+
m.template 'css_color.css', File.join("public/stylesheets/rtml", class_path, "#{file_name}_color.css")
|
32
|
+
m.template 'css_mono.css', File.join("public/stylesheets/rtml", class_path, "#{file_name}_mono.css")
|
33
|
+
|
34
|
+
# View template for each action.
|
35
|
+
actions.each do |action|
|
36
|
+
rtml_path = File.join('app/views', class_path, file_name, action, "main.rtml.erb")
|
37
|
+
html_path = File.join('app/views', class_path, file_name, "#{action}.html.erb")
|
38
|
+
rb_path = File.join(tml_helper_path, "#{action}.rb")
|
39
|
+
|
40
|
+
m.directory File.dirname(rtml_path)
|
41
|
+
m.template 'view.rtml.erb', rtml_path, :assigns => { :action => action, :path => rtml_path }
|
42
|
+
m.template 'view.html.erb', html_path, :assigns => { :action => action, :path => html_path }
|
43
|
+
m.template 'tml_helper.rb', rb_path, :assigns => { :action => action, :path => rb_path }
|
44
|
+
end
|
45
|
+
|
46
|
+
m.template 'common_tml_helper.rb', File.join(tml_helper_path, "common.rb")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/common_tml_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Rtml.actions_for <%=class_name%>Controller do
|
2
|
+
# Don't turn these methods into Rails or RTML actions
|
3
|
+
hide_action :build_menu, :tml_layout, :tml_stylesheet
|
4
|
+
|
5
|
+
def build_menu
|
6
|
+
super
|
7
|
+
# examples:
|
8
|
+
# menu_item :sale
|
9
|
+
# menu_item :refund
|
10
|
+
# menu_item :sale_with_cashback, :next_screen => :sale_cb, :position => 1
|
11
|
+
end
|
12
|
+
|
13
|
+
def tml_layout
|
14
|
+
File.join("rtml", "<%=File.join(class_path, file_name)%>_#{color_display? ? "color" : "mono"}")
|
15
|
+
end
|
16
|
+
|
17
|
+
def tml_stylesheet
|
18
|
+
File.join("/stylesheets/rtml", "<%=File.join(class_path, file_name)%>_#{color_display? ? "color" : "mono"}.css")
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
.menu{text-indent: 15%;}
|
2
|
+
div.title{background-color: #000000; color: #FFFFFF; width: 100%; margin: 2px;}
|
3
|
+
span.title{background-color: #000000; color: #FFFFFF; font-size: large; font-weight: bold; text-align: center; vertical-align: middle;}
|
4
|
+
span.center{vertical-align: middle; text-align: center;}
|
5
|
+
div.message{height: 100%; }
|
6
|
+
span.message{ font-size: large; text-align: center;}
|
7
|
+
span{font-size: large;}
|
8
|
+
screen{font-size: large;}
|
9
|
+
h1{text-align: center;}
|
10
|
+
table.message{text-align: center; vertical-align: middle; height: 100%; width: 100%;}
|
11
|
+
table.warning{text-align: center; vertical-align: middle; height: 100%; width: 100%;}
|
12
|
+
th{text-align: center; vertical-align: middle;}
|
13
|
+
table.menu{height: 100%; width: 100%; vertical-align: middle; text-align: center; font-size: large;}
|
14
|
+
table.menu2{vertical-align: middle; font-size: large;}
|
15
|
+
div.menu{height: 100%; width: 100%; vertical-align: middle; text-align: center; font-size: large;}
|
16
|
+
|
17
|
+
|
18
|
+
.c_bold { font-weight: bold;}
|
19
|
+
.c_small { font-size: small;}
|
20
|
+
.c_large { font-size: large; text-align: left;}
|
21
|
+
.c_bold_large { font-weight: bold; font-size: large; text-align: left;}
|
22
|
+
.c_bold_large_center { font-weight: bold; font-size: large; text-align: center;}
|
23
|
+
.c_bold_red_large { font-weight: bold; font-size: large; text-align: left; color: #FF0000;}
|
24
|
+
.c_right { text-align: right;}
|
25
|
+
.c_left { text-align: left; }
|
26
|
+
.c_center { text-align: center;}
|
27
|
+
.c_warn { color: #FF0000; text-align: center; font-weight: bold;}
|
28
|
+
.c_href_menu { font-family: helvetica; font-size: large; text-indent: 2%; vertical-align: middle;}
|
29
|
+
|
30
|
+
.c_prn { font-size: medium; text-align: left; }
|
31
|
+
|
32
|
+
.c_image_middle {vertical-align: middle;}
|
33
|
+
|
34
|
+
pre { white-space: pre; }
|
35
|
+
|
36
|
+
h1 { font-weight: bold; font-size: large; text-align: left;}
|
37
|
+
h2 { font-weight: bold; font-size: medium; text-align: left;}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.menu{text-indent: 15%;}
|
2
|
+
div.title{background-color: #000000; color: #FFFFFF; width: 100%; margin: 2px;}
|
3
|
+
span.title{background-color: #000000; color: #FFFFFF; font-size: medium; font-weight: bold; text-align: center; vertical-align: middle;}
|
4
|
+
span.center{vertical-align: middle; text-align: center;}
|
5
|
+
div.message{height: 100%; }
|
6
|
+
span.message{ font-size: medium; text-align: center;}
|
7
|
+
span{font-size: medium;}
|
8
|
+
screen{font-size: medium;}
|
9
|
+
h1{text-align: center;}
|
10
|
+
table.message{text-align: center; vertical-align: middle; height: 100%; width: 100%;}
|
11
|
+
table.warning{text-align: center; vertical-align: middle; height: 100%; width: 100%;}
|
12
|
+
div.menu{ width: 100%; text-align: left; font-size: medium; text-indent: 15%;}
|
data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/functional_test.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class <%=class_name%>ControllerTest < Rtml::Debug::RtmlControllerTestCase
|
4
|
+
<%actions.each do |action|%>
|
5
|
+
def test_<%=action%>_is_valid
|
6
|
+
get :<%=action%>, :format => :rtml
|
7
|
+
assert_valid_tml
|
8
|
+
assert_all_variables_declared
|
9
|
+
end
|
10
|
+
<%end%>
|
11
|
+
end
|
data/app_generators/rtml/templates/rtml/generators/rtml_controller/templates/layout_color.rtml.erb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<table height="240" width="240" class="menu">
|
2
|
+
<tr><td align="center" valign="middle">
|
3
|
+
<table height="240" width="240">
|
4
|
+
<tr><td align="center" valign="middle">
|
5
|
+
<table width="100%" height="240">
|
6
|
+
<tr><td align="center" valign="middle">
|
7
|
+
<table class="c_small" height="77">
|
8
|
+
<tr><td align="left" valign="middle">
|
9
|
+
RTML Application (layout_graphic.rtml.erb)
|
10
|
+
</td></tr>
|
11
|
+
</table>
|
12
|
+
</td></tr>
|
13
|
+
<tr><td align="center">
|
14
|
+
<table width="240" border="0" height="163">
|
15
|
+
<tr><td align='center' valign='middle' class='c_bold_large'>
|
16
|
+
<%%=yield%>
|
17
|
+
</td></tr>
|
18
|
+
</table>
|
19
|
+
</td></tr>
|
20
|
+
</table>
|
21
|
+
</td></tr>
|
22
|
+
</table>
|
23
|
+
</td></tr>
|
24
|
+
</table>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Rtml.actions_for <%=class_name%>Controller do
|
2
|
+
def <%= action %>
|
3
|
+
on :cancel => embedded_app
|
4
|
+
default_screen :init
|
5
|
+
layout tml_layout
|
6
|
+
includes tml_stylesheet
|
7
|
+
|
8
|
+
screen :init, :next => :main do
|
9
|
+
# application init/reinit code
|
10
|
+
end
|
11
|
+
|
12
|
+
screen :main, :next => :main do
|
13
|
+
display # see <%=File.join("app/views", class_path, file_name)%>/<%=action%>/main.rtml.erb
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title><%%=params[:controller]%> - <%%=params[:action]%></title>
|
6
|
+
<%%=render :partial => 'rtml/rtml_app/default_header'%>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<%%if ENV['RAILS_ENV'] == 'production'%>
|
10
|
+
<%%=render :partial => "rtml/rtml_app/default_production"%>
|
11
|
+
<%%else # this could include test %>
|
12
|
+
<%%=render :partial => "rtml/rtml_app/default_development"%>
|
13
|
+
<%%end%>
|
14
|
+
</body>
|
15
|
+
</html>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
class RtmlDocumentGenerator < Rails::Generator::NamedBase
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
puts "Warning: 'script/generate rtml_document' is obsolete in most cases."
|
5
|
+
puts "You probably meant to use 'script/generate rtml_controller'."
|
6
|
+
print "Are you sure you wish to continue with 'script/generate rtml_document'?"
|
7
|
+
yn = $stdin.gets[0]
|
8
|
+
yn = yn.chr if yn.kind_of? Fixnum
|
9
|
+
|
10
|
+
if yn.downcase == 'y'
|
11
|
+
# Check for class naming collisions.
|
12
|
+
m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
|
13
|
+
|
14
|
+
# Controller, helper, views, and test directories.
|
15
|
+
m.directory File.join('app/controllers', class_path)
|
16
|
+
m.directory File.join('app/helpers', class_path)
|
17
|
+
m.directory File.join('app/views', class_path, file_name)
|
18
|
+
m.directory File.join('test/functional', class_path)
|
19
|
+
|
20
|
+
# Controller class, functional test, and helper class.
|
21
|
+
m.template 'controller.rb',
|
22
|
+
File.join('app/controllers',
|
23
|
+
class_path,
|
24
|
+
"#{file_name}_controller.rb")
|
25
|
+
|
26
|
+
m.template 'functional_test.rb',
|
27
|
+
File.join('test/functional',
|
28
|
+
class_path,
|
29
|
+
"#{file_name}_controller_test.rb")
|
30
|
+
|
31
|
+
m.template 'helper.rb',
|
32
|
+
File.join('app/helpers',
|
33
|
+
class_path,
|
34
|
+
"#{file_name}_helper.rb")
|
35
|
+
|
36
|
+
# View template for each action.
|
37
|
+
actions.each do |action|
|
38
|
+
path = File.join('app/views', class_path, file_name, "#{action}.rtml.erb")
|
39
|
+
m.template 'view.rtml.erb', path,
|
40
|
+
:assigns => { :action => action, :path => path }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
class RtmlWidgetGenerator < Rails::Generator::NamedBase
|
2
|
+
attr_accessor :aliases, :accessors, :properties, :no_help
|
3
|
+
|
4
|
+
def initialize(*args)
|
5
|
+
@no_help = false
|
6
|
+
args.each do |arg|
|
7
|
+
if arg.class == Array and arg.include? "--no-help"
|
8
|
+
# because the option will raise an argument error when it hits super,
|
9
|
+
# and if there's a more elegant way to do it, I can't find it 'cause
|
10
|
+
# the documentation sucks
|
11
|
+
arg.delete "--no-help"
|
12
|
+
@no_help = true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
super(*args)
|
16
|
+
|
17
|
+
@aliases, @accessors, @properties = [], [], []
|
18
|
+
options = {}
|
19
|
+
args = args.collect { |i| i.class == Array ? i.split(/\s/) : i }.flatten
|
20
|
+
args.each do |arg|
|
21
|
+
arg = arg.to_s
|
22
|
+
[:alias, :accessor, :property].each do |type|
|
23
|
+
options[type] ||= []
|
24
|
+
options[type] << arg.sub(/^#{type}\:/i, '') if arg =~ /^#{type.to_s}\:/i
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
options.each do |type,arr|
|
29
|
+
case type
|
30
|
+
when :alias then @aliases = arr
|
31
|
+
when :accessor then @accessors = arr
|
32
|
+
when :property then @properties = arr
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def manifest
|
38
|
+
record do |m|
|
39
|
+
m.class_collisions class_path, "#{class_name}Widget"
|
40
|
+
begin
|
41
|
+
dir = File.join('lib', 'rtml', 'widgets')
|
42
|
+
m.directory dir
|
43
|
+
if @no_help
|
44
|
+
m.template 'basic_widget_no_help.rb', File.join(dir, "#{file_name}_widget.rb")
|
45
|
+
else
|
46
|
+
m.template 'basic_widget.rb', File.join(dir, "#{file_name}_widget.rb")
|
47
|
+
end
|
48
|
+
rescue
|
49
|
+
puts $!.message
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
protected
|
55
|
+
def banner
|
56
|
+
pref = "#{$0} #{spec.name} [widget_name]"
|
57
|
+
usages = [ "#{pref}",
|
58
|
+
"#{pref} [options1] ... [optionsN], where options can include:",
|
59
|
+
" alias:[accessor_alias_name]",
|
60
|
+
" accessor:[accessor_name]",
|
61
|
+
" property:[property_name]",
|
62
|
+
"Use with the --no-help flag to disable the help comments."
|
63
|
+
]
|
64
|
+
"Usage: ".concat(usages.join("\n "))
|
65
|
+
end
|
66
|
+
end
|