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,17 @@
|
|
1
|
+
perms 'rwxrw'
|
2
|
+
desc 'These variables are used to store card-related data read by parsers.'
|
3
|
+
|
4
|
+
cardholder_name :type => :string
|
5
|
+
effective_date :type => :date
|
6
|
+
expiry_date :type => :date
|
7
|
+
input_type 'Specifies how card details are entered. 1 - magnetic card swiped; 2 - card details are read from ICC EMV; 3 - card details are entered manually. When parser is called with the command "read_data", this variable should be set to 1. If the parser is called with the command "risk_mgmt", the variable value should be checked, and if it is 3, card number and expiration date should be verified and card.pan should be filled.', :type => :integer, :values => [ 1, 2, 3 ]
|
8
|
+
issue_number :type => :integer
|
9
|
+
issuer_name :type => :string
|
10
|
+
pan 'Primary Account Number in ASCII.', :type => :string
|
11
|
+
scheme :type => :string
|
12
|
+
pin 'A cryptogram containing the PIN entered by a smart card holder.', :type => :string, :perms => 'rwxr-'
|
13
|
+
|
14
|
+
namespace :emv
|
15
|
+
namespace :pin
|
16
|
+
namespace :mag
|
17
|
+
namespace :parser
|
@@ -0,0 +1,31 @@
|
|
1
|
+
type :opaque
|
2
|
+
desc "These variables are used to store the 'icc_emv' card parser-related data. Refer to 'EMV Specification Book 3' for explanations of ICC EMV terms."
|
3
|
+
|
4
|
+
aac 'AAC - Application Authentication Cryptogram generated during risk management'
|
5
|
+
aid 'Application Identifier', :type => :string
|
6
|
+
aip 'Application Interchange Profile', :type => :integer
|
7
|
+
app_pan_seq 'Application PAN Sequence Number', :type => :integer
|
8
|
+
arqc 'Authorization Request Cryptogram generated during risk management'
|
9
|
+
atc 'Application Transaction Counter', :type => :integer
|
10
|
+
auc 'Application Usage Control', :type => :integer
|
11
|
+
cvmr 'Cardholder Verification Method Result'
|
12
|
+
iac_default 'Issuer Action Code (default)'
|
13
|
+
iac_denial 'Issuer Action Code (denial)'
|
14
|
+
iac_online 'Issuer Action Code (online)'
|
15
|
+
iad 'Issuer Application Data'
|
16
|
+
iso_track2 'Contents of the Track 2 on the card.'
|
17
|
+
last_attempt 'If set to 1, indicates the last PIN entry attempt.', :type => :integer
|
18
|
+
signature 'If non-zero, the customer\'s signature should be verified offline, using the printed receipt.', :type => :integer
|
19
|
+
tc 'Transaction Certificate generated during risk management'
|
20
|
+
tvr 'Terminal Verification Results'
|
21
|
+
unumber 'Unpredictable Number', :type => :integer
|
22
|
+
|
23
|
+
# TODO: Make sure these are legal?? They're not in the 2.1.3.0 docs, but they're used in the BTMLPA.
|
24
|
+
# That they're even strings is an assumption on my part.
|
25
|
+
type :string
|
26
|
+
selected_app
|
27
|
+
app_status_list
|
28
|
+
app_list
|
29
|
+
aid_list
|
30
|
+
selected_aid
|
31
|
+
apdu_list
|
@@ -0,0 +1,8 @@
|
|
1
|
+
desc 'These variables are used to store the "mag" card parser-related data.'
|
2
|
+
perms 'rwxrw'
|
3
|
+
type :string
|
4
|
+
|
5
|
+
iso1_track 'ISO 1 track as read from the card.'
|
6
|
+
iso2_track 'ISO 2 track as read from the card.'
|
7
|
+
iso3_track 'ISO 3 track as read from the card.'
|
8
|
+
service_code 'The service code read from track two of the magnetic card.'
|
@@ -0,0 +1,7 @@
|
|
1
|
+
desc 'These variables are used to store the card parser-related data.'
|
2
|
+
|
3
|
+
_vardcl :type, :desc => 'Specifies the card parser used: "mag" or "icc_emv".'
|
4
|
+
reject_reason 'Reason for transaction rejection.'
|
5
|
+
verdict 'Risk management verdict: "online", "offline", or "reject".'
|
6
|
+
cvm 'Cardholder Verification Method.'
|
7
|
+
cvr 'Cardholder Verification Result.'
|
@@ -0,0 +1,6 @@
|
|
1
|
+
desc 'These variables are used to store the data required for online validation of a smart card holder\'s PIN (Persinal Identification Number).'
|
2
|
+
perms 'rwxr-'
|
3
|
+
|
4
|
+
length 'The number of characters in the entered PIN.', :type => :integer
|
5
|
+
smid 'SMID for PIN\'s DUKPT.', :type => :string
|
6
|
+
array 'This variable is used to select the key array for DUKPT and 3DES encryption.', :type => :integer, :perms => 'rwxrw'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
desc 'This section describes predefined TML variables used to manage updates of configuration data in use by the terminal ICC EMV and magnetic card parsers and to check if the versions of these data are up-to-date and correspond to the most recent ones available at the server. The values of most of these variables are set by the server.'
|
2
|
+
perms 'rwxr-'
|
3
|
+
type :integer
|
4
|
+
|
5
|
+
namespace :emv do
|
6
|
+
timestamp "The variable used to keep track of the version of configuration data in use by the terminal ICC EMV card parser.", :default => 0
|
7
|
+
end
|
8
|
+
|
9
|
+
namespace :mag do
|
10
|
+
timestamp "The variable used to keep track of the version of configuration data in use by the terminal magnetic card parser.", :default => 0
|
11
|
+
end
|
12
|
+
|
13
|
+
namespace :scan do
|
14
|
+
interval "The minimum amount of time in seconds between subsequent configuration requests sent to Gateway when the connection between the terminal and Gateway is active.", :default => 1, :perms => 'rwx--'
|
15
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
desc 'This section describes predefined TML variables related to transmission of data via the terminal\'s COM (RS232) port.'
|
2
|
+
perms 'rwxr-'
|
3
|
+
type :string
|
4
|
+
|
5
|
+
data_size 'COM Data Size - an asynchronous connection parameter defining how many bits of data there are in one byte.', :values => %W(5 6 7 8), :default => '8'
|
6
|
+
_vardcl :name, :desc => 'COM Name - the name of the terminal\'s COM port used for data transfer.', :values => %W(COM1 COM2), :default => 'COM1'
|
7
|
+
parity 'COM Parity - an asynchronous connection parameter - one of the parameters used to control the data transfer via a COM port.', :values => %W(none odd even), :default => 'none'
|
8
|
+
speed 'COM Speed - an asynchronous connection parameter defining the pseed of data transfer in bits per second.', :values => %W(115200 57600 9600), :default => '115200'
|
9
|
+
stop_bits 'COM Stop Bits - an asynchronous connection parameter - one of the parameters used to control the data transfer via a COM port.', :values => %W(1 2), :default => '1'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
desc 'This section describes predefined TML variables related to error handling.'
|
2
|
+
type :string
|
3
|
+
perms 'rwxrw'
|
4
|
+
|
5
|
+
baddata_reason 'A reason returned by the terminal if the data entered by the user is invalid.'
|
6
|
+
description 'A brief textual description of the last error occurred in the system. The value of this variable is set by the module in which the error occurred.'
|
7
|
+
|
8
|
+
namespace :code do
|
9
|
+
type :integer
|
10
|
+
perms 'rwxr-'
|
11
|
+
|
12
|
+
high 'Numeric code of the last error detected by the MicroBrowser. The value of this variable is set by the main module of the Microbrowser.'
|
13
|
+
low 'The numeric code of the "previous", that is, the last but one error detected by the MicroBrowser. The value of this variable is set by the main module of the Microbrowser.'
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
type :string
|
2
|
+
perms 'rwxrw'
|
3
|
+
subscribed 'Variable containing the list of GMA events you want the MicroBrowser to be informed of. This is a semicolon-delimited list of "anykey", "mag", and/or "icc".'
|
4
|
+
perms 'rwxr-'
|
5
|
+
occured 'The name of a GMA event that took place.', :values => %W(menu anykey mag icc), :default => 'menu'
|
6
|
+
|
7
|
+
namespace :key do
|
8
|
+
pressed 'Variable whose value tells which of the keypad keys was pressed (if the MicroBrowser is subscribed to key presses and one of the keys was in fact just pressed).', :values => %W(enter stop 00 cancel sys lfeed f1 f2 f3 f4 f5 f6 f7 f8 f9), :default => ''
|
9
|
+
end
|
10
|
+
|
11
|
+
namespace :icc do
|
12
|
+
card_answer 'If the event with the name "icc" takes place, this variable will contain the smart card answer. Internal use only. You MUST NOT use this variable in your TML applications.', :perms => 'rwx--', :type => :opaque, :values => []
|
13
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
desc 'This section describes predefined TML variables used to store the settings for modem connections over GPRS (General Packet Radio Service) communications channels.'
|
2
|
+
type :string
|
3
|
+
perms 'rwxr-'
|
4
|
+
|
5
|
+
apn 'APN - Access Point Name', :default => 'internet.msk'
|
6
|
+
gsm_pin1 "GSM PIN1 - The Global System for Mobile Communications Personal Identification Number that the terminal uses to prove its identity when trying to establish a connection with mobile (GSM/GPRS) communications service providers.", :default => '0000'
|
7
|
+
gsm_puk1 'GSM PUK1 - The Global System for Mobile Communications Personal Unblocking Key - a numeric code used to unblock a SIM card after incorrect entry of GSM PIN1.', :default => '00000000'
|
8
|
+
selection_to 'Selection Timeout - the amount of time in seconds within which the terminal is waiting for registration in mobile communications service provider\'s network.', :type => :integer, :default => 60
|
@@ -0,0 +1,8 @@
|
|
1
|
+
desc 'This section describes predefined TML variables used when working with a bar code scanner (imager).'
|
2
|
+
type :string
|
3
|
+
perms 'rwxrw'
|
4
|
+
|
5
|
+
aim_id 'AIM Code Character - the second character in the symbology identifier string according to "International Technical Specification - Symbology Identifiers" by AIM Inc.'
|
6
|
+
aim_modifier 'AIM Modifier Character - the third character in the symbology identifier string according to "International Technical Specification - Symbology Identifiers" by AIM Inc.'
|
7
|
+
code_id "Single-character symbology identifier according to the coding systme used by Hand Held Products, Inc., the company manufacturing bar code scanners that are used in Ingenico terminals."
|
8
|
+
data "The data contained in a bar code."
|
@@ -0,0 +1,15 @@
|
|
1
|
+
type :string
|
2
|
+
perms 'rwxr-'
|
3
|
+
desc 'This section describes predefined IP (Internet Protocol)-related TML variables.'
|
4
|
+
|
5
|
+
default_gateway 'Default Gateway IP - an IP address of the gateway, a router or host computer, that routes TCP packets from the terminal to the Internet and to the Gateway.', :default => '192.168.0.1'
|
6
|
+
dns1 'IP address of a DNS (Domain Name Server) - a server that translates hostnames (domain names) into IP addresses', :default => '0.0.0.0'
|
7
|
+
dns2 'IP address of a DNS (Domain Name Server) - a server that translates hostnames (domain names) into IP addresses', :default => '0.0.0.0'
|
8
|
+
local_addr 'The variable used to store the terminal\'s IP address which the terminal receives from the server.', :default => '0.0.0.0'
|
9
|
+
media 'Media Type - the type of communications channel used by the terminal for data transmission.', :values => %W(com dsl ethernet gprs modem), :default => 'com'
|
10
|
+
net_conn_timeout "The amount of time in seconds within which the terminal is waiting for the receipt of the network settings (for example, an IP address) from the server.", :default => 120, :type => :integer
|
11
|
+
net_mask 'Net Mask - the net mask of the network to which the terminal is connected.', :default => '255.255.255.0'
|
12
|
+
persistent 'Persistent Connection - parameter that defines whether or not the connection with the Internet service provider (ISP)\'s server should be kept active after the terminal disconnects from the Gatway.', :values => %W(yes no), :default => "yes"
|
13
|
+
so_timeout 'Socket Timeout - the amount of time in seconds within which the terminal is waiting for the receipt of data from the host.', :type => :integer, :default => 30
|
14
|
+
static_addr 'Static IP Address - the static IP address of the terminal; the one used by the terminal when the value of the ip.term_ip variable is set to "static".', :default => '192.168.0.10'
|
15
|
+
term_ip 'Defines which of the IP addresses the terminal uses: the dynamic IP address received from the server or the static IP address defined by the value of the variable ip.static_addr.', :values => %W(dynamic static), :default => "dynamic"
|
@@ -0,0 +1,42 @@
|
|
1
|
+
desc 'This section describes predefined TML variables related to the MicroBrowser and various aspects of its behavior including its interaction with other terminal applications, terminal memory management, etc.'
|
2
|
+
perms 'rwxr-'
|
3
|
+
type :string
|
4
|
+
|
5
|
+
appversion 'MicroBrowser version as seen by the terminal OS.', :type => :string, :perms => 'r-xr-'
|
6
|
+
cache_update_policy 'Cache update policy defines how the resources cached in the terminal memory (TML pages, images, etc.) are updated. If "all", all the resources cached in the terminal are requested from the server each time the terminal connects to the Gateway. If "expired", only those that have expired are requested from the server when the terminal goes online. If the connection with the Gateway is initiated by a call to the "connect_to_server" C function, the value of this variable does not matter: all the resources cached in the terminal are requested from the server.', :values => %W(all expired), :default => 'expired'
|
7
|
+
current_uri 'Current URI. The value of this variable is updated each time the application switches onto the next screen.'
|
8
|
+
econn 'Reason for failure when submitting data; filled by the HTTP client.', :type => :integer, :perms => 'rwxrw'
|
9
|
+
indicators 'Defines the positions of the indicators on the terminal display. Four different indicators may be present showing radio signal strength, main terminal battery usage, external power supply connection, secondary terminal battery charge.', :values => %W(none default top-left top-middle top-right bottom-left bottom-middle bottom-right left-top left-middle left-bottom right-top right-middle right-bottom), :default => "default"
|
10
|
+
languages 'The list of supported languages. Value is a semicolon-delimeted list consisting of "english", "french" and/or "spanish".', :default => "english;french;spanish", :perms => 'rwxrw'
|
11
|
+
last_connection_dt 'Last date and time when the terminal connected to the Gateway host.', :perms => 'rwxrw', :type => :date
|
12
|
+
pin_init 'Security Key to be sent to the Gateway during initialization of the terminal.', :default => '100', :perms => "rwx--"
|
13
|
+
post_id 'Identifier of the postponed terminal transaction to be cancelled.', :perms => 'rwxrw', :type => :integer
|
14
|
+
posts_number 'Total number of postponed terminal transactions currently stored in the terminal memory.', :type => :integer, :perms => 'rwxr-'
|
15
|
+
posts_number_tmp 'Temporary offilne posts count.', :type => :integer, :perms => 'rwxr-'
|
16
|
+
posts_print_mode 'Defines what information should be included when the contents of offline posts are printed out.', :values => %W(header name value), :default => "header"
|
17
|
+
prev_screen "The uRI of the last rendered screen."
|
18
|
+
run_on_reboot "Run on Reboot - parameter whose value defines whether or not MicroBrowser should start automatically after terminal is rebooted.", :values => %W(yes no), :default => "yes", :perms => "rwx--"
|
19
|
+
run_on_reboot_str "Auxiliary variable used to store intermediate results of working with the Run on Reboot parameter.", :values => %W(yes no), :default => "yes", :perms => "rwx--"
|
20
|
+
start_page "The URI of the MicroBrowser start page. Default value is '/' which is the URI of the default TML page on the application server.", :default => "/", :perms => "rwxrw"
|
21
|
+
submit_mode "This variable defines one of the two possible ways of submitting the transaction data.", :perms => "rwxrw", :values => %W(online offline), :default => "online"
|
22
|
+
supervisor_password "The terminal administrator's password.", :default => '123', :perms => "rwx--"
|
23
|
+
time_zone "Time zone of the terminal location.", :default => '0'
|
24
|
+
transid 'Unique numeric transaction identifier which is set for each transaction.', :perms => 'rwxrw', :default => 1, :type => :integer
|
25
|
+
unique_id 'Variable used for generating a unique positive integer number. Each reference of this variable in TML code updates its value.', :type => :integer, :perms => 'r-xr-'
|
26
|
+
version 'MicroBworser version in use by the terminal.', :perms => 'r-xr-'
|
27
|
+
# log variables
|
28
|
+
perms 'rwx--'
|
29
|
+
log_descr 'Error description.'
|
30
|
+
log_id 'This variable defines the name of the log that is to be cleared when the "clear_log" function is called. The value of this variable should be properly set prior to performing the function call.', :perms => 'rwxrw'
|
31
|
+
log_module 'The name of the software module that originated the error.'
|
32
|
+
log_severity 'Error severity, e.g. FATAL, ERROR, WARNING, etc.'
|
33
|
+
log_size 'The total size (in bytes) of all log files being used in the system.', :type => :integer
|
34
|
+
log_size_limit 'This variable sets the maximum possible size (in kilobytes) of all log files.', :default => 128, :type => :integer
|
35
|
+
ulog_cntr "Auxiliary log counter.", :type => :integer
|
36
|
+
|
37
|
+
namespace :offline
|
38
|
+
namsepace :connection
|
39
|
+
namespace :connect
|
40
|
+
namespace :cache
|
41
|
+
namespace :backlight
|
42
|
+
namespace '3rdparty'
|
@@ -0,0 +1,7 @@
|
|
1
|
+
desc 'These variables are used to store the information necessary for data exchange with third-party UNICAPT32 applications running on the terminal.'
|
2
|
+
type :string
|
3
|
+
perms 'rwxrw'
|
4
|
+
|
5
|
+
app_name 'The name of an application (assigned to it in IngeDev) to which the data are to be sent.', :default => 'GB000400_Ima'
|
6
|
+
_vardcl :timeout, :desc => 'Timeout in tens of milliseconds. This is an auxiliary variable whose value does not affect the data exchange per se. Its purpose is to pass a third-party application a recommended amount of time within which the third-party aopplication may stay idle. it is assumed that if there is no user activity in the third-party application and the timeout elapses, the control should be passed back to the MicroBrowser. The third-party application may just ignore this variable (as well as take it into account).', :default => 0, :type => :integer
|
7
|
+
var_list 'The list of variables to be sent to an application defined by oebr.3rdparty.app_name. Names of variables in the list should be separated with a semicolon.', :default => 'oebr.3rdparty.app_name;oebr.3rdparty.timeout;card.emv.aac;oebr.last_connection_dt'
|
@@ -0,0 +1,4 @@
|
|
1
|
+
type :integer
|
2
|
+
|
3
|
+
off_strength 'The variable whose value defines how bright the terminal screen is when the backlight is off. The higher the value the brighter the screen is. When set to 100, the screen is as bright as when the backlight is on.', :default => 0
|
4
|
+
_vardcl :timeout, :desc => 'The amount of time in seconds within which the terminal screen backlight stays on after a user performs some action with the terminal (for example, pressing a key on the keypad, etc.). When this time expires, the backlight goes off, and stays off until the user does something with the terminal again.', :default => 600
|
@@ -0,0 +1 @@
|
|
1
|
+
storage 'The size of terminal memory cache (in kilobytes) reserved for storing HTTP/TML resources (TML pages, image and CSS files, etc.). This variable is used to limit the total size of all HTTP/TML resources downloaded by the terminal from the application server and cached in the terminal memory. The limit defined by this variable is checked only when "new" resources are being downloaded by the terminal. That is, this limit is not checked when the resources that have once been downloaded are updated. When 75% of the limit set by this variable is reached, the MicroBrowser will try to remove from the terminal cache all TML pages with the "cache" attribute set to "deny". As soon as the limit defined by this variable is reached, no new resource will be downloaded. It is worth mentioning that the number of files stored in HTTP cache cannot exceed 192. This number is fixed and cannot be controlled via a TML application.', :default => 256, :type => :integer
|
@@ -0,0 +1,5 @@
|
|
1
|
+
type :string
|
2
|
+
perms 'rwxrw'
|
3
|
+
pool_off 'Defines whether or not all transactions performed offline and currently stored in the terminal memory should be sent to the Gateway when the "connect_to_server" C function is called.', :values => %W(yes no), :default => "yes"
|
4
|
+
sync_cache 'Defines whether or not all the resources cached in the terminal memory should be requested when the "connect_to_server" C function is called.', :values => %W(yes no), :default => "yes"
|
5
|
+
sync_config 'Defines whether or not the confugration data in use by ICC EMV and magnetic card parsers should be requested from the Gateway when the "connect_to_server" C function is called. See also cfgm.scan.interval', :values => %W(yes no), :default => "yes"
|
@@ -0,0 +1,5 @@
|
|
1
|
+
type :string
|
2
|
+
perms 'rwxrw'
|
3
|
+
|
4
|
+
endstate 'Variable whose value specifies what should be the state of the connection between the terminal/MicroBrowser and Gateway host after the MicroBrowser and Gateway have completed the data exchange.', :values => %W(up down connected), :default => 'up'
|
5
|
+
state 'Variable used to monitor and control the state of the connection between the terminal/MicroBrowser and the Gateway host. "down" - the network interface is down which means that the terminal is in offline mode and is not trying to connect to the network; "going_up" - the terminal is in transition from "down" to "up" which means taht the terminal is trying to connect to the network; "up" - the network interface is up which means that the terminal has connected to the Gateway host; "connecting" - the MicroBrowser is in transition from "up" to "connected" which means that the terminal has already connected to the host and the MicroBrowser is trying to establish the socket connection with the Gateway; "connected" - the MicroBrowser has connected to the Gateway and the applications are ready to start exchanging the data; "error" - connection error occurred. By changing the value of this variable a TML application tells the MicroBrowser which connection state should be achieved. The MicroBrowser, in turn, uses this variable to reflect the current connection state of the terminal. A TML application can then check the variable value and take the appropriate actions.', :values => %W(down up connected)
|
@@ -0,0 +1,5 @@
|
|
1
|
+
type :integer
|
2
|
+
perms 'rwxr-'
|
3
|
+
|
4
|
+
size 'The total size (in kilobytes) of all offline posts currently stored in the terminal memory.'
|
5
|
+
storage 'The size of terminal memory (in kilobytes) reserved for storing offline posts. As soon as the total size of postponed transactions in the terminal memory reaches the limit defined by the value of this parameter, the terminal goes online, sends the postponed transactions to the Gateway, and then deletes them from the terminal memory.', :default => 64
|
@@ -0,0 +1,12 @@
|
|
1
|
+
type :string
|
2
|
+
perms 'rwxr-'
|
3
|
+
certificate 'Gateway\'s X.509 public key certificate. By default, this variable stores the default Gateway certificate.', :perms => 'rwx--'
|
4
|
+
init_port 'Gateway Initialization Service port number', :type => :integer, :default => 61001
|
5
|
+
init_resp_timeout 'Gateway Initialization Service response timeout in seconds', :type => :integer, :default => 25
|
6
|
+
ip 'Gateway\'s hostname (domain name) or the IP address of the computer on which the Gateway runs. The value of this variable must be the same as the Common Name (CN) of certificate owner in the Gateway\'s X.509 public key certificate.', :default => '127.0.0.1'
|
7
|
+
port 'Data port number', :default => 61000, :type => :integer
|
8
|
+
resp_timeout 'Gateway response timeout in seconds', :default => 25, :type => :integer
|
9
|
+
|
10
|
+
namespace :ip do
|
11
|
+
resolved 'Gateway\'s IP address received from a DNS (Domain Name Server) as a result of translation of the Gateway\'s hostname (domain name) into an IP address.', :default => 'unknown'
|
12
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
desc 'This section describes predefined TML variables related to payment processing.'
|
2
|
+
type :integer
|
3
|
+
perms 'rwxrw'
|
4
|
+
|
5
|
+
amount 'Transaction amount'
|
6
|
+
amount_other "Transaction cashback amount"
|
7
|
+
auth_code 'Contains Authorization Code; used for ICC online authorization.', :type => :string
|
8
|
+
auth_resp_code 'Contains Authorization Response Code; used for ICC online authorization.', :default => 0
|
9
|
+
|
10
|
+
namespace :emv do
|
11
|
+
type :opaque
|
12
|
+
arpc 'Authorization Response Cryptogram'
|
13
|
+
issuer_auth 'Used during online authorization; contains Issuer Authentication Data'
|
14
|
+
issuer_script1 'Used during online ICC authorization; contains an issuer\'s script which should be executed on the ICC EMV to update the card data, change application or block the card.'
|
15
|
+
issuer_script2 'Contains an issuer\'s script which should be executed on the ICC EMV to update the card data, change application or block the card.'
|
16
|
+
issuer_script_results 'Used during online authorization; contains the results returned by ICC EMV after executing an issuer\'s script.'
|
17
|
+
end
|
18
|
+
|
19
|
+
merchant_number 'Merchant\'s phone number.', :perms => 'rwxr-'
|
20
|
+
trans_type 'This variable is used by the card parsers. To perform a transaction, it should be set to one of the generic transaction types.'
|
21
|
+
txn_result 'Indicates the transaction authorization result: 1 - approved, 0 - declined.', :values => [1,0]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
desc 'This section describes predefined TML variables related to PPP connections.'
|
2
|
+
type :string
|
3
|
+
perms 'rwxr-'
|
4
|
+
|
5
|
+
authtype 'PPP Authentication Type – the type of authentication used to check the terminal\'s identity when the terminal tries to establish the PPP connection with a server using the PSTN modem.',
|
6
|
+
:values => %W(PAP CHAP), :default => 'PAP'
|
7
|
+
conn_timeout 'The amount of time in seconds within which the terminal is trying to establish the connection with the service provider\'s server via the PSTN modem.', :default => 120, :type => :integer
|
8
|
+
login 'The name that the terminal uses to identify itself when connecting to the Internet service provider\'s server via a modem.', :perms => 'rwx--', :default => 'ingenico_oe'
|
9
|
+
password 'The password that the terminal provides to prove its identity when connecting to the Internet service provider\'s server via a modem.', :default => '1234567890', :perms => 'rwx--'
|
10
|
+
phone 'The phone number that the terminal\'s PSTN modem dials to establish the connection with the service provider\'s server.', :default => '908450885336'
|
11
|
+
retries 'The number of times the terminal is trying to establish the connection with the service provider\'s server via the PSTN modem.', :type => :integer, :default => 3
|
@@ -0,0 +1,29 @@
|
|
1
|
+
desc 'This section describes predefined TML variables related to a terminal.'
|
2
|
+
|
3
|
+
type :date
|
4
|
+
perms 'r-xr-'
|
5
|
+
datetime "System local date and time."
|
6
|
+
datetime_start "An auxiliary variable used for checking whether or not the terminal date and time have been set.", :default => '2006/01/01'
|
7
|
+
|
8
|
+
type :string
|
9
|
+
perms 'r-xr-'
|
10
|
+
itid 'ITID - Ingenico Terminal Identifier', :default => '100', :perms => 'rwxr-'
|
11
|
+
os 'The version of the terminal operating system'
|
12
|
+
part_number
|
13
|
+
serial_number
|
14
|
+
serial_number_default 'A serial number assigned to a development terminal. This is an auxiliary variable used for checking whether or not the terminal is a development one.', :default => '123456789012'
|
15
|
+
|
16
|
+
type :string
|
17
|
+
perms 'rwx--'
|
18
|
+
certificate 'Terminal\'s X.509 public key certificate corresponding to the private key stored in the variable terminal.privkey.'
|
19
|
+
password 'The password used for authentication of a terminal by the Gateway. Received from the Gateway as a result of terminal initialization.'
|
20
|
+
privkey 'Terminal\'s RSA private (asymmetric cryptographic) key.'
|
21
|
+
|
22
|
+
type :integer
|
23
|
+
perms 'rwx--'
|
24
|
+
sn_check 'Defines whether or not the terminal serial number should be checked to make sure that the terminal is not a development one. 1 means the number should be checked.', :default => 1, :values => %W(0 1)
|
25
|
+
|
26
|
+
type :integer
|
27
|
+
perms 'r-xr-'
|
28
|
+
model 'The model of the terminal; for example, 8550, 5100, etc.'
|
29
|
+
pinpad_present 'The variable whose value defines whether or not the terminal has a PIN pad attached to it. 1 if present.', :values => %W(0 1), :default => 0, :perms => 'r-x--'
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/packagetask'
|
4
|
+
require 'rake/rdoctask'
|
5
|
+
require 'find'
|
6
|
+
require 'vendor/plugins/rtml/lib/extensions/rake'
|
7
|
+
require 'rdoc/rdoc'
|
8
|
+
|
9
|
+
|
10
|
+
namespace :doc do
|
11
|
+
namespace :plugins do
|
12
|
+
desc "Generate documentation for the RTML plugin"
|
13
|
+
plugin = 'rtml'
|
14
|
+
Rake.override_task(plugin => :environment) do
|
15
|
+
plugin_base = "vendor/plugins/#{plugin}"
|
16
|
+
options = []
|
17
|
+
files = Rake::FileList.new
|
18
|
+
accessors = Rtml::Doc::AccessorList.collect { |accessor| "#{accessor}=#{Rtml::Doc::AccessorText[accessor]}" }.join(",")
|
19
|
+
options << "-o" << "doc/plugins/#{plugin}"
|
20
|
+
options << "--title" << "'#{plugin.titlecase} Plugin Documentation'"
|
21
|
+
options << '--line-numbers' << '--inline-source'
|
22
|
+
options << '--charset' << 'utf-8'
|
23
|
+
options << "--accessor" << accessors #"#property,accessor,accessor_alias'#=text replaces [r,w,rw]
|
24
|
+
options << '-T' << 'html'
|
25
|
+
|
26
|
+
files.include("#{plugin_base}/lib/**/*.rb")
|
27
|
+
if File.exist?("#{plugin_base}/README")
|
28
|
+
files.include("#{plugin_base}/README")
|
29
|
+
options << "--main" << "#{plugin_base}/README"
|
30
|
+
end
|
31
|
+
files.include("#{plugin_base}/CHANGELOG") if File.exist?("#{plugin_base}/CHANGELOG")
|
32
|
+
|
33
|
+
options.concat files.to_a#to_s.split(/ /)
|
34
|
+
|
35
|
+
RDoc::RDoc::new.document options
|
36
|
+
#sh %(rdoc #{options * ' '})
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
namespace :rtml do
|
42
|
+
desc "Run all available tests of the RTML framework"
|
43
|
+
Rake::TestTask.new(:test) do |t|
|
44
|
+
t.pattern = 'vendor/plugins/rtml/test/**/*_test.rb'
|
45
|
+
t.test_files = ["vendor/plugins/rtml/test/rtml_test_helper.rb"]
|
46
|
+
t.verbose = true
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "Sets up RTML database tables"
|
50
|
+
task :setup => :environment do
|
51
|
+
start = Time.now
|
52
|
+
puts "Setting up RTML database tables..."
|
53
|
+
ActiveRecord::Migrator.up(File.join(PLUGIN_BASE, "db/migrate/"), nil)
|
54
|
+
puts "RTML database tables have been created. (Duration: #{(Time.now - start).to_f} sec)"
|
55
|
+
end
|
56
|
+
|
57
|
+
desc "Brings all RTML database migrations up to date"
|
58
|
+
task :migrate => :environment do
|
59
|
+
ActiveRecord::Migrator.up(File.join(PLUGIN_BASE, "db/migrate/"), nil)
|
60
|
+
puts
|
61
|
+
puts "RTML database tables have been updated to version #{Rtml::VERSION::STRING}" # or else an error was raised.
|
62
|
+
end
|
63
|
+
|
64
|
+
desc "Removes RTML database tables"
|
65
|
+
task :destroy => :environment do
|
66
|
+
start = Time.now
|
67
|
+
ActiveRecord::Migrator.down(File.join(PLUGIN_BASE, "db/migrate/"), nil)
|
68
|
+
puts "RTML database tables have been destroyed. (Duration: #{(Time.now - start).to_f} sec)"
|
69
|
+
end
|
70
|
+
|
71
|
+
desc "Removes and then rebuilds the RTML database tables"
|
72
|
+
task :reset => :environment do
|
73
|
+
start = Time.now
|
74
|
+
Rake::Task['rtml:destroy'].invoke
|
75
|
+
Rake::Task['rtml:setup'].invoke
|
76
|
+
puts "RTML: Reset complete. (Duration: #{(Time.now - start).to_f} sec)"
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
#HELPERS
|
2
|
+
def win_env?
|
3
|
+
RUBY_PLATFORM=~ /win32/
|
4
|
+
end
|
5
|
+
|
6
|
+
def rake(command, options = {})
|
7
|
+
env = options[:env] || 'development'
|
8
|
+
log 'rake', "#{command} in #{env} "
|
9
|
+
sudo = win_env? ? '' : (options[:sudo] ? 'sudo' : '')
|
10
|
+
rake_cmd = win_env? ? "rake.bat" : 'rake'
|
11
|
+
in_root { run("#{sudo} #{rake_cmd} #{command} RAILS_ENV=#{env}", false) }
|
12
|
+
end
|
13
|
+
|
14
|
+
# OPTIONS
|
15
|
+
controller_name = ask("Controller name [skip]: ").chomp
|
16
|
+
if controller_name.length > 0
|
17
|
+
controller_name.gsub!(/_./) { |i| i[1].chr.upcase }
|
18
|
+
actions = ask("Actions (separate with space) [index]: ").chomp.split(/\s/)
|
19
|
+
actions = [ 'index' ] if actions.length == 0
|
20
|
+
default_action = ((actions.include? "index") ? "index" : actions.first)
|
21
|
+
end
|
22
|
+
use_git = yes?("Use git?")
|
23
|
+
if use_git
|
24
|
+
use_submodule = yes?("Install RTML as a git submodule?")
|
25
|
+
end
|
26
|
+
rake_rtml_setup = yes?("Rake rtml:setup?")
|
27
|
+
freeze_rails_gems = yes?("Freeze rails gems?")
|
28
|
+
|
29
|
+
# GENERATE
|
30
|
+
run "rm public/index.html"
|
31
|
+
gem "hpricot"
|
32
|
+
rake "gems:install"
|
33
|
+
rake "rails:freeze:gems" if freeze_rails_gems
|
34
|
+
|
35
|
+
if use_git
|
36
|
+
git :init
|
37
|
+
# if use_submodule
|
38
|
+
# plugin 'rtml', :git => 'git://github.com/sinisterchipmunk/rtml.git', :submodule => true
|
39
|
+
# else
|
40
|
+
# plugin 'rtml', :git => 'git://github.com/sinisterchipmunk/rtml.git'
|
41
|
+
# end
|
42
|
+
git :add => '.'
|
43
|
+
git :commit => '-a -m "Initial commit"'
|
44
|
+
else
|
45
|
+
# plugin 'rtml', :git => 'git://github.com/sinisterchipmunk/rtml.git'
|
46
|
+
end
|
47
|
+
|
48
|
+
inside("vendor/plugins") do
|
49
|
+
run "git clone git://github.com/sinisterchipmunk/rtml.git"
|
50
|
+
end
|
51
|
+
|
52
|
+
if controller_name.length > 0
|
53
|
+
run "ruby script/generate rtml_controller #{controller_name} #{actions.join(" ")}"
|
54
|
+
# generate(:rtml_controller, controller_name, *actions)
|
55
|
+
route "map.connect_rtml :controller => '#{controller_name}', :action => '#{default_action}'"
|
56
|
+
else
|
57
|
+
route 'map.connect_rtml'
|
58
|
+
end
|
59
|
+
|
60
|
+
if rake_rtml_setup
|
61
|
+
run "rake rtml:setup"
|
62
|
+
#rake "rtml:setup"
|
63
|
+
end
|
64
|
+
|