From 2c9604293a3094670eda6f926083942105b23d2f Mon Sep 17 00:00:00 2001 From: andykim78 Date: Sun, 24 Jun 2007 05:21:58 +0000 Subject: [PATCH 001/250] Initial import of version 0.1.0 git-svn-id: https://potionstore.googlecode.com/svn/trunk@2 25f2d1f3-9e33-0410-bf15-d1b47774bbb0 --- LICENSE | 18 + README | 47 + Rakefile | 10 + TODO | 27 + app/controllers/admin_controller.rb | 319 + app/controllers/application.rb | 24 + app/controllers/email_controller.rb | 12 + .../store/lost_license_controller.rb | 26 + .../store/notification_controller.rb | 85 + app/controllers/store/order_controller.rb | 234 + app/helpers/admin_helper.rb | 2 + app/helpers/application_helper.rb | 3 + app/helpers/email_helper.rb | 2 + app/helpers/store/lost_license_helper.rb | 2 + app/helpers/store/notification_helper.rb | 2 + app/helpers/store/order_helper.rb | 2 + app/models/coupon.rb | 21 + app/models/line_item.rb | 34 + app/models/list_subscriber.rb | 2 + app/models/order.rb | 419 + app/models/order_mailer.rb | 29 + app/models/product.rb | 2 + app/models/support_mailer.rb | 49 + app/views/admin/_form.rhtml | 13 + app/views/admin/_order_form.rhtml | 72 + app/views/admin/_product_quantities.rhtml | 18 + app/views/admin/add_coupons.rhtml | 8 + app/views/admin/add_order.rhtml | 3 + app/views/admin/edit_order.rhtml | 3 + app/views/admin/generate_coupons.rhtml | 59 + app/views/admin/index.rhtml | 56 + app/views/admin/mass_order.rhtml | 14 + app/views/admin/order.rhtml | 19 + app/views/admin/orders.rhtml | 62 + app/views/admin/products.rhtml | 27 + app/views/admin/show.rhtml | 8 + app/views/admin/signin_form.rhtml | 33 + app/views/layouts/admin.rhtml | 31 + app/views/layouts/error.rhtml | 49 + app/views/layouts/store.rhtml | 47 + .../order_mailer/lost_license_sent.rhtml | 29 + app/views/order_mailer/thankyou_html.rhtml | 77 + app/views/order_mailer/thankyou_plain.rhtml | 83 + app/views/store/lost_license/index.rhtml | 30 + app/views/store/lost_license/sent.rhtml | 9 + app/views/store/order/_form.rhtml | 0 app/views/store/order/_form_countries.rhtml | 62 + app/views/store/order/_form_months.rhtml | 14 + app/views/store/order/_receipt.rhtml | 154 + app/views/store/order/confirm_paypal.rhtml | 87 + app/views/store/order/failed.rhtml | 28 + app/views/store/order/new.rhtml | 74 + app/views/store/order/payment_cc.rhtml | 165 + app/views/store/order/payment_gcheckout.rhtml | 90 + app/views/store/order/thankyou.rhtml | 72 + app/views/support_mailer/crash_report.rhtml | 1 + .../support_mailer/support_request.rhtml | 1 + config/boot.rb | 45 + config/certs/api_cert_chain.crt | 35 + config/certs/live_api.crt | 0 config/certs/live_api.key | 0 config/certs/sandbox_api.crt | 0 config/certs/sandbox_api.key | 0 config/database.yml | 28 + config/environment.rb | 54 + config/environments/development.rb | 28 + config/environments/production.rb | 23 + config/environments/test.rb | 19 + config/routes.rb | 25 + config/store.yml | 25 + db/migrate/001_create_tables.rb | 108 + db/schema.rb | 79 + doc/README_FOR_APP | 2 + lib/http-access2.rb | 1588 ++++ lib/http-access2/cookie.rb | 538 ++ lib/http-access2/http.rb | 542 ++ lib/licensekey.rb | 21 + lib/soap/XMLSchemaDatatypes.rb | 9 + lib/soap/XMLSchemaDatatypes1999.rb | 10 + lib/soap/attachment.rb | 107 + lib/soap/baseData.rb | 987 +++ lib/soap/cgistub.rb | 9 + lib/soap/charset.rb | 9 + lib/soap/compat.rb | 182 + lib/soap/driver.rb | 9 + lib/soap/element.rb | 266 + lib/soap/encodingstyle/aspDotNetHandler.rb | 213 + lib/soap/encodingstyle/handler.rb | 100 + lib/soap/encodingstyle/literalHandler.rb | 236 + lib/soap/encodingstyle/soapHandler.rb | 586 ++ lib/soap/generator.rb | 268 + lib/soap/header/handler.rb | 60 + lib/soap/header/handlerset.rb | 70 + lib/soap/header/simplehandler.rb | 44 + lib/soap/httpconfigloader.rb | 119 + lib/soap/mapping.rb | 10 + lib/soap/mapping/factory.rb | 355 + lib/soap/mapping/mapping.rb | 459 + lib/soap/mapping/registry.rb | 541 ++ lib/soap/mapping/rubytypeFactory.rb | 475 + lib/soap/mapping/typeMap.rb | 82 + lib/soap/mapping/wsdlencodedregistry.rb | 289 + lib/soap/mapping/wsdlliteralregistry.rb | 549 ++ lib/soap/mappingRegistry.rb | 9 + lib/soap/marshal.rb | 59 + lib/soap/mimemessage.rb | 240 + lib/soap/namespace.rb | 9 + lib/soap/netHttpClient.rb | 190 + lib/soap/parser.rb | 251 + lib/soap/processor.rb | 66 + lib/soap/property.rb | 333 + lib/soap/proxy.rb | 14 + lib/soap/qname.rb | 9 + lib/soap/rpc/cgistub.rb | 206 + lib/soap/rpc/driver.rb | 254 + lib/soap/rpc/element.rb | 330 + lib/soap/rpc/httpserver.rb | 135 + lib/soap/rpc/proxy.rb | 511 ++ lib/soap/rpc/router.rb | 601 ++ lib/soap/rpc/rpc.rb | 25 + lib/soap/rpc/soaplet.rb | 162 + lib/soap/rpc/standaloneServer.rb | 43 + lib/soap/rpcRouter.rb | 9 + lib/soap/rpcUtils.rb | 9 + lib/soap/server.rb | 9 + lib/soap/soap.rb | 150 + lib/soap/standaloneServer.rb | 9 + lib/soap/streamHandler.rb | 258 + lib/soap/wsdlDriver.rb | 575 ++ lib/tasks/capistrano.rake | 102 + lib/tasks/gems.rake | 34 + lib/wsdl/binding.rb | 65 + lib/wsdl/data.rb | 64 + lib/wsdl/definitions.rb | 250 + lib/wsdl/documentation.rb | 32 + lib/wsdl/import.rb | 80 + lib/wsdl/importer.rb | 38 + lib/wsdl/info.rb | 39 + lib/wsdl/message.rb | 54 + lib/wsdl/operation.rb | 172 + lib/wsdl/operationBinding.rb | 108 + lib/wsdl/param.rb | 85 + lib/wsdl/parser.rb | 163 + lib/wsdl/part.rb | 52 + lib/wsdl/port.rb | 84 + lib/wsdl/portType.rb | 73 + lib/wsdl/service.rb | 61 + lib/wsdl/soap/address.rb | 40 + lib/wsdl/soap/binding.rb | 49 + lib/wsdl/soap/body.rb | 56 + lib/wsdl/soap/cgiStubCreator.rb | 76 + lib/wsdl/soap/classDefCreator.rb | 431 + lib/wsdl/soap/classDefCreatorSupport.rb | 126 + lib/wsdl/soap/clientSkeltonCreator.rb | 78 + lib/wsdl/soap/complexType.rb | 166 + lib/wsdl/soap/data.rb | 42 + lib/wsdl/soap/definitions.rb | 150 + lib/wsdl/soap/driverCreator.rb | 95 + lib/wsdl/soap/element.rb | 28 + lib/wsdl/soap/fault.rb | 56 + lib/wsdl/soap/header.rb | 86 + lib/wsdl/soap/headerfault.rb | 56 + lib/wsdl/soap/mappingRegistryCreator.rb | 92 + lib/wsdl/soap/methodDefCreator.rb | 248 + lib/wsdl/soap/operation.rb | 122 + lib/wsdl/soap/servantSkeltonCreator.rb | 67 + lib/wsdl/soap/standaloneServerStubCreator.rb | 85 + lib/wsdl/soap/wsdl2ruby.rb | 180 + lib/wsdl/types.rb | 43 + lib/wsdl/wsdl.rb | 23 + lib/wsdl/xmlSchema/all.rb | 24 + lib/wsdl/xmlSchema/annotation.rb | 34 + lib/wsdl/xmlSchema/any.rb | 56 + lib/wsdl/xmlSchema/attribute.rb | 127 + lib/wsdl/xmlSchema/choice.rb | 55 + lib/wsdl/xmlSchema/complexContent.rb | 81 + lib/wsdl/xmlSchema/complexExtension.rb | 99 + lib/wsdl/xmlSchema/complexRestriction.rb | 92 + lib/wsdl/xmlSchema/complexType.rb | 148 + lib/wsdl/xmlSchema/content.rb | 73 + lib/wsdl/xmlSchema/data.rb | 85 + lib/wsdl/xmlSchema/element.rb | 154 + lib/wsdl/xmlSchema/enumeration.rb | 36 + lib/wsdl/xmlSchema/import.rb | 65 + lib/wsdl/xmlSchema/importer.rb | 87 + lib/wsdl/xmlSchema/include.rb | 54 + lib/wsdl/xmlSchema/length.rb | 35 + lib/wsdl/xmlSchema/list.rb | 48 + lib/wsdl/xmlSchema/parser.rb | 166 + lib/wsdl/xmlSchema/pattern.rb | 36 + lib/wsdl/xmlSchema/schema.rb | 143 + lib/wsdl/xmlSchema/sequence.rb | 51 + lib/wsdl/xmlSchema/simpleContent.rb | 69 + lib/wsdl/xmlSchema/simpleExtension.rb | 54 + lib/wsdl/xmlSchema/simpleRestriction.rb | 73 + lib/wsdl/xmlSchema/simpleType.rb | 80 + lib/wsdl/xmlSchema/unique.rb | 34 + lib/wsdl/xmlSchema/xsd2ruby.rb | 107 + lib/xsd/charset.rb | 187 + lib/xsd/codegen.rb | 12 + lib/xsd/codegen/classdef.rb | 203 + lib/xsd/codegen/commentdef.rb | 34 + lib/xsd/codegen/gensupport.rb | 166 + lib/xsd/codegen/methoddef.rb | 63 + lib/xsd/codegen/moduledef.rb | 191 + lib/xsd/datatypes.rb | 1269 +++ lib/xsd/datatypes1999.rb | 20 + lib/xsd/iconvcharset.rb | 33 + lib/xsd/mapping.rb | 42 + lib/xsd/namedelements.rb | 108 + lib/xsd/ns.rb | 140 + lib/xsd/qname.rb | 78 + lib/xsd/xmlparser.rb | 61 + lib/xsd/xmlparser/parser.rb | 96 + lib/xsd/xmlparser/rexmlparser.rb | 54 + lib/xsd/xmlparser/xmlparser.rb | 50 + lib/xsd/xmlparser/xmlscanner.rb | 147 + log/development.log | 1 + public/.htaccess | 49 + public/404.html | 42 + public/500.html | 42 + public/dispatch.cgi | 10 + public/dispatch.fcgi | 24 + public/dispatch.rb | 10 + public/favicon.ico | 0 public/favicon.png | Bin 0 -> 665 bytes public/images/store/amex.gif | Bin 0 -> 645 bytes public/images/store/application_icon.png | Bin 0 -> 2212 bytes public/images/store/cvv.png | Bin 0 -> 1071 bytes public/images/store/discover.gif | Bin 0 -> 495 bytes public/images/store/gcheckout.gif | Bin 0 -> 2675 bytes public/images/store/mc.gif | Bin 0 -> 808 bytes public/images/store/missing_field.png | Bin 0 -> 254 bytes public/images/store/paypal.gif | Bin 0 -> 416 bytes public/images/store/printer.png | Bin 0 -> 731 bytes public/images/store/rounded_tr.png | Bin 0 -> 472 bytes public/images/store/visa.gif | Bin 0 -> 335 bytes public/javascripts/application.js | 2 + public/javascripts/controls.js | 833 ++ public/javascripts/dragdrop.js | 942 ++ public/javascripts/effects.js | 1088 +++ public/javascripts/prototype.js | 2515 ++++++ public/javascripts/store.js | 32 + public/robots.txt | 1 + public/stylesheets/admin.css | 69 + public/stylesheets/mytheme.css | 283 + public/stylesheets/scaffold.css | 74 + public/stylesheets/store.css | 241 + script/about | 3 + script/breakpointer | 3 + script/console | 3 + script/destroy | 3 + script/generate | 3 + script/makelicenses | 35 + script/performance/benchmarker | 3 + script/performance/profiler | 3 + script/plugin | 3 + script/process/inspector | 3 + script/process/reaper | 3 + script/process/spawner | 3 + script/runner | 3 + script/server | 3 + svn-commit.tmp | 4 + test/fixtures/coupons.yml | 5 + test/fixtures/line_items.yml | 5 + test/fixtures/list_subscribers.yml | 5 + test/fixtures/order_mailer/thankyou | 3 + test/fixtures/orders.yml | 5 + test/fixtures/products.yml | 5 + test/functional/admin_controller_test.rb | 88 + test/functional/email_controller_test.rb | 18 + test/test_helper.rb | 28 + test/unit/coupon_test.rb | 10 + test/unit/line_item_test.rb | 10 + test/unit/list_subscriber_test.rb | 10 + test/unit/order_mailer_test.rb | 35 + test/unit/order_test.rb | 10 + test/unit/product_test.rb | 10 + test/unit/support_mailer_test.rb | 27 + .../init.rb | 2 + .../lib/active_record_extensions.rb | 192 + vendor/plugins/google4r/CHANGES | 5 + vendor/plugins/google4r/LICENSE | 22 + vendor/plugins/google4r/README | 75 + vendor/plugins/google4r/init.rb | 41 + .../plugins/google4r/lib/google4r/checkout.rb | 36 + .../lib/google4r/checkout/commands.rb | 296 + .../lib/google4r/checkout/frontend.rb | 112 + .../lib/google4r/checkout/notifications.rb | 534 ++ .../google4r/lib/google4r/checkout/shared.rb | 501 ++ .../lib/google4r/checkout/xml_generation.rb | 271 + .../integration/checkout_command_test.rb | 103 + .../test/checkout/unit/address_test.rb | 131 + .../google4r/test/checkout/unit/area_test.rb | 41 + .../checkout/unit/checkout_command_test.rb | 112 + .../checkout_command_xml_generator_test.rb | 187 + .../test/checkout/unit/command_test.rb | 126 + .../checkout/unit/flat_rate_shipping_test.rb | 114 + .../test/checkout/unit/frontend_test.rb | 63 + .../google4r/test/checkout/unit/item_test.rb | 159 + .../unit/marketing_preferences_test.rb | 65 + .../test/checkout/unit/merchant_code_test.rb | 122 + .../unit/new_order_notification_test.rb | 115 + .../unit/notification_acknowledgement_test.rb | 43 + .../unit/notification_handler_test.rb | 93 + .../checkout/unit/order_adjustment_test.rb | 95 + .../order_state_change_notification_test.rb | 159 + .../checkout/unit/pickup_shipping_test.rb | 70 + .../checkout/unit/private_data_parser_test.rb | 68 + .../checkout/unit/shipping_adjustment_test.rb | 100 + .../checkout/unit/shipping_method_test.rb | 41 + .../test/checkout/unit/shopping_cart_test.rb | 146 + .../test/checkout/unit/tax_rule_test.rb | 65 + .../test/checkout/unit/tax_table_test.rb | 82 + .../checkout/unit/us_country_area_test.rb | 76 + .../test/checkout/unit/us_state_area_test.rb | 70 + .../test/checkout/unit/us_zip_area_test.rb | 66 + vendor/plugins/google4r/var/cacert.pem | 7815 +++++++++++++++++ vendor/plugins/paypal/LPGL-LICENSE | 504 ++ vendor/plugins/paypal/README | 227 + vendor/plugins/paypal/Rakefile | 22 + vendor/plugins/paypal/init.rb | 1 + .../lib/PayPalAPIInterfaceServiceClient.rb | 221 + vendor/plugins/paypal/lib/default.rb | 5976 +++++++++++++ vendor/plugins/paypal/lib/defaultDriver.rb | 195 + vendor/plugins/paypal/lib/paypal.rb | 368 + vendor/plugins/paypal/test/paypal_test.rb | 81 + vendor/plugins/paypal/test/test_helper.rb | 10 + 328 files changed, 52239 insertions(+) create mode 100644 LICENSE create mode 100644 README create mode 100644 Rakefile create mode 100644 TODO create mode 100644 app/controllers/admin_controller.rb create mode 100644 app/controllers/application.rb create mode 100644 app/controllers/email_controller.rb create mode 100644 app/controllers/store/lost_license_controller.rb create mode 100644 app/controllers/store/notification_controller.rb create mode 100644 app/controllers/store/order_controller.rb create mode 100644 app/helpers/admin_helper.rb create mode 100644 app/helpers/application_helper.rb create mode 100644 app/helpers/email_helper.rb create mode 100644 app/helpers/store/lost_license_helper.rb create mode 100644 app/helpers/store/notification_helper.rb create mode 100644 app/helpers/store/order_helper.rb create mode 100644 app/models/coupon.rb create mode 100644 app/models/line_item.rb create mode 100644 app/models/list_subscriber.rb create mode 100644 app/models/order.rb create mode 100644 app/models/order_mailer.rb create mode 100644 app/models/product.rb create mode 100644 app/models/support_mailer.rb create mode 100644 app/views/admin/_form.rhtml create mode 100644 app/views/admin/_order_form.rhtml create mode 100644 app/views/admin/_product_quantities.rhtml create mode 100644 app/views/admin/add_coupons.rhtml create mode 100644 app/views/admin/add_order.rhtml create mode 100644 app/views/admin/edit_order.rhtml create mode 100644 app/views/admin/generate_coupons.rhtml create mode 100644 app/views/admin/index.rhtml create mode 100644 app/views/admin/mass_order.rhtml create mode 100644 app/views/admin/order.rhtml create mode 100644 app/views/admin/orders.rhtml create mode 100644 app/views/admin/products.rhtml create mode 100644 app/views/admin/show.rhtml create mode 100644 app/views/admin/signin_form.rhtml create mode 100644 app/views/layouts/admin.rhtml create mode 100644 app/views/layouts/error.rhtml create mode 100644 app/views/layouts/store.rhtml create mode 100644 app/views/order_mailer/lost_license_sent.rhtml create mode 100644 app/views/order_mailer/thankyou_html.rhtml create mode 100644 app/views/order_mailer/thankyou_plain.rhtml create mode 100644 app/views/store/lost_license/index.rhtml create mode 100644 app/views/store/lost_license/sent.rhtml create mode 100644 app/views/store/order/_form.rhtml create mode 100644 app/views/store/order/_form_countries.rhtml create mode 100644 app/views/store/order/_form_months.rhtml create mode 100644 app/views/store/order/_receipt.rhtml create mode 100644 app/views/store/order/confirm_paypal.rhtml create mode 100644 app/views/store/order/failed.rhtml create mode 100644 app/views/store/order/new.rhtml create mode 100644 app/views/store/order/payment_cc.rhtml create mode 100644 app/views/store/order/payment_gcheckout.rhtml create mode 100644 app/views/store/order/thankyou.rhtml create mode 100644 app/views/support_mailer/crash_report.rhtml create mode 100644 app/views/support_mailer/support_request.rhtml create mode 100644 config/boot.rb create mode 100644 config/certs/api_cert_chain.crt create mode 100644 config/certs/live_api.crt create mode 100644 config/certs/live_api.key create mode 100644 config/certs/sandbox_api.crt create mode 100644 config/certs/sandbox_api.key create mode 100644 config/database.yml create mode 100644 config/environment.rb create mode 100644 config/environments/development.rb create mode 100644 config/environments/production.rb create mode 100644 config/environments/test.rb create mode 100644 config/routes.rb create mode 100644 config/store.yml create mode 100644 db/migrate/001_create_tables.rb create mode 100644 db/schema.rb create mode 100644 doc/README_FOR_APP create mode 100644 lib/http-access2.rb create mode 100644 lib/http-access2/cookie.rb create mode 100644 lib/http-access2/http.rb create mode 100644 lib/licensekey.rb create mode 100644 lib/soap/XMLSchemaDatatypes.rb create mode 100644 lib/soap/XMLSchemaDatatypes1999.rb create mode 100644 lib/soap/attachment.rb create mode 100644 lib/soap/baseData.rb create mode 100644 lib/soap/cgistub.rb create mode 100644 lib/soap/charset.rb create mode 100644 lib/soap/compat.rb create mode 100644 lib/soap/driver.rb create mode 100644 lib/soap/element.rb create mode 100644 lib/soap/encodingstyle/aspDotNetHandler.rb create mode 100644 lib/soap/encodingstyle/handler.rb create mode 100644 lib/soap/encodingstyle/literalHandler.rb create mode 100644 lib/soap/encodingstyle/soapHandler.rb create mode 100644 lib/soap/generator.rb create mode 100644 lib/soap/header/handler.rb create mode 100644 lib/soap/header/handlerset.rb create mode 100644 lib/soap/header/simplehandler.rb create mode 100644 lib/soap/httpconfigloader.rb create mode 100644 lib/soap/mapping.rb create mode 100644 lib/soap/mapping/factory.rb create mode 100644 lib/soap/mapping/mapping.rb create mode 100644 lib/soap/mapping/registry.rb create mode 100644 lib/soap/mapping/rubytypeFactory.rb create mode 100644 lib/soap/mapping/typeMap.rb create mode 100644 lib/soap/mapping/wsdlencodedregistry.rb create mode 100644 lib/soap/mapping/wsdlliteralregistry.rb create mode 100644 lib/soap/mappingRegistry.rb create mode 100644 lib/soap/marshal.rb create mode 100644 lib/soap/mimemessage.rb create mode 100644 lib/soap/namespace.rb create mode 100644 lib/soap/netHttpClient.rb create mode 100644 lib/soap/parser.rb create mode 100644 lib/soap/processor.rb create mode 100644 lib/soap/property.rb create mode 100644 lib/soap/proxy.rb create mode 100644 lib/soap/qname.rb create mode 100644 lib/soap/rpc/cgistub.rb create mode 100644 lib/soap/rpc/driver.rb create mode 100644 lib/soap/rpc/element.rb create mode 100644 lib/soap/rpc/httpserver.rb create mode 100644 lib/soap/rpc/proxy.rb create mode 100644 lib/soap/rpc/router.rb create mode 100644 lib/soap/rpc/rpc.rb create mode 100644 lib/soap/rpc/soaplet.rb create mode 100644 lib/soap/rpc/standaloneServer.rb create mode 100644 lib/soap/rpcRouter.rb create mode 100644 lib/soap/rpcUtils.rb create mode 100644 lib/soap/server.rb create mode 100644 lib/soap/soap.rb create mode 100644 lib/soap/standaloneServer.rb create mode 100644 lib/soap/streamHandler.rb create mode 100644 lib/soap/wsdlDriver.rb create mode 100644 lib/tasks/capistrano.rake create mode 100644 lib/tasks/gems.rake create mode 100644 lib/wsdl/binding.rb create mode 100644 lib/wsdl/data.rb create mode 100644 lib/wsdl/definitions.rb create mode 100644 lib/wsdl/documentation.rb create mode 100644 lib/wsdl/import.rb create mode 100644 lib/wsdl/importer.rb create mode 100644 lib/wsdl/info.rb create mode 100644 lib/wsdl/message.rb create mode 100644 lib/wsdl/operation.rb create mode 100644 lib/wsdl/operationBinding.rb create mode 100644 lib/wsdl/param.rb create mode 100644 lib/wsdl/parser.rb create mode 100644 lib/wsdl/part.rb create mode 100644 lib/wsdl/port.rb create mode 100644 lib/wsdl/portType.rb create mode 100644 lib/wsdl/service.rb create mode 100644 lib/wsdl/soap/address.rb create mode 100644 lib/wsdl/soap/binding.rb create mode 100644 lib/wsdl/soap/body.rb create mode 100644 lib/wsdl/soap/cgiStubCreator.rb create mode 100644 lib/wsdl/soap/classDefCreator.rb create mode 100644 lib/wsdl/soap/classDefCreatorSupport.rb create mode 100644 lib/wsdl/soap/clientSkeltonCreator.rb create mode 100644 lib/wsdl/soap/complexType.rb create mode 100644 lib/wsdl/soap/data.rb create mode 100644 lib/wsdl/soap/definitions.rb create mode 100644 lib/wsdl/soap/driverCreator.rb create mode 100644 lib/wsdl/soap/element.rb create mode 100644 lib/wsdl/soap/fault.rb create mode 100644 lib/wsdl/soap/header.rb create mode 100644 lib/wsdl/soap/headerfault.rb create mode 100644 lib/wsdl/soap/mappingRegistryCreator.rb create mode 100644 lib/wsdl/soap/methodDefCreator.rb create mode 100644 lib/wsdl/soap/operation.rb create mode 100644 lib/wsdl/soap/servantSkeltonCreator.rb create mode 100644 lib/wsdl/soap/standaloneServerStubCreator.rb create mode 100644 lib/wsdl/soap/wsdl2ruby.rb create mode 100644 lib/wsdl/types.rb create mode 100644 lib/wsdl/wsdl.rb create mode 100644 lib/wsdl/xmlSchema/all.rb create mode 100644 lib/wsdl/xmlSchema/annotation.rb create mode 100644 lib/wsdl/xmlSchema/any.rb create mode 100644 lib/wsdl/xmlSchema/attribute.rb create mode 100644 lib/wsdl/xmlSchema/choice.rb create mode 100644 lib/wsdl/xmlSchema/complexContent.rb create mode 100644 lib/wsdl/xmlSchema/complexExtension.rb create mode 100644 lib/wsdl/xmlSchema/complexRestriction.rb create mode 100644 lib/wsdl/xmlSchema/complexType.rb create mode 100644 lib/wsdl/xmlSchema/content.rb create mode 100644 lib/wsdl/xmlSchema/data.rb create mode 100644 lib/wsdl/xmlSchema/element.rb create mode 100644 lib/wsdl/xmlSchema/enumeration.rb create mode 100644 lib/wsdl/xmlSchema/import.rb create mode 100644 lib/wsdl/xmlSchema/importer.rb create mode 100644 lib/wsdl/xmlSchema/include.rb create mode 100644 lib/wsdl/xmlSchema/length.rb create mode 100644 lib/wsdl/xmlSchema/list.rb create mode 100644 lib/wsdl/xmlSchema/parser.rb create mode 100644 lib/wsdl/xmlSchema/pattern.rb create mode 100644 lib/wsdl/xmlSchema/schema.rb create mode 100644 lib/wsdl/xmlSchema/sequence.rb create mode 100644 lib/wsdl/xmlSchema/simpleContent.rb create mode 100644 lib/wsdl/xmlSchema/simpleExtension.rb create mode 100644 lib/wsdl/xmlSchema/simpleRestriction.rb create mode 100644 lib/wsdl/xmlSchema/simpleType.rb create mode 100644 lib/wsdl/xmlSchema/unique.rb create mode 100644 lib/wsdl/xmlSchema/xsd2ruby.rb create mode 100644 lib/xsd/charset.rb create mode 100644 lib/xsd/codegen.rb create mode 100644 lib/xsd/codegen/classdef.rb create mode 100644 lib/xsd/codegen/commentdef.rb create mode 100644 lib/xsd/codegen/gensupport.rb create mode 100644 lib/xsd/codegen/methoddef.rb create mode 100644 lib/xsd/codegen/moduledef.rb create mode 100644 lib/xsd/datatypes.rb create mode 100644 lib/xsd/datatypes1999.rb create mode 100644 lib/xsd/iconvcharset.rb create mode 100644 lib/xsd/mapping.rb create mode 100644 lib/xsd/namedelements.rb create mode 100644 lib/xsd/ns.rb create mode 100644 lib/xsd/qname.rb create mode 100644 lib/xsd/xmlparser.rb create mode 100644 lib/xsd/xmlparser/parser.rb create mode 100644 lib/xsd/xmlparser/rexmlparser.rb create mode 100644 lib/xsd/xmlparser/xmlparser.rb create mode 100644 lib/xsd/xmlparser/xmlscanner.rb create mode 100644 log/development.log create mode 100644 public/.htaccess create mode 100644 public/404.html create mode 100644 public/500.html create mode 100755 public/dispatch.cgi create mode 100755 public/dispatch.fcgi create mode 100755 public/dispatch.rb create mode 100644 public/favicon.ico create mode 100644 public/favicon.png create mode 100644 public/images/store/amex.gif create mode 100644 public/images/store/application_icon.png create mode 100644 public/images/store/cvv.png create mode 100644 public/images/store/discover.gif create mode 100644 public/images/store/gcheckout.gif create mode 100644 public/images/store/mc.gif create mode 100644 public/images/store/missing_field.png create mode 100644 public/images/store/paypal.gif create mode 100644 public/images/store/printer.png create mode 100644 public/images/store/rounded_tr.png create mode 100644 public/images/store/visa.gif create mode 100644 public/javascripts/application.js create mode 100644 public/javascripts/controls.js create mode 100644 public/javascripts/dragdrop.js create mode 100644 public/javascripts/effects.js create mode 100644 public/javascripts/prototype.js create mode 100644 public/javascripts/store.js create mode 100644 public/robots.txt create mode 100644 public/stylesheets/admin.css create mode 100644 public/stylesheets/mytheme.css create mode 100644 public/stylesheets/scaffold.css create mode 100644 public/stylesheets/store.css create mode 100755 script/about create mode 100755 script/breakpointer create mode 100755 script/console create mode 100755 script/destroy create mode 100755 script/generate create mode 100755 script/makelicenses create mode 100755 script/performance/benchmarker create mode 100755 script/performance/profiler create mode 100755 script/plugin create mode 100755 script/process/inspector create mode 100755 script/process/reaper create mode 100755 script/process/spawner create mode 100755 script/runner create mode 100755 script/server create mode 100644 svn-commit.tmp create mode 100644 test/fixtures/coupons.yml create mode 100644 test/fixtures/line_items.yml create mode 100644 test/fixtures/list_subscribers.yml create mode 100644 test/fixtures/order_mailer/thankyou create mode 100644 test/fixtures/orders.yml create mode 100644 test/fixtures/products.yml create mode 100644 test/functional/admin_controller_test.rb create mode 100644 test/functional/email_controller_test.rb create mode 100644 test/test_helper.rb create mode 100644 test/unit/coupon_test.rb create mode 100644 test/unit/line_item_test.rb create mode 100644 test/unit/list_subscriber_test.rb create mode 100644 test/unit/order_mailer_test.rb create mode 100644 test/unit/order_test.rb create mode 100644 test/unit/product_test.rb create mode 100644 test/unit/support_mailer_test.rb create mode 100644 vendor/plugins/activerecord_foreign_key_extensions/init.rb create mode 100644 vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb create mode 100644 vendor/plugins/google4r/CHANGES create mode 100644 vendor/plugins/google4r/LICENSE create mode 100644 vendor/plugins/google4r/README create mode 100644 vendor/plugins/google4r/init.rb create mode 100644 vendor/plugins/google4r/lib/google4r/checkout.rb create mode 100644 vendor/plugins/google4r/lib/google4r/checkout/commands.rb create mode 100644 vendor/plugins/google4r/lib/google4r/checkout/frontend.rb create mode 100644 vendor/plugins/google4r/lib/google4r/checkout/notifications.rb create mode 100644 vendor/plugins/google4r/lib/google4r/checkout/shared.rb create mode 100644 vendor/plugins/google4r/lib/google4r/checkout/xml_generation.rb create mode 100644 vendor/plugins/google4r/test/checkout/integration/checkout_command_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/address_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/area_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/checkout_command_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/checkout_command_xml_generator_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/command_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/flat_rate_shipping_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/frontend_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/item_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/marketing_preferences_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/merchant_code_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/new_order_notification_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/notification_acknowledgement_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/notification_handler_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/order_adjustment_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/order_state_change_notification_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/pickup_shipping_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/private_data_parser_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/shipping_adjustment_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/shipping_method_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/shopping_cart_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/tax_rule_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/tax_table_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/us_country_area_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/us_state_area_test.rb create mode 100644 vendor/plugins/google4r/test/checkout/unit/us_zip_area_test.rb create mode 100644 vendor/plugins/google4r/var/cacert.pem create mode 100644 vendor/plugins/paypal/LPGL-LICENSE create mode 100644 vendor/plugins/paypal/README create mode 100644 vendor/plugins/paypal/Rakefile create mode 100644 vendor/plugins/paypal/init.rb create mode 100644 vendor/plugins/paypal/lib/PayPalAPIInterfaceServiceClient.rb create mode 100644 vendor/plugins/paypal/lib/default.rb create mode 100644 vendor/plugins/paypal/lib/defaultDriver.rb create mode 100644 vendor/plugins/paypal/lib/paypal.rb create mode 100644 vendor/plugins/paypal/test/paypal_test.rb create mode 100644 vendor/plugins/paypal/test/test_helper.rb diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..62b37fe --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +Unless noted otherwise, the files of this project are licensed under a +Creative Commons Attribution-Share Alike License. + +http://creativecommons.org/licenses/by-sa/3.0/ + +Additionally, we ask that you credit and link to http://www.potionfactory.com +somewhere on your store. This is not a requirement, however. + +Copyright 2007, Potion Factory LLC + +### + +Some software components bundled with this software are licensed to +Potion Factory LLC under their own terms. Please see the following +files for details: + +vendor/plugins/google4r/LICENSE +vendor/plugins/paypal/LPGL-LICENSE \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..11b6f95 --- /dev/null +++ b/README @@ -0,0 +1,47 @@ +== Welcome to PotionStore + +Features: + +- PayPal Website Payments Pro support +- PayPal Express Checkout support +- Google Checkout support +- Administration interface +- Coupons +- Send lost license page (http://mycompany.com/store/lost_license) + + +== Dependencies + +- Rails 1.2 or higher +- Postgresql +- money rubygem + + +== Installation + +- Edit the following config files to suit your needs + + config/store.yml + config/paypal.yml + config/google_checkout.yml + +- Setup database + - Install Postgresql if you haven't + - Create the store_development database. + Make sure to set the encoding of the database to UTF8. + I recommend pgAdmin for Postgresql newcomers. + - Edit config/database.yml + - run "rake db:migrate" to import schema + +- Install gem dependency: + gem install money + +- Install PayPal API access certificates into config/certs + +- Run with script/server and test through + http://localhost:3000/store and + http://localhost:3000/admin + +- Replace the default license key generator in lib/licensekey.rb with your own + +- Modify config/deploy.rb to setup your deployment diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..3bb0e85 --- /dev/null +++ b/Rakefile @@ -0,0 +1,10 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require(File.join(File.dirname(__FILE__), 'config', 'boot')) + +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' + +require 'tasks/rails' diff --git a/TODO b/TODO new file mode 100644 index 0000000..0a80980 --- /dev/null +++ b/TODO @@ -0,0 +1,27 @@ +Any volunteers? + +- Write some unit tests +- Show sales graphs in the admin site + + +Changes: + +12/11/2006 +- AK: No longer says coupons at the bottom when there are no coupons +- AK: Percentage based coupons accepted now + +12/04/2006 +- AK: Bug where adding a new order in the admin interface didn't make a new license key fixed +- AK: Comment field in order editor fixed + +11/30/2006 +- AK: Paypal order problem fixed. + +11/28/2006 +- AK: Coupons are now accepted + +9/20/2006 +- AK: A valid license is created for people with unicode names +- AK: Printable receipt did not have a potion factory title- +- AK: License files get downloaded with the correct unicode name +- AK: UTF-8 encoding specified in the database configuration \ No newline at end of file diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb new file mode 100644 index 0000000..e0e928d --- /dev/null +++ b/app/controllers/admin_controller.rb @@ -0,0 +1,319 @@ + +class AdminController < ApplicationController + # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) + verify :method => :post, :only => [ :destroy, :create, :update ], + :redirect_to => { :action => :list } + + # Authentication stuff + before_filter :check_authentication, :except => [:signin_form, :signin] + def check_authentication + unless session[:logged_in] + session[:intended_action] = action_name + render :action => "signin_form", :layout => 'error' + end + end + + def signin_form + render :action => 'signin_form', :layout => 'error' + end + + def signin + if params[:username] == $STORE_PREFS['admin_username'] && + params[:password] == $STORE_PREFS['admin_password'] + session[:logged_in] = true + redirect_to :action => session[:intended_action] + else + flash[:notice] = 'Go home kid. This ain\'t for you.' + render :action => "signin_form", :layout => 'error' + end + end + + def signout + session[:logged_in] = nil + redirect_to home_url + end + + # Welcome page + def index + @reports = {} + + # NOTE: mysql should use IFNULL instead of COALESCE + + @reports['Today'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product") + @reports['Last 7 Days'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time group by product") + @reports['Last 30 Days'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time group by product") + @reports['Last 365 Days'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time group by product") + + + @report_num_orders = {} + @report_totals = {} + + for key in ['Today', 'Last 7 Days', 'Last 30 Days', 'Last 365 Days'] + report = @reports[key] + orders = 0 + total = 0 + for product in report + orders = product.orders + total += product.earned.to_f + end + @report_num_orders[key] = orders + @report_totals[key] = total + end + + # NOTE: mysql uses year, month, and day functions instead of date_part + + last_8_days_sql = " + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8" + + last_8_months_sql = " + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8" + + @daily = Order.find_by_sql(last_8_days_sql) + @monthly = Order.find_by_sql(last_8_months_sql) + + today = Date.today + month_days = Date.civil(today.year, today.month, -1).day + + @month_estimate = @monthly.first.earned.to_f + @report_totals['Last 30 Days'] / 30 * (month_days - today.day) + @year_estimate = @month_estimate * 12 + end + + # Order actions + def find_orders + q = params[:query] + q.strip! + redirect_to :back and return if not q + conditions = "status != 'P' AND (email ~* '#{q}' OR + first_name ~* '#{q}.*' OR + last_name ~* '#{q}.*' OR + licensee_name ~* '%#{q}.*')" + @order_pages, @orders = paginate :orders, :per_page => 100, :order => 'order_time DESC', :conditions => conditions + render :action => "orders" + end + + def orders + @order_pages, @orders = paginate :orders, :per_page => 100, :order => 'order_time DESC', :conditions => "status != 'P'" + end + + def order + @order = Order.find(params[:id]) + end + + def add_order + @order = Order.new() + @order.country = 'US' + @order.payment_type = 'Free' + end + + def edit_order + @order = Order.find(params[:id]) + end + + def modify_order + # must delete the licensee name from parameters because we need to set it after the line items are added + licensee_name = params[:order][:licensee_name] + params[:order].delete("licensee_name") + + if params[:order] && !params[:order][:id].blank? + @order = Order.find(params[:order][:id]) + @order.attributes = params[:order] + else + @order = Order.new(params[:order]) + @order.status = 'C' + end + begin + @order.transaction do + if not @order.add_or_update_items(params[:items]) + flash[:notice] = 'Order contains no items' + raise "Problem" + end + @order.update_item_prices(params[:item_prices]) + @order.skip_cc_validation = true + @order.licensee_name = licensee_name + if not @order.save() + flash[:notice] = 'Problem saving order' + raise "Problem" + end + end + rescue + redirect_to :back and return + end + redirect_to :action => "order", :id => @order.id + end + + def cancel_order + @order = Order.find(params[:id]) + @order.status = 'X' + @order.update() + redirect_to :action => 'order', :id => @order.id + end + + def uncancel_order + @order = Order.find(params[:id]) + @order.status = 'C' + @order.update() + redirect_to :action => 'order', :id => @order.id + end + + def send_order_emails + @order = Order.find(params[:id]) + OrderMailer.deliver_thankyou(@order) # if is_live() + redirect_to :action => 'order', :id => @order.id + end + + # Product actions + def products + @product_pages, @products = paginate :products, :per_page => 10 + end + + def product + @product = Product.find(params[:id]) + end + + def new_product + @product = Product.new + end + + def create_product + @product = Product.new(params[:product]) + if @product.save + flash[:notice] = 'Product was successfully created.' + redirect_to :action => 'list' + else + render :action => 'new' + end + end + + def edit_product + @product = Product.find(params[:id]) + end + + def update_product + @product = Product.find(params[:id]) + if @product.update_attributes(params[:product]) + flash[:notice] = 'Product was successfully updated.' + redirect_to :action => 'show', :id => @product + else + render :action => 'edit' + end + end + + def destroy_product + Product.find(params[:id]).destroy + redirect_to :action => 'list' + end + + # Coupon actions + def generate_coupons + if params[:form] + form = params[:form] + @coupons = [] + 1.upto(Integer(form[:quantity])) { |i| + coupon = Coupon.new + coupon.code = form[:code] + coupon.product_code = form[:product_code] + coupon.description = form[:description] + coupon.amount = form[:amount] + coupon.use_limit = form[:use_limit] + coupon.save() + @coupons << coupon + } + flash[:notice] = 'Coupons generated' + end + end + + def add_coupons + if params[:form] + form = params[:form] + lines = form[:coupons].split("\r\n") + lines.reject! {|x| x.strip == ''} + for line in lines + coupon = Coupon.new + coupon.code = form[:code] + coupon.coupon = line.strip() + coupon.product_code = 'x' + coupon.description = form[:description].strip() + coupon.amount = form[:amount].strip() + coupon.save() + end + end + end + + # Mass order + def mass_order + if params[:form] + form = params[:form] + for key in form.keys() + form[key] = form[key].strip() + end + lines = form[:people].split("\r\n") + lines.reject! {|x| x.strip == ''} + for line in lines + fname, lname, email = line.split(",").collect{|x| x.strip} + order = Order.new + + # add item + order.order_time = Time.now() + + order.add_form_items(params[:items]) + order.update_item_prices(params[:item_prices]) + + order.first_name = fname + order.last_name = lname + order.email = email + + order.address1 = 'n/a' + order.address2 = '' + order.city = 'n/a' + order.state = 'n/a' + order.zipcode = 'n/a' + order.country = 'XX' + + order.payment_type = form[:payment_type] + order.cc_number = 'XXXXXXXXXXXXXXXX' + order.cc_month = 'n/a' + order.cc_year = 'n/a' + order.cc_code = 'n/a' + + order.comment = '' + + order.status = 'C' + order.save() + + coupons = order.add_promo_coupons() + + email = OrderMailer.deliver_thankyou(order) + end + end + end + +end diff --git a/app/controllers/application.rb b/app/controllers/application.rb new file mode 100644 index 0000000..bc269b3 --- /dev/null +++ b/app/controllers/application.rb @@ -0,0 +1,24 @@ +# Filters added to this controller will be run for all controllers in the application. +# Likewise, all the methods added will be available for all controllers. + +class ApplicationController < ActionController::Base +end + +def is_live + return ENV['RAILS_ENV'] == 'production' +end + +# Load username and password for admin user +def load_store_prefs + app_root = File.dirname(__FILE__) + '/../..' + config_dir = app_root + '/config/' + + ymlpath = File.expand_path(config_dir + 'store.yml') + $STORE_PREFS = YAML.load(File.open(ymlpath)) +end + +load_store_prefs() + + +# Make the debugger available in development +require 'ruby-debug' if not is_live() diff --git a/app/controllers/email_controller.rb b/app/controllers/email_controller.rb new file mode 100644 index 0000000..c554209 --- /dev/null +++ b/app/controllers/email_controller.rb @@ -0,0 +1,12 @@ +class EmailController < ApplicationController + def crash_report + SupportMailer.deliver_crash_report(params["product"], + params["crashlog"]) + render :text => '' + end + + def support_request + SupportMailer.deliver_support_request(params) + render :text => '' + end +end diff --git a/app/controllers/store/lost_license_controller.rb b/app/controllers/store/lost_license_controller.rb new file mode 100644 index 0000000..a8aa66a --- /dev/null +++ b/app/controllers/store/lost_license_controller.rb @@ -0,0 +1,26 @@ +class Store::LostLicenseController < ApplicationController + layout "store" + + def index + end + + def retrieve + if params[:email].blank? + flash[:notice] = "We can't do much without an email address" + render :action => 'index' and return + end + + email = params[:email].strip() + orders = Order.find(:all, :conditions => ['status=\'C\' AND email=?', email]) + if orders.empty? + flash[:notice] = "Could not find any orders for " + email + @email = email + render :action => 'index' and return + end + for order in orders + OrderMailer.deliver_thankyou(order, bcc = false) + OrderMailer.deliver_lost_license_sent(order) + end + redirect_to :action => 'sent' + end +end diff --git a/app/controllers/store/notification_controller.rb b/app/controllers/store/notification_controller.rb new file mode 100644 index 0000000..753f120 --- /dev/null +++ b/app/controllers/store/notification_controller.rb @@ -0,0 +1,85 @@ +def _xmlval(hash, key) + if hash[key] == {} + nil + else + hash[key] + end +end + + +class Store::NotificationController < ApplicationController + + ## Google Checkout notification + + def gcheckout + notification = XmlSimple.xml_in(request.raw_post, 'KeepRoot' => true, 'ForceArray' => false) + + notification_name = notification.keys[0] + notification_data = notification[notification_name] + + case notification_name + when 'new-order-notification' + process_new_order_notification(notification_data) + + when 'charge-amount-notification' + process_charge_amount_notification(notification_data) + # Ignore the other notifications +# when 'order-state-change-notification' +# when 'risk-information-notification' + end + + render_text '' + end + + private + def process_new_order_notification(n) + order = Order.find(Integer(n['shopping-cart']['merchant-private-data']['order-id'])) + + return if order == nil or order.payment_type != 'Google Checkout' + + ba = n['buyer-billing-address'] + + words = ba['contact-name'].split(' ') + order.first_name = words.shift + order.last_name = words.join(' ') + + order.email = _xmlval(ba, 'email') + if order.email == nil + order.status = 'C' + order.failure_reason = 'Did not get email from Google Checkout' + order.finish_and_save() + return + end + + order.address1 = _xmlval(ba, 'address1') + order.address2 = _xmlval(ba, 'address2') + order.city = _xmlval(ba, 'city') + order.company = _xmlval(ba, 'company-name') + order.country = _xmlval(ba, 'country-code') + order.zipcode = _xmlval(ba, 'postal-code') + order.state = _xmlval(ba, 'region') + + order.transaction_number = n['google-order-number'] + + order.save() + + order.subscribe_to_list() if n['buyer-marketing-preferences']['email_allowed'] == 'true' + + order.send_to_google_add_merchant_order_number_command() + end + + private + def process_charge_amount_notification(n) + order = Order.find_by_transaction_number_and_payment_type(n['google-order-number'], 'Google Checkout') + + return if order == nil or order.status == 'C' + + order.status = 'C' + order.finish_and_save() + OrderMailer.deliver_thankyou(order) + + order.send_to_google_deliver_order_command() + order.send_to_google_archive_order_command() + end + +end diff --git a/app/controllers/store/order_controller.rb b/app/controllers/store/order_controller.rb new file mode 100644 index 0000000..d50ce5d --- /dev/null +++ b/app/controllers/store/order_controller.rb @@ -0,0 +1,234 @@ +class Store::OrderController < ApplicationController + layout "store" + + before_filter :redirect_to_ssl + + def redirect_to_ssl + if is_live() + redirect_to :protocol => "https://" unless (request.ssl? or local_request?) + end + end + + def index + new + render :action => 'new' + end + + # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) + verify :method => :post, :only => [ :destroy, :create, :update ], + :redirect_to => { :action => :list } + + def new + session[:order] = nil + @qty = {} + @payment_type = session[:payment_type] + @products = Product.find_all(:active => 1) + if params[:product] + @qty[params[:product]] = 1 + elsif session[:items] + for key in session[:items].keys + @qty[Product.find(key).code] = session[:items][key] + end + end + end + + def payment + session[:order] = nil + redirect_to :action => 'index' and return if !params[:items] + @order = Order.new + session[:payment_type] = params[:payment_type] + + session[:items] = params[:items] + + if not @order.add_form_items(params[:items]) + flash[:notice] = 'Nothing to buy!' + redirect_to :action => 'index' and return + end + + coupon_text = params[:coupon].strip + @order.coupon_text = coupon_text + + if coupon_text != '' && @order.coupon == nil + coupon = Coupon.find_by_coupon(coupon_text) + if coupon != nil && coupon.expired? + flash[:notice] = 'Coupon Expired' + else + flash[:notice] = 'Invalid Coupon' + end + session[:coupon_text] = params[:coupon].strip + redirect_to :action => 'index' and return + end + + if @order.total <= 0 + flash[:notice] = 'Nothing to buy!' + redirect_to :action => 'index' and return + end + + # Handle Paypal orders + if params[:payment_type] == 'paypal' + + res = Paypal.express_checkout(:amount => String(@order.total), + :cancelURL => url_for(:action => 'index'), + :returnURL => url_for(:action => 'confirm_paypal'), + :noShipping => 1, + :cpp_header_image => $STORE_PREFS['paypal_express_checkout_header_image']) + if res.ack == 'Success' + # Need to copy the string. For some reason, it tries to render the payment action otherwise + @order.paypal_token = String.new(res.token) + session[:order] = @order + redirect_to Paypal.express_checkout_redirect_url(res.token) and return + else + flash[:notice] = 'Could not connect to PayPal' + redirect_to :action => 'index' and return + end + + # Handle Google Checkout orders + elsif params[:payment_type] == 'gcheckout' + render :action => 'payment_gcheckout' and return + end + + # credit card order + + # put in a dummy credit card number for testing + @order.cc_number = '4916306176169494' if not is_live() + + render :action => 'payment_cc' + end + + def redirect + redirect_to :action => 'index' + end + + def purchase + redirect_to :action => 'index' and return unless params[:order] && params[:items] + + if session[:order] != nil && session[:order].status == 'C' + @order = session[:order] + render :action => 'failed', :layout => 'error' and return + end + + params[:order].keys.each { |x| params[:order][x] = params[:order][x].strip } + + @order = Order.new(params[:order]) + + # the order in the session is a bogus temporary one + @order.add_form_items(params[:items]) + + if params[:coupon] + @order.coupon_text = params[:coupon] + end + + @order.order_time = Time.now() + session[:order] = @order + session[:items] = nil + + if not @order.save() + flash[:error] = 'Please fill out all fields' + if @order.cc_order? + render :action => 'payment_cc' and return + else + render :action => 'payment_gcheckout' and return + end + end + + # Actually send out the payload + if @order.cc_order? + success = @order.paypal_directcharge(request) + finish_order(success) + else + # Google Checkout order + redirect_url = @order.send_to_google_checkout(url_for(:action => 'index')) + if redirect_url == nil + @order.failure_reason = 'Could not connect to Google Checkout' + render :action => 'failed', :layout => 'error' and return + end + redirect_to redirect_url and return + end + end + + def confirm_paypal + @order = session[:order] + redirect_to :action => 'index' and return if @order == nil || @order.paypal_token != params[:token] + + # Suck the info from PayPal + res = Paypal.express_checkout_details(:token => @order.paypal_token) + + if res.ack != 'Success' + flash[:notice] = 'Could not retrieve order information from PayPal' + redirect_to :action => 'index' and return + end + + payerInfo = res.getExpressCheckoutDetailsResponseDetails.payerInfo + @order.paypal_payer_id = params['PayerID'] + @order.email = String.new(payerInfo.payer) + @order.first_name = String.new(payerInfo.payerName.firstName) + @order.last_name = String.new(payerInfo.payerName.lastName) + @order.licensee_name = @order.first_name + " " + @order.last_name + if payerInfo.respond_to? 'payerCountry' + @order.country = String.new(payerInfo.payerCountry) + else + @order.country = 'XX' + end + @order.payment_type = 'PayPal' + session[:order] = @order + end + + def purchase_paypal + @order = session[:order] + @order.attributes = params[:order] + + redirect_to :action => 'index' and return if @order.paypal_token == nil + render :action => 'failed', :layout => 'error' and return if @order.status != 'P' + + @order.order_time = Time.now() + + if not @order.save() + flash[:error] = 'Please fill out all fields' + render :action => 'confirm_paypal' and return + end + + success = @order.paypal_express_checkout_payment() + + finish_order(success) + end + + ## Methods that need a completed order + before_filter :check_completed_order, :only => [:thankyou, :receipt] + + def thankyou + @order = session[:order] + end + + def receipt + @order = session[:order] + @print = true + render :partial => 'receipt' + end + + ## Private methods + private + def check_completed_order + unless session[:order] && session[:order].complete? + redirect_to :action => "index" + end + end + + private + def finish_order(success) + if params[:subscribe] && params[:subscribe] == 'checked' + @order.subscribe_to_list() + end + + @order.status = success ? 'C' : 'F' + @order.finish_and_save() + + if success + session[:order] = @order + redirect_to :action => 'thankyou' + OrderMailer.deliver_thankyou(@order) + else + render :action => 'failed', :layout => 'error' + end + end + +end diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb new file mode 100644 index 0000000..d5c6d35 --- /dev/null +++ b/app/helpers/admin_helper.rb @@ -0,0 +1,2 @@ +module AdminHelper +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 0000000..22a7940 --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,3 @@ +# Methods added to this helper will be available to all templates in the application. +module ApplicationHelper +end diff --git a/app/helpers/email_helper.rb b/app/helpers/email_helper.rb new file mode 100644 index 0000000..37a644c --- /dev/null +++ b/app/helpers/email_helper.rb @@ -0,0 +1,2 @@ +module EmailHelper +end diff --git a/app/helpers/store/lost_license_helper.rb b/app/helpers/store/lost_license_helper.rb new file mode 100644 index 0000000..bb853ba --- /dev/null +++ b/app/helpers/store/lost_license_helper.rb @@ -0,0 +1,2 @@ +module Store::LostLicenseHelper +end diff --git a/app/helpers/store/notification_helper.rb b/app/helpers/store/notification_helper.rb new file mode 100644 index 0000000..f98641d --- /dev/null +++ b/app/helpers/store/notification_helper.rb @@ -0,0 +1,2 @@ +module Store::NotificationHelper +end diff --git a/app/helpers/store/order_helper.rb b/app/helpers/store/order_helper.rb new file mode 100644 index 0000000..9549c3a --- /dev/null +++ b/app/helpers/store/order_helper.rb @@ -0,0 +1,2 @@ +module Store::OrderHelper +end diff --git a/app/models/coupon.rb b/app/models/coupon.rb new file mode 100644 index 0000000..ee6b078 --- /dev/null +++ b/app/models/coupon.rb @@ -0,0 +1,21 @@ +class Coupon < ActiveRecord::Base + def initialize + super() + self.coupon = random_string_of_length(16).upcase + self.used_count = 0 + self.use_limit = 1 + end + + def expired? + return self.numdays != 0 && self.creation_time + self.numdays.days < Time.now + end + + private + def random_string_of_length(len) + chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a + s = "" + 1.upto(len) { |i| s << chars[rand(chars.size-1)] } + return s + end + +end diff --git a/app/models/line_item.rb b/app/models/line_item.rb new file mode 100644 index 0000000..6cc1002 --- /dev/null +++ b/app/models/line_item.rb @@ -0,0 +1,34 @@ +require 'licensekey' + +class LineItem < ActiveRecord::Base + belongs_to :order + belongs_to :product + + validates_numericality_of :quantity + validates_numericality_of :unit_price + + def total + return quantity * self.unit_price + end + + def volume_price + # This is hard coded for now. Modify to suit your needs + if self.product.code == 'pcm' + return 19.95 if quantity >= 20 + return 22.95 if quantity >= 10 + return 24.95 if quantity >= 2 + elsif self.product.code == 'vc' + return 9.95 if self.order.has_item_with_code('tgr') + end + return unit_price + end + + def regular_price + return product.price + end + + def generate_license_key + return make_license(self.product.code, self.order.licensee_name, self.quantity) + end + +end diff --git a/app/models/list_subscriber.rb b/app/models/list_subscriber.rb new file mode 100644 index 0000000..8b49a43 --- /dev/null +++ b/app/models/list_subscriber.rb @@ -0,0 +1,2 @@ +class ListSubscriber < ActiveRecord::Base +end diff --git a/app/models/order.rb b/app/models/order.rb new file mode 100644 index 0000000..efcec80 --- /dev/null +++ b/app/models/order.rb @@ -0,0 +1,419 @@ +COUNTRY_MAPPING = { + 'AI' => 'Anguilla', 'AR' => 'Argentina', 'AU' => 'Australia', 'AT' => 'Austria', 'BE' => 'Belgium', + 'BR' => 'Brazil', 'CA' => 'Canada', 'CL' => 'Chile', 'CN' => 'China', 'CR' => 'Costa Rica', 'CY' => 'Cyprus', + 'CZ' => 'Czech Republic', 'DK' => 'Denmark', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EE' => 'Estonia', + 'FI' => 'Finland', 'FR' => 'France', 'DE' => 'Germany', 'GR' => 'Greece', 'HK' => 'Hong Kong', + 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'IE' => 'Ireland', 'IL' => 'Israel', + 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'LV' => 'Latvia', 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', 'MY' => 'Malaysia', 'MT' => 'Malta', 'MX' => 'Mexico', 'NL' => 'Netherlands', + 'NZ' => 'New Zealand', 'NO' => 'Norway', 'PL' => 'Poland', 'PT' => 'Portugal', 'SG' => 'Singapore', + 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'ZA' => 'South Africa', 'KR' => 'South Korea', 'ES' => 'Spain', + 'SE' => 'Sweden', 'CH' => 'Switzerland', 'TW' => 'Taiwan', 'TH' => 'Thailand', 'TR' => 'Turkey', + 'GB' => 'United Kingdom', 'US' => 'United States', 'UY' => 'Uruguay', 'VE' => 'Venezuela'} + +class Order < ActiveRecord::Base + has_many :line_items + belongs_to :coupon + + attr_accessor :cc_code, :cc_month, :cc_year + attr_accessor :paypal_token, :paypal_payer_id + attr_accessor :skip_cc_validation + attr_writer :promo_coupons + + validates_presence_of :licensee_name, :payment_type + + def validate + if self.cc_order? && !skip_cc_validation + errors.add_on_blank(['first_name', 'last_name', 'address1', 'city', 'country', + 'cc_number', 'cc_month', 'cc_year', 'cc_code', 'email']) + + if ['US', 'CA'].member?(self.country) + errors.add_on_blank('zipcode') + errors.add('state', msg = 'must be a 2 character abbreviation for USA and Canada') if self.state.size != 2 + end + end + + if self.paypal_order? + errors.add_on_blank(['email']) + end + end + + def total + return total_before_applying_coupons() - coupon_amount() + end + + def total_before_applying_coupons + total = 0 + for item in self.line_items + total = total + item.total + end + return total + end + + def coupon_amount + return 0 if coupon == nil + return coupon.amount if coupon.percentage == nil + for item in self.line_items + if coupon && coupon.percentage != nil && coupon.product_code == item.product.code + return (item.total * coupon.percentage / 100.0) + end + end + if coupon && coupon.percentage != nil && coupon.product_code == 'all' + return total_before_applying_coupons() * (coupon.percentage / 100.0) + end + return 0 + end + + def volume_discount_total + total = self.total() + self.line_items.collect{|x| x.regular_price * x.quantity}.each {|x| total -= x} + return -total + end + + def items_count + return self.line_items.reject{|x| x.quantity <= 0}.length + end + + def product_quantity(product_code) + for item in self.line_items + return item.quantity if item.product.code == product_code + end + return 0 + end + + def licensee_name=(new_name) + regenerate_keys = (self.licensee_name != new_name) + write_attribute(:licensee_name, new_name) + if regenerate_keys + for item in self.line_items + item.license_key = item.generate_license_key + item.save() if !item.new_record? + end + end + end + + def country_name + return COUNTRY_MAPPING[self.country] + end + + def name + return self.first_name + ' ' + self.last_name + end + + def address + address = self.address1 + address += ', ' + self.address2 if self.address2 != '' + return address + end + + def cc_number + return @cc_number + end + + def cc_number=(num) + t = num.tr('- ', '') + @cc_number = t + return if t.length < 4 + self.ccnum = 'X' * (t.length - 4) + t[t.length-4 .. t.length-1] + end + + def cc_order? + return ['Visa', 'MasterCard', 'Amex', 'Discover'].member?(self.payment_type) + end + + def paypal_order? + return self.payment_type != nil && self.payment_type.downcase == 'paypal' + end + + def gcheckout? + return self.payment_type != nil && self.payment_type.downcase == 'google checkout' + end + + def complete? + return self.status == 'C' + end + + def status_description + case self.status + when 'C' + return 'Complete' + when 'P' + return 'Pending' + when 'F' + return 'Failed' + when 'X' + return 'Cancelled' + end + return self.status + end + + def coupon_text + self.coupon.coupon + end + + def coupon_text=(coupon_text) + return if !coupon_text || coupon_text.strip == '' + coupon = Coupon.find_by_coupon(coupon_text.strip) + if coupon != nil && + self.coupon == nil && + (coupon.product_code == 'all' || has_item_with_code(coupon.product_code)) && + coupon.used_count < coupon.use_limit && + !coupon.expired? + self.coupon = coupon + end + end + + def has_item_with_product_id(product_id) + return self.line_items.collect {|x| x.product.id if x.quantity > 0}.member?(product_id) + end + + def has_item_with_code(code) + return self.line_items.collect {|x| x.product.code if x.quantity > 0}.member?(code) + end + + def line_item_with_product_id(product_id) + begin + product_id = Integer(product_id) + rescue + return nil + end + items = self.line_items.collect {|x| x if x.product.id == product_id}.compact + return nil if items.length == 0 + return items[0] + end + + def line_item_with_product_code(product_code) + p = Product.find_by_code(product_code) + return self.line_item_with_product_id(p.id) + end + + # Add items from form parameters + def add_form_items(items) + begin + for product_id in items.keys + next if items[product_id].strip == '' + item = LineItem.new + item.order + item.order = self + item.product_id = product_id + item.quantity = Integer(items[product_id]) + next if item.quantity == 0 + if item.quantity < 0 + return false + end + item.unit_price = Product.find(product_id).price + self.line_items << item + end + for item in self.line_items + item.unit_price = item.volume_price + end + return true + rescue + return false + end + end + + def add_or_update_items(items) + for product_id in items.keys + next if items[product_id].strip == '' + litem = self.line_item_with_product_id(product_id) + if litem == nil + return false if not self.add_form_items({product_id => items[product_id]}) + else + litem.quantity = Integer(items[product_id]) + litem.update + end + end + return true + end + + # Updates the prices from form + def update_item_prices(item_prices) + for product_id in item_prices.keys + litem = self.line_item_with_product_id(product_id) + next if litem == nil + litem.unit_price = item_prices[product_id] + litem.update + end + end + + def promo_coupons + return @promo_coupons if @promo_coupons + return [] + end + + # Create new coupons that pertain to this order and return it + def add_promo_coupons + self.promo_coupons = [] + # if the order contains Voice Candy, create 3 coupons +# if self.has_item_with_code('vc') +# 1.upto(3) { |i| +# coupon = Coupon.new +# coupon.code = 'vc' +# coupon.product_code = 'vc' +# coupon.description = 'Cool friend discount' +# coupon.amount = 3.00 +# coupon.numdays = 16 +# coupon.save() +# coupons << coupon +# } +# end + return promo_coupons + end + + def subscribe_to_list + ListSubscriber.find_by_email(self.email) == nil + subscriber = ListSubscriber.new + subscriber.email = self.email + subscriber.save() + end + + def finish_and_save + if self.status == 'C' + self.add_promo_coupons() + self.status = 'C' + for line_item in self.line_items + line_item.license_key = line_item.generate_license_key() + line_item.save() + end + if self.coupon + self.coupon.used_count += 1 + self.coupon.save() + end + end + + self.save() + end + + + # PayPal related methods + def paypal_directcharge(request) + # return true if not is_live() + + # The following is needed because MediaTemple puts in two ip addresses in the REMOTE_ADDR for some reason + ip_address = request.env['REMOTE_ADDR'] + ip_address = ip_address.split(',')[0] if ip_address.count(",") != 0 + + res = Paypal.directcharge(:firstName => self.first_name, + :lastName => self.last_name, + :ip => ip_address, + :amount => self.total, + :itemName => $STORE_PREFS['company_name'] + ' Software', + :addressName => 'Billing', + :street1 => self.address1, + :street2 => self.address2, + :cityName => self.city, + :stateOrProvince => (self.state.blank?) ? 'N/A' : self.state, + :postalCode => self.zipcode, + :country => self.country, + :creditCardType => self.payment_type, + :creditCardNumber => self.cc_number, + :cVV2 => self.cc_code, + :expMonth => self.cc_month, + :expYear => self.cc_year) + success = (res.ack == 'Success') + if success + self.transaction_number = res.transactionID + else + set_order_errors_with_paypal_response(res) + end + return success + end + + def paypal_express_checkout_payment() + res = Paypal.express_checkout_payment(:token => self.paypal_token, + :payerID => self.paypal_payer_id, + :amount => self.total) + success = (res.ack == 'Success') + if success + self.transaction_number = res.doExpressCheckoutPaymentResponseDetails.paymentInfo.transactionID + else + set_order_errors_with_paypal_response(res) + end + return success + end + + def set_order_errors_with_paypal_response(res) + if res.ack == 'Failure' + self.failure_reason = '' + if res.errors.respond_to? 'length' + errors = res.errors + else + errors = [res.errors] + end + + self.failure_code = errors.collect {|x| x.errorCode}.join(', ') + + self.failure_reason = errors.collect {|error| + msg = '' + if error.respond_to? 'longMessage' + msg = error.longMessage + elsif error.repond_to? 'shortMessage' + msg = error.shortMessage + end + msg = msg[38..-1] if msg =~ /^This transaction cannot be processed. / + msg + }.join("\n") + if res.respond_to? 'cVV2Code' + self.failure_reason += "\nThe card security code did not match." if res.cVV2Code == 'N' + end + end + end + + + # Google Checkout related methods + def send_to_google_checkout(edit_cart_url = nil) + # TODO: move the hard coded data out to the configuration + command = $GCHECKOUT_FRONTEND.create_checkout_command + command.continue_shopping_url = $STORE_PREFS['company_url'] + command.edit_cart_url = edit_cart_url + + for line_item in self.line_items + command.cart.create_item do |item| + item.name = line_item.product.name + item.description = "" + item.unit_price = Money.new(line_item.unit_price * 100) + item.quantity = line_item.quantity + end + end + + if self.coupon + command.cart.create_item do |item| + item.name = "Coupon" + item.description = coupon.description + item.unit_price = Money.new(-coupon_amount() * 100) + item.quantity = 1 + end + end + + command.cart.private_data = { 'order-id' => [self.id] } + + begin + res = command.send_to_google_checkout() + return res.redirect_url + rescue + return nil + end + end + + def send_to_google_add_merchant_order_number_command + command = $GCHECKOUT_FRONTEND.create_add_merchant_order_number_command + command.google_order_number = self.transaction_number + command.merchant_order_number = self.id + command.send_to_google_checkout() rescue nil + end + + def send_to_google_deliver_order_command + command = $GCHECKOUT_FRONTEND.create_deliver_order_command + command.google_order_number = self.transaction_number + command.send_email = false + command.send_to_google_checkout() rescue nil + end + + def send_to_google_archive_order_command + command = $GCHECKOUT_FRONTEND.create_archive_order_command + command.google_order_number = self.transaction_number + command.send_to_google_checkout() rescue nil + end +end + diff --git a/app/models/order_mailer.rb b/app/models/order_mailer.rb new file mode 100644 index 0000000..52326a9 --- /dev/null +++ b/app/models/order_mailer.rb @@ -0,0 +1,29 @@ +class OrderMailer < ActionMailer::Base + + def thankyou(order, bcc = true) + from $STORE_PREFS['purchase_receipt_sender_email'] + + recipients order.email + bcc $STORE_PREFS['purchase_receipt_bcc_email'] if bcc == true + + subject "Purchase Receipt for Order ##{order.id}" + subject subject + ' *' if order.comment && order.comment.strip() != '' + + content_type "multipart/alternative" + + part :content_type => "text/plain", + :body => render_message("thankyou_plain", :order => order) + + part :content_type => "text/html", + :transfer_encoding => 'base64', + :body => render_message("thankyou_html", :order => order) + end + + def lost_license_sent(order) + recipients $STORE_PREFS['lost_license_sent_notification_recipient_email'] + from $STORE_PREFS['lost_license_sent_notification_sender_email'] + subject 'Lost License Sent' + body 'order' => order + end + +end diff --git a/app/models/product.rb b/app/models/product.rb new file mode 100644 index 0000000..077a819 --- /dev/null +++ b/app/models/product.rb @@ -0,0 +1,2 @@ +class Product < ActiveRecord::Base +end diff --git a/app/models/support_mailer.rb b/app/models/support_mailer.rb new file mode 100644 index 0000000..697c94c --- /dev/null +++ b/app/models/support_mailer.rb @@ -0,0 +1,49 @@ +class SupportMailer < ActionMailer::Base + + def support_request(fields) + + if fields["registered"] == "1" + subject "#{fields["product"]} Support *" + else + subject "#{fields["product"]} Support" + end + recipients fields["recipient"] + from fields["replyTo"] + + email_body = fields["message"] + "\r\n\r\n" + + exclude_fields = ["product", "recipient", "replyTo", "message", "action", "controller"] + + fields.each do |key, value| + if fields[key].respond_to?("original_filename") == false && exclude_fields.include?(key) == false && fields[key] != nil + email_body = email_body + fields[key] + end + end + email_body = email_body + "\r\n\r\n" + + body = {} + part :content_type => "text/plain", :body => email_body + + fields.each do |key, value| + if fields[key].respond_to?("original_filename") == true && exclude_fields.include?(key) == false && fields[key] != nil + attachment "application/binary" do |x| + x.filename = fields[key].original_filename.gsub(/[^a-zA-Z0-9.]/, '_') + x.body = fields[key].read + end + end + end + end + + def crash_report(product, report) + if is_live() + subject "#{product} Crash Report" + else + subject "#{product} Crash Report (this is a test)" + end + recipients $STORE_PREFS['crash_report_recipient_email'] + from $STORE_PREFS['crash_report_sender_email'] + + body :report => report + end + +end diff --git a/app/views/admin/_form.rhtml b/app/views/admin/_form.rhtml new file mode 100644 index 0000000..9ca3ba3 --- /dev/null +++ b/app/views/admin/_form.rhtml @@ -0,0 +1,13 @@ +<%= error_messages_for 'product' %> + + +


+<%= text_field 'product', 'name' %>

+ +


+<%= text_field 'product', 'price' %>

+ +


+<%= text_field 'product', 'active' %>

+ + diff --git a/app/views/admin/_order_form.rhtml b/app/views/admin/_order_form.rhtml new file mode 100644 index 0000000..703ed94 --- /dev/null +++ b/app/views/admin/_order_form.rhtml @@ -0,0 +1,72 @@ +<% form_tag :action => "modify_order" do -%> +<% if @order -%> +<%= hidden_field "order", "id" %> +<%= hidden_field "order", "status" %> +<% end -%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Licensee Name:<%= text_field "order", "licensee_name" %>
Email:<%= text_field "order", "email" %>
Items:<%= render :partial => "product_quantities" -%>
Ordered Time:<%= datetime_select("order", "order_time") -%>
Company:<%= text_field "order", "company" %>
Billing First Name:<%= text_field "order", "first_name" %>
Billing Last Name:<%= text_field "order", "last_name" %>
Address 1:<%= text_field "order", "address1" %>
Address 2:<%= text_field "order", "address2" %>
City:<%= text_field "order", "city" %>
State:<%= text_field "order", "state" %>
Postal/Zipcode:<%= text_field "order", "zipcode" %>
Country 2 letter Code:<%= text_field "order", "country", :size => 2 %>
Comment:<%= text_field "order", "comment" %>
Payment Method:<%= text_field "order", "payment_type" %>
<%= submit_tag "Submit" %>
+<% end -%> diff --git a/app/views/admin/_product_quantities.rhtml b/app/views/admin/_product_quantities.rhtml new file mode 100644 index 0000000..79617ca --- /dev/null +++ b/app/views/admin/_product_quantities.rhtml @@ -0,0 +1,18 @@ + + <% for product in Product.find_all() -%> + + <% if @order && @order.has_item_with_product_id(product.id) -%> + <% item = @order.line_item_with_product_id(product.id) -%> + + + + + + + + <% end -%> + + <% end -%> +
<%= item.product.name -%><%= text_field "items", item.product.id, :size => 4, :value => item.quantity %>$<%= text_field "item_prices", item.product.id, :size => 5, :value => item.unit_price %><%= item.license_key -%> + <% else -%> + <%= product.name %><%= text_field "items", product.id, :size => 4 %>$<%= text_field "item_prices", product.id, :size => 5, :value => product.price %>
diff --git a/app/views/admin/add_coupons.rhtml b/app/views/admin/add_coupons.rhtml new file mode 100644 index 0000000..2822bcf --- /dev/null +++ b/app/views/admin/add_coupons.rhtml @@ -0,0 +1,8 @@ +<% @qty = {} %> +<% form_tag :action => "add_coupons" do -%> +

Code: <%= text_field 'form', 'code' %>

+

Amount: <%= text_field 'form', 'amount' %>

+

Description: <%= text_field 'form', 'description' %>

+

Coupons<%= text_area 'form', 'coupons' %>

+

<%= submit_tag 'Process Orders' %>

+<% end -%> diff --git a/app/views/admin/add_order.rhtml b/app/views/admin/add_order.rhtml new file mode 100644 index 0000000..f1da83f --- /dev/null +++ b/app/views/admin/add_order.rhtml @@ -0,0 +1,3 @@ +

Add Order

+ +<%= render :partial => "order_form" -%> diff --git a/app/views/admin/edit_order.rhtml b/app/views/admin/edit_order.rhtml new file mode 100644 index 0000000..2788da5 --- /dev/null +++ b/app/views/admin/edit_order.rhtml @@ -0,0 +1,3 @@ +

Edit Order <%= @order.id %>

+ +<%= render :partial => "order_form" -%> diff --git a/app/views/admin/generate_coupons.rhtml b/app/views/admin/generate_coupons.rhtml new file mode 100644 index 0000000..5623364 --- /dev/null +++ b/app/views/admin/generate_coupons.rhtml @@ -0,0 +1,59 @@ +

Generate Coupons

+ +<% form_tag :action => "generate_coupons" do -%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
# to Generate:<%= text_field 'form', 'quantity', 'value' => '1' %>
Coupon Identifider Code:<%= text_field 'form', 'code' %>
Description:<%= text_field 'form', 'description' %>
Product: + +
Amount:<%= text_field 'form', 'amount' %>
Use Limit:<%= text_field 'form', 'use_limit', :value => '1' %>
<%= submit_tag 'Generate Coupons' %>
+ +<% end -%> + +<% if @coupons -%> +

Generated Coupons

+
+<% for coupon in @coupons -%>
+<%= coupon.coupon %>
+<% end -%>
+
+<% end -%> + + + diff --git a/app/views/admin/index.rhtml b/app/views/admin/index.rhtml new file mode 100644 index 0000000..34d53d3 --- /dev/null +++ b/app/views/admin/index.rhtml @@ -0,0 +1,56 @@ + + +<% + for key in ['Today', 'Last 7 Days', 'Last 30 Days', 'Last 365 Days'] + reports = @reports[key] -%> +
+

<%= key -%>

+ + + <% for product in reports -%> + + + + + <% end -%> + +
Orders:<%= @report_num_orders[key] %>
<%= product.product %><%= product.q -%>
Total:<%= number_to_currency @report_totals[key] %>
+
+<% end -%> + +
+ +
+

Daily

+ + + <% for p in @daily -%> + + <% end -%> +
DateRevenue
<%= "%02d" % p.month -%>/<%= "%02d" % p.day -%>/<%= p.year -%><%= number_to_currency p.earned -%>
+
+ +
+

Monthly

+ + + <% for p in @monthly -%> + + <% end -%> +
DateRevenue
<%= "%02d" % p.month %>/<%= p.year %><%= number_to_currency p.earned %>
+
+ +
+

Estimates

+ + + +
Month<%= number_to_currency @month_estimate %>
Year<%= number_to_currency @year_estimate %>
+
+ diff --git a/app/views/admin/mass_order.rhtml b/app/views/admin/mass_order.rhtml new file mode 100644 index 0000000..c38048b --- /dev/null +++ b/app/views/admin/mass_order.rhtml @@ -0,0 +1,14 @@ +<% @qty = {} %> +<% form_tag :action => "mass_order" do -%> + +<%= render :partial => "product_quantities" -%> + +

Payment Type:<%= text_field 'form', 'payment_type', :value => 'Paypal' %>

+ +

Format is: "fname, lname, email"

+ +

<%= text_area 'form', 'people' %>

+ +

<%= submit_tag 'Process Orders' %>

+ +<% end -%> diff --git a/app/views/admin/order.rhtml b/app/views/admin/order.rhtml new file mode 100644 index 0000000..5c0405c --- /dev/null +++ b/app/views/admin/order.rhtml @@ -0,0 +1,19 @@ +<%= render :partial => "store/order/receipt" %> + +

+ Status: <%= @order.status_description %>
+ Transaction ID: <%= @order.transaction_number -%> +

+ +

Commands

+ diff --git a/app/views/admin/orders.rhtml b/app/views/admin/orders.rhtml new file mode 100644 index 0000000..a010dd2 --- /dev/null +++ b/app/views/admin/orders.rhtml @@ -0,0 +1,62 @@ + + +

Orders

+ +

+<%= link_to 'Previous page', { :page => @order_pages.current.previous } if @order_pages.current.previous %> +<%= link_to 'Next page', { :page => @order_pages.current.next } if @order_pages.current.next %> +

+ + + + + + + + + + + + + +<% + last_day = 0 + for order in @orders -%> + + + + + + + + + <% if order.failure_code -%> + + <% else -%> + + <% end -%> + + +<% + last_day = order.order_time.yday + end %> +
#DateNameAddressTotalPaytypeFailure
<%= order.status -%> + <%= link_to order.id, :action => 'order', :id => order %><%= "*" if order.comment != '' %> + <%= order.order_time.strftime("%m/%d/%y %H:%M") -%><%= order.licensee_name ? order.licensee_name : order.name -%><%= order.email -%><% if order.cc_order? %><%= order.address -%>, <%= order.city -%>, <%= order.state -%> <%= order.zipcode -%>,<% end %> <%= order.country -%> + <%= number_to_currency order.total -%><%= order.payment_type -%><%= order.failure_code -%>: <%= order.failure_reason -%>
+ +

+<%= link_to 'Previous page', { :page => @order_pages.current.previous } if @order_pages.current.previous %> +<%= link_to 'Next page', { :page => @order_pages.current.next } if @order_pages.current.next %> +

+ +
diff --git a/app/views/admin/products.rhtml b/app/views/admin/products.rhtml new file mode 100644 index 0000000..d58e105 --- /dev/null +++ b/app/views/admin/products.rhtml @@ -0,0 +1,27 @@ +

Listing products

+ + + + <% for column in Product.content_columns %> + + <% end %> + + +<% for product in @products %> + + <% for column in Product.content_columns %> + + <% end %> + + + + +<% end %> +
<%= column.human_name %>
<%=h product.send(column.name) %><%= link_to 'Show', :action => 'show', :id => product %><%= link_to 'Edit', :action => 'edit', :id => product %><%= link_to 'Destroy', { :action => 'destroy', :id => product }, :confirm => 'Are you sure?', :post => true %>
+ +<%= link_to 'Previous page', { :page => @product_pages.current.previous } if @product_pages.current.previous %> +<%= link_to 'Next page', { :page => @product_pages.current.next } if @product_pages.current.next %> + +
+ +<%= link_to 'New product', :action => 'new' %> diff --git a/app/views/admin/show.rhtml b/app/views/admin/show.rhtml new file mode 100644 index 0000000..78fcf1d --- /dev/null +++ b/app/views/admin/show.rhtml @@ -0,0 +1,8 @@ +<% for column in Product.content_columns %> +

+ <%= column.human_name %>: <%=h @product.send(column.name) %> +

+<% end %> + +<%= link_to 'Edit', :action => 'edit', :id => @product %> | +<%= link_to 'Back', :action => 'list' %> diff --git a/app/views/admin/signin_form.rhtml b/app/views/admin/signin_form.rhtml new file mode 100644 index 0000000..dffaa49 --- /dev/null +++ b/app/views/admin/signin_form.rhtml @@ -0,0 +1,33 @@ +
+

Magic Potion Required

+ +
+
+ + <% form_tag :action => "signin" do -%> + + + + + + + + + + + + + +
+ + + <%= text_field_tag "username" %> +
+ + + <%= password_field_tag "password" %> +
+ <%= submit_tag "Abracadabra" %> +
+ <% end -%> +
diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml new file mode 100644 index 0000000..eb4b88d --- /dev/null +++ b/app/views/layouts/admin.rhtml @@ -0,0 +1,31 @@ + + + + + Admin: <%= controller.action_name %> + <%= stylesheet_link_tag "scaffold" %> + <%= stylesheet_link_tag "admin" %> + + + <% if session[:logged_in] -%> + + <% end -%> +

<%= flash[:notice] %>

+

<%= flash[:error] %>

+ + <%= @content_for_layout %> + + diff --git a/app/views/layouts/error.rhtml b/app/views/layouts/error.rhtml new file mode 100644 index 0000000..d97855d --- /dev/null +++ b/app/views/layouts/error.rhtml @@ -0,0 +1,49 @@ + + + + + <%=$STORE_PREFS['store_name']%> + + + + + + +
+
+ <% if $STORE_PREFS['company_logo_path'] != "" -%> + + <% end -%> + +
+
+
+
+
+
+
+
+
+
+ +
+ <%= @content_for_layout %> +
+
+
+ <% if is_live() && $STORE_PREFS['google_analytics_account'] != "" -%> + + + <% end -%> + + diff --git a/app/views/layouts/store.rhtml b/app/views/layouts/store.rhtml new file mode 100644 index 0000000..41c38dd --- /dev/null +++ b/app/views/layouts/store.rhtml @@ -0,0 +1,47 @@ + + + + + <%=$STORE_PREFS['store_name']%> + + + + + + +
+
+ <% if $STORE_PREFS['company_logo_path'] != "" -%> + + <% end -%> +

<%=$STORE_PREFS['store_name']%>

+
rounded border +
+ +
+
+ <%= @content_for_layout %> +
+
 
+
+ + +
+ <% if is_live() && $STORE_PREFS['google_analytics_account'] != "" -%> + + + <% end -%> + + diff --git a/app/views/order_mailer/lost_license_sent.rhtml b/app/views/order_mailer/lost_license_sent.rhtml new file mode 100644 index 0000000..8f51a6b --- /dev/null +++ b/app/views/order_mailer/lost_license_sent.rhtml @@ -0,0 +1,29 @@ +Order Number: <%= @order.id %> + +Placed On: <%= @order.order_time.utc %> + +Registered-To: <%= @order.first_name %> <%= @order.last_name %> +<% if @order.company != '' -%> +Company: <%= @order.company %> +<% end -%> +Email: <%= @order.email %> + +Billing Address: +<% if @order.payment_type == 'PayPal' -%> +N/A +<% else -%> +<%= @order.address1 -%><%= ', ' + @order.address2 if @order.address2 && ! @order.address2.blank? %> +<%= @order.city %>, <%= @order.state %> <%= @order.zipcode %> +<%= @order.country_name %> +<% end -%> + +Payment: +<%= @order.payment_type %><%= ', ' + @order.ccnum if @order.cc_order? %> + +Purchased Items: + +<% for item in @order.line_items -%> +<%= sprintf("%d %s @ %s each", item.quantity, item.product.name, number_to_currency(item.unit_price)) %> +<% end -%> + +Total: <%= number_to_currency(@order.total) %> diff --git a/app/views/order_mailer/thankyou_html.rhtml b/app/views/order_mailer/thankyou_html.rhtml new file mode 100644 index 0000000..cc36517 --- /dev/null +++ b/app/views/order_mailer/thankyou_html.rhtml @@ -0,0 +1,77 @@ +<% + if @order.items_count == 1 + application = 'application' + file = 'file' + key = 'KEY' + else + application = 'applications' + file = 'files' + key = 'KEYS' + end + + coupons = @order.promo_coupons + + if coupons.length > 0 + vc_coupons = coupons.compact() + vc_coupons.reject!{|x| x.product_code != 'vc'} + end +-%> + + + + + <%=$STORE_PREFS['company_name']%> Receipt + + + +
+
+
+

Dear <%= h @order.name %>,

+ +

+ Thank you for purchasing <%=$STORE_PREFS['company_name']%> software. Your license keys are below. If you already have the <%= application %> + installed, you can activate by clicking the "Activate Now" link. +

+ +

LICENSE <%= key %>

+<% for item in @order.line_items -%> +
+<%=item.product.name%>:
+<%= item.license_key %> Activate Now
+
+<% end -%> + +
+

Please let us know if you have any questions or comments. Enjoy your purchase.

+ +

- <%=$STORE_PREFS['company_name']%>

+ +
+ <%= render :partial => '../store/order/receipt', :order => @order %> + + <% if coupons && coupons.length > 0 -%> +
+

COUPONS

+ <% if vc_coupons.length != 0 -%> +

+ If you have friends who might enjoy Voice Candy, here are 3 coupon + codes for $3 off their purchases. They expire in 15 days. +

+
<%= vc_coupons.collect {|x| x.coupon}.join(',  ') %>
+ <% end -%> + <% end -%> +
+
+ + + diff --git a/app/views/order_mailer/thankyou_plain.rhtml b/app/views/order_mailer/thankyou_plain.rhtml new file mode 100644 index 0000000..d1fa9c8 --- /dev/null +++ b/app/views/order_mailer/thankyou_plain.rhtml @@ -0,0 +1,83 @@ +<% + if @order.items_count == 1 + application = 'application' + file = 'file' + else + application = 'applications' + file = 'files' + end + + coupons = @order.promo_coupons +-%> +Dear <%= @order.first_name %> <%= @order.last_name %>, + +Thank you for purchasing <%=$STORE_PREFS['company_name']%> software. +Below are your application license keys. To activate, please copy +and paste the code to the registration window in the application. + +<% for item in @order.line_items -%> +<%=item.product.name%>: +<%= item.license_key %> + +<% end -%> + +Please let us know if you have any questions or comments. +Enjoy your purchase. + +- <%=$STORE_PREFS['company_name']%> + + + +RECEIPT +---------------------------------------------------------------------- + +Order Number: <%= @order.id %> + +Placed On: <%= @order.order_time.utc %> + +Registered-To: <%= @order.first_name %> <%= @order.last_name %> +<% if @order.company != '' -%> +Company: <%= @order.company %> +<% end -%> +Email: <%= @order.email %> + +Billing Address: +<% if @order.payment_type == 'PayPal' -%> +N/A +<% else -%> +<%= @order.address1 -%><%= ', ' + @order.address2 if @order.address2 && ! @order.address2.blank? %> +<%= @order.city %>, <%= @order.state %> <%= @order.zipcode %> +<%= @order.country_name %> +<% end -%> + +Payment: +<%= @order.payment_type %><%= ', ' + @order.ccnum if @order.cc_order? %> + +Purchased Items: + +<% for item in @order.line_items -%> +<%= sprintf("%d %s @ %s each", item.quantity, item.product.name, number_to_currency(item.unit_price)) %> +<% end -%> +<% if @order.coupon -%> +<%= @order.coupon.description %>: -<%= number_to_currency(@order.coupon_amount) %> +<% end -%> + +Total: <%= number_to_currency(@order.total) %> + +<% if coupons && coupons.length > 0 -%> +<% vc_coupons = coupons.compact() + vc_coupons.reject!{|x| x.product_code != 'vc'} + + if coupons.length != 0 -%> + + +COUPONS +---------------------------------------------------------------------- +<% if vc_coupons.length != 0 -%> +If you have friends who might enjoy Voice Candy, here are 3 coupon +codes for $3 off their purchases. They expire in 15 days. + +<%= vc_coupons.collect {|x| x.coupon}.join(', ') -%> +<% end -%> +<% end -%> +<% end -%> diff --git a/app/views/store/lost_license/index.rhtml b/app/views/store/lost_license/index.rhtml new file mode 100644 index 0000000..620a98d --- /dev/null +++ b/app/views/store/lost_license/index.rhtml @@ -0,0 +1,30 @@ +<% form_tag :action => "retrieve" do -%> + +

Retrieve License

+ +

+Please tell us the email address used during the purchase. Your license along with the order receipt +will be sent by email. +

+ +<% if flash[:notice] -%> +

<%= flash[:notice] %>

+<% end -%> + +
+ +
+ Email address: <%= text_field_tag 'email', @email, :size => 40 %> + <%= submit_tag 'Submit' %> +
+ +
+
+ +

+ If your email address has changed, let us know by email +

+ +
+ +<% end -%> diff --git a/app/views/store/lost_license/sent.rhtml b/app/views/store/lost_license/sent.rhtml new file mode 100644 index 0000000..62336c8 --- /dev/null +++ b/app/views/store/lost_license/sent.rhtml @@ -0,0 +1,9 @@ +

License Sent

+ +

+Your license information has been sent. If you do not receive it within an hour, please +check your spam folder or contact us at +<%=$STORE_PREFS['support_email']%>. +

+ +
diff --git a/app/views/store/order/_form.rhtml b/app/views/store/order/_form.rhtml new file mode 100644 index 0000000..e69de29 diff --git a/app/views/store/order/_form_countries.rhtml b/app/views/store/order/_form_countries.rhtml new file mode 100644 index 0000000..ecff391 --- /dev/null +++ b/app/views/store/order/_form_countries.rhtml @@ -0,0 +1,62 @@ + diff --git a/app/views/store/order/_form_months.rhtml b/app/views/store/order/_form_months.rhtml new file mode 100644 index 0000000..1a735b0 --- /dev/null +++ b/app/views/store/order/_form_months.rhtml @@ -0,0 +1,14 @@ + diff --git a/app/views/store/order/_receipt.rhtml b/app/views/store/order/_receipt.rhtml new file mode 100644 index 0000000..52f0c20 --- /dev/null +++ b/app/views/store/order/_receipt.rhtml @@ -0,0 +1,154 @@ +<% if @print -%> + + + + <%=$STORE_PREFS['company_name']%> Receipt + + + +

<%=$STORE_PREFS['company_name']%>

+<% end -%> + +<% +=begin + /* The following is the original CSS code. They have been inlined for GMail -%> + +#receipt { font-family:helvetica, arial, sans-serif; font-size:12px; line-height:18px; margin-top:30px; } +#receipt h2, #receipt h3 { margin: 0; color:#333; } +#receipt #order_number { vertical-align:bottom; } +#receipt table { border-collapse:collapse; } +#receipt tr td, +#receipt tr th { padding:5px 0; } +#receipt td { vertical-align:top; } +#receipt #payment { width:35%; } +#receipt .license_key {text-align:center; } +#receipt .unit { width:12%; text-align:center; } +#receipt .qty { width:12%; text-align:center; } +#receipt .price { width:11%; text-align:right; } +#receipt th.unit { text-align:left; } +#receipt table tr.r { border-bottom: 1px solid #ddd; } +#receipt table tr.s td { border-bottom: 1px solid #777; padding-bottom: 12px; } +#receipt table tr.d { border-bottom: 3px double #ddd; } +#receipt h3 { display:inline; margin:0; padding:0;} + +<% +=end -%> + +
+ + + + + + + + + + + + + + + + + + + + +
+

+ Receipt +

+
+

+ Order Number: <%= @order.id %> +

+
+ Time: <%= @order.order_time.utc %> +
+ Licensed to: <%=h @order.licensee_name %> + + <% if @order.company != '' -%> + Company: <%=h @order.company -%> + <% end -%>
+ Email: <%=h @order.email %> +
+ Billing Address:
+ <%=h @order.first_name %> <%=h @order.last_name %>
+ <% if @order.address1.blank? -%> + N/A + <% else -%> + <%=h @order.address1 + -%><%=h ', ' + @order.address2 if @order.address2 && ! @order.address2.blank? -%>
+ <%=h @order.city %>, <%=h @order.state %> <%=h @order.zipcode %>
+ <%=h @order.country_name %> + <% end -%> +
+ Payment:
+ <%=h @order.payment_type %> + <% if @order.cc_order? %> +
<%=h @order.ccnum %> + <% end %> +
+ + + + + + + + + <% for item in @order.line_items -%> + + + + + + + + <% end -%> + <% if @order.coupon -%> + + + + + <% end -%> + + + + + + <% if @order.comment -%> + + + + <% end -%> +
ItemLicense KeyUnit PriceQtyPrice
+ <%=h item.product.name %> + + <%=h item.license_key %> + + <%= number_to_currency item.unit_price %> + + <%= item.quantity %> + + <%= number_to_currency item.unit_price * item.quantity %> +
<%= @order.coupon.description %>-<%= number_to_currency(@order.coupon_amount) %>
+ Total: + + <%= number_to_currency @order.total %> +
+ Comment: <%=h @order.comment %> +
+
+<% if @print %> + + +<% end %> diff --git a/app/views/store/order/confirm_paypal.rhtml b/app/views/store/order/confirm_paypal.rhtml new file mode 100644 index 0000000..40fa9d1 --- /dev/null +++ b/app/views/store/order/confirm_paypal.rhtml @@ -0,0 +1,87 @@ + + +

Confirm

+ +<% unless @order.errors.empty? %> +
+

Problems

+ +
+<% end %> + +
+ +
+ <% if @order.items_count == 1 %> +

Your Item

+ <% else %> +

Your Items

+ <% end %> + + + <% for item in @order.line_items -%> + <% if item.quantity > 0 -%> + + + + + <% end -%> + <% end -%> + <% if @order.coupon -%> + + + + + <% end -%> + + + + +
<%= item.quantity %> @ <%= number_to_currency item.unit_price %> each<%= item.product.name %>
-<%= number_to_currency(@order.coupon_amount) %><%= @order.coupon.description %>
Total: <%= number_to_currency @order.total %>
+
+ +<% form_tag :action => "purchase_paypal", :onsubmit => "javascript:return validate();" do -%> + +
+ +
+

Your Information

+

Name on License: <%= text_field "order", "licensee_name" %>

+ +

+ +

+ + (optional) +

+ +

+ + (optional) +

+ +

 

+
+ +

+ +<% end -%> diff --git a/app/views/store/order/failed.rhtml b/app/views/store/order/failed.rhtml new file mode 100644 index 0000000..e134340 --- /dev/null +++ b/app/views/store/order/failed.rhtml @@ -0,0 +1,28 @@ +

Order Failed

+ + + +

+ <% if @order.status == 'C' -%> + You placed this order already. + <% elsif @order.status == 'X' -%> + This order has been cancelled. + <% else -%> + <%= @order.failure_reason.gsub("\n", "
") %> + <% end -%> +

+
+ +<% if @order.country == "US" && @order.status != "C" -%> +

+ Non-USA Customers: Please make sure to select your country +

+<% end -%> + +

+ <% if @order.status == 'C' -%> + An order receipt with the license key was sent to <%= @order.email -%> + <% else -%> + Go back to try again + <% end -%> +

diff --git a/app/views/store/order/new.rhtml b/app/views/store/order/new.rhtml new file mode 100644 index 0000000..4fe30bc --- /dev/null +++ b/app/views/store/order/new.rhtml @@ -0,0 +1,74 @@ +

Purchase Software

+ + + +<% form_tag :action => "payment" do -%> + +
+ If you need a site license or have special pricing needs, please contact us. +
+ + + +<% for product in @products -%> + + + + +<% end -%> + + + + + + + + + + + + + + +
+ + <% if product.image_path != "" -%> + <%= image_tag product.image_path, :alt => '' -%> + <% end -%> + <%= product.name %> + + + <%= text_field "items", product.id, :size => "3", :value => @qty[product.code], :autocomplete => "off", :class => "qty" -%> + $<%=product.price %>  each +
Coupon Code:<%= text_field_tag 'coupon', session[:coupon_text], :autocomplete => 'off' %>
Payment Method: +

+ <%= radio_button_tag 'payment_type', 'cc', !(['paypal', 'gcheckout'].member? @payment_type), :id => 'creditcard' %> + VisaMasterCardAmexDiscover +

+

+ <%= radio_button_tag 'payment_type', 'paypal', @payment_type == 'paypal', :id => 'paypal' %> + PayPal + Shop without sharing your financial information +

+

+ <%= radio_button_tag 'payment_type', 'gcheckout', @payment_type == 'gcheckout', :id => 'gcheckout' %> + Google Checkout +

+
+ + <%= flash[:notice] %> +
+ +<% end -%> + diff --git a/app/views/store/order/payment_cc.rhtml b/app/views/store/order/payment_cc.rhtml new file mode 100644 index 0000000..bfe1abd --- /dev/null +++ b/app/views/store/order/payment_cc.rhtml @@ -0,0 +1,165 @@ + + +

Checkout

+ +<% unless @order.errors.empty? %> +
+

Problems

+ +
+<% end %> + +
+ +
+ <% if @order.items_count == 1 %> +

Your Item

+ <% else %> +

Your Items

+ <% end %> +
+ + + <% for item in @order.line_items -%> + <% if item.quantity > 0 -%> + + + + + <% end -%> + <% end -%> + <% if @order.coupon -%> + + + + + <% end -%> + + + + +
<%= item.quantity %> @ <%= number_to_currency item.unit_price %> each<%= item.product.name %>
-<%= number_to_currency(@order.coupon_amount) %><%= @order.coupon.description %>
Total: <%= number_to_currency @order.total %>
+ +<% form_tag :action => "purchase", :onsubmit => "javascript:return validate();" do -%> + +<% for item in @order.line_items -%> +<%= hidden_field "items", String(item.product_id), :value=> item.quantity -%> +<% end -%> +<%= hidden_field_tag("coupon", @order.coupon_text) if @order.coupon -%> + + + + +
+ +
+

Billing Information

+

+
Name:
+ + +

+
+

+ + (optional) +

+ +

+

+ (optional) +

+

+ + +

+
+

+ +

+

+ +

+

+ +

+
+ +
+ + + +
+

Credit Card

+

Card Type: + + Visa + + + MasterCard + + + Amex + + + Discover +

+ +

+ +

+ +

+

+ CVV +

+
+ +
+ +
+

Almost There

+

Name on License: <%= text_field "order", "licensee_name" %>

+

+ (optional) +

+

 

+
+ +

+ +<% end -%> diff --git a/app/views/store/order/payment_gcheckout.rhtml b/app/views/store/order/payment_gcheckout.rhtml new file mode 100644 index 0000000..6f44a8c --- /dev/null +++ b/app/views/store/order/payment_gcheckout.rhtml @@ -0,0 +1,90 @@ + + +

Confirm

+ +<% unless @order.errors.empty? %> +
+

Problems

+ +
+<% end %> + +

Your license key, along with your purchase receipt, will be emailed to your GMail address.

+ +
+ +
+ <% if @order.items_count == 1 %> +

Your Item

+ <% else %> +

Your Items

+ <% end %> + + + <% for item in @order.line_items -%> + <% if item.quantity > 0 -%> + + + + + <% end -%> + <% end -%> + <% if @order.coupon -%> + + + + + <% end -%> + + + + +
<%= item.quantity %> @ <%= number_to_currency item.unit_price %> each<%= item.product.name %>
-<%= number_to_currency(@order.coupon_amount) %><%= @order.coupon.description %>
Total: <%= number_to_currency @order.total %>
+ +
+ +<% form_tag :action => "purchase", :onsubmit => "javascript:return validate();" do -%> + +<% for item in @order.line_items -%> +<%= hidden_field 'items', String(item.product_id), :value=> item.quantity %> +<% end -%> +<%= hidden_field_tag("coupon", @order.coupon_text) if @order.coupon %> +<%= hidden_field("order", "payment_type", :value => "Google Checkout") %> + +
+ +
+

Your Information

+

+ Name on License: <%= text_field "order", "licensee_name" %> +

+

+ + (optional) +

+
+ +

+ +

+ +<% end -%> + + diff --git a/app/views/store/order/thankyou.rhtml b/app/views/store/order/thankyou.rhtml new file mode 100644 index 0000000..634bfa0 --- /dev/null +++ b/app/views/store/order/thankyou.rhtml @@ -0,0 +1,72 @@ +<% + if @order.items_count == 1 + application = 'application' + icon = 'icon' + file = 'file' + it = 'it' + else + application = 'applications' + icon = 'icons' + file = 'files' + it = 'them' + end + + coupons = @order.promo_coupons + vc_coupons = coupons.compact() + vc_coupons.reject!{|x| x.product_code != 'vc'} + +-%> +

Thank You

+ +

+ Thank you for purchasing <%=$STORE_PREFS['company_name']%> software. If you have not + downloaded the software already, please do so now: + +

+

+ +

HOW TO ACTIVATE

+
+

+ If you have the <%= application %> installed, you can activate by clicking on the "Activate Now" button. + Otherwise, you can copy and paste the license key into the application's registration window. +

+ + + <% for item in @order.line_items -%> + + + + + +<% end -%> +
<%=item.product.name%>:<%= item.license_key %>ACTIVATE NOW
+
+ +
+ +<%= render :partial => 'receipt' -%> + +
+ <%= link_to image_tag('store/printer.png')+' Printer Friendly Receipt', { :action => 'receipt' }, :popup => ['new_window', 'height=500,width=600'] -%> +
+ +<% if coupons.length != 0 -%> +

DISCOUNT COUPONS

+<% end + if vc_coupons.length != 0 -%> +

+ If you have friends who might enjoy Voice Candy, here are 3 coupon + codes for $3 off their purchases. They expire in 15 days. +

+ +
<%= vc_coupons.collect {|x| x.coupon}.join(',  ') %>
+<% end -%> + +

+ The contents of this page are being sent to you by email. +

diff --git a/app/views/support_mailer/crash_report.rhtml b/app/views/support_mailer/crash_report.rhtml new file mode 100644 index 0000000..10126a7 --- /dev/null +++ b/app/views/support_mailer/crash_report.rhtml @@ -0,0 +1 @@ +<%= @report %> diff --git a/app/views/support_mailer/support_request.rhtml b/app/views/support_mailer/support_request.rhtml new file mode 100644 index 0000000..17a3d7c --- /dev/null +++ b/app/views/support_mailer/support_request.rhtml @@ -0,0 +1 @@ +<%= @message %> \ No newline at end of file diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 0000000..b7af0c3 --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,45 @@ +# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb + +unless defined?(RAILS_ROOT) + root_path = File.join(File.dirname(__FILE__), '..') + + unless RUBY_PLATFORM =~ /(:?mswin|mingw)/ + require 'pathname' + root_path = Pathname.new(root_path).cleanpath(true).to_s + end + + RAILS_ROOT = root_path +end + +unless defined?(Rails::Initializer) + if File.directory?("#{RAILS_ROOT}/vendor/rails") + require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" + else + require 'rubygems' + + environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join + environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/ + rails_gem_version = $1 + + if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version + # Asking for 1.1.6 will give you 1.1.6.5206, if available -- makes it easier to use beta gems + rails_gem = Gem.cache.search('rails', "~>#{version}.0").sort_by { |g| g.version.version }.last + + if rails_gem + gem "rails", "=#{rails_gem.version.version}" + require rails_gem.full_gem_path + '/lib/initializer' + else + STDERR.puts %(Cannot find gem for Rails ~>#{version}.0: + Install the missing gem with 'gem install -v=#{version} rails', or + change environment.rb to define RAILS_GEM_VERSION with your desired version. + ) + exit 1 + end + else + gem "rails" + require 'initializer' + end + end + + Rails::Initializer.run(:set_load_path) +end diff --git a/config/certs/api_cert_chain.crt b/config/certs/api_cert_chain.crt new file mode 100644 index 0000000..fb0cf6d --- /dev/null +++ b/config/certs/api_cert_chain.crt @@ -0,0 +1,35 @@ +-----BEGIN CERTIFICATE----- +MIIDgzCCAuygAwIBAgIQJUuKhThCzONY+MXdriJupDANBgkqhkiG9w0BAQUFADBf +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT +LkNsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw +HhcNOTcwNDE3MDAwMDAwWhcNMTExMDI0MjM1OTU5WjCBujEfMB0GA1UEChMWVmVy +aVNpZ24gVHJ1c3QgTmV0d29yazEXMBUGA1UECxMOVmVyaVNpZ24sIEluYy4xMzAx +BgNVBAsTKlZlcmlTaWduIEludGVybmF0aW9uYWwgU2VydmVyIENBIC0gQ2xhc3Mg +MzFJMEcGA1UECxNAd3d3LnZlcmlzaWduLmNvbS9DUFMgSW5jb3JwLmJ5IFJlZi4g +TElBQklMSVRZIExURC4oYyk5NyBWZXJpU2lnbjCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEA2IKA6NYZAn0fhRg5JaJlK+G/1AXTvOY2O6rwTGxbtueqPHNFVbLx +veqXQu2aNAoV1Klc9UAl3dkHwTKydWzEyruj/lYncUOqY/UwPpMo5frxCTvzt01O +OfdcSVq4wR3Tsor+cDCVQsv+K1GLWjw6+SJPkLICp1OcTzTnqwSye28CAwEAAaOB +4zCB4DAPBgNVHRMECDAGAQH/AgEAMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHAQEw +KjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL0NQUzA0BgNV +HSUELTArBggrBgEFBQcDAQYIKwYBBQUHAwIGCWCGSAGG+EIEAQYKYIZIAYb4RQEI +ATALBgNVHQ8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgEGMDEGA1UdHwQqMCgwJqAk +oCKGIGh0dHA6Ly9jcmwudmVyaXNpZ24uY29tL3BjYTMuY3JsMA0GCSqGSIb3DQEB +BQUAA4GBAAgB7ORolANC8XPxI6I63unx2sZUxCM+hurPajozq+qcBBQHNgYL+Yhv +1RPuKSvD5HKNRO3RrCAJLeH24RkFOLA9D59/+J4C3IYChmFOJl9en5IeDCSk9dBw +E88mw0M9SR2egi5SX7w+xmYpAY5Okiy8RnUDgqxz6dl+C2fvVFIa +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG +A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz +cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 +MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV +BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt +YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN +ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE +BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is +I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G +CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do +lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc +AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k +-----END CERTIFICATE----- diff --git a/config/certs/live_api.crt b/config/certs/live_api.crt new file mode 100644 index 0000000..e69de29 diff --git a/config/certs/live_api.key b/config/certs/live_api.key new file mode 100644 index 0000000..e69de29 diff --git a/config/certs/sandbox_api.crt b/config/certs/sandbox_api.crt new file mode 100644 index 0000000..e69de29 diff --git a/config/certs/sandbox_api.key b/config/certs/sandbox_api.key new file mode 100644 index 0000000..e69de29 diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 0000000..f8ce5c5 --- /dev/null +++ b/config/database.yml @@ -0,0 +1,28 @@ +# Potion Store requires postgresql for now + +development: + adapter: postgresql + database: store_development + encoding: utf8 + username: postgres + password: + host: localhost + +# Warning: The database defined as 'test' will be erased and +# re-generated from your development database when you run 'rake'. +# Do not set this db to the same as development or production. +test: + adapter: postgresql + database: store_test + encoding: utf8 + username: postgres + password: + host: localhost + +production: + adapter: postgresql + database: store_production + encoding: utf8 + username: store + password: + host: localhost diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 0000000..f4e607f --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,54 @@ +# Be sure to restart your web server when you modify this file. + +# Uncomment below to force Rails into production mode when +# you don't control web/app server and can't set it the proper way +# ENV['RAILS_ENV'] ||= 'production' + +# Specifies gem version of Rails to use when vendor/rails is not present +#RAILS_GEM_VERSION = '1.1.6' + +# Bootstrap the Rails environment, frameworks, and default configuration +require File.join(File.dirname(__FILE__), 'boot') + +Rails::Initializer.run do |config| + # Settings in config/environments/* take precedence those specified here + + # Skip frameworks you're not going to use + # config.frameworks -= [ :action_web_service, :action_mailer ] + config.frameworks -= [ :action_web_service ] + + # Add additional load paths for your own custom dirs + # config.load_paths += %W( #{RAILS_ROOT}/extras ) + + # Force all environments to use the same logger level + # (by default production uses :info, the others :debug) + # config.log_level = :debug + + # Use the database for sessions instead of the file system + # (create the session table with 'rake db:sessions:create') + # config.action_controller.session_store = :active_record_store + + # Use SQL instead of Active Record's schema dumper when creating the test database. + # This is necessary if your schema can't be completely dumped by the schema dumper, + # like if you have constraints or database-specific column types + # config.active_record.schema_format = :sql + + # Activate observers that should always be running + # config.active_record.observers = :cacher, :garbage_collector + + # Make Active Record use UTC-base instead of local time + # config.active_record.default_timezone = :utc + + # See Rails::Configuration for more options +end + +# Add new inflection rules using the following format +# (all these examples are active by default): +# Inflector.inflections do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# Include your application configuration below diff --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 0000000..7321b55 --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,28 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# In the development environment your application's code is reloaded on +# every request. This slows down response time but is perfect for development +# since you don't have to restart the webserver when you make code changes. +config.cache_classes = false + +# Log error messages when you accidentally call methods on nil. +config.whiny_nils = true + +# Enable the breakpoint server that script/breakpointer connects to +config.breakpoint_server = true + +# Show full error reports and disable caching +config.action_controller.consider_all_requests_local = true +config.action_controller.perform_caching = false +config.action_view.cache_template_extensions = false +config.action_view.debug_rjs = true + +# Don't care if the mailer can't send +config.action_mailer.raise_delivery_errors = true + +config.action_mailer.smtp_settings = { + :address => "localhost", + :port => 25, + :domain => "localhost" +} + diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 0000000..a9a28e3 --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,23 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# The production environment is meant for finished, "live" apps. +# Code is not reloaded between requests +config.cache_classes = true + +# Use a different logger for distributed setups +# config.logger = SyslogLogger.new + +# Full error reports are disabled and caching is turned on +config.action_controller.consider_all_requests_local = false +config.action_controller.perform_caching = true + +# Enable serving of images, stylesheets, and javascripts from an asset server +# config.action_controller.asset_host = "http://assets.example.com" + +# Disable delivery errors if you bad email addresses should just be ignored +# config.action_mailer.raise_delivery_errors = false + +config.action_mailer.delivery_method = :sendmail + +# Suppress logging from the mailer. We don't want every email to get logged +config.action_mailer.logger = nil diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 0000000..f0689b9 --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,19 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! +config.cache_classes = true + +# Log error messages when you accidentally call methods on nil. +config.whiny_nils = true + +# Show full error reports and disable caching +config.action_controller.consider_all_requests_local = true +config.action_controller.perform_caching = false + +# Tell ActionMailer not to deliver emails to the real world. +# The :test delivery method accumulates sent emails in the +# ActionMailer::Base.deliveries array. +config.action_mailer.delivery_method = :test \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 0000000..35e44b9 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,25 @@ +ActionController::Routing::Routes.draw do |map| + # The priority is based upon order of creation: first created -> highest priority. + + # Sample of regular route: + # map.connect 'products/:id', :controller => 'catalog', :action => 'view' + # Keep in mind you can assign values other than :controller and :action + + # Sample of named route: + # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' + # This route can be invoked with purchase_url(:id => product.id) + + # You can have the root of your site routed by hooking up '' + # -- just remember to delete public/index.html. + map.connect 'store', :controller =>"store/order" + map.connect '', :controller => "store/order" + + # Allow downloading Web Service WSDL as a file with an extension + # instead of a file named 'wsdl' + # map.connect ':controller/service.wsdl', :action => 'wsdl' + + map.connect 'bugreport/crash', :controller => 'email', :action => 'crash_report' + + # Install the default route as the lowest priority. + map.connect ':controller/:action/:id' +end diff --git a/config/store.yml b/config/store.yml new file mode 100644 index 0000000..9180263 --- /dev/null +++ b/config/store.yml @@ -0,0 +1,25 @@ +# Admin site login +admin_username: "admin" +admin_password: "password" + +# Presentation stuf +company_name: "My Company" +company_url: "http://www.mycompany.com/" +company_logo_path: "" +store_name: "My Company Store" +copyright_html: "Copyright © 2007 My Company. All rights reserved." +google_analytics_account: "" +paypal_express_checkout_header_image: "https://www.mycompany.com/images/mylogo.png" + +# Email addresses +support_email: "support@mycompany.com" +sales_email: "sales@mycompany.com" + +purchase_receipt_sender_email: "My Company " +purchase_receipt_bcc_email: "orders@mycompany.com" + +lost_license_sent_notification_sender_email: "My Company " +lost_license_sent_notification_recipient_email: "info@mycompany.com" + +crash_report_sender_email: "bugs@mycompany.com" +crash_report_recipient_email: "bugs@mycompany.com" diff --git a/db/migrate/001_create_tables.rb b/db/migrate/001_create_tables.rb new file mode 100644 index 0000000..c55a198 --- /dev/null +++ b/db/migrate/001_create_tables.rb @@ -0,0 +1,108 @@ +class CreateTables < ActiveRecord::Migration + def self.up + + create_table :products do |t| + t.column "code", :string, :limit => 16, :default => "", :null => false + t.column "name", :string, :limit => 64, :default => "", :null => false + t.column "price", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false + t.column "image_path", :text + t.column "url", :text + t.column "download_url", :text + t.column "license_url_scheme",:text + t.column "active", :integer, :default => 1, :null => false + end + + create_table :coupons do |t| + t.column "code", :string, :limit => 16, :default => "", :null => false + t.column "description", :string, :limit => 64, :default => "", :null => false + t.column "coupon", :string, :limit => 64, :default => "", :null => false + t.column "product_code", :string, :limit => 16, :default => "", :null => false + t.column "amount", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false + t.column "percentage", :integer + t.column "used_count", :integer + t.column "use_limit", :integer, :default => 1, :null => false + t.column "creation_time", :timestamp + t.column "numdays", :integer, :default => 0, :null => false + end + + add_index "coupons", ["coupon"], :name => "coupon" + + create_table :orders do |t| + t.column "coupon_id", :integer + t.column "status", :string, :limit => 1, :default => "P", :null => false + t.column "email", :string, :limit => 128, :default => "", :null => false + t.column "order_time", :datetime + t.column "first_name", :string, :limit => 64, :default => "" + t.column "licensee_name", :string, :limit => 128 + t.column "last_name", :string, :limit => 64, :default => "" + t.column "company", :string, :limit => 64 + t.column "address1", :string, :limit => 64, :default => "" + t.column "address2", :string, :limit => 64 + t.column "city", :string, :limit => 64, :default => "" + t.column "state", :string, :limit => 64, :default => "" + t.column "zipcode", :string, :limit => 64, :default => "" + t.column "country", :string, :limit => 2, :default => "", :null => false + t.column "payment_type", :string, :limit => 16 + t.column "ccnum", :string, :limit => 32 + t.column "comment", :text + t.column "failure_code", :integer + t.column "failure_reason", :string + t.column "transaction_number", :string, :limit => 64 + end + + add_index "orders", ["coupon_id"], :name => "coupon_id" + add_index "orders", ["email"], :name => "email" + + create_table :line_items do |t| + t.column "order_id", :integer, :default => 0, :null => false + t.column "product_id", :integer, :default => 0, :null => false + t.column "quantity", :integer, :default => 0, :null => false + t.column "unit_price", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false + t.column "license_key", :string, :limit => 64 + end + + add_index "line_items", ["order_id"], :name => "order_id" + add_index "line_items", ["product_id"], :name => "product_id" + + create_table :list_subscribers do |t| + t.column "email", :text, :default => "", :null => false + end + + add_foreign_key_constraint "line_items", "order_id", "orders", "id", :on_update => nil, :on_delete => :cascade + add_foreign_key_constraint "line_items", "product_id", "products", "id", :on_update => nil, :on_delete => nil + + add_foreign_key_constraint "orders", "coupon_id", "coupons", "id", :on_update => nil, :on_delete => :restrict + + p = Product.new + p.code = "foo" + p.name = "Footion v1" + p.price = 12.95 + p.image_path = "/images/store/application_icon.png" + p.url = "http://www.mycompany.com/foo/" + p.download_url = "http://www.mycompany.com/foo/download/" + p.license_url_scheme = "x-com-mycompany-license-footion" + p.save() + + p = Product.new + p.code = "bar" + p.name = "Barsoap v1" + p.price = 24.95 + p.url = "http://www.mycompany.com/bar/" + p.image_path = "/images/store/application_icon.png" + p.download_url = "http://www.mycompany.com/bar/download/" + p.license_url_scheme = "x-com-mycompany-license-barsoap" + p.save() + end + + def self.down + remove_foreign_key_constraint "line_items", :foreign_key => "order_id" + remove_foreign_key_constraint "line_items", :foreign_key => "product_id" + remove_foreign_key_constraint "orders", :foreign_key => "coupon_id" + + drop_table :list_subscribers + drop_table :line_items + drop_table :orders + drop_table :coupons + drop_table :products + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..cca14de --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,79 @@ +# This file is autogenerated. Instead of editing this file, please use the +# migrations feature of ActiveRecord to incrementally modify your database, and +# then regenerate this schema definition. + +ActiveRecord::Schema.define(:version => 1) do + + create_table "coupons", :force => true do |t| + t.column "code", :string, :limit => 16, :default => "", :null => false + t.column "description", :string, :limit => 64, :default => "", :null => false + t.column "coupon", :string, :limit => 64, :default => "", :null => false + t.column "product_code", :string, :limit => 16, :default => "", :null => false + t.column "amount", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false + t.column "percentage", :integer + t.column "used_count", :integer + t.column "use_limit", :integer, :default => 1, :null => false + t.column "creation_time", :datetime + t.column "numdays", :integer, :default => 0, :null => false + end + + add_index "coupons", ["coupon"], :name => "coupon" + + create_table "line_items", :force => true do |t| + t.column "order_id", :integer, :default => 0, :null => false + t.column "product_id", :integer, :default => 0, :null => false + t.column "quantity", :integer, :default => 0, :null => false + t.column "unit_price", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false + t.column "license_key", :string, :limit => 64 + end + + add_index "line_items", ["order_id"], :name => "order_id" + add_index "line_items", ["product_id"], :name => "product_id" + + create_table "list_subscribers", :force => true do |t| + t.column "email", :text, :default => "", :null => false + end + + create_table "orders", :force => true do |t| + t.column "coupon_id", :integer + t.column "status", :string, :limit => 1, :default => "P", :null => false + t.column "email", :string, :limit => 128, :default => "", :null => false + t.column "order_time", :datetime + t.column "first_name", :string, :limit => 64, :default => "" + t.column "licensee_name", :string, :limit => 128 + t.column "last_name", :string, :limit => 64, :default => "" + t.column "company", :string, :limit => 64 + t.column "address1", :string, :limit => 64, :default => "" + t.column "address2", :string, :limit => 64 + t.column "city", :string, :limit => 64, :default => "" + t.column "state", :string, :limit => 64, :default => "" + t.column "zipcode", :string, :limit => 64, :default => "" + t.column "country", :string, :limit => 2, :default => "", :null => false + t.column "payment_type", :string, :limit => 16 + t.column "ccnum", :string, :limit => 32 + t.column "comment", :text + t.column "failure_code", :integer + t.column "failure_reason", :string + t.column "transaction_number", :string, :limit => 64 + end + + add_index "orders", ["coupon_id"], :name => "coupon_id" + add_index "orders", ["email"], :name => "email" + + create_table "products", :force => true do |t| + t.column "code", :string, :limit => 16, :default => "", :null => false + t.column "name", :string, :limit => 64, :default => "", :null => false + t.column "price", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false + t.column "image_path", :text + t.column "url", :text + t.column "download_url", :text + t.column "license_url_scheme", :text + t.column "active", :integer, :default => 1, :null => false + end + + add_foreign_key_constraint "line_items", "order_id", "orders", "id", :name => "line_items_ibfk_order_id", :on_update => nil, :on_delete => :cascade + add_foreign_key_constraint "line_items", "product_id", "products", "id", :name => "line_items_ibfk_product_id", :on_update => nil, :on_delete => nil + + add_foreign_key_constraint "orders", "coupon_id", "coupons", "id", :name => "orders_ibfk_coupon_id", :on_update => nil, :on_delete => :restrict + +end diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP new file mode 100644 index 0000000..ac6c149 --- /dev/null +++ b/doc/README_FOR_APP @@ -0,0 +1,2 @@ +Use this README file to introduce your application and point to useful places in the API for learning more. +Run "rake appdoc" to generate API documentation for your models and controllers. \ No newline at end of file diff --git a/lib/http-access2.rb b/lib/http-access2.rb new file mode 100644 index 0000000..2ac5075 --- /dev/null +++ b/lib/http-access2.rb @@ -0,0 +1,1588 @@ +# HTTPAccess2 - HTTP accessing library. +# Copyright (C) 2000-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + +# http-access2.rb is based on http-access.rb in http-access/0.0.4. Some part +# of code in http-access.rb was recycled in http-access2.rb. Those part is +# copyrighted by Maehashi-san. + + +# Ruby standard library +require 'timeout' +require 'uri' +require 'socket' +require 'thread' + +# Extra library +require 'http-access2/http' +require 'http-access2/cookie' + + +module HTTPAccess2 + VERSION = '2.0.6' + RUBY_VERSION_STRING = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]" + s = %w$Id: http-access2.rb 114 2005-09-13 03:20:38Z nahi $ + RCS_FILE, RCS_REVISION = s[1][/.*(?=,v$)/], s[2] + + SSLEnabled = begin + require 'openssl' + true + rescue LoadError + false + end + + DEBUG_SSL = true + + +# DESCRIPTION +# HTTPAccess2::Client -- Client to retrieve web resources via HTTP. +# +# How to create your client. +# 1. Create simple client. +# clnt = HTTPAccess2::Client.new +# +# 2. Accessing resources through HTTP proxy. +# clnt = HTTPAccess2::Client.new("http://myproxy:8080") +# +# 3. Set User-Agent and From in HTTP request header.(nil means "No proxy") +# clnt = HTTPAccess2::Client.new(nil, "MyAgent", "nahi@keynauts.com") +# +# How to retrieve web resources. +# 1. Get content of specified URL. +# puts clnt.get_content("http://www.ruby-lang.org/en/") +# +# 2. Do HEAD request. +# res = clnt.head(uri) +# +# 3. Do GET request with query. +# res = clnt.get(uri) +# +# 4. Do POST request. +# res = clnt.post(uri) +# res = clnt.get|post|head(uri, proxy) +# +class Client + attr_reader :agent_name + attr_reader :from + attr_reader :ssl_config + attr_accessor :cookie_manager + attr_reader :test_loopback_response + + class << self + %w(get_content head get post put delete options trace).each do |name| + eval <<-EOD + def #{name}(*arg) + new.#{name}(*arg) + end + EOD + end + end + + # SYNOPSIS + # Client.new(proxy = nil, agent_name = nil, from = nil) + # + # ARGS + # proxy A String of HTTP proxy URL. ex. "http://proxy:8080". + # agent_name A String for "User-Agent" HTTP request header. + # from A String for "From" HTTP request header. + # + # DESCRIPTION + # Create an instance. + # SSLConfig cannot be re-initialized. Create new client. + # + def initialize(proxy = nil, agent_name = nil, from = nil) + @proxy = nil # assigned later. + @no_proxy = nil + @agent_name = agent_name + @from = from + @basic_auth = BasicAuth.new(self) + @debug_dev = nil + @ssl_config = SSLConfig.new(self) + @redirect_uri_callback = method(:default_redirect_uri_callback) + @test_loopback_response = [] + @session_manager = SessionManager.new + @session_manager.agent_name = @agent_name + @session_manager.from = @from + @session_manager.ssl_config = @ssl_config + @cookie_manager = WebAgent::CookieManager.new + self.proxy = proxy + end + + def debug_dev + @debug_dev + end + + def debug_dev=(dev) + @debug_dev = dev + reset_all + @session_manager.debug_dev = dev + end + + def protocol_version + @session_manager.protocol_version + end + + def protocol_version=(protocol_version) + reset_all + @session_manager.protocol_version = protocol_version + end + + def connect_timeout + @session_manager.connect_timeout + end + + def connect_timeout=(connect_timeout) + reset_all + @session_manager.connect_timeout = connect_timeout + end + + def send_timeout + @session_manager.send_timeout + end + + def send_timeout=(send_timeout) + reset_all + @session_manager.send_timeout = send_timeout + end + + def receive_timeout + @session_manager.receive_timeout + end + + def receive_timeout=(receive_timeout) + reset_all + @session_manager.receive_timeout = receive_timeout + end + + def proxy + @proxy + end + + def proxy=(proxy) + if proxy.nil? + @proxy = nil + else + if proxy.is_a?(URI) + @proxy = proxy + else + @proxy = URI.parse(proxy) + end + if @proxy.scheme == nil or @proxy.scheme.downcase != 'http' or + @proxy.host == nil or @proxy.port == nil + raise ArgumentError.new("unsupported proxy `#{proxy}'") + end + end + reset_all + @proxy + end + + def no_proxy + @no_proxy + end + + def no_proxy=(no_proxy) + @no_proxy = no_proxy + reset_all + end + + # if your ruby is older than 2005-09-06, do not set socket_sync = false to + # avoid an SSL socket blocking bug in openssl/buffering.rb. + def socket_sync=(socket_sync) + @session_manager.socket_sync = socket_sync + end + + def set_basic_auth(uri, user_id, passwd) + unless uri.is_a?(URI) + uri = URI.parse(uri) + end + @basic_auth.set(uri, user_id, passwd) + end + + def set_cookie_store(filename) + if @cookie_manager.cookies_file + raise RuntimeError.new("overriding cookie file location") + end + @cookie_manager.cookies_file = filename + @cookie_manager.load_cookies if filename + end + + def save_cookie_store + @cookie_manager.save_cookies + end + + def redirect_uri_callback=(redirect_uri_callback) + @redirect_uri_callback = redirect_uri_callback + end + + # SYNOPSIS + # Client#get_content(uri, query = nil, extheader = {}, &block = nil) + # + # ARGS + # uri an_URI or a_string of uri to connect. + # query a_hash or an_array of query part. e.g. { "a" => "b" }. + # Give an array to pass multiple value like + # [["a" => "b"], ["a" => "c"]]. + # extheader + # a_hash of extra headers like { "SOAPAction" => "urn:foo" }. + # &block Give a block to get chunked message-body of response like + # get_content(uri) { |chunked_body| ... } + # Size of each chunk may not be the same. + # + # DESCRIPTION + # Get a_sring of message-body of response. + # + def get_content(uri, query = nil, extheader = {}, &block) + retry_connect(uri, query) do |uri, query| + get(uri, query, extheader, &block) + end + end + + def post_content(uri, body = nil, extheader = {}, &block) + retry_connect(uri, nil) do |uri, query| + post(uri, body, extheader, &block) + end + end + + def default_redirect_uri_callback(res) + uri = res.header['location'][0] + puts "Redirect to: #{uri}" if $DEBUG + uri + end + + def head(uri, query = nil, extheader = {}) + request('HEAD', uri, query, nil, extheader) + end + + def get(uri, query = nil, extheader = {}, &block) + request('GET', uri, query, nil, extheader, &block) + end + + def post(uri, body = nil, extheader = {}, &block) + request('POST', uri, nil, body, extheader, &block) + end + + def put(uri, body = nil, extheader = {}, &block) + request('PUT', uri, nil, body, extheader, &block) + end + + def delete(uri, extheader = {}, &block) + request('DELETE', uri, nil, nil, extheader, &block) + end + + def options(uri, extheader = {}, &block) + request('OPTIONS', uri, nil, nil, extheader, &block) + end + + def trace(uri, query = nil, body = nil, extheader = {}, &block) + request('TRACE', uri, query, body, extheader, &block) + end + + def request(method, uri, query = nil, body = nil, extheader = {}, &block) + conn = Connection.new + conn_request(conn, method, uri, query, body, extheader, &block) + conn.pop + end + + # Async interface. + + def head_async(uri, query = nil, extheader = {}) + request_async('HEAD', uri, query, nil, extheader) + end + + def get_async(uri, query = nil, extheader = {}) + request_async('GET', uri, query, nil, extheader) + end + + def post_async(uri, body = nil, extheader = {}) + request_async('POST', uri, nil, body, extheader) + end + + def put_async(uri, body = nil, extheader = {}) + request_async('PUT', uri, nil, body, extheader) + end + + def delete_async(uri, extheader = {}) + request_async('DELETE', uri, nil, nil, extheader) + end + + def options_async(uri, extheader = {}) + request_async('OPTIONS', uri, nil, nil, extheader) + end + + def trace_async(uri, query = nil, body = nil, extheader = {}) + request_async('TRACE', uri, query, body, extheader) + end + + def request_async(method, uri, query = nil, body = nil, extheader = {}) + conn = Connection.new + t = Thread.new(conn) { |tconn| + conn_request(tconn, method, uri, query, body, extheader) + } + conn.async_thread = t + conn + end + + ## + # Multiple call interface. + + # ??? + + ## + # Management interface. + + def reset(uri) + @session_manager.reset(uri) + end + + def reset_all + @session_manager.reset_all + end + +private + + def retry_connect(uri, query = nil) + retry_number = 0 + while retry_number < 10 + res = yield(uri, query) + if res.status == HTTP::Status::OK + return res.content + elsif HTTP::Status.redirect?(res.status) + uri = @redirect_uri_callback.call(res) + query = nil + retry_number += 1 + else + raise RuntimeError.new("Unexpected response: #{res.header.inspect}") + end + end + raise RuntimeError.new("Retry count exceeded.") + end + + def conn_request(conn, method, uri, query, body, extheader, &block) + unless uri.is_a?(URI) + uri = URI.parse(uri) + end + proxy = no_proxy?(uri) ? nil : @proxy + begin + req = create_request(method, uri, query, body, extheader, !proxy.nil?) + do_get_block(req, proxy, conn, &block) + rescue Session::KeepAliveDisconnected + req = create_request(method, uri, query, body, extheader, !proxy.nil?) + do_get_block(req, proxy, conn, &block) + end + end + + def create_request(method, uri, query, body, extheader, proxy) + if extheader.is_a?(Hash) + extheader = extheader.to_a + end + cred = @basic_auth.get(uri) + if cred + extheader << ['Authorization', "Basic " << cred] + end + if cookies = @cookie_manager.find(uri) + extheader << ['Cookie', cookies] + end + boundary = nil + content_type = extheader.find { |key, value| + key.downcase == 'content-type' + } + if content_type && content_type[1] =~ /boundary=(.+)\z/ + boundary = $1 + end + req = HTTP::Message.new_request(method, uri, query, body, proxy, boundary) + extheader.each do |key, value| + req.header.set(key, value) + end + if content_type.nil? and !body.nil? + req.header.set('content-type', 'application/x-www-form-urlencoded') + end + req + end + + NO_PROXY_HOSTS = ['localhost'] + + def no_proxy?(uri) + if !@proxy or NO_PROXY_HOSTS.include?(uri.host) + return true + end + unless @no_proxy + return false + end + @no_proxy.scan(/([^:,]+)(?::(\d+))?/) do |host, port| + if /(\A|\.)#{Regexp.quote(host)}\z/i =~ uri.host && + (!port || uri.port == port.to_i) + return true + end + end + false + end + + # !! CAUTION !! + # Method 'do_get*' runs under MT conditon. Be careful to change. + def do_get_block(req, proxy, conn, &block) + if str = @test_loopback_response.shift + dump_dummy_request_response(req.body.dump, str) if @debug_dev + conn.push(HTTP::Message.new_response(str)) + return + end + content = '' + res = HTTP::Message.new_response(content) + @debug_dev << "= Request\n\n" if @debug_dev + sess = @session_manager.query(req, proxy) + @debug_dev << "\n\n= Response\n\n" if @debug_dev + do_get_header(req, res, sess) + conn.push(res) + sess.get_data() do |str| + block.call(str) if block + content << str + end + @session_manager.keep(sess) unless sess.closed? + end + + def do_get_stream(req, proxy, conn) + if str = @test_loopback_response.shift + dump_dummy_request_response(req.body.dump, str) if @debug_dev + conn.push(HTTP::Message.new_response(str)) + return + end + piper, pipew = IO.pipe + res = HTTP::Message.new_response(piper) + @debug_dev << "= Request\n\n" if @debug_dev + sess = @session_manager.query(req, proxy) + @debug_dev << "\n\n= Response\n\n" if @debug_dev + do_get_header(req, res, sess) + conn.push(res) + sess.get_data() do |str| + pipew.syswrite(str) + end + pipew.close + @session_manager.keep(sess) unless sess.closed? + end + + def do_get_header(req, res, sess) + res.version, res.status, res.reason = sess.get_status + sess.get_header().each do |line| + unless /^([^:]+)\s*:\s*(.*)$/ =~ line + raise RuntimeError.new("Unparsable header: '#{line}'.") if $DEBUG + end + res.header.set($1, $2) + end + if res.header['set-cookie'] + res.header['set-cookie'].each do |cookie| + @cookie_manager.parse(cookie, req.header.request_uri) + end + end + end + + def dump_dummy_request_response(req, res) + @debug_dev << "= Dummy Request\n\n" + @debug_dev << req + @debug_dev << "\n\n= Dummy Response\n\n" + @debug_dev << res + end +end + + +# HTTPAccess2::SSLConfig -- SSL configuration of a client. +# +class SSLConfig # :nodoc: + attr_reader :client_cert + attr_reader :client_key + attr_reader :client_ca + + attr_reader :verify_mode + attr_reader :verify_depth + attr_reader :verify_callback + + attr_reader :timeout + attr_reader :options + attr_reader :ciphers + + attr_reader :cert_store # don't use if you don't know what it is. + + def initialize(client) + return unless SSLEnabled + @client = client + @cert_store = OpenSSL::X509::Store.new + @client_cert = @client_key = @client_ca = nil + @verify_mode = OpenSSL::SSL::VERIFY_PEER | + OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT + @verify_depth = nil + @verify_callback = nil + @dest = nil + @timeout = nil + @options = defined?(OpenSSL::SSL::OP_ALL) ? + OpenSSL::SSL::OP_ALL | OpenSSL::SSL::OP_NO_SSLv2 : nil + @ciphers = "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH" + end + + def set_client_cert_file(cert_file, key_file) + @client_cert = OpenSSL::X509::Certificate.new(File.open(cert_file).read) + @client_key = OpenSSL::PKey::RSA.new(File.open(key_file).read) + change_notify + end + + def set_trust_ca(trust_ca_file_or_hashed_dir) + if FileTest.directory?(trust_ca_file_or_hashed_dir) + @cert_store.add_path(trust_ca_file_or_hashed_dir) + else + @cert_store.add_file(trust_ca_file_or_hashed_dir) + end + change_notify + end + + def set_crl(crl_file) + crl = OpenSSL::X509::CRL.new(File.open(crl_file).read) + @cert_store.add_crl(crl) + @cert_store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK | OpenSSL::X509::V_FLAG_CRL_CHECK_ALL + change_notify + end + + def client_cert=(client_cert) + @client_cert = client_cert + change_notify + end + + def client_key=(client_key) + @client_key = client_key + change_notify + end + + def client_ca=(client_ca) + @client_ca = client_ca + change_notify + end + + def verify_mode=(verify_mode) + @verify_mode = verify_mode + change_notify + end + + def verify_depth=(verify_depth) + @verify_depth = verify_depth + change_notify + end + + def verify_callback=(verify_callback) + @verify_callback = verify_callback + change_notify + end + + def timeout=(timeout) + @timeout = timeout + change_notify + end + + def options=(options) + @options = options + change_notify + end + + def ciphers=(ciphers) + @ciphers = ciphers + change_notify + end + + # don't use if you don't know what it is. + def cert_store=(cert_store) + @cert_store = cert_store + change_notify + end + + # interfaces for SSLSocketWrap. + + def set_context(ctx) + # Verification: Use Store#verify_callback instead of SSLContext#verify*? + ctx.cert_store = @cert_store + ctx.verify_mode = @verify_mode + ctx.verify_depth = @verify_depth if @verify_depth + ctx.verify_callback = @verify_callback || method(:default_verify_callback) + # SSL config + ctx.cert = @client_cert + ctx.key = @client_key + ctx.client_ca = @client_ca + ctx.timeout = @timeout + ctx.options = @options + ctx.ciphers = @ciphers + end + + # this definition must match with the one in ext/openssl/lib/openssl/ssl.rb + def post_connection_check(peer_cert, hostname) + check_common_name = true + cert = peer_cert + cert.extensions.each{|ext| + next if ext.oid != "subjectAltName" + ext.value.split(/,\s+/).each{|general_name| + if /\ADNS:(.*)/ =~ general_name + check_common_name = false + reg = Regexp.escape($1).gsub(/\\\*/, "[^.]+") + return true if /\A#{reg}\z/i =~ hostname + elsif /\AIP Address:(.*)/ =~ general_name + check_common_name = false + return true if $1 == hostname + end + } + } + if check_common_name + cert.subject.to_a.each{|oid, value| + if oid == "CN" && value.casecmp(hostname) == 0 + return true + end + } + end + raise OpenSSL::SSL::SSLError, "hostname not match" + end + + # Default callback for verification: only dumps error. + def default_verify_callback(is_ok, ctx) + if $DEBUG + puts "#{ is_ok ? 'ok' : 'ng' }: #{ctx.current_cert.subject}" + end + if !is_ok + depth = ctx.error_depth + code = ctx.error + msg = ctx.error_string + STDERR.puts "at depth #{depth} - #{code}: #{msg}" + end + is_ok + end + + # Sample callback method: CAUTION: does not check CRL/ARL. + def sample_verify_callback(is_ok, ctx) + unless is_ok + depth = ctx.error_depth + code = ctx.error + msg = ctx.error_string + STDERR.puts "at depth #{depth} - #{code}: #{msg}" if $DEBUG + return false + end + + cert = ctx.current_cert + self_signed = false + ca = false + pathlen = nil + server_auth = true + self_signed = (cert.subject.cmp(cert.issuer) == 0) + + # Check extensions whatever its criticality is. (sample) + cert.extensions.each do |ex| + case ex.oid + when 'basicConstraints' + /CA:(TRUE|FALSE), pathlen:(\d+)/ =~ ex.value + ca = ($1 == 'TRUE') + pathlen = $2.to_i + when 'keyUsage' + usage = ex.value.split(/\s*,\s*/) + ca = usage.include?('Certificate Sign') + server_auth = usage.include?('Key Encipherment') + when 'extendedKeyUsage' + usage = ex.value.split(/\s*,\s*/) + server_auth = usage.include?('Netscape Server Gated Crypto') + when 'nsCertType' + usage = ex.value.split(/\s*,\s*/) + ca = usage.include?('SSL CA') + server_auth = usage.include?('SSL Server') + end + end + + if self_signed + STDERR.puts 'self signing CA' if $DEBUG + return true + elsif ca + STDERR.puts 'middle level CA' if $DEBUG + return true + elsif server_auth + STDERR.puts 'for server authentication' if $DEBUG + return true + end + + return false + end + +private + + def change_notify + @client.reset_all + end +end + + +# HTTPAccess2::BasicAuth -- BasicAuth repository. +# +class BasicAuth # :nodoc: + def initialize(client) + @client = client + @auth = {} + end + + def set(uri, user_id, passwd) + uri = uri.clone + uri.path = uri.path.sub(/\/[^\/]*$/, '/') + @auth[uri] = ["#{user_id}:#{passwd}"].pack('m').strip + @client.reset_all + end + + def get(uri) + @auth.each do |realm_uri, cred| + if ((realm_uri.host == uri.host) and + (realm_uri.scheme == uri.scheme) and + (realm_uri.port == uri.port) and + uri.path.upcase.index(realm_uri.path.upcase) == 0) + return cred + end + end + nil + end +end + + +# HTTPAccess2::Site -- manage a site(host and port) +# +class Site # :nodoc: + attr_accessor :scheme + attr_accessor :host + attr_reader :port + + def initialize(uri = nil) + if uri + @scheme = uri.scheme + @host = uri.host + @port = uri.port.to_i + else + @scheme = 'tcp' + @host = '0.0.0.0' + @port = 0 + end + end + + def addr + "#{@scheme}://#{@host}:#{@port.to_s}" + end + + def port=(port) + @port = port.to_i + end + + def ==(rhs) + if rhs.is_a?(Site) + ((@scheme == rhs.scheme) and (@host == rhs.host) and (@port == rhs.port)) + else + false + end + end + + def to_s + addr + end + + def inspect + sprintf("#<%s:0x%x %s>", self.class.name, __id__, addr) + end +end + + +# HTTPAccess2::Connection -- magage a connection(one request and response to it). +# +class Connection # :nodoc: + attr_accessor :async_thread + + def initialize(header_queue = [], body_queue = []) + @headers = header_queue + @body = body_queue + @async_thread = nil + @queue = Queue.new + end + + def finished? + if !@async_thread + # Not in async mode. + true + elsif @async_thread.alive? + # Working... + false + else + # Async thread have been finished. + @async_thread.join + true + end + end + + def pop + @queue.pop + end + + def push(result) + @queue.push(result) + end + + def join + unless @async_thread + false + else + @async_thread.join + end + end +end + + +# HTTPAccess2::SessionManager -- manage several sessions. +# +class SessionManager # :nodoc: + attr_accessor :agent_name # Name of this client. + attr_accessor :from # Owner of this client. + + attr_accessor :protocol_version # Requested protocol version + attr_accessor :chunk_size # Chunk size for chunked request + attr_accessor :debug_dev # Device for dumping log for debugging + attr_accessor :socket_sync # Boolean value for Socket#sync + + # These parameters are not used now... + attr_accessor :connect_timeout + attr_accessor :connect_retry # Maximum retry count. 0 for infinite. + attr_accessor :send_timeout + attr_accessor :receive_timeout + attr_accessor :read_block_size + + attr_accessor :ssl_config + + def initialize + @proxy = nil + + @agent_name = nil + @from = nil + + @protocol_version = nil + @debug_dev = nil + @socket_sync = true + @chunk_size = 4096 + + @connect_timeout = 60 + @connect_retry = 1 + @send_timeout = 120 + @receive_timeout = 60 # For each read_block_size bytes + @read_block_size = 8192 + + @ssl_config = nil + + @sess_pool = [] + @sess_pool_mutex = Mutex.new + end + + def proxy=(proxy) + if proxy.nil? + @proxy = nil + else + @proxy = Site.new(proxy) + end + end + + def query(req, proxy) + req.body.chunk_size = @chunk_size + dest_site = Site.new(req.header.request_uri) + proxy_site = if proxy + Site.new(proxy) + else + @proxy + end + sess = open(dest_site, proxy_site) + begin + sess.query(req) + rescue + sess.close + raise + end + sess + end + + def reset(uri) + unless uri.is_a?(URI) + uri = URI.parse(uri.to_s) + end + site = Site.new(uri) + close(site) + end + + def reset_all + close_all + end + + def keep(sess) + add_cached_session(sess) + end + +private + + def open(dest, proxy = nil) + sess = nil + if cached = get_cached_session(dest) + sess = cached + else + sess = Session.new(dest, @agent_name, @from) + sess.proxy = proxy + sess.socket_sync = @socket_sync + sess.requested_version = @protocol_version if @protocol_version + sess.connect_timeout = @connect_timeout + sess.connect_retry = @connect_retry + sess.send_timeout = @send_timeout + sess.receive_timeout = @receive_timeout + sess.read_block_size = @read_block_size + sess.ssl_config = @ssl_config + sess.debug_dev = @debug_dev + end + sess + end + + def close_all + each_sess do |sess| + sess.close + end + @sess_pool.clear + end + + def close(dest) + if cached = get_cached_session(dest) + cached.close + true + else + false + end + end + + def get_cached_session(dest) + cached = nil + @sess_pool_mutex.synchronize do + new_pool = [] + @sess_pool.each do |s| + if s.dest == dest + cached = s + else + new_pool << s + end + end + @sess_pool = new_pool + end + cached + end + + def add_cached_session(sess) + @sess_pool_mutex.synchronize do + @sess_pool << sess + end + end + + def each_sess + @sess_pool_mutex.synchronize do + @sess_pool.each do |sess| + yield(sess) + end + end + end +end + + +# HTTPAccess2::SSLSocketWrap +# +class SSLSocketWrap + def initialize(socket, context, debug_dev = nil) + unless SSLEnabled + raise RuntimeError.new( + "Ruby/OpenSSL module is required for https access.") + end + @context = context + @socket = socket + @ssl_socket = create_ssl_socket(@socket) + @debug_dev = debug_dev + end + + def ssl_connect + @ssl_socket.connect + end + + def post_connection_check(host) + verify_mode = @context.verify_mode || OpenSSL::SSL::VERIFY_NONE + if verify_mode == OpenSSL::SSL::VERIFY_NONE + return + elsif @ssl_socket.peer_cert.nil? and + check_mask(verify_mode, OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT) + raise OpenSSL::SSL::SSLError, "no peer cert" + end + hostname = host.host + if @ssl_socket.respond_to?(:post_connection_check) + @ssl_socket.post_connection_check(hostname) + end + @context.post_connection_check(@ssl_socket.peer_cert, hostname) + end + + def peer_cert + @ssl_socket.peer_cert + end + + def addr + @socket.addr + end + + def close + @ssl_socket.close + @socket.close + end + + def closed? + @socket.closed? + end + + def eof? + @ssl_socket.eof? + end + + def gets(*args) + str = @ssl_socket.gets(*args) + @debug_dev << str if @debug_dev + str + end + + def read(*args) + str = @ssl_socket.read(*args) + @debug_dev << str if @debug_dev + str + end + + def <<(str) + rv = @ssl_socket.write(str) + @debug_dev << str if @debug_dev + rv + end + + def flush + @ssl_socket.flush + end + + def sync + @ssl_socket.sync + end + + def sync=(sync) + @ssl_socket.sync = sync + end + +private + + def check_mask(value, mask) + value & mask == mask + end + + def create_ssl_socket(socket) + ssl_socket = nil + if OpenSSL::SSL.const_defined?("SSLContext") + ctx = OpenSSL::SSL::SSLContext.new + @context.set_context(ctx) + ssl_socket = OpenSSL::SSL::SSLSocket.new(socket, ctx) + else + ssl_socket = OpenSSL::SSL::SSLSocket.new(socket) + @context.set_context(ssl_socket) + end + ssl_socket + end +end + + +# HTTPAccess2::DebugSocket -- debugging support +# +class DebugSocket < TCPSocket + attr_accessor :debug_dev # Device for logging. + + class << self + def create_socket(host, port, debug_dev) + debug_dev << "! CONNECT TO #{host}:#{port}\n" + socket = new(host, port) + socket.debug_dev = debug_dev + socket.log_connect + socket + end + + private :new + end + + def initialize(*args) + super + @debug_dev = nil + end + + def log_connect + @debug_dev << '! CONNECTION ESTABLISHED' << "\n" + end + + def close + super + @debug_dev << '! CONNECTION CLOSED' << "\n" + end + + def gets(*args) + str = super + @debug_dev << str if str + str + end + + def read(*args) + str = super + @debug_dev << str if str + str + end + + def <<(str) + super + @debug_dev << str + end +end + + +# HTTPAccess2::Session -- manage http session with one site. +# One or more TCP sessions with the site may be created. +# Only 1 TCP session is live at the same time. +# +class Session # :nodoc: + + class Error < StandardError # :nodoc: + end + + class InvalidState < Error # :nodoc: + end + + class BadResponse < Error # :nodoc: + end + + class KeepAliveDisconnected < Error # :nodoc: + end + + attr_reader :dest # Destination site + attr_reader :src # Source site + attr_accessor :proxy # Proxy site + attr_accessor :socket_sync # Boolean value for Socket#sync + + attr_accessor :requested_version # Requested protocol version + + attr_accessor :debug_dev # Device for dumping log for debugging + + # These session parameters are not used now... + attr_accessor :connect_timeout + attr_accessor :connect_retry + attr_accessor :send_timeout + attr_accessor :receive_timeout + attr_accessor :read_block_size + + attr_accessor :ssl_config + + def initialize(dest, user_agent, from) + @dest = dest + @src = Site.new + @proxy = nil + @socket_sync = true + @requested_version = nil + + @debug_dev = nil + + @connect_timeout = nil + @connect_retry = 1 + @send_timeout = nil + @receive_timeout = nil + @read_block_size = nil + + @ssl_config = nil + + @user_agent = user_agent + @from = from + @state = :INIT + + @requests = [] + + @status = nil + @reason = nil + @headers = [] + + @socket = nil + end + + # Send a request to the server + def query(req) + connect() if @state == :INIT + begin + timeout(@send_timeout) do + set_header(req) + req.dump(@socket) + # flush the IO stream as IO::sync mode is false + @socket.flush unless @socket_sync + end + rescue Errno::ECONNABORTED + close + raise KeepAliveDisconnected.new + rescue + if SSLEnabled and $!.is_a?(OpenSSL::SSL::SSLError) + raise KeepAliveDisconnected.new + elsif $!.is_a?(TimeoutError) + close + raise + else + raise + end + end + + @state = :META if @state == :WAIT + @next_connection = nil + @requests.push(req) + end + + def close + unless @socket.nil? + @socket.flush + @socket.close unless @socket.closed? + end + @state = :INIT + end + + def closed? + @state == :INIT + end + + def get_status + version = status = reason = nil + begin + if @state != :META + raise RuntimeError.new("get_status must be called at the beginning of a session.") + end + version, status, reason = read_header() + rescue + close + raise + end + return version, status, reason + end + + def get_header(&block) + begin + read_header() if @state == :META + rescue + close + raise + end + if block + @headers.each do |line| + block.call(line) + end + else + @headers + end + end + + def eof? + if @content_length == 0 + true + elsif @readbuf.length > 0 + false + else + @socket.closed? or @socket.eof? + end + end + + def get_data(&block) + begin + read_header() if @state == :META + return nil if @state != :DATA + unless @state == :DATA + raise InvalidState.new('state != DATA') + end + data = nil + if block + until eof? + begin + timeout(@receive_timeout) do + data = read_body() + end + rescue TimeoutError + raise + end + block.call(data) if data + end + data = nil # Calling with block returns nil. + else + begin + timeout(@receive_timeout) do + data = read_body() + end + rescue TimeoutError + raise + end + end + rescue + close + raise + end + if eof? + if @next_connection + @state = :WAIT + else + close + end + end + data + end + +private + + LibNames = "(#{RCS_FILE}/#{RCS_REVISION}, #{RUBY_VERSION_STRING})" + + def set_header(req) + req.version = @requested_version if @requested_version + if @user_agent + req.header.set('User-Agent', "#{@user_agent} #{LibNames}") + end + if @from + req.header.set('From', @from) + end + req.header.set('Date', Time.now) + end + + # Connect to the server + def connect + site = @proxy || @dest + begin + retry_number = 0 + timeout(@connect_timeout) do + @socket = create_socket(site) + begin + @src.host = @socket.addr[3] + @src.port = @socket.addr[1] + rescue SocketError + # to avoid IPSocket#addr problem on Mac OS X 10.3 + ruby-1.8.1. + # cf. [ruby-talk:84909], [ruby-talk:95827] + end + if @dest.scheme == 'https' + @socket = create_ssl_socket(@socket) + connect_ssl_proxy(@socket) if @proxy + @socket.ssl_connect + @socket.post_connection_check(@dest) + end + # Use Ruby internal buffering instead of passing data immediatly + # to the underlying layer + # => we need to to call explicitely flush on the socket + @socket.sync = @socket_sync + end + rescue TimeoutError + if @connect_retry == 0 + retry + else + retry_number += 1 + retry if retry_number < @connect_retry + end + close + raise + end + + @state = :WAIT + @readbuf = '' + end + + def create_socket(site) + begin + if @debug_dev + DebugSocket.create_socket(site.host, site.port, @debug_dev) + else + TCPSocket.new(site.host, site.port) + end + rescue SystemCallError => e + e.message << " (#{site.host}, ##{site.port})" + raise + end + end + + # wrap socket with OpenSSL. + def create_ssl_socket(raw_socket) + SSLSocketWrap.new(raw_socket, @ssl_config, (DEBUG_SSL ? @debug_dev : nil)) + end + + def connect_ssl_proxy(socket) + socket << sprintf("CONNECT %s:%s HTTP/1.1\r\n\r\n", @dest.host, @dest.port) + parse_header(socket) + unless @status == 200 + raise BadResponse.new( + "connect to ssl proxy failed with status #{@status} #{@reason}") + end + end + + # Read status block. + def read_header + if @state == :DATA + get_data {} + check_state() + end + unless @state == :META + raise InvalidState, 'state != :META' + end + parse_header(@socket) + @content_length = nil + @chunked = false + @headers.each do |line| + case line + when /^Content-Length:\s+(\d+)/i + @content_length = $1.to_i + when /^Transfer-Encoding:\s+chunked/i + @chunked = true + @content_length = true # how? + @chunk_length = 0 + when /^Connection:\s+([\-\w]+)/i, /^Proxy-Connection:\s+([\-\w]+)/i + case $1 + when /^Keep-Alive$/i + @next_connection = true + when /^close$/i + @next_connection = false + end + else + # Nothing to parse. + end + end + + # Head of the request has been parsed. + @state = :DATA + req = @requests.shift + + if req.header.request_method == 'HEAD' + @content_length = 0 + if @next_connection + @state = :WAIT + else + close + end + end + @next_connection = false unless @content_length + return [@version, @status, @reason] + end + + StatusParseRegexp = %r(\AHTTP/(\d+\.\d+)\s+(\d+)(?:\s+(.*))?\r?\n\z) + def parse_header(socket) + begin + timeout(@receive_timeout) do + begin + initial_line = socket.gets("\n") + if initial_line.nil? + raise KeepAliveDisconnected.new + end + if StatusParseRegexp =~ initial_line + @version, @status, @reason = $1, $2.to_i, $3 + @next_connection = HTTP.keep_alive_enabled?(@version) + else + @version = '0.9' + @status = nil + @reason = nil + @next_connection = false + @readbuf = initial_line + break + end + @headers = [] + while true + line = socket.gets("\n") + unless line + raise BadResponse.new('Unexpected EOF.') + end + line.sub!(/\r?\n\z/, '') + break if line.empty? + if line.sub!(/^\t/, '') + @headers[-1] << line + else + @headers.push(line) + end + end + end while (@version == '1.1' && @status == 100) + end + rescue TimeoutError + raise + end + end + + def read_body + if @chunked + return read_body_chunked() + elsif @content_length == 0 + return nil + elsif @content_length + return read_body_length() + else + if @readbuf.length > 0 + data = @readbuf + @readbuf = '' + return data + else + data = @socket.read(@read_block_size) + data = nil if data.empty? # Absorbing interface mismatch. + return data + end + end + end + + def read_body_length + maxbytes = @read_block_size + if @readbuf.length > 0 + data = @readbuf[0, @content_length] + @readbuf[0, @content_length] = '' + @content_length -= data.length + return data + end + maxbytes = @content_length if maxbytes > @content_length + data = @socket.read(maxbytes) + if data + @content_length -= data.length + else + @content_length = 0 + end + return data + end + + RS = "\r\n" + ChunkDelimiter = "0#{RS}" + ChunkTrailer = "0#{RS}#{RS}" + def read_body_chunked + if @chunk_length == 0 + until (i = @readbuf.index(RS)) + @readbuf << @socket.gets(RS) + end + i += 2 + if @readbuf[0, i] == ChunkDelimiter + @content_length = 0 + unless @readbuf[0, 5] == ChunkTrailer + @readbuf << @socket.gets(RS) + end + @readbuf[0, 5] = '' + return nil + end + @chunk_length = @readbuf[0, i].hex + @readbuf[0, i] = '' + end + while @readbuf.length < @chunk_length + 2 + @readbuf << @socket.read(@chunk_length + 2 - @readbuf.length) + end + data = @readbuf[0, @chunk_length] + @readbuf[0, @chunk_length + 2] = '' + @chunk_length = 0 + return data + end + + def check_state + if @state == :DATA + if eof? + if @next_connection + if @requests.empty? + @state = :WAIT + else + @state = :META + end + end + end + end + end +end + + +end + + +HTTPClient = HTTPAccess2::Client diff --git a/lib/http-access2/cookie.rb b/lib/http-access2/cookie.rb new file mode 100644 index 0000000..664aef6 --- /dev/null +++ b/lib/http-access2/cookie.rb @@ -0,0 +1,538 @@ +# cookie.rb is redistributed file which is originally included in Webagent +# version 0.6.2 by TAKAHASHI `Maki' Masayoshi. And it contains some bug fixes. +# You can download the entire package of Webagent from +# http://www.rubycolor.org/arc/. + + +# Cookie class +# +# I refered to w3m's source to make these classes. Some comments +# are quoted from it. I'm thanksful for author(s) of it. +# +# w3m homepage: http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/eng/ + +require 'uri' + +class WebAgent + + module CookieUtils + + def head_match?(str1, str2) + str1 == str2[0, str1.length] + end + + def tail_match?(str1, str2) + if str1.length > 0 + str1 == str2[-str1.length..-1].to_s + else + true + end + end + + def domain_match(host, domain) + case domain + when /\d+\.\d+\.\d+\.\d+/ + return (host == domain) + when '.' + return true + when /^\./ + return tail_match?(domain, host) + else + return (host == domain) + end + end + + def total_dot_num(string) + string.scan(/\./).length() + end + + end + + class Cookie + include CookieUtils + + require 'parsedate' + include ParseDate + + attr_accessor :name, :value + attr_accessor :domain, :path + attr_accessor :expires ## for Netscape Cookie + attr_accessor :url + attr_writer :use, :secure, :discard, :domain_orig, :path_orig, :override + + USE = 1 + SECURE = 2 + DOMAIN = 4 + PATH = 8 + DISCARD = 16 + OVERRIDE = 32 + OVERRIDE_OK = 32 + + def initialize() + @discard = @use = @secure = @domain_orig = @path_orig = @override = nil + end + + def discard? + @discard + end + + def use? + @use + end + + def secure? + @secure + end + + def domain_orig? + @domain_orig + end + + def path_orig? + @path_orig + end + + def override? + @override + end + + def flag + flg = 0 + flg += USE if @use + flg += SECURE if @secure + flg += DOMAIN if @domain_orig + flg += PATH if @path_orig + flg += DISCARD if @discard + flg += OVERRIDE if @override + flg + end + + def set_flag(flag) + flag = flag.to_i + @use = true if flag & USE > 0 + @secure = true if flag & SECURE > 0 + @domain_orig = true if flag & DOMAIN > 0 + @path_orig = true if flag & PATH > 0 + @discard = true if flag & DISCARD > 0 + @override = true if flag & OVERRIDE > 0 + end + + def match?(url) + domainname = url.host + if (!domainname || + !domain_match(domainname, @domain) || + (@path && !head_match?(@path, url.path)) || + (@secure && (url.scheme != 'https')) ) + return false + else + return true + end + end + + def join_quotedstr(array, sep) + ret = Array.new() + old_elem = nil + array.each{|elem| + if (elem.scan(/"/).length % 2) == 0 + if old_elem + old_elem << sep << elem + else + ret << elem + old_elem = nil + end + else + if old_elem + old_elem << sep << elem + ret << old_elem + old_elem = nil + else + old_elem = elem.dup + end + end + } + ret + end + + def parse(str, url) + @url = url + cookie_elem = str.split(/;/) + cookie_elem = join_quotedstr(cookie_elem, ';') + first_elem = cookie_elem.shift + if first_elem !~ /([^=]*)(\=(.*))?/ + return + ## raise ArgumentError 'invalid cookie value' + end + @name = $1.strip + @value = $3 + if @value + if @value =~ /^\s*"(.*)"\s*$/ + @value = $1 + else + @value.dup.strip! + end + end + cookie_elem.each{|pair| + key, value = pair.split(/=/) ## value may nil + key.strip! + if value + value = value.strip.sub(/\A"(.*)"\z/) { $1 } + end + case key.downcase + when 'domain' + @domain = value + when 'expires' + begin + @expires = Time.gm(*parsedate(value)[0,6]) + rescue ArgumentError + @expires = nil + end + when 'path' + @path = value + when 'secure' + @secure = true ## value may nil, but must 'true'. + else + ## ignore + end + } + end + + end + + class CookieManager + include CookieUtils + + ### errors + class Error < StandardError; end + class ErrorOverrideOK < Error; end + class SpecialError < Error; end + class NoDotError < ErrorOverrideOK; end + + SPECIAL_DOMAIN = [".com",".edu",".gov",".mil",".net",".org",".int"] + + attr_accessor :cookies + attr_accessor :cookies_file + attr_accessor :accept_domains, :reject_domains + attr_accessor :netscape_rule + + def initialize(file=nil) + @cookies = Array.new() + @cookies_file = file + @is_saved = true + @reject_domains = Array.new() + @accept_domains = Array.new() + # for conformance to http://wp.netscape.com/newsref/std/cookie_spec.html + @netscape_rule = false + end + + def save_all_cookies(force = nil, save_unused = true, save_discarded = true) + if @is_saved and !force + return + end + File.open(@cookies_file, 'w') do |f| + @cookies.each do |cookie| + if (cookie.use? or save_unused) and + (!cookie.discard? or save_discarded) + f.print(cookie.url.to_s,"\t", + cookie.name,"\t", + cookie.value,"\t", + cookie.expires.to_i,"\t", + cookie.domain,"\t", + cookie.path,"\t", + cookie.flag,"\n") + end + end + end + end + + def save_cookies(force = nil) + save_all_cookies(force, false, false) + end + + def check_expired_cookies() + @cookies.reject!{|cookie| + is_expired = (cookie.expires && (cookie.expires < Time.now.gmtime)) + if is_expired && !cookie.discard? + @is_saved = false + end + is_expired + } + end + + def parse(str, url) + cookie = WebAgent::Cookie.new() + cookie.parse(str, url) + add(cookie) + end + + def make_cookie_str(cookie_list) + if cookie_list.empty? + return nil + end + + ret = '' + c = cookie_list.shift + ret += "#{c.name}=#{c.value}" + cookie_list.each{|cookie| + ret += "; #{cookie.name}=#{cookie.value}" + } + return ret + end + private :make_cookie_str + + + def find(url) + + check_expired_cookies() + + cookie_list = Array.new() + + @cookies.each{|cookie| + if cookie.use? && cookie.match?(url) + if cookie_list.select{|c1| c1.name == cookie.name}.empty? + cookie_list << cookie + end + end + } + return make_cookie_str(cookie_list) + end + + def find_cookie_info(domain, path, name) + @cookies.find{|c| + c.domain == domain && c.path == path && c.name == name + } + end + private :find_cookie_info + + def cookie_error(err, override) + if err.kind_of?(ErrorOverrideOK) || !override + raise err + end + end + private :cookie_error + + def add(cookie) + url = cookie.url + name, value = cookie.name, cookie.value + expires, domain, path = + cookie.expires, cookie.domain, cookie.path + secure, domain_orig, path_orig = + cookie.secure?, cookie.domain_orig?, cookie.path_orig? + discard, override = + cookie.discard?, cookie.override? + + domainname = url.host + domain_orig, path_orig = domain, path + use_security = override + + if !domainname + cookie_error(NodotError.new(), override) + end + + if domain + + # [DRAFT 12] s. 4.2.2 (does not apply in the case that + # host name is the same as domain attribute for version 0 + # cookie) + # I think that this rule has almost the same effect as the + # tail match of [NETSCAPE]. + if domain !~ /^\./ && domainname != domain + domain = '.'+domain + end + + n = total_dot_num(domain) + if n < 2 + cookie_error(SpecialError.new(), override) + elsif @netscape_rule and n == 2 + ## [NETSCAPE] rule + ok = SPECIAL_DOMAIN.select{|sdomain| + sdomain == domain[-(sdomain.length)..-1] + } + if ok.empty? + cookie_error(SpecialError.new(), override) + end + end + + end + + path ||= url.path.sub!(%r|/[^/]*|, '') + domain ||= domainname + cookie = find_cookie_info(domain, path, name) + + if !cookie + cookie = WebAgent::Cookie.new() + cookie.use = true + @cookies << cookie + end + + cookie.url = url + cookie.name = name + cookie.value = value + cookie.expires = expires + cookie.domain = domain + cookie.path = path + + ## for flag + cookie.secure = secure + cookie.domain_orig = domain_orig + cookie.path_orig = path_orig + if discard || cookie.expires == nil + cookie.discard = true + else + cookie.discard = false + @is_saved = false + end + + check_expired_cookies() + return false + end + + def load_cookies() + return if !File.readable?(@cookies_file) + File.open(@cookies_file,'r'){|f| + while line = f.gets + cookie = WebAgent::Cookie.new() + @cookies << cookie + col = line.chomp.split(/\t/) + cookie.url = URI.parse(col[0]) + cookie.name = col[1] + cookie.value = col[2] + cookie.expires = Time.at(col[3].to_i) + cookie.domain = col[4] + cookie.path = col[5] + cookie.set_flag(col[6]) + end + } + end + + def check_cookie_accept_domain(domain) + unless domain + return false + end + @accept_domains.each{|dom| + if domain_match(domain, dom) + return true + end + } + @reject_domains.each{|dom| + if domain_match(domain, dom) + return false + end + } + return true + end + end +end + +__END__ + +=begin + +== WebAgent::CookieManager Class + +Load, save, parse and send cookies. + +=== Usage + + ## initialize + cm = WebAgent::CookieManager.new("/home/foo/bar/cookie") + + ## load cookie data + cm.load_cookies() + + ## parse cookie from string (maybe "Set-Cookie:" header) + cm.parse(str) + + ## send cookie data to url + f.write(cm.find(url)) + + ## save cookie to cookiefile + cm.save_cookies() + + +=== Class Methods + + -- CookieManager::new(file=nil) + + create new CookieManager. If a file is provided, + use it as cookies' file. + +=== Methods + + -- CookieManager#save_cookies(force = nil) + + save cookies' data into file. if argument is true, + save data although data is not modified. + + -- CookieManager#parse(str, url) + + parse string and store cookie (to parse HTTP response header). + + -- CookieManager#find(url) + + get cookies and make into string (to send as HTTP request header). + + -- CookieManager#add(cookie) + + add new cookie. + + -- CookieManager#load_cookies() + + load cookies' data from file. + + +== WebAgent::CookieUtils Module + + -- CookieUtils::head_match?(str1, str2) + -- CookieUtils::tail_match?(str1, str2) + -- CookieUtils::domain_match(host, domain) + -- CookieUtils::total_dot_num(str) + + +== WebAgent::Cookie Class + +=== Class Methods + + -- Cookie::new() + + create new cookie. + +=== Methods + + -- Cookie#match?(url) + + match cookie by url. if match, return true. otherwise, + return false. + + -- Cookie#name + -- Cookie#name=(name) + -- Cookie#value + -- Cookie#value=(value) + -- Cookie#domain + -- Cookie#domain=(domain) + -- Cookie#path + -- Cookie#path=(path) + -- Cookie#expires + -- Cookie#expires=(expires) + -- Cookie#url + -- Cookie#url=(url) + + accessor methods for cookie's items. + + -- Cookie#discard? + -- Cookie#discard=(discard) + -- Cookie#use? + -- Cookie#use=(use) + -- Cookie#secure? + -- Cookie#secure=(secure) + -- Cookie#domain_orig? + -- Cookie#domain_orig=(domain_orig) + -- Cookie#path_orig? + -- Cookie#path_orig=(path_orig) + -- Cookie#override? + -- Cookie#override=(override) + -- Cookie#flag + -- Cookie#set_flag(flag_num) + + accessor methods for flags. + +=end diff --git a/lib/http-access2/http.rb b/lib/http-access2/http.rb new file mode 100644 index 0000000..c33c4f7 --- /dev/null +++ b/lib/http-access2/http.rb @@ -0,0 +1,542 @@ +# HTTP - HTTP container. +# Copyright (C) 2001, 2002, 2003, 2005 NAKAMURA, Hiroshi. +# +# This module is copyrighted free software by NAKAMURA, Hiroshi. +# You can redistribute it and/or modify it under the same term as Ruby. + +require 'uri' +require 'time' + +module HTTP + + +module Status + OK = 200 + MOVED_PERMANENTLY = 301 + FOUND = 302 + SEE_OTHER = 303 + TEMPORARY_REDIRECT = MOVED_TEMPORARILY = 307 + BAD_REQUEST = 400 + INTERNAL = 500 + + def self.redirect?(status) + [ + MOVED_PERMANENTLY, FOUND, SEE_OTHER, + TEMPORARY_REDIRECT, MOVED_TEMPORARILY + ].include?(status) + end +end + + +class Error < StandardError; end +class BadResponseError < Error; end + + class << self + def http_date(a_time) + a_time.gmtime.strftime("%a, %d %b %Y %H:%M:%S GMT") + end + + ProtocolVersionRegexp = Regexp.new('^(?:HTTP/|)(\d+)\.(\d+)$') + def keep_alive_enabled?(version) + ProtocolVersionRegexp =~ version + if !($1 and $2) + false + elsif $1.to_i > 1 + true + elsif $1.to_i == 1 and $2.to_i >= 1 + true + else + false + end + end + end + + +# HTTP::Message -- HTTP message. +# +# DESCRIPTION +# A class that describes 1 HTTP request / response message. +# +class Message + CRLF = "\r\n" + + # HTTP::Message::Headers -- HTTP message header. + # + # DESCRIPTION + # A class that describes header part of HTTP message. + # + class Headers + # HTTP version string in a HTTP header. + attr_accessor :http_version + # Content-type. + attr_accessor :body_type + # Charset. + attr_accessor :body_charset + # Size of body. + attr_reader :body_size + # A milestone of body. + attr_accessor :body_date + # Chunked or not. + attr_reader :chunked + # Request method. + attr_reader :request_method + # Requested URI. + attr_reader :request_uri + # HTTP status reason phrase. + attr_accessor :reason_phrase + + StatusCodeMap = { + Status::OK => 'OK', + Status::MOVED_PERMANENTLY => 'Moved Permanently', + Status::FOUND => 'Found', + Status::SEE_OTHER => 'See Other', + Status::TEMPORARY_REDIRECT => 'Temporary Redirect', + Status::MOVED_TEMPORARILY => 'Temporary Redirect', + Status::BAD_REQUEST => 'Bad Request', + Status::INTERNAL => 'Internal Server Error', + } + + CharsetMap = { + 'NONE' => 'us-ascii', + 'EUC' => 'euc-jp', + 'SJIS' => 'shift_jis', + 'UTF8' => 'utf-8', + } + + # SYNOPSIS + # HTTP::Message.new + # + # ARGS + # N/A + # + # DESCRIPTION + # Create a instance of HTTP request or HTTP response. Specify + # status_code for HTTP response. + # + def initialize + @is_request = nil # true, false and nil + @http_version = 'HTTP/1.1' + @body_type = nil + @body_charset = nil + @body_size = nil + @body_date = nil + @header_item = [] + @chunked = false + @response_status_code = nil + @reason_phrase = nil + @request_method = nil + @request_uri = nil + @request_query = nil + @request_via_proxy = nil + end + + def init_request(method, uri, query = nil, via_proxy = nil) + @is_request = true + @request_method = method + @request_uri = if uri.is_a?(URI) + uri + else + URI.parse(uri.to_s) + end + @request_query = create_query_uri(@request_uri, query) + @request_via_proxy = via_proxy + end + + def init_response(status_code) + @is_request = false + self.response_status_code = status_code + end + + attr_accessor :request_via_proxy + + attr_reader :response_status_code + def response_status_code=(status_code) + @response_status_code = status_code + @reason_phrase = StatusCodeMap[@response_status_code] + end + + def contenttype + self['content-type'][0] + end + + def contenttype=(contenttype) + self['content-type'] = contenttype + end + + # body_size == nil means that the body is_a? IO + def body_size=(body_size) + @body_size = body_size + if @body_size + @chunked = false + else + @chunked = true + end + end + + def dump(dev = '') + set_header + if @is_request + dev << request_line + else + dev << response_status_line + end + dev << @header_item.collect { |key, value| + dump_line("#{ key }: #{ value }") + }.join + dev + end + + def set(key, value) + @header_item.push([key, value]) + end + + def get(key = nil) + if !key + @header_item + else + @header_item.find_all { |pair| pair[0].upcase == key.upcase } + end + end + + def []=(key, value) + set(key, value) + end + + def [](key) + get(key).collect { |item| item[1] } + end + + private + + def request_line + path = if @request_via_proxy + if @request_uri.port + "#{ @request_uri.scheme }://#{ @request_uri.host }:#{ @request_uri.port }#{ @request_query }" + else + "#{ @request_uri.scheme }://#{ @request_uri.host }#{ @request_query }" + end + else + @request_query + end + dump_line("#{ @request_method } #{ path } #{ @http_version }") + end + + def response_status_line + if defined?(Apache) + dump_line("#{ @http_version } #{ response_status_code } #{ @reason_phrase }") + else + dump_line("Status: #{ response_status_code } #{ @reason_phrase }") + end + end + + def set_header + if defined?(Apache) + set('Date', HTTP.http_date(Time.now)) + end + + keep_alive = HTTP.keep_alive_enabled?(@http_version) + set('Connection', 'close') unless keep_alive + + if @chunked + set('Transfer-Encoding', 'chunked') + else + if keep_alive or @body_size != 0 + set('Content-Length', @body_size.to_s) + end + end + + if @body_date + set('Last-Modified', HTTP.http_date(@body_date)) + end + + if @is_request == true + if @http_version >= 'HTTP/1.1' + if @request_uri.port == @request_uri.default_port + set('Host', "#{@request_uri.host}") + else + set('Host', "#{@request_uri.host}:#{@request_uri.port}") + end + end + elsif @is_request == false + set('Content-Type', "#{ @body_type || 'text/html' }; charset=#{ CharsetMap[@body_charset || $KCODE] }") + end + end + + def dump_line(str) + str + CRLF + end + + def create_query_uri(uri, query) + path = uri.path.dup + path = '/' if path.empty? + query_str = nil + if uri.query + query_str = uri.query + end + if query + if query_str + query_str << '&' << Message.create_query_part_str(query) + else + query_str = Message.create_query_part_str(query) + end + end + if query_str + path << '?' << query_str + end + path + end + end + + class Body + attr_accessor :type, :charset, :date, :chunk_size + + def initialize(body = nil, date = nil, type = nil, charset = nil, + boundary = nil) + @body = nil + @boundary = boundary + set_content(body || '', boundary) + @type = type + @charset = charset + @date = date + @chunk_size = 4096 + end + + def size + if @body.respond_to?(:read) + nil + else + @body.size + end + end + + def dump(dev = '') + if @body.respond_to?(:read) + begin + while true + chunk = @body.read(@chunk_size) + break if chunk.nil? + dev << dump_chunk(chunk) + end + rescue EOFError + end + dev << (dump_last_chunk + CRLF) + else + dev << @body + end + dev + end + + def content + @body + end + + def set_content(body, boundary = nil) + if body.respond_to?(:read) + @body = body + elsif boundary + @body = Message.create_query_multipart_str(body, boundary) + else + @body = Message.create_query_part_str(body) + end + end + + private + + def dump_chunk(str) + dump_chunk_size(str.size) << (str + CRLF) + end + + def dump_last_chunk + dump_chunk_size(0) + end + + def dump_chunk_size(size) + sprintf("%x", size) << CRLF + end + end + + def initialize + @body = @header = nil + end + + class << self + alias __new new + undef new + end + + def self.new_request(method, uri, query = nil, body = nil, proxy = nil, + boundary = nil) + m = self.__new + m.header = Headers.new + m.header.init_request(method, uri, query, proxy) + m.body = Body.new(body, nil, nil, nil, boundary) + m + end + + def self.new_response(body = '') + m = self.__new + m.header = Headers.new + m.header.init_response(Status::OK) + m.body = Body.new(body) + m + end + + def dump(dev = '') + sync_header + dev = header.dump(dev) + dev << CRLF + dev = body.dump(dev) if body + dev + end + + def load(str) + buf = str.dup + unless self.header.load(buf) + self.body.load(buf) + end + end + + def header + @header + end + + def header=(header) + @header = header + sync_body + end + + def content + @body.content + end + + def body + @body + end + + def body=(body) + @body = body + sync_header + end + + def status + @header.response_status_code + end + + def status=(status) + @header.response_status_code = status + end + + def version + @header.http_version + end + + def version=(version) + @header.http_version = version + end + + def reason + @header.reason_phrase + end + + def reason=(reason) + @header.reason_phrase = reason + end + + def contenttype + @header.contenttype + end + + def contenttype=(contenttype) + @header.contenttype = contenttype + end + + class << self + def create_query_part_str(query) + if multiparam_query?(query) + escape_query(query) + else + query.to_s + end + end + + def create_query_multipart_str(query, boundary) + if multiparam_query?(query) + query.collect { |attr, value| + value ||= '' + if value.is_a? File + params = { + 'filename' => value.path, + # Creation time is not available from File::Stat + # 'creation-date' => value.ctime.rfc822, + 'modification-date' => value.mtime.rfc822, + 'read-date' => value.atime.rfc822, + } + param_str = params.to_a.collect { |k, v| + "#{k}=\"#{v}\"" + }.join("; ") + "--#{boundary}\n" + + %{Content-Disposition: form-data; name="#{attr.to_s}"; #{param_str}\n} + + "Content-Type: #{mime_type(value.path)}\n\n#{value.read}\n" + else + "--#{boundary}\n" + + %{Content-Disposition: form-data; name="#{attr.to_s}"\n} + + "\n#{value.to_s}\n" + end + }.join('') + "--#{boundary}--\n" + else + query.to_s + end + end + + def multiparam_query?(query) + query.is_a?(Array) or query.is_a?(Hash) + end + + def escape_query(query) + query.collect { |attr, value| + escape(attr.to_s) << '=' << escape(value.to_s) + }.join('&') + end + + # from CGI.escape + def escape(str) + str.gsub(/([^ a-zA-Z0-9_.-]+)/n) { + '%' + $1.unpack('H2' * $1.size).join('%').upcase + }.tr(' ', '+') + end + + def mime_type(path) + case path + when /.(htm|html)$/ + 'text/html' + when /.doc$/ + 'application/msword' + else + 'text/plain' + end + end + end + +private + + def sync_header + if @header and @body + @header.body_type = @body.type + @header.body_charset = @body.charset + @header.body_size = @body.size + @header.body_date = @body.date + end + end + + def sync_body + if @header and @body + @body.type = @header.body_type + @body.charset = @header.body_charset + @body.size = @header.body_size + @body.date = @header.body_date + end + end +end + + +end diff --git a/lib/licensekey.rb b/lib/licensekey.rb new file mode 100644 index 0000000..d5a549e --- /dev/null +++ b/lib/licensekey.rb @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby +# +# Modify this file and put in your own license key generator +# + +def random_chars_of_length(len) + chars = ("A".."Z").to_a + ("0".."9").to_a + result = "" + 1.upto(len) { |i| result << chars[rand(chars.size-1)] } + return result +end + +def make_license(product_code, name, copies) + license = product_code.upcase() + '-' + random_chars_of_length(16) + return license +end + +# Simple command line test +if __FILE__ == $0 + puts make_license('tgr', 'Andy Kim', 1) +end diff --git a/lib/soap/XMLSchemaDatatypes.rb b/lib/soap/XMLSchemaDatatypes.rb new file mode 100644 index 0000000..23316ce --- /dev/null +++ b/lib/soap/XMLSchemaDatatypes.rb @@ -0,0 +1,9 @@ +# soap/XMLSchemaDatatypes.rb: SOAP4R - XML Schema Datatype implementation. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/datatypes' diff --git a/lib/soap/XMLSchemaDatatypes1999.rb b/lib/soap/XMLSchemaDatatypes1999.rb new file mode 100644 index 0000000..9ad1fc2 --- /dev/null +++ b/lib/soap/XMLSchemaDatatypes1999.rb @@ -0,0 +1,10 @@ +# soap/XMLSchemaDatatypes1999.rb: SOAP4R - XML Schema Datatype 1999 support +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/datatypes1999' +load 'soap/mapping/typeMap.rb' diff --git a/lib/soap/attachment.rb b/lib/soap/attachment.rb new file mode 100644 index 0000000..1a59b14 --- /dev/null +++ b/lib/soap/attachment.rb @@ -0,0 +1,107 @@ +# soap/attachment.rb: SOAP4R - SwA implementation. +# Copyright (C) 2002, 2003 Jamie Herre and NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/baseData' +require 'soap/mapping' + + +module SOAP + + +class SOAPAttachment < SOAPExternalReference + attr_reader :data + + def initialize(value) + super() + @data = value + end + +private + + def external_contentid + @data.contentid + end +end + + +class Attachment + attr_reader :io + attr_accessor :contenttype + + def initialize(string_or_readable = nil) + @string_or_readable = string_or_readable + @contenttype = "application/octet-stream" + @contentid = nil + end + + def contentid + @contentid ||= Attachment.contentid(self) + end + + def contentid=(contentid) + @contentid = contentid + end + + def mime_contentid + '<' + contentid + '>' + end + + def content + if @content == nil and @string_or_readable != nil + @content = @string_or_readable.respond_to?(:read) ? + @string_or_readable.read : @string_or_readable + end + @content + end + + def to_s + content + end + + def write(out) + out.write(content) + end + + def save(filename) + File.open(filename, "wb") do |f| + write(f) + end + end + + def self.contentid(obj) + # this needs to be fixed + [obj.__id__.to_s, Process.pid.to_s].join('.') + end + + def self.mime_contentid(obj) + '<' + contentid(obj) + '>' + end +end + + +module Mapping + class AttachmentFactory < SOAP::Mapping::Factory + def obj2soap(soap_class, obj, info, map) + soap_obj = soap_class.new(obj) + mark_marshalled_obj(obj, soap_obj) + soap_obj + end + + def soap2obj(obj_class, node, info, map) + obj = node.data + mark_unmarshalled_obj(node, obj) + return true, obj + end + end + + DefaultRegistry.add(::SOAP::Attachment, ::SOAP::SOAPAttachment, + AttachmentFactory.new, nil) +end + + +end diff --git a/lib/soap/baseData.rb b/lib/soap/baseData.rb new file mode 100644 index 0000000..0a0c916 --- /dev/null +++ b/lib/soap/baseData.rb @@ -0,0 +1,987 @@ +# soap/baseData.rb: SOAP4R - Base type library +# Copyright (C) 2000, 2001, 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/datatypes' +require 'soap/soap' + + +module SOAP + + +### +## Mix-in module for SOAP base type classes. +# +module SOAPModuleUtils + include SOAP + +public + + def decode(elename) + d = self.new + d.elename = elename + d + end +end + + +### +## for SOAP type(base and compound) +# +module SOAPType + attr_accessor :encodingstyle + attr_accessor :elename + attr_accessor :id + attr_reader :precedents + attr_accessor :root + attr_accessor :parent + attr_accessor :position + attr_reader :extraattr + attr_accessor :definedtype + + def initialize(*arg) + super + @encodingstyle = nil + @elename = XSD::QName::EMPTY + @id = nil + @precedents = [] + @root = false + @parent = nil + @position = nil + @definedtype = nil + @extraattr = {} + end + + def inspect + if self.is_a?(XSD::NSDBase) + sprintf("#<%s:0x%x %s %s>", self.class.name, __id__, self.elename, self.type) + else + sprintf("#<%s:0x%x %s>", self.class.name, __id__, self.elename) + end + end + + def rootnode + node = self + while node = node.parent + break if SOAPEnvelope === node + end + node + end +end + + +### +## for SOAP base type +# +module SOAPBasetype + include SOAPType + include SOAP + + def initialize(*arg) + super + end +end + + +### +## for SOAP compound type +# +module SOAPCompoundtype + include SOAPType + include SOAP + + def initialize(*arg) + super + end +end + + +### +## Convenience datatypes. +# +class SOAPReference < XSD::NSDBase + include SOAPBasetype + extend SOAPModuleUtils + +public + + attr_accessor :refid + + # Override the definition in SOAPBasetype. + def initialize(obj = nil) + super() + @type = XSD::QName::EMPTY + @refid = nil + @obj = nil + __setobj__(obj) if obj + end + + def __getobj__ + @obj + end + + def __setobj__(obj) + @obj = obj + @refid = @obj.id || SOAPReference.create_refid(@obj) + @obj.id = @refid unless @obj.id + @obj.precedents << self + # Copies NSDBase information + @obj.type = @type unless @obj.type + end + + # Why don't I use delegate.rb? + # -> delegate requires target object type at initialize time. + # Why don't I use forwardable.rb? + # -> forwardable requires a list of forwarding methods. + # + # ToDo: Maybe I should use forwardable.rb and give it a methods list like + # delegate.rb... + # + def method_missing(msg_id, *params) + if @obj + @obj.send(msg_id, *params) + else + nil + end + end + + def refidstr + '#' + @refid + end + + def self.create_refid(obj) + 'id' + obj.__id__.to_s + end + + def self.decode(elename, refidstr) + if /\A#(.*)\z/ =~ refidstr + refid = $1 + elsif /\Acid:(.*)\z/ =~ refidstr + refid = $1 + else + raise ArgumentError.new("illegal refid #{refidstr}") + end + d = super(elename) + d.refid = refid + d + end +end + + +class SOAPExternalReference < XSD::NSDBase + include SOAPBasetype + extend SOAPModuleUtils + + def initialize + super() + @type = XSD::QName::EMPTY + end + + def referred + rootnode.external_content[external_contentid] = self + end + + def refidstr + 'cid:' + external_contentid + end + +private + + def external_contentid + raise NotImplementedError.new + end +end + + +class SOAPNil < XSD::XSDNil + include SOAPBasetype + extend SOAPModuleUtils +end + +# SOAPRawString is for sending raw string. In contrast to SOAPString, +# SOAP4R does not do XML encoding and does not convert its CES. The string it +# holds is embedded to XML instance directly as a 'xsd:string'. +class SOAPRawString < XSD::XSDString + include SOAPBasetype + extend SOAPModuleUtils +end + + +### +## Basic datatypes. +# +class SOAPAnySimpleType < XSD::XSDAnySimpleType + include SOAPBasetype + extend SOAPModuleUtils +end + +class SOAPString < XSD::XSDString + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, StringLiteral) +end + +class SOAPBoolean < XSD::XSDBoolean + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, BooleanLiteral) +end + +class SOAPDecimal < XSD::XSDDecimal + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, DecimalLiteral) +end + +class SOAPFloat < XSD::XSDFloat + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, FloatLiteral) +end + +class SOAPDouble < XSD::XSDDouble + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, DoubleLiteral) +end + +class SOAPDuration < XSD::XSDDuration + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, DurationLiteral) +end + +class SOAPDateTime < XSD::XSDDateTime + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, DateTimeLiteral) +end + +class SOAPTime < XSD::XSDTime + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, TimeLiteral) +end + +class SOAPDate < XSD::XSDDate + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, DateLiteral) +end + +class SOAPGYearMonth < XSD::XSDGYearMonth + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, GYearMonthLiteral) +end + +class SOAPGYear < XSD::XSDGYear + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, GYearLiteral) +end + +class SOAPGMonthDay < XSD::XSDGMonthDay + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, GMonthDayLiteral) +end + +class SOAPGDay < XSD::XSDGDay + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, GDayLiteral) +end + +class SOAPGMonth < XSD::XSDGMonth + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, GMonthLiteral) +end + +class SOAPHexBinary < XSD::XSDHexBinary + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, HexBinaryLiteral) +end + +class SOAPBase64 < XSD::XSDBase64Binary + include SOAPBasetype + extend SOAPModuleUtils + Type = SOAPENCType = QName.new(EncodingNamespace, Base64Literal) + +public + # Override the definition in SOAPBasetype. + def initialize(value = nil) + super(value) + @type = Type + end + + def as_xsd + @type = XSD::XSDBase64Binary::Type + end +end + +class SOAPAnyURI < XSD::XSDAnyURI + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, AnyURILiteral) +end + +class SOAPQName < XSD::XSDQName + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, QNameLiteral) +end + + +class SOAPInteger < XSD::XSDInteger + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, IntegerLiteral) +end + +class SOAPNonPositiveInteger < XSD::XSDNonPositiveInteger + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, NonPositiveIntegerLiteral) +end + +class SOAPNegativeInteger < XSD::XSDNegativeInteger + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, NegativeIntegerLiteral) +end + +class SOAPLong < XSD::XSDLong + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, LongLiteral) +end + +class SOAPInt < XSD::XSDInt + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, IntLiteral) +end + +class SOAPShort < XSD::XSDShort + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, ShortLiteral) +end + +class SOAPByte < XSD::XSDByte + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, ByteLiteral) +end + +class SOAPNonNegativeInteger < XSD::XSDNonNegativeInteger + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, NonNegativeIntegerLiteral) +end + +class SOAPUnsignedLong < XSD::XSDUnsignedLong + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, UnsignedLongLiteral) +end + +class SOAPUnsignedInt < XSD::XSDUnsignedInt + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, UnsignedIntLiteral) +end + +class SOAPUnsignedShort < XSD::XSDUnsignedShort + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, UnsignedShortLiteral) +end + +class SOAPUnsignedByte < XSD::XSDUnsignedByte + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, UnsignedByteLiteral) +end + +class SOAPPositiveInteger < XSD::XSDPositiveInteger + include SOAPBasetype + extend SOAPModuleUtils + SOAPENCType = QName.new(EncodingNamespace, PositiveIntegerLiteral) +end + + +### +## Compound datatypes. +# +class SOAPStruct < XSD::NSDBase + include SOAPCompoundtype + include Enumerable + +public + + def initialize(type = nil) + super() + @type = type || XSD::QName::EMPTY + @array = [] + @data = [] + end + + def to_s() + str = '' + self.each do |key, data| + str << "#{key}: #{data}\n" + end + str + end + + def add(name, value) + add_member(name, value) + end + + def [](idx) + if idx.is_a?(Range) + @data[idx] + elsif idx.is_a?(Integer) + if (idx > @array.size) + raise ArrayIndexOutOfBoundsError.new('In ' << @type.name) + end + @data[idx] + else + if @array.include?(idx) + @data[@array.index(idx)] + else + nil + end + end + end + + def []=(idx, data) + if @array.include?(idx) + data.parent = self if data.respond_to?(:parent=) + @data[@array.index(idx)] = data + else + add(idx, data) + end + end + + def key?(name) + @array.include?(name) + end + + def members + @array + end + + def to_obj + hash = {} + proptype = {} + each do |k, v| + value = v.respond_to?(:to_obj) ? v.to_obj : v.to_s + case proptype[k] + when :single + hash[k] = [hash[k], value] + proptype[k] = :multi + when :multi + hash[k] << value + else + hash[k] = value + proptype[k] = :single + end + end + hash + end + + def each + idx = 0 + while idx < @array.length + yield(@array[idx], @data[idx]) + idx += 1 + end + end + + def replace + members.each do |member| + self[member] = yield(self[member]) + end + end + + def self.decode(elename, type) + s = SOAPStruct.new(type) + s.elename = elename + s + end + +private + + def add_member(name, value = nil) + value = SOAPNil.new() if value.nil? + @array.push(name) + value.elename = value.elename.dup_name(name) + @data.push(value) + value.parent = self if value.respond_to?(:parent=) + value + end +end + + +# SOAPElement is not typed so it is not derived from NSDBase. +class SOAPElement + include Enumerable + + attr_accessor :encodingstyle + + attr_accessor :elename + attr_accessor :id + attr_reader :precedents + attr_accessor :root + attr_accessor :parent + attr_accessor :position + attr_accessor :extraattr + + attr_accessor :qualified + + def initialize(elename, text = nil) + if !elename.is_a?(XSD::QName) + elename = XSD::QName.new(nil, elename) + end + @encodingstyle = LiteralNamespace + @elename = elename + @id = nil + @precedents = [] + @root = false + @parent = nil + @position = nil + @extraattr = {} + + @qualified = nil + + @array = [] + @data = [] + @text = text + end + + def inspect + sprintf("#<%s:0x%x %s>", self.class.name, __id__, self.elename) + + (@text ? " #{@text.inspect}" : '') + + @data.collect { |ele| "\n#{ele.inspect}" }.join.gsub(/^/, ' ') + end + + # Text interface. + attr_accessor :text + alias data text + + # Element interfaces. + def add(value) + add_member(value.elename.name, value) + end + + def [](idx) + if @array.include?(idx) + @data[@array.index(idx)] + else + nil + end + end + + def []=(idx, data) + if @array.include?(idx) + data.parent = self if data.respond_to?(:parent=) + @data[@array.index(idx)] = data + else + add(data) + end + end + + def key?(name) + @array.include?(name) + end + + def members + @array + end + + def to_obj + if members.empty? + @text + else + hash = {} + proptype = {} + each do |k, v| + value = v.respond_to?(:to_obj) ? v.to_obj : v.to_s + case proptype[k] + when :single + hash[k] = [hash[k], value] + proptype[k] = :multi + when :multi + hash[k] << value + else + hash[k] = value + proptype[k] = :single + end + end + hash + end + end + + def each + idx = 0 + while idx < @array.length + yield(@array[idx], @data[idx]) + idx += 1 + end + end + + def self.decode(elename) + o = SOAPElement.new(elename) + o + end + + def self.from_objs(objs) + objs.collect { |value| + if value.is_a?(SOAPElement) + value + else + k, v = value + ele = from_obj(v) + ele.elename = XSD::QName.new(nil, k) + ele + end + } + end + + def self.from_obj(obj, namespace = nil) + o = SOAPElement.new(nil) + case obj + when nil + o.text = nil + when Hash, Array + obj.each do |elename, value| + if value.is_a?(Array) + value.each do |subvalue| + child = from_obj(subvalue, namespace) + child.elename = to_elename(elename, namespace) + o.add(child) + end + else + child = from_obj(value, namespace) + child.elename = to_elename(elename, namespace) + o.add(child) + end + end + else + o.text = obj.to_s + end + o + end + + def self.to_elename(obj, namespace = nil) + if obj.is_a?(XSD::QName) + obj + elsif /\A(.+):([^:]+)\z/ =~ obj.to_s + XSD::QName.new($1, $2) + else + XSD::QName.new(namespace, obj.to_s) + end + end + +private + + def add_member(name, value) + add_accessor(name) + @array.push(name) + @data.push(value) + value.parent = self if value.respond_to?(:parent=) + value + end + + if RUBY_VERSION > "1.7.0" + def add_accessor(name) + methodname = name + if self.respond_to?(methodname) + methodname = safe_accessor_name(methodname) + end + Mapping.define_singleton_method(self, methodname) do + @data[@array.index(name)] + end + Mapping.define_singleton_method(self, methodname + '=') do |value| + @data[@array.index(name)] = value + end + end + else + def add_accessor(name) + methodname = safe_accessor_name(name) + instance_eval <<-EOS + def #{methodname} + @data[@array.index(#{name.dump})] + end + + def #{methodname}=(value) + @data[@array.index(#{name.dump})] = value + end + EOS + end + end + + def safe_accessor_name(name) + "var_" << name.gsub(/[^a-zA-Z0-9_]/, '') + end +end + + +class SOAPArray < XSD::NSDBase + include SOAPCompoundtype + include Enumerable + +public + + attr_accessor :sparse + + attr_reader :offset, :rank + attr_accessor :size, :size_fixed + attr_reader :arytype + + def initialize(type = nil, rank = 1, arytype = nil) + super() + @type = type || ValueArrayName + @rank = rank + @data = Array.new + @sparse = false + @offset = Array.new(rank, 0) + @size = Array.new(rank, 0) + @size_fixed = false + @position = nil + @arytype = arytype + end + + def offset=(var) + @offset = var + @sparse = true + end + + def add(value) + self[*(@offset)] = value + end + + def [](*idxary) + if idxary.size != @rank + raise ArgumentError.new("given #{idxary.size} params does not match rank: #{@rank}") + end + + retrieve(idxary) + end + + def []=(*idxary) + value = idxary.slice!(-1) + + if idxary.size != @rank + raise ArgumentError.new("given #{idxary.size} params(#{idxary})" + + " does not match rank: #{@rank}") + end + + idx = 0 + while idx < idxary.size + if idxary[idx] + 1 > @size[idx] + @size[idx] = idxary[idx] + 1 + end + idx += 1 + end + + data = retrieve(idxary[0, idxary.size - 1]) + data[idxary.last] = value + + if value.is_a?(SOAPType) + value.elename = ITEM_NAME + # Sync type + unless @type.name + @type = XSD::QName.new(value.type.namespace, + SOAPArray.create_arytype(value.type.name, @rank)) + end + value.type ||= @type + end + + @offset = idxary + value.parent = self if value.respond_to?(:parent=) + offsetnext + end + + def each + @data.each do |data| + yield(data) + end + end + + def to_a + @data.dup + end + + def replace + @data = deep_map(@data) do |ele| + yield(ele) + end + end + + def deep_map(ary, &block) + ary.collect do |ele| + if ele.is_a?(Array) + deep_map(ele, &block) + else + new_obj = block.call(ele) + new_obj.elename = ITEM_NAME + new_obj + end + end + end + + def include?(var) + traverse_data(@data) do |v, *rank| + if v.is_a?(SOAPBasetype) && v.data == var + return true + end + end + false + end + + def traverse + traverse_data(@data) do |v, *rank| + unless @sparse + yield(v) + else + yield(v, *rank) if v && !v.is_a?(SOAPNil) + end + end + end + + def soap2array(ary) + traverse_data(@data) do |v, *position| + iteary = ary + rank = 1 + while rank < position.size + idx = position[rank - 1] + if iteary[idx].nil? + iteary = iteary[idx] = Array.new + else + iteary = iteary[idx] + end + rank += 1 + end + if block_given? + iteary[position.last] = yield(v) + else + iteary[position.last] = v + end + end + end + + def position + @position + end + +private + + ITEM_NAME = XSD::QName.new(nil, 'item') + + def retrieve(idxary) + data = @data + rank = 1 + while rank <= idxary.size + idx = idxary[rank - 1] + if data[idx].nil? + data = data[idx] = Array.new + else + data = data[idx] + end + rank += 1 + end + data + end + + def traverse_data(data, rank = 1) + idx = 0 + while idx < ranksize(rank) + if rank < @rank + traverse_data(data[idx], rank + 1) do |*v| + v[1, 0] = idx + yield(*v) + end + else + yield(data[idx], idx) + end + idx += 1 + end + end + + def ranksize(rank) + @size[rank - 1] + end + + def offsetnext + move = false + idx = @offset.size - 1 + while !move && idx >= 0 + @offset[idx] += 1 + if @size_fixed + if @offset[idx] < @size[idx] + move = true + else + @offset[idx] = 0 + idx -= 1 + end + else + move = true + end + end + end + + # Module function + +public + + def self.decode(elename, type, arytype) + typestr, nofary = parse_type(arytype.name) + rank = nofary.count(',') + 1 + plain_arytype = XSD::QName.new(arytype.namespace, typestr) + o = SOAPArray.new(type, rank, plain_arytype) + size = [] + nofary.split(',').each do |s| + if s.empty? + size.clear + break + else + size << s.to_i + end + end + unless size.empty? + o.size = size + o.size_fixed = true + end + o.elename = elename + o + end + +private + + def self.create_arytype(typename, rank) + "#{typename}[" << ',' * (rank - 1) << ']' + end + + TypeParseRegexp = Regexp.new('^(.+)\[([\d,]*)\]$') + + def self.parse_type(string) + TypeParseRegexp =~ string + return $1, $2 + end +end + + +require 'soap/mapping/typeMap' + + +end diff --git a/lib/soap/cgistub.rb b/lib/soap/cgistub.rb new file mode 100644 index 0000000..e4678a3 --- /dev/null +++ b/lib/soap/cgistub.rb @@ -0,0 +1,9 @@ +# SOAP4R - CGI stub library +# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/charset.rb b/lib/soap/charset.rb new file mode 100644 index 0000000..7d53d3e --- /dev/null +++ b/lib/soap/charset.rb @@ -0,0 +1,9 @@ +# SOAP4R - Charset encoding handler. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/compat.rb b/lib/soap/compat.rb new file mode 100644 index 0000000..feb5e38 --- /dev/null +++ b/lib/soap/compat.rb @@ -0,0 +1,182 @@ +# SOAP4R - Compatibility definitions. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +STDERR.puts "Loading compatibility library..." + + +require 'xsd/qname' +require 'xsd/ns' +require 'xsd/charset' +require 'soap/mapping' +require 'soap/rpc/rpc' +require 'soap/rpc/element' +require 'soap/rpc/driver' +require 'soap/rpc/cgistub' +require 'soap/rpc/router' +require 'soap/rpc/standaloneServer' + + +module SOAP + + +module RPC + RubyTypeNamespace = Mapping::RubyTypeNamespace + RubyTypeInstanceNamespace = Mapping::RubyTypeInstanceNamespace + RubyCustomTypeNamespace = Mapping::RubyCustomTypeNamespace + ApacheSOAPTypeNamespace = Mapping::ApacheSOAPTypeNamespace + + DefaultMappingRegistry = Mapping::DefaultRegistry + + def self.obj2soap(*arg); Mapping.obj2soap(*arg); end + def self.soap2obj(*arg); Mapping.soap2obj(*arg); end + def self.ary2soap(*arg); Mapping.ary2soap(*arg); end + def self.ary2md(*arg); Mapping.ary2md(*arg); end + def self.fault2exception(*arg); Mapping.fault2exception(*arg); end + + def self.defined_methods(obj) + if obj.is_a?(Module) + obj.methods - Module.methods + else + obj.methods - Kernel.instance_methods(true) + end + end +end + + +NS = XSD::NS +Charset = XSD::Charset +RPCUtils = RPC +RPCServerException = RPC::ServerException +RPCRouter = RPC::Router + + +class StandaloneServer < RPC::StandaloneServer + def initialize(*arg) + super + @router = @soaplet.app_scope_router + methodDef if respond_to?('methodDef') + end + + alias addServant add_servant + alias addMethod add_method + alias addMethodAs add_method_as +end + + +class CGIStub < RPC::CGIStub + def initialize(*arg) + super + methodDef if respond_to?('methodDef') + end + + alias addServant add_servant + + def addMethod(receiver, methodName, *paramArg) + addMethodWithNSAs(@default_namespace, receiver, methodName, methodName, *paramArg) + end + + def addMethodAs(receiver, methodName, methodNameAs, *paramArg) + addMethodWithNSAs(@default_namespace, receiver, methodName, methodNameAs, *paramArg) + end + + def addMethodWithNS(namespace, receiver, methodName, *paramArg) + addMethodWithNSAs(namespace, receiver, methodName, methodName, *paramArg) + end + + def addMethodWithNSAs(namespace, receiver, methodName, methodNameAs, *paramArg) + add_method_with_namespace_as(namespace, receiver, methodName, methodNameAs, *paramArg) + end +end + + +class Driver < RPC::Driver + include Logger::Severity + + attr_accessor :logdev + alias logDev= logdev= + alias logDev logdev + alias setWireDumpDev wiredump_dev= + alias setDefaultEncodingStyle default_encodingstyle= + alias mappingRegistry= mapping_registry= + alias mappingRegistry mapping_registry + + def initialize(log, logid, namespace, endpoint_url, httpproxy = nil, soapaction = nil) + super(endpoint_url, namespace, soapaction) + @logdev = log + @logid = logid + @logid_prefix = "<#{ @logid }> " + self.httpproxy = httpproxy if httpproxy + log(INFO) { 'initialize: initializing SOAP driver...' } + end + + def invoke(headers, body) + log(INFO) { "invoke: invoking message '#{ body.type }'." } + super + end + + def call(name, *params) + log(INFO) { "call: calling method '#{ name }'." } + log(DEBUG) { "call: parameters '#{ params.inspect }'." } + log(DEBUG) { + params = Mapping.obj2soap(params, @mapping_registry).to_a + "call: parameters '#{ params.inspect }'." + } + super + end + + def addMethod(name, *params) + addMethodWithSOAPActionAs(name, name, nil, *params) + end + + def addMethodAs(name_as, name, *params) + addMethodWithSOAPActionAs(name_as, name, nil, *params) + end + + def addMethodWithSOAPAction(name, soapaction, *params) + addMethodWithSOAPActionAs(name, name, soapaction, *params) + end + + def addMethodWithSOAPActionAs(name_as, name, soapaction, *params) + add_method_with_soapaction_as(name, name_as, soapaction, *params) + end + + def setLogDev(logdev) + self.logdev = logdev + end + +private + + def log(sev) + @logdev.add(sev, nil, self.class) { @logid_prefix + yield } if @logdev + end +end + + +module RPC + class MappingRegistry < SOAP::Mapping::Registry + def initialize(*arg) + super + end + + def add(obj_class, soap_class, factory, info = nil) + if (info.size > 1) + raise RuntimeError.new("Parameter signature changed. [namespace, name] should be { :type => XSD::QName.new(namespace, name) } from 1.5.0.") + end + @map.add(obj_class, soap_class, factory, { :type => info[0] }) + end + alias set add + end + + class Router + alias mappingRegistry mapping_registry + alias mappingRegistry= mapping_registry= + end +end + + +end diff --git a/lib/soap/driver.rb b/lib/soap/driver.rb new file mode 100644 index 0000000..5b45a85 --- /dev/null +++ b/lib/soap/driver.rb @@ -0,0 +1,9 @@ +# SOAP4R - SOAP driver +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/element.rb b/lib/soap/element.rb new file mode 100644 index 0000000..88af22d --- /dev/null +++ b/lib/soap/element.rb @@ -0,0 +1,266 @@ +# SOAP4R - SOAP elements library +# Copyright (C) 2000, 2001, 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'soap/baseData' + + +module SOAP + + +### +## SOAP elements +# +module SOAPEnvelopeElement; end + +class SOAPFault < SOAPStruct + include SOAPEnvelopeElement + include SOAPCompoundtype + +public + + def faultcode + self['faultcode'] + end + + def faultstring + self['faultstring'] + end + + def faultactor + self['faultactor'] + end + + def detail + self['detail'] + end + + def faultcode=(rhs) + self['faultcode'] = rhs + end + + def faultstring=(rhs) + self['faultstring'] = rhs + end + + def faultactor=(rhs) + self['faultactor'] = rhs + end + + def detail=(rhs) + self['detail'] = rhs + end + + def initialize(faultcode = nil, faultstring = nil, faultactor = nil, detail = nil) + super(EleFaultName) + @elename = EleFaultName + @encodingstyle = EncodingNamespace + + if faultcode + self.faultcode = faultcode + self.faultstring = faultstring + self.faultactor = faultactor + self.detail = detail + self.faultcode.elename = EleFaultCodeName if self.faultcode + self.faultstring.elename = EleFaultStringName if self.faultstring + self.faultactor.elename = EleFaultActorName if self.faultactor + self.detail.elename = EleFaultDetailName if self.detail + end + faultcode.parent = self if faultcode + faultstring.parent = self if faultstring + faultactor.parent = self if faultactor + detail.parent = self if detail + end + + def encode(generator, ns, attrs = {}) + SOAPGenerator.assign_ns(attrs, ns, EnvelopeNamespace) + SOAPGenerator.assign_ns(attrs, ns, EncodingNamespace) + attrs[ns.name(AttrEncodingStyleName)] = EncodingNamespace + name = ns.name(@elename) + generator.encode_tag(name, attrs) + yield(self.faultcode) + yield(self.faultstring) + yield(self.faultactor) + yield(self.detail) if self.detail + generator.encode_tag_end(name, true) + end +end + + +class SOAPBody < SOAPStruct + include SOAPEnvelopeElement + + def initialize(data = nil, is_fault = false) + super(nil) + @elename = EleBodyName + @encodingstyle = nil + if data + if data.respond_to?(:elename) + add(data.elename.name, data) + else + data.to_a.each do |datum| + add(datum.elename.name, datum) + end + end + end + @is_fault = is_fault + end + + def encode(generator, ns, attrs = {}) + name = ns.name(@elename) + generator.encode_tag(name, attrs) + if @is_fault + yield(@data) + else + @data.each do |data| + yield(data) + end + end + generator.encode_tag_end(name, true) + end + + def root_node + @data.each do |node| + if node.root == 1 + return node + end + end + # No specified root... + @data.each do |node| + if node.root != 0 + return node + end + end + + raise Parser::FormatDecodeError.new('no root element') + end +end + + +class SOAPHeaderItem < XSD::NSDBase + include SOAPEnvelopeElement + include SOAPCompoundtype + +public + + attr_accessor :element + attr_accessor :mustunderstand + attr_accessor :encodingstyle + attr_accessor :actor + + def initialize(element, mustunderstand = true, encodingstyle = nil, actor = nil) + super() + @type = nil + @element = element + @mustunderstand = mustunderstand + @encodingstyle = encodingstyle + @actor = actor + element.parent = self if element + end + + def encode(generator, ns, attrs = {}) + attrs.each do |key, value| + @element.extraattr[key] = value + end + @element.extraattr[ns.name(AttrMustUnderstandName)] = + (@mustunderstand ? '1' : '0') + if @encodingstyle + @element.extraattr[ns.name(AttrEncodingStyleName)] = @encodingstyle + end + unless @element.encodingstyle + @element.encodingstyle = @encodingstyle + end + if @actor + @element.extraattr[ns.name(AttrActorName)] = @actor + end + yield(@element) + end +end + + +class SOAPHeader < SOAPStruct + include SOAPEnvelopeElement + + def initialize + super(nil) + @elename = EleHeaderName + @encodingstyle = nil + end + + def encode(generator, ns, attrs = {}) + name = ns.name(@elename) + generator.encode_tag(name, attrs) + @data.each do |data| + yield(data) + end + generator.encode_tag_end(name, true) + end + + def add(name, value) + actor = value.extraattr[AttrActorName] + mu = (value.extraattr[AttrMustUnderstandName] == '1') + encstyle = value.extraattr[AttrEncodingStyleName] + item = SOAPHeaderItem.new(value, mu, encstyle, actor) + super(name, item) + end + + def length + @data.length + end + alias size length +end + + +class SOAPEnvelope < XSD::NSDBase + include SOAPEnvelopeElement + include SOAPCompoundtype + + attr_reader :header + attr_reader :body + attr_reader :external_content + + def initialize(header = nil, body = nil) + super() + @type = nil + @elename = EleEnvelopeName + @encodingstyle = nil + @header = header + @body = body + @external_content = {} + header.parent = self if header + body.parent = self if body + end + + def header=(header) + header.parent = self + @header = header + end + + def body=(body) + body.parent = self + @body = body + end + + def encode(generator, ns, attrs = {}) + SOAPGenerator.assign_ns(attrs, ns, elename.namespace, SOAPNamespaceTag) + name = ns.name(@elename) + generator.encode_tag(name, attrs) + + yield(@header) if @header and @header.length > 0 + yield(@body) + + generator.encode_tag_end(name, true) + end + + def to_ary + [header, body] + end +end + + +end diff --git a/lib/soap/encodingstyle/aspDotNetHandler.rb b/lib/soap/encodingstyle/aspDotNetHandler.rb new file mode 100644 index 0000000..fd7e0fa --- /dev/null +++ b/lib/soap/encodingstyle/aspDotNetHandler.rb @@ -0,0 +1,213 @@ +# SOAP4R - ASP.NET EncodingStyle handler library +# Copyright (C) 2001, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/encodingstyle/handler' + + +module SOAP +module EncodingStyle + + +class ASPDotNetHandler < Handler + Namespace = 'http://tempuri.org/ASP.NET' + add_handler + + def initialize(charset = nil) + super(charset) + @textbuf = '' + @decode_typemap = nil + end + + + ### + ## encode interface. + # + def encode_data(generator, ns, data, parent) + attrs = {} + # ASPDotNetHandler is intended to be used for accessing an ASP.NET doc/lit + # service as an rpc/encoded service. in the situation, local elements + # should be qualified. propagate parent's namespace to children. + if data.elename.namespace.nil? + data.elename.namespace = parent.elename.namespace + end + name = generator.encode_name(ns, data, attrs) + case data + when SOAPRawString + generator.encode_tag(name, attrs) + generator.encode_rawstring(data.to_s) + when XSD::XSDString + generator.encode_tag(name, attrs) + generator.encode_string(@charset ? + XSD::Charset.encoding_to_xml(data.to_s, @charset) : data.to_s) + when XSD::XSDAnySimpleType + generator.encode_tag(name, attrs) + generator.encode_string(data.to_s) + when SOAPStruct + generator.encode_tag(name, attrs) + data.each do |key, value| + generator.encode_child(ns, value, data) + end + when SOAPArray + generator.encode_tag(name, attrs) + data.traverse do |child, *rank| + data.position = nil + generator.encode_child(ns, child, data) + end + else + raise EncodingStyleError.new( + "unknown object:#{data} in this encodingStyle") + end + end + + def encode_data_end(generator, ns, data, parent) + name = generator.encode_name_end(ns, data) + cr = data.is_a?(SOAPCompoundtype) + generator.encode_tag_end(name, cr) + end + + + ### + ## decode interface. + # + class SOAPTemporalObject + attr_accessor :parent + + def initialize + @parent = nil + end + end + + class SOAPUnknown < SOAPTemporalObject + def initialize(handler, elename) + super() + @handler = handler + @elename = elename + end + + def as_struct + o = SOAPStruct.decode(@elename, XSD::AnyTypeName) + o.parent = @parent + o.type.name = @name + @handler.decode_parent(@parent, o) + o + end + + def as_string + o = SOAPString.decode(@elename) + o.parent = @parent + @handler.decode_parent(@parent, o) + o + end + + def as_nil + o = SOAPNil.decode(@elename) + o.parent = @parent + @handler.decode_parent(@parent, o) + o + end + end + + def decode_tag(ns, elename, attrs, parent) + @textbuf = '' + o = SOAPUnknown.new(self, elename) + o.parent = parent + o + end + + def decode_tag_end(ns, node) + o = node.node + if o.is_a?(SOAPUnknown) + newnode = o.as_string +# if /\A\s*\z/ =~ @textbuf +# o.as_struct +# else +# o.as_string +# end + node.replace_node(newnode) + o = node.node + end + + decode_textbuf(o) + @textbuf = '' + end + + def decode_text(ns, text) + # @textbuf is set at decode_tag_end. + @textbuf << text + end + + def decode_prologue + end + + def decode_epilogue + end + + def decode_parent(parent, node) + case parent.node + when SOAPUnknown + newparent = parent.node.as_struct + node.parent = newparent + parent.replace_node(newparent) + decode_parent(parent, node) + + when SOAPStruct + data = parent.node[node.elename.name] + case data + when nil + parent.node.add(node.elename.name, node) + when SOAPArray + name, type_ns = node.elename.name, node.type.namespace + data.add(node) + node.elename, node.type.namespace = name, type_ns + else + parent.node[node.elename.name] = SOAPArray.new + name, type_ns = data.elename.name, data.type.namespace + parent.node[node.elename.name].add(data) + data.elename.name, data.type.namespace = name, type_ns + name, type_ns = node.elename.name, node.type.namespace + parent.node[node.elename.name].add(node) + node.elename.name, node.type.namespace = name, type_ns + end + + when SOAPArray + if node.position + parent.node[*(decode_arypos(node.position))] = node + parent.node.sparse = true + else + parent.node.add(node) + end + + when SOAPBasetype + raise EncodingStyleError.new("SOAP base type must not have a child") + + else + # SOAPUnknown does not have parent. + # raise EncodingStyleError.new("illegal parent: #{parent}") + end + end + +private + + def decode_textbuf(node) + if node.is_a?(XSD::XSDString) + if @charset + node.set(XSD::Charset.encoding_from_xml(@textbuf, @charset)) + else + node.set(@textbuf) + end + else + # Nothing to do... + end + end +end + +ASPDotNetHandler.new + + +end +end diff --git a/lib/soap/encodingstyle/handler.rb b/lib/soap/encodingstyle/handler.rb new file mode 100644 index 0000000..6343bfb --- /dev/null +++ b/lib/soap/encodingstyle/handler.rb @@ -0,0 +1,100 @@ +# SOAP4R - EncodingStyle handler library +# Copyright (C) 2001, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/soap' +require 'soap/baseData' +require 'soap/element' + + +module SOAP +module EncodingStyle + + +class Handler + @@handlers = {} + + class EncodingStyleError < Error; end + + class << self + def uri + self::Namespace + end + + def handler(uri) + @@handlers[uri] + end + + def each + @@handlers.each do |key, value| + yield(value) + end + end + + private + + def add_handler + @@handlers[self.uri] = self + end + end + + attr_reader :charset + attr_accessor :generate_explicit_type + def decode_typemap=(definedtypes) + @decode_typemap = definedtypes + end + + def initialize(charset) + @charset = charset + @generate_explicit_type = true + @decode_typemap = nil + end + + ### + ## encode interface. + # + # Returns a XML instance as a string. + def encode_data(generator, ns, data, parent) + raise NotImplementError + end + + def encode_data_end(generator, ns, data, parent) + raise NotImplementError + end + + def encode_prologue + end + + def encode_epilogue + end + + ### + ## decode interface. + # + # Returns SOAP/OM data. + def decode_tag(ns, name, attrs, parent) + raise NotImplementError + end + + def decode_tag_end(ns, name) + raise NotImplementError + end + + def decode_text(ns, text) + raise NotImplementError + end + + def decode_prologue + end + + def decode_epilogue + end +end + + +end +end diff --git a/lib/soap/encodingstyle/literalHandler.rb b/lib/soap/encodingstyle/literalHandler.rb new file mode 100644 index 0000000..a806277 --- /dev/null +++ b/lib/soap/encodingstyle/literalHandler.rb @@ -0,0 +1,236 @@ +# SOAP4R - XML Literal EncodingStyle handler library +# Copyright (C) 2001, 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/encodingstyle/handler' + + +module SOAP +module EncodingStyle + + +class LiteralHandler < Handler + Namespace = SOAP::LiteralNamespace + add_handler + + def initialize(charset = nil) + super(charset) + @textbuf = '' + end + + + ### + ## encode interface. + # + def encode_data(generator, ns, data, parent) + attrs = {} + name = generator.encode_name(ns, data, attrs) + data.extraattr.each do |k, v| + # ToDo: check generator.attributeformdefault here + if k.is_a?(XSD::QName) + if k.namespace + SOAPGenerator.assign_ns(attrs, ns, k.namespace) + k = ns.name(k) + else + k = k.name + end + end + attrs[k] = v + end + case data + when SOAPRawString + generator.encode_tag(name, attrs) + generator.encode_rawstring(data.to_s) + when XSD::XSDString + generator.encode_tag(name, attrs) + str = data.to_s + str = XSD::Charset.encoding_to_xml(str, @charset) if @charset + generator.encode_string(str) + when XSD::XSDAnySimpleType + generator.encode_tag(name, attrs) + generator.encode_string(data.to_s) + when SOAPStruct + generator.encode_tag(name, attrs) + data.each do |key, value| + generator.encode_child(ns, value, data) + end + when SOAPArray + generator.encode_tag(name, attrs) + data.traverse do |child, *rank| + data.position = nil + generator.encode_child(ns, child, data) + end + when SOAPElement + # passes 2 times for simplifying namespace definition + data.each do |key, value| + if value.elename.namespace + SOAPGenerator.assign_ns(attrs, ns, value.elename.namespace) + end + end + if data.text and data.text.is_a?(XSD::QName) + SOAPGenerator.assign_ns(attrs, ns, data.text.namespace) + end + generator.encode_tag(name, attrs) + if data.text + if data.text.is_a?(XSD::QName) + text = ns.name(data.text) + else + text = data.text + end + generator.encode_rawstring(text) + end + data.each do |key, value| + generator.encode_child(ns, value, data) + end + else + raise EncodingStyleError.new( + "unknown object:#{data} in this encodingStyle") + end + end + + def encode_data_end(generator, ns, data, parent) + name = generator.encode_name_end(ns, data) + cr = (data.is_a?(SOAPCompoundtype) or + (data.is_a?(SOAPElement) and !data.text)) + generator.encode_tag_end(name, cr) + end + + + ### + ## decode interface. + # + class SOAPTemporalObject + attr_accessor :parent + + def initialize + @parent = nil + end + end + + class SOAPUnknown < SOAPTemporalObject + def initialize(handler, elename, extraattr) + super() + @handler = handler + @elename = elename + @extraattr = extraattr + end + + def as_element + o = SOAPElement.decode(@elename) + o.parent = @parent + o.extraattr.update(@extraattr) + @handler.decode_parent(@parent, o) + o + end + + def as_string + o = SOAPString.decode(@elename) + o.parent = @parent + o.extraattr.update(@extraattr) + @handler.decode_parent(@parent, o) + o + end + + def as_nil + o = SOAPNil.decode(@elename) + o.parent = @parent + o.extraattr.update(@extraattr) + @handler.decode_parent(@parent, o) + o + end + end + + def decode_tag(ns, elename, attrs, parent) + @textbuf = '' + o = SOAPUnknown.new(self, elename, decode_attrs(ns, attrs)) + o.parent = parent + o + end + + def decode_tag_end(ns, node) + o = node.node + if o.is_a?(SOAPUnknown) + newnode = if /\A\s*\z/ =~ @textbuf + o.as_element + else + o.as_string + end + node.replace_node(newnode) + o = node.node + end + + decode_textbuf(o) + @textbuf = '' + end + + def decode_text(ns, text) + # @textbuf is set at decode_tag_end. + @textbuf << text + end + + def decode_attrs(ns, attrs) + extraattr = {} + attrs.each do |key, value| + qname = ns.parse_local(key) + extraattr[qname] = value + end + extraattr + end + + def decode_prologue + end + + def decode_epilogue + end + + def decode_parent(parent, node) + return unless parent.node + case parent.node + when SOAPUnknown + newparent = parent.node.as_element + node.parent = newparent + parent.replace_node(newparent) + decode_parent(parent, node) + when SOAPElement + parent.node.add(node) + node.parent = parent.node + when SOAPStruct + parent.node.add(node.elename.name, node) + node.parent = parent.node + when SOAPArray + if node.position + parent.node[*(decode_arypos(node.position))] = node + parent.node.sparse = true + else + parent.node.add(node) + end + node.parent = parent.node + else + raise EncodingStyleError.new("illegal parent: #{parent.node}") + end + end + +private + + def decode_textbuf(node) + if node.is_a?(XSD::XSDString) + if @charset + node.set(XSD::Charset.encoding_from_xml(@textbuf, @charset)) + else + node.set(@textbuf) + end + else + # Nothing to do... + end + end +end + +LiteralHandler.new + + +end +end diff --git a/lib/soap/encodingstyle/soapHandler.rb b/lib/soap/encodingstyle/soapHandler.rb new file mode 100644 index 0000000..c37fc5e --- /dev/null +++ b/lib/soap/encodingstyle/soapHandler.rb @@ -0,0 +1,586 @@ +# SOAP4R - SOAP EncodingStyle handler library +# Copyright (C) 2001, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/encodingstyle/handler' + + +module SOAP +module EncodingStyle + + +class SOAPHandler < Handler + Namespace = SOAP::EncodingNamespace + add_handler + + def initialize(charset = nil) + super(charset) + @refpool = [] + @idpool = [] + @textbuf = '' + @is_first_top_ele = true + end + + + ### + ## encode interface. + # + def encode_data(generator, ns, data, parent) + attrs = encode_attrs(generator, ns, data, parent) + if parent && parent.is_a?(SOAPArray) && parent.position + attrs[ns.name(AttrPositionName)] = "[#{parent.position.join(',')}]" + end + name = generator.encode_name(ns, data, attrs) + case data + when SOAPReference + attrs['href'] = data.refidstr + generator.encode_tag(name, attrs) + when SOAPExternalReference + data.referred + attrs['href'] = data.refidstr + generator.encode_tag(name, attrs) + when SOAPRawString + generator.encode_tag(name, attrs) + generator.encode_rawstring(data.to_s) + when XSD::XSDString + generator.encode_tag(name, attrs) + generator.encode_string(@charset ? + XSD::Charset.encoding_to_xml(data.to_s, @charset) : data.to_s) + when XSD::XSDAnySimpleType + generator.encode_tag(name, attrs) + generator.encode_string(data.to_s) + when SOAPStruct + generator.encode_tag(name, attrs) + data.each do |key, value| + generator.encode_child(ns, value, data) + end + when SOAPArray + generator.encode_tag(name, attrs) + data.traverse do |child, *rank| + data.position = data.sparse ? rank : nil + generator.encode_child(ns, child, data) + end + else + raise EncodingStyleError.new( + "unknown object:#{data} in this encodingStyle") + end + end + + def encode_data_end(generator, ns, data, parent) + name = generator.encode_name_end(ns, data) + cr = data.is_a?(SOAPCompoundtype) + generator.encode_tag_end(name, cr) + end + + + ### + ## decode interface. + # + class SOAPTemporalObject + attr_accessor :parent + attr_accessor :position + attr_accessor :id + attr_accessor :root + + def initialize + @parent = nil + @position = nil + @id = nil + @root = nil + end + end + + class SOAPUnknown < SOAPTemporalObject + attr_reader :type + attr_accessor :definedtype + attr_reader :extraattr + + def initialize(handler, elename, type, extraattr) + super() + @handler = handler + @elename = elename + @type = type + @extraattr = extraattr + @definedtype = nil + end + + def as_struct + o = SOAPStruct.decode(@elename, @type) + o.id = @id + o.root = @root + o.parent = @parent + o.position = @position + o.extraattr.update(@extraattr) + @handler.decode_parent(@parent, o) + o + end + + def as_string + o = SOAPString.decode(@elename) + o.id = @id + o.root = @root + o.parent = @parent + o.position = @position + o.extraattr.update(@extraattr) + @handler.decode_parent(@parent, o) + o + end + + def as_nil + o = SOAPNil.decode(@elename) + o.id = @id + o.root = @root + o.parent = @parent + o.position = @position + o.extraattr.update(@extraattr) + @handler.decode_parent(@parent, o) + o + end + end + + def decode_tag(ns, elename, attrs, parent) + @textbuf = '' + is_nil, type, arytype, root, offset, position, href, id, extraattr = + decode_attrs(ns, attrs) + o = nil + if is_nil + o = SOAPNil.decode(elename) + elsif href + o = SOAPReference.decode(elename, href) + @refpool << o + elsif @decode_typemap + o = decode_tag_by_wsdl(ns, elename, type, parent.node, arytype, extraattr) + else + o = decode_tag_by_type(ns, elename, type, parent.node, arytype, extraattr) + end + + if o.is_a?(SOAPArray) + if offset + o.offset = decode_arypos(offset) + o.sparse = true + else + o.sparse = false + end + end + + o.parent = parent + o.id = id + o.root = root + o.position = position + + unless o.is_a?(SOAPTemporalObject) + @idpool << o if o.id + decode_parent(parent, o) + end + o + end + + def decode_tag_end(ns, node) + o = node.node + if o.is_a?(SOAPUnknown) + newnode = if /\A\s*\z/ =~ @textbuf + o.as_struct + else + o.as_string + end + if newnode.id + @idpool << newnode + end + node.replace_node(newnode) + o = node.node + end + decode_textbuf(o) + # unlink definedtype + o.definedtype = nil + end + + def decode_text(ns, text) + @textbuf << text + end + + def decode_prologue + @refpool.clear + @idpool.clear + @is_first_top_ele = true + end + + def decode_epilogue + decode_resolve_id + end + + def decode_parent(parent, node) + return unless parent.node + case parent.node + when SOAPUnknown + newparent = parent.node.as_struct + node.parent = newparent + if newparent.id + @idpool << newparent + end + parent.replace_node(newparent) + decode_parent(parent, node) + when SOAPStruct + parent.node.add(node.elename.name, node) + node.parent = parent.node + when SOAPArray + if node.position + parent.node[*(decode_arypos(node.position))] = node + parent.node.sparse = true + else + parent.node.add(node) + end + node.parent = parent.node + else + raise EncodingStyleError.new("illegal parent: #{parent.node}") + end + end + +private + + def content_ranksize(typename) + typename.scan(/\[[\d,]*\]$/)[0] + end + + def content_typename(typename) + typename.sub(/\[,*\]$/, '') + end + + def create_arytype(ns, data) + XSD::QName.new(data.arytype.namespace, + content_typename(data.arytype.name) + "[#{data.size.join(',')}]") + end + + def encode_attrs(generator, ns, data, parent) + attrs = {} + return attrs if data.is_a?(SOAPReference) + + if !parent || parent.encodingstyle != EncodingNamespace + if @generate_explicit_type + SOAPGenerator.assign_ns(attrs, ns, EnvelopeNamespace) + attrs[ns.name(AttrEncodingStyleName)] = EncodingNamespace + end + data.encodingstyle = EncodingNamespace + end + + if data.is_a?(SOAPNil) + attrs[ns.name(XSD::AttrNilName)] = XSD::NilValue + elsif @generate_explicit_type + if data.type.namespace + SOAPGenerator.assign_ns(attrs, ns, data.type.namespace) + end + if data.is_a?(SOAPArray) + if data.arytype.namespace + SOAPGenerator.assign_ns(attrs, ns, data.arytype.namespace) + end + SOAPGenerator.assign_ns(attrs, ns, EncodingNamespace) + attrs[ns.name(AttrArrayTypeName)] = ns.name(create_arytype(ns, data)) + if data.type.name + attrs[ns.name(XSD::AttrTypeName)] = ns.name(data.type) + end + elsif parent && parent.is_a?(SOAPArray) && (parent.arytype == data.type) + # No need to add. + elsif !data.type.namespace + # No need to add. + else + attrs[ns.name(XSD::AttrTypeName)] = ns.name(data.type) + end + end + + data.extraattr.each do |key, value| + SOAPGenerator.assign_ns(attrs, ns, key.namespace) + attrs[ns.name(key)] = encode_attr_value(generator, ns, key, value) + end + if data.id + attrs['id'] = data.id + end + attrs + end + + def encode_attr_value(generator, ns, qname, value) + if value.is_a?(SOAPType) + ref = SOAPReference.new(value) + generator.add_reftarget(qname.name, value) + ref.refidstr + else + value.to_s + end + end + + def decode_tag_by_wsdl(ns, elename, typestr, parent, arytypestr, extraattr) + o = nil + if parent.class == SOAPBody + # root element: should branch by root attribute? + if @is_first_top_ele + # Unqualified name is allowed here. + @is_first_top_ele = false + type = @decode_typemap[elename] || + @decode_typemap.find_name(elename.name) + if type + o = SOAPStruct.new(elename) + o.definedtype = type + return o + end + end + # multi-ref element. + if typestr + typename = ns.parse(typestr) + typedef = @decode_typemap[typename] + if typedef + return decode_definedtype(elename, typename, typedef, arytypestr) + end + end + return decode_tag_by_type(ns, elename, typestr, parent, arytypestr, + extraattr) + end + + if parent.type == XSD::AnyTypeName + return decode_tag_by_type(ns, elename, typestr, parent, arytypestr, + extraattr) + end + + # parent.definedtype == nil means the parent is SOAPUnknown. SOAPUnknown + # is generated by decode_tag_by_type when its type is anyType. + parenttype = parent.definedtype || @decode_typemap[parent.type] + unless parenttype + return decode_tag_by_type(ns, elename, typestr, parent, arytypestr, + extraattr) + end + + definedtype_name = parenttype.child_type(elename) + if definedtype_name and (klass = TypeMap[definedtype_name]) + return decode_basetype(klass, elename) + elsif definedtype_name == XSD::AnyTypeName + return decode_tag_by_type(ns, elename, typestr, parent, arytypestr, + extraattr) + end + + if definedtype_name + typedef = @decode_typemap[definedtype_name] + else + typedef = parenttype.child_defined_complextype(elename) + end + decode_definedtype(elename, definedtype_name, typedef, arytypestr) + end + + def decode_definedtype(elename, typename, typedef, arytypestr) + unless typedef + raise EncodingStyleError.new("unknown type '#{typename}'") + end + if typedef.is_a?(::WSDL::XMLSchema::SimpleType) + decode_defined_simpletype(elename, typename, typedef, arytypestr) + else + decode_defined_complextype(elename, typename, typedef, arytypestr) + end + end + + def decode_basetype(klass, elename) + klass.decode(elename) + end + + def decode_defined_simpletype(elename, typename, typedef, arytypestr) + if typedef.base + o = decode_basetype(TypeMap[typedef.base], elename) + o.definedtype = typedef + o + else + raise RuntimeError.new("unsupported simpleType: #{typedef}") + end + end + + def decode_defined_complextype(elename, typename, typedef, arytypestr) + case typedef.compoundtype + when :TYPE_STRUCT, :TYPE_MAP + o = SOAPStruct.decode(elename, typename) + o.definedtype = typedef + return o + when :TYPE_ARRAY + expected_arytype = typedef.find_arytype + if arytypestr + actual_arytype = XSD::QName.new(expected_arytype.namespace, + content_typename(expected_arytype.name) << + content_ranksize(arytypestr)) + o = SOAPArray.decode(elename, typename, actual_arytype) + else + o = SOAPArray.new(typename, 1, expected_arytype) + o.elename = elename + end + o.definedtype = typedef + return o + when :TYPE_EMPTY + o = SOAPNil.decode(elename) + o.definedtype = typedef + return o + else + raise RuntimeError.new( + "Unknown kind of complexType: #{typedef.compoundtype}") + end + nil + end + + def decode_tag_by_type(ns, elename, typestr, parent, arytypestr, extraattr) + if arytypestr + type = typestr ? ns.parse(typestr) : ValueArrayName + node = SOAPArray.decode(elename, type, ns.parse(arytypestr)) + node.extraattr.update(extraattr) + return node + end + + type = nil + if typestr + type = ns.parse(typestr) + elsif parent.is_a?(SOAPArray) + type = parent.arytype + else + # Since it's in dynamic(without any type) encoding process, + # assumes entity as its type itself. + # => type Array in SOAP-ENC. + # => type Country in foo. + type = elename + end + + if klass = TypeMap[type] + node = decode_basetype(klass, elename) + node.extraattr.update(extraattr) + return node + end + + # Unknown type... Struct or String + SOAPUnknown.new(self, elename, type, extraattr) + end + + def decode_textbuf(node) + case node + when XSD::XSDHexBinary, XSD::XSDBase64Binary + node.set_encoded(@textbuf) + when XSD::XSDString + if @charset + @textbuf = XSD::Charset.encoding_from_xml(@textbuf, @charset) + end + if node.definedtype + node.definedtype.check_lexical_format(@textbuf) + end + node.set(@textbuf) + when SOAPNil + # Nothing to do. + when SOAPBasetype + node.set(@textbuf) + else + # Nothing to do... + end + @textbuf = '' + end + + NilLiteralMap = { + 'true' => true, + '1' => true, + 'false' => false, + '0' => false + } + RootLiteralMap = { + '1' => 1, + '0' => 0 + } + def decode_attrs(ns, attrs) + is_nil = false + type = nil + arytype = nil + root = nil + offset = nil + position = nil + href = nil + id = nil + extraattr = {} + + attrs.each do |key, value| + qname = ns.parse(key) + case qname.namespace + when XSD::InstanceNamespace + case qname.name + when XSD::NilLiteral + is_nil = NilLiteralMap[value] or + raise EncodingStyleError.new("cannot accept attribute value: #{value} as the value of xsi:#{XSD::NilLiteral} (expected 'true', 'false', '1', or '0')") + next + when XSD::AttrType + type = value + next + end + when EncodingNamespace + case qname.name + when AttrArrayType + arytype = value + next + when AttrRoot + root = RootLiteralMap[value] or + raise EncodingStyleError.new( + "illegal root attribute value: #{value}") + next + when AttrOffset + offset = value + next + when AttrPosition + position = value + next + end + end + if key == 'href' + href = value + next + elsif key == 'id' + id = value + next + end + qname = ns.parse_local(key) + extraattr[qname] = decode_attr_value(ns, qname, value) + end + + return is_nil, type, arytype, root, offset, position, href, id, extraattr + end + + def decode_attr_value(ns, qname, value) + if /\A#/ =~ value + o = SOAPReference.decode(nil, value) + @refpool << o + o + else + value + end + end + + def decode_arypos(position) + /^\[(.+)\]$/ =~ position + $1.split(',').collect { |s| s.to_i } + end + + def decode_resolve_id + count = @refpool.length # To avoid infinite loop + while !@refpool.empty? && count > 0 + @refpool = @refpool.find_all { |ref| + o = @idpool.find { |item| + item.id == ref.refid + } + if o.is_a?(SOAPReference) + true # link of link. + elsif o + ref.__setobj__(o) + false + elsif o = ref.rootnode.external_content[ref.refid] + ref.__setobj__(o) + false + else + raise EncodingStyleError.new("unresolved reference: #{ref.refid}") + end + } + count -= 1 + end + end +end + +SOAPHandler.new + + +end +end diff --git a/lib/soap/generator.rb b/lib/soap/generator.rb new file mode 100644 index 0000000..f179555 --- /dev/null +++ b/lib/soap/generator.rb @@ -0,0 +1,268 @@ +# SOAP4R - SOAP XML Instance Generator library. +# Copyright (C) 2001, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/ns' +require 'soap/soap' +require 'soap/baseData' +require 'soap/encodingstyle/handler' + + +module SOAP + + +### +## CAUTION: MT-unsafe +# +class SOAPGenerator + include SOAP + + class FormatEncodeError < Error; end + +public + + attr_accessor :charset + attr_accessor :default_encodingstyle + attr_accessor :generate_explicit_type + attr_accessor :use_numeric_character_reference + + def initialize(opt = {}) + @reftarget = nil + @handlers = {} + @charset = opt[:charset] || XSD::Charset.xml_encoding_label + @default_encodingstyle = opt[:default_encodingstyle] || EncodingNamespace + @generate_explicit_type = + opt.key?(:generate_explicit_type) ? opt[:generate_explicit_type] : true + @elementformdefault = opt[:elementformdefault] + @attributeformdefault = opt[:attributeformdefault] + @use_numeric_character_reference = opt[:use_numeric_character_reference] + @indentstr = opt[:no_indent] ? '' : ' ' + @buf = @indent = @curr = nil + end + + def generate(obj, io = nil) + @buf = io || '' + @indent = '' + + prologue + @handlers.each do |uri, handler| + handler.encode_prologue + end + + ns = XSD::NS.new + @buf << xmldecl + encode_data(ns, obj, nil) + + @handlers.each do |uri, handler| + handler.encode_epilogue + end + epilogue + + @buf + end + + def encode_data(ns, obj, parent) + if obj.is_a?(SOAPEnvelopeElement) + encode_element(ns, obj, parent) + return + end + if @reftarget && !obj.precedents.empty? + add_reftarget(obj.elename.name, obj) + ref = SOAPReference.new(obj) + ref.elename = ref.elename.dup_name(obj.elename.name) + obj.precedents.clear # Avoid cyclic delay. + obj.encodingstyle = parent.encodingstyle + # SOAPReference is encoded here. + obj = ref + end + encodingstyle = obj.encodingstyle + # Children's encodingstyle is derived from its parent. + encodingstyle ||= parent.encodingstyle if parent + obj.encodingstyle = encodingstyle + handler = find_handler(encodingstyle || @default_encodingstyle) + unless handler + raise FormatEncodeError.new("Unknown encodingStyle: #{ encodingstyle }.") + end + if !obj.elename.name + raise FormatEncodeError.new("Element name not defined: #{ obj }.") + end + handler.encode_data(self, ns, obj, parent) + handler.encode_data_end(self, ns, obj, parent) + end + + def add_reftarget(name, node) + unless @reftarget + raise FormatEncodeError.new("Reftarget is not defined.") + end + @reftarget.add(name, node) + end + + def encode_child(ns, child, parent) + indent_backup, @indent = @indent, @indent + @indentstr + encode_data(ns.clone_ns, child, parent) + @indent = indent_backup + end + + def encode_element(ns, obj, parent) + attrs = {} + if obj.is_a?(SOAPBody) + @reftarget = obj + obj.encode(self, ns, attrs) do |child| + indent_backup, @indent = @indent, @indent + @indentstr + encode_data(ns.clone_ns, child, obj) + @indent = indent_backup + end + @reftarget = nil + else + if obj.is_a?(SOAPEnvelope) + # xsi:nil="true" can appear even if dumping without explicit type. + SOAPGenerator.assign_ns(attrs, ns, + XSD::InstanceNamespace, XSINamespaceTag) + if @generate_explicit_type + SOAPGenerator.assign_ns(attrs, ns, XSD::Namespace, XSDNamespaceTag) + end + end + obj.encode(self, ns, attrs) do |child| + indent_backup, @indent = @indent, @indent + @indentstr + encode_data(ns.clone_ns, child, obj) + @indent = indent_backup + end + end + end + + def encode_name(ns, data, attrs) + if element_local?(data) + data.elename.name + else + if element_qualified?(data) + SOAPGenerator.assign_ns(attrs, ns, data.elename.namespace, '') + else + SOAPGenerator.assign_ns(attrs, ns, data.elename.namespace) + end + ns.name(data.elename) + end + end + + def encode_name_end(ns, data) + if element_local?(data) + data.elename.name + else + ns.name(data.elename) + end + end + + def encode_tag(elename, attrs = nil) + if !attrs or attrs.empty? + @buf << "\n#{ @indent }<#{ elename }>" + elsif attrs.size == 1 + key, value = attrs.shift + @buf << %Q[\n#{ @indent }<#{ elename } #{ key }="#{ value }">] + else + @buf << "\n#{ @indent }<#{ elename } " << + attrs.collect { |key, value| + %Q[#{ key }="#{ value }"] + }.join("\n#{ @indent }#{ @indentstr * 2 }") << + '>' + end + end + + def encode_tag_end(elename, cr = nil) + if cr + @buf << "\n#{ @indent }" + else + @buf << "" + end + end + + def encode_rawstring(str) + @buf << str + end + + EncodeMap = { + '&' => '&', + '<' => '<', + '>' => '>', + '"' => '"', + '\'' => ''', + "\r" => ' ' + } + EncodeCharRegexp = Regexp.new("[#{EncodeMap.keys.join}]") + def encode_string(str) + if @use_numeric_character_reference and !XSD::Charset.is_us_ascii(str) + str.gsub!(EncodeCharRegexp) { |c| EncodeMap[c] } + @buf << str.unpack("U*").collect { |c| + if c == 0x9 or c == 0xa or c == 0xd or (c >= 0x20 and c <= 0x7f) + c.chr + else + sprintf("&#x%x;", c) + end + }.join + else + @buf << str.gsub(EncodeCharRegexp) { |c| EncodeMap[c] } + end + end + + def element_local?(element) + element.elename.namespace.nil? + end + + def element_qualified?(element) + if element.respond_to?(:qualified) + if element.qualified.nil? + @elementformdefault + else + element.qualified + end + else + @elementformdefault + end + end + + def self.assign_ns(attrs, ns, namespace, tag = nil) + if namespace.nil? + raise FormatEncodeError.new("empty namespace") + end + unless ns.assigned?(namespace) + tag = ns.assign(namespace, tag) + if tag == '' + attr = 'xmlns' + else + attr = "xmlns:#{tag}" + end + attrs[attr] = namespace + end + end + +private + + def prologue + end + + def epilogue + end + + def find_handler(encodingstyle) + unless @handlers.key?(encodingstyle) + handler = SOAP::EncodingStyle::Handler.handler(encodingstyle).new(@charset) + handler.generate_explicit_type = @generate_explicit_type + handler.encode_prologue + @handlers[encodingstyle] = handler + end + @handlers[encodingstyle] + end + + def xmldecl + if @charset + %Q[] + else + %Q[] + end + end +end + + +end diff --git a/lib/soap/header/handler.rb b/lib/soap/header/handler.rb new file mode 100644 index 0000000..bbd4d27 --- /dev/null +++ b/lib/soap/header/handler.rb @@ -0,0 +1,60 @@ +# SOAP4R - SOAP Header handler item +# Copyright (C) 2003, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/element' + + +module SOAP +module Header + + +class Handler + attr_reader :elename + attr_reader :mustunderstand + attr_reader :encodingstyle + attr_reader :target_actor + + def initialize(elename) + @elename = elename + @mustunderstand = false + @encodingstyle = nil + @target_actor = nil + end + + # Should return a SOAP/OM, a SOAPHeaderItem or nil. + def on_outbound + nil + end + + # Given header is a SOAPHeaderItem or nil. + def on_inbound(header, mustunderstand = false) + # do something. + end + + def on_outbound_headeritem + item = on_outbound + if item.nil? + nil + elsif item.is_a?(::SOAP::SOAPHeaderItem) + item.elename = @elename + item + else + item.elename = @elename + ::SOAP::SOAPHeaderItem.new(item, @mustunderstand, @encodingstyle, + @target_actor) + end + end + + def on_inbound_headeritem(header) + on_inbound(header.element, header.mustunderstand) + end +end + + +end +end diff --git a/lib/soap/header/handlerset.rb b/lib/soap/header/handlerset.rb new file mode 100644 index 0000000..a8eee03 --- /dev/null +++ b/lib/soap/header/handlerset.rb @@ -0,0 +1,70 @@ +# SOAP4R - SOAP Header handler set +# Copyright (C) 2003, 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/namedelements' + + +module SOAP +module Header + + +class HandlerSet + def initialize + @store = XSD::NamedElements.new + end + + def dup + obj = HandlerSet.new + obj.store = @store.dup + obj + end + + def add(handler) + @store << handler + end + alias << add + + def delete(handler) + @store.delete(handler) + end + + def include?(handler) + @store.include?(handler) + end + + # returns: Array of SOAPHeaderItem + def on_outbound + @store.collect { |handler| + handler.on_outbound_headeritem + }.compact + end + + # headers: SOAPHeaderItem enumerable object + def on_inbound(headers) + headers.each do |name, item| + handler = @store.find { |handler| + handler.elename == item.element.elename + } + if handler + handler.on_inbound_headeritem(item) + elsif item.mustunderstand + raise UnhandledMustUnderstandHeaderError.new(item.element.elename.to_s) + end + end + end + +protected + + def store=(store) + @store = store + end +end + + +end +end diff --git a/lib/soap/header/simplehandler.rb b/lib/soap/header/simplehandler.rb new file mode 100644 index 0000000..7b206f7 --- /dev/null +++ b/lib/soap/header/simplehandler.rb @@ -0,0 +1,44 @@ +# SOAP4R - SOAP Simple header item handler +# Copyright (C) 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/header/handler' +require 'soap/baseData' + + +module SOAP +module Header + + +class SimpleHandler < SOAP::Header::Handler + def initialize(elename) + super(elename) + end + + # Should return a Hash, String or nil. + def on_simple_outbound + nil + end + + # Given header is a Hash, String or nil. + def on_simple_inbound(header, mustunderstand) + end + + def on_outbound + h = on_simple_outbound + h ? SOAPElement.from_obj(h, elename.namespace) : nil + end + + def on_inbound(header, mustunderstand) + h = header.respond_to?(:to_obj) ? header.to_obj : header.data + on_simple_inbound(h, mustunderstand) + end +end + + +end +end diff --git a/lib/soap/httpconfigloader.rb b/lib/soap/httpconfigloader.rb new file mode 100644 index 0000000..cd7bca8 --- /dev/null +++ b/lib/soap/httpconfigloader.rb @@ -0,0 +1,119 @@ +# SOAP4R - HTTP config loader. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/property' + + +module SOAP + + +module HTTPConfigLoader +module_function + + def set_options(client, options) + client.proxy = options["proxy"] + options.add_hook("proxy") do |key, value| + client.proxy = value + end + client.no_proxy = options["no_proxy"] + options.add_hook("no_proxy") do |key, value| + client.no_proxy = value + end + if client.respond_to?(:protocol_version=) + client.protocol_version = options["protocol_version"] + options.add_hook("protocol_version") do |key, value| + client.protocol_version = value + end + end + ssl_config = options["ssl_config"] ||= ::SOAP::Property.new + set_ssl_config(client, ssl_config) + ssl_config.add_hook(true) do |key, value| + set_ssl_config(client, ssl_config) + end + basic_auth = options["basic_auth"] ||= ::SOAP::Property.new + set_basic_auth(client, basic_auth) + basic_auth.add_hook do |key, value| + set_basic_auth(client, basic_auth) + end + options.add_hook("connect_timeout") do |key, value| + client.connect_timeout = value + end + options.add_hook("send_timeout") do |key, value| + client.send_timeout = value + end + options.add_hook("receive_timeout") do |key, value| + client.receive_timeout = value + end + end + + def set_basic_auth(client, basic_auth) + basic_auth.values.each do |url, userid, passwd| + client.set_basic_auth(url, userid, passwd) + end + end + + def set_ssl_config(client, ssl_config) + ssl_config.each do |key, value| + cfg = client.ssl_config + if cfg.nil? + raise NotImplementedError.new("SSL not supported") + end + case key + when 'client_cert' + cfg.client_cert = cert_from_file(value) + when 'client_key' + cfg.client_key = key_from_file(value) + when 'client_ca' + cfg.client_ca = value + when 'ca_path' + cfg.set_trust_ca(value) + when 'ca_file' + cfg.set_trust_ca(value) + when 'crl' + cfg.set_crl(value) + when 'verify_mode' + cfg.verify_mode = ssl_config_int(value) + when 'verify_depth' + cfg.verify_depth = ssl_config_int(value) + when 'options' + cfg.options = value + when 'ciphers' + cfg.ciphers = value + when 'verify_callback' + cfg.verify_callback = value + when 'cert_store' + cfg.cert_store = value + else + raise ArgumentError.new("unknown ssl_config property #{key}") + end + end + end + + def ssl_config_int(value) + if value.nil? or value.to_s.empty? + nil + else + begin + Integer(value) + rescue ArgumentError + ::SOAP::Property::Util.const_from_name(value.to_s) + end + end + end + + def cert_from_file(filename) + OpenSSL::X509::Certificate.new(File.open(filename) { |f| f.read }) + end + + def key_from_file(filename) + OpenSSL::PKey::RSA.new(File.open(filename) { |f| f.read }) + end +end + + +end diff --git a/lib/soap/mapping.rb b/lib/soap/mapping.rb new file mode 100644 index 0000000..b83f8b4 --- /dev/null +++ b/lib/soap/mapping.rb @@ -0,0 +1,10 @@ +# SOAP4R - Ruby type mapping utility. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/mapping/mapping' +require 'soap/mapping/registry' diff --git a/lib/soap/mapping/factory.rb b/lib/soap/mapping/factory.rb new file mode 100644 index 0000000..978b303 --- /dev/null +++ b/lib/soap/mapping/factory.rb @@ -0,0 +1,355 @@ +# SOAP4R - Mapping factory. +# Copyright (C) 2000, 2001, 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module SOAP +module Mapping + + +class Factory + include TraverseSupport + + def initialize + # nothing to do + end + + def obj2soap(soap_class, obj, info, map) + raise NotImplementError.new + # return soap_obj + end + + def soap2obj(obj_class, node, info, map) + raise NotImplementError.new + # return convert_succeeded_or_not, obj + end + + def setiv2obj(obj, node, map) + return if node.nil? + if obj.is_a?(Array) + setiv2ary(obj, node, map) + else + setiv2struct(obj, node, map) + end + end + + def setiv2soap(node, obj, map) + if obj.class.class_variables.include?('@@schema_element') + obj.class.class_eval('@@schema_element').each do |name, info| + type, qname = info + if qname + elename = qname.name + else + elename = Mapping.name2elename(name) + end + node.add(elename, + Mapping._obj2soap(obj.instance_variable_get('@' + name), map)) + end + else + # should we sort instance_variables? + obj.instance_variables.each do |var| + name = var.sub(/^@/, '') + elename = Mapping.name2elename(name) + node.add(elename, + Mapping._obj2soap(obj.instance_variable_get(var), map)) + end + end + end + +private + + def setiv2ary(obj, node, map) + node.each do |name, value| + Array.instance_method(:<<).bind(obj).call(Mapping._soap2obj(value, map)) + end + end + + def setiv2struct(obj, node, map) + vars = {} + node.each do |name, value| + vars[Mapping.elename2name(name)] = Mapping._soap2obj(value, map) + end + Mapping.set_attributes(obj, vars) + end +end + +class StringFactory_ < Factory + def initialize(allow_original_mapping = false) + super() + @allow_original_mapping = allow_original_mapping + end + + def obj2soap(soap_class, obj, info, map) + if !@allow_original_mapping and !obj.instance_variables.empty? + return nil + end + begin + unless XSD::Charset.is_ces(obj, Thread.current[:SOAPExternalCES]) + return nil + end + encoded = XSD::Charset.encoding_conv(obj, + Thread.current[:SOAPExternalCES], XSD::Charset.encoding) + soap_obj = soap_class.new(encoded) + rescue XSD::ValueSpaceError + return nil + end + mark_marshalled_obj(obj, soap_obj) + soap_obj + end + + def soap2obj(obj_class, node, info, map) + obj = Mapping.create_empty_object(obj_class) + decoded = XSD::Charset.encoding_conv(node.data, XSD::Charset.encoding, + Thread.current[:SOAPExternalCES]) + obj.replace(decoded) + mark_unmarshalled_obj(node, obj) + return true, obj + end +end + +class BasetypeFactory_ < Factory + def initialize(allow_original_mapping = false) + super() + @allow_original_mapping = allow_original_mapping + end + + def obj2soap(soap_class, obj, info, map) + if !@allow_original_mapping and !obj.instance_variables.empty? + return nil + end + soap_obj = nil + begin + soap_obj = soap_class.new(obj) + rescue XSD::ValueSpaceError + return nil + end + if @allow_original_mapping + # Basetype except String should not be multiref-ed in SOAP/1.1. + mark_marshalled_obj(obj, soap_obj) + end + soap_obj + end + + def soap2obj(obj_class, node, info, map) + obj = node.data + mark_unmarshalled_obj(node, obj) + return true, obj + end +end + +class DateTimeFactory_ < Factory + def initialize(allow_original_mapping = false) + super() + @allow_original_mapping = allow_original_mapping + end + + def obj2soap(soap_class, obj, info, map) + if !@allow_original_mapping and + Time === obj and !obj.instance_variables.empty? + return nil + end + soap_obj = nil + begin + soap_obj = soap_class.new(obj) + rescue XSD::ValueSpaceError + return nil + end + mark_marshalled_obj(obj, soap_obj) + soap_obj + end + + def soap2obj(obj_class, node, info, map) + if node.respond_to?(:to_obj) + obj = node.to_obj(obj_class) + return false if obj.nil? + mark_unmarshalled_obj(node, obj) + return true, obj + else + return false + end + end +end + +class Base64Factory_ < Factory + def obj2soap(soap_class, obj, info, map) + return nil unless obj.instance_variables.empty? + soap_obj = soap_class.new(obj) + mark_marshalled_obj(obj, soap_obj) if soap_obj + soap_obj + end + + def soap2obj(obj_class, node, info, map) + obj = node.string + mark_unmarshalled_obj(node, obj) + return true, obj + end +end + +class URIFactory_ < Factory + def obj2soap(soap_class, obj, info, map) + soap_obj = soap_class.new(obj) + mark_marshalled_obj(obj, soap_obj) if soap_obj + soap_obj + end + + def soap2obj(obj_class, node, info, map) + obj = node.data + mark_unmarshalled_obj(node, obj) + return true, obj + end +end + +class ArrayFactory_ < Factory + def initialize(allow_original_mapping = false) + super() + @allow_original_mapping = allow_original_mapping + end + + # [[1], [2]] is converted to Array of Array, not 2-D Array. + # To create M-D Array, you must call Mapping.ary2md. + def obj2soap(soap_class, obj, info, map) + if !@allow_original_mapping and !obj.instance_variables.empty? + return nil + end + arytype = Mapping.obj2element(obj) + if arytype.name + arytype.namespace ||= RubyTypeNamespace + else + arytype = XSD::AnyTypeName + end + soap_obj = SOAPArray.new(ValueArrayName, 1, arytype) + mark_marshalled_obj(obj, soap_obj) + obj.each do |item| + soap_obj.add(Mapping._obj2soap(item, map)) + end + soap_obj + end + + def soap2obj(obj_class, node, info, map) + obj = Mapping.create_empty_object(obj_class) + mark_unmarshalled_obj(node, obj) + node.soap2array(obj) do |elem| + elem ? Mapping._soap2obj(elem, map) : nil + end + return true, obj + end +end + +class TypedArrayFactory_ < Factory + def initialize(allow_original_mapping = false) + super() + @allow_original_mapping = allow_original_mapping + end + + def obj2soap(soap_class, obj, info, map) + if !@allow_original_mapping and !obj.instance_variables.empty? + return nil + end + arytype = info[:type] || info[0] + soap_obj = SOAPArray.new(ValueArrayName, 1, arytype) + mark_marshalled_obj(obj, soap_obj) + obj.each do |var| + soap_obj.add(Mapping._obj2soap(var, map)) + end + soap_obj + end + + def soap2obj(obj_class, node, info, map) + if node.rank > 1 + return false + end + arytype = info[:type] || info[0] + unless node.arytype == arytype + return false + end + obj = Mapping.create_empty_object(obj_class) + mark_unmarshalled_obj(node, obj) + node.soap2array(obj) do |elem| + elem ? Mapping._soap2obj(elem, map) : nil + end + return true, obj + end +end + +class TypedStructFactory_ < Factory + def obj2soap(soap_class, obj, info, map) + type = info[:type] || info[0] + soap_obj = soap_class.new(type) + mark_marshalled_obj(obj, soap_obj) + if obj.class <= SOAP::Marshallable + setiv2soap(soap_obj, obj, map) + else + setiv2soap(soap_obj, obj, map) + end + soap_obj + end + + def soap2obj(obj_class, node, info, map) + type = info[:type] || info[0] + unless node.type == type + return false + end + obj = Mapping.create_empty_object(obj_class) + mark_unmarshalled_obj(node, obj) + setiv2obj(obj, node, map) + return true, obj + end +end + +MapQName = XSD::QName.new(ApacheSOAPTypeNamespace, 'Map') +class HashFactory_ < Factory + def initialize(allow_original_mapping = false) + super() + @allow_original_mapping = allow_original_mapping + end + + def obj2soap(soap_class, obj, info, map) + if !@allow_original_mapping and !obj.instance_variables.empty? + return nil + end + if !obj.default.nil? or + (obj.respond_to?(:default_proc) and obj.default_proc) + return nil + end + soap_obj = SOAPStruct.new(MapQName) + mark_marshalled_obj(obj, soap_obj) + obj.each do |key, value| + elem = SOAPStruct.new + elem.add("key", Mapping._obj2soap(key, map)) + elem.add("value", Mapping._obj2soap(value, map)) + # ApacheAxis allows only 'item' here. + soap_obj.add("item", elem) + end + soap_obj + end + + def soap2obj(obj_class, node, info, map) + unless node.type == MapQName + return false + end + if node.class == SOAPStruct and node.key?('default') + return false + end + obj = Mapping.create_empty_object(obj_class) + mark_unmarshalled_obj(node, obj) + if node.class == SOAPStruct + node.each do |key, value| + obj[Mapping._soap2obj(value['key'], map)] = + Mapping._soap2obj(value['value'], map) + end + else + node.each do |value| + obj[Mapping._soap2obj(value['key'], map)] = + Mapping._soap2obj(value['value'], map) + end + end + return true, obj + end +end + + +end +end diff --git a/lib/soap/mapping/mapping.rb b/lib/soap/mapping/mapping.rb new file mode 100644 index 0000000..faa6ffd --- /dev/null +++ b/lib/soap/mapping/mapping.rb @@ -0,0 +1,459 @@ +# SOAP4R - Ruby type mapping utility. +# Copyright (C) 2000, 2001, 2003-2005 NAKAMURA Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' + + +module SOAP + + +module Mapping + RubyTypeNamespace = 'http://www.ruby-lang.org/xmlns/ruby/type/1.6' + RubyTypeInstanceNamespace = + 'http://www.ruby-lang.org/xmlns/ruby/type-instance' + RubyCustomTypeNamespace = 'http://www.ruby-lang.org/xmlns/ruby/type/custom' + ApacheSOAPTypeNamespace = 'http://xml.apache.org/xml-soap' + + + # TraverseSupport breaks following thread variables. + # Thread.current[:SOAPMarshalDataKey] + module TraverseSupport + def mark_marshalled_obj(obj, soap_obj) + raise if obj.nil? + Thread.current[:SOAPMarshalDataKey][obj.__id__] = soap_obj + end + + def mark_unmarshalled_obj(node, obj) + return if obj.nil? + # node.id is not Object#id but SOAPReference#id + Thread.current[:SOAPMarshalDataKey][node.id] = obj + end + end + + + EMPTY_OPT = {} + def self.obj2soap(obj, registry = nil, type = nil, opt = EMPTY_OPT) + registry ||= Mapping::DefaultRegistry + soap_obj = nil + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} + Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + soap_obj = _obj2soap(obj, registry, type) + end + soap_obj + end + + def self.soap2obj(node, registry = nil, klass = nil, opt = EMPTY_OPT) + registry ||= Mapping::DefaultRegistry + obj = nil + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} + Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + obj = _soap2obj(node, registry, klass) + end + obj + end + + def self.ary2soap(ary, type_ns = XSD::Namespace, typename = XSD::AnyTypeLiteral, registry = nil, opt = EMPTY_OPT) + registry ||= Mapping::DefaultRegistry + type = XSD::QName.new(type_ns, typename) + soap_ary = SOAPArray.new(ValueArrayName, 1, type) + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} + Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + ary.each do |ele| + soap_ary.add(_obj2soap(ele, registry, type)) + end + end + soap_ary + end + + def self.ary2md(ary, rank, type_ns = XSD::Namespace, typename = XSD::AnyTypeLiteral, registry = nil, opt = EMPTY_OPT) + registry ||= Mapping::DefaultRegistry + type = XSD::QName.new(type_ns, typename) + md_ary = SOAPArray.new(ValueArrayName, rank, type) + protect_threadvars(:SOAPMarshalDataKey, :SOAPExternalCES, :SOAPMarshalNoReference) do + Thread.current[:SOAPMarshalDataKey] = {} + Thread.current[:SOAPExternalCES] = opt[:external_ces] || $KCODE + Thread.current[:SOAPMarshalNoReference] = opt[:no_reference] + add_md_ary(md_ary, ary, [], registry) + end + md_ary + end + + def self.fault2exception(fault, registry = nil) + registry ||= Mapping::DefaultRegistry + detail = if fault.detail + soap2obj(fault.detail, registry) || "" + else + "" + end + if detail.is_a?(Mapping::SOAPException) + begin + e = detail.to_e + remote_backtrace = e.backtrace + e.set_backtrace(nil) + raise e # ruby sets current caller as local backtrace of e => e2. + rescue Exception => e + e.set_backtrace(remote_backtrace + e.backtrace[1..-1]) + raise + end + else + fault.detail = detail + fault.set_backtrace( + if detail.is_a?(Array) + detail + else + [detail.to_s] + end + ) + raise + end + end + + def self._obj2soap(obj, registry, type = nil) + if referent = Thread.current[:SOAPMarshalDataKey][obj.__id__] and + !Thread.current[:SOAPMarshalNoReference] + SOAPReference.new(referent) + elsif registry + registry.obj2soap(obj, type) + else + raise MappingError.new("no mapping registry given") + end + end + + def self._soap2obj(node, registry, klass = nil) + if node.nil? + return nil + elsif node.is_a?(SOAPReference) + target = node.__getobj__ + # target.id is not Object#id but SOAPReference#id + if referent = Thread.current[:SOAPMarshalDataKey][target.id] and + !Thread.current[:SOAPMarshalNoReference] + return referent + else + return _soap2obj(target, registry, klass) + end + end + return registry.soap2obj(node, klass) + end + + if Object.respond_to?(:allocate) + # ruby/1.7 or later. + def self.create_empty_object(klass) + klass.allocate + end + else + MARSHAL_TAG = { + String => ['"', 1], + Regexp => ['/', 2], + Array => ['[', 1], + Hash => ['{', 1] + } + def self.create_empty_object(klass) + if klass <= Struct + name = klass.name + return ::Marshal.load(sprintf("\004\006S:%c%s\000", name.length + 5, name)) + end + if MARSHAL_TAG.has_key?(klass) + tag, terminate = MARSHAL_TAG[klass] + return ::Marshal.load(sprintf("\004\006%s%s", tag, "\000" * terminate)) + end + MARSHAL_TAG.each do |k, v| + if klass < k + name = klass.name + tag, terminate = v + return ::Marshal.load(sprintf("\004\006C:%c%s%s%s", name.length + 5, name, tag, "\000" * terminate)) + end + end + name = klass.name + ::Marshal.load(sprintf("\004\006o:%c%s\000", name.length + 5, name)) + end + end + + # Allow only (Letter | '_') (Letter | Digit | '-' | '_')* here. + # Caution: '.' is not allowed here. + # To follow XML spec., it should be NCName. + # (denied chars) => .[0-F][0-F] + # ex. a.b => a.2eb + # + def self.name2elename(name) + name.gsub(/([^a-zA-Z0-9:_\-]+)/n) { + '.' << $1.unpack('H2' * $1.size).join('.') + }.gsub(/::/n, '..') + end + + def self.elename2name(name) + name.gsub(/\.\./n, '::').gsub(/((?:\.[0-9a-fA-F]{2})+)/n) { + [$1.delete('.')].pack('H*') + } + end + + def self.const_from_name(name, lenient = false) + const = ::Object + name.sub(/\A::/, '').split('::').each do |const_str| + if XSD::CodeGen::GenSupport.safeconstname?(const_str) + if const.const_defined?(const_str) + const = const.const_get(const_str) + next + end + elsif lenient + const_str = XSD::CodeGen::GenSupport.safeconstname(const_str) + if const.const_defined?(const_str) + const = const.const_get(const_str) + next + end + end + return nil + end + const + end + + def self.class_from_name(name, lenient = false) + const = const_from_name(name, lenient) + if const.is_a?(::Class) + const + else + nil + end + end + + def self.module_from_name(name, lenient = false) + const = const_from_name(name, lenient) + if const.is_a?(::Module) + const + else + nil + end + end + + def self.class2qname(klass) + name = schema_type_definition(klass) + namespace = schema_ns_definition(klass) + XSD::QName.new(namespace, name) + end + + def self.class2element(klass) + type = Mapping.class2qname(klass) + type.name ||= Mapping.name2elename(klass.name) + type.namespace ||= RubyCustomTypeNamespace + type + end + + def self.obj2element(obj) + name = namespace = nil + ivars = obj.instance_variables + if ivars.include?('@schema_type') + name = obj.instance_variable_get('@schema_type') + end + if ivars.include?('@schema_ns') + namespace = obj.instance_variable_get('@schema_ns') + end + if !name or !namespace + class2qname(obj.class) + else + XSD::QName.new(namespace, name) + end + end + + def self.define_singleton_method(obj, name, &block) + sclass = (class << obj; self; end) + sclass.class_eval { + define_method(name, &block) + } + end + + def self.get_attributes(obj) + if obj.is_a?(::Hash) + obj + else + rs = {} + obj.instance_variables.each do |ele| + rs[ele.sub(/^@/, '')] = obj.instance_variable_get(ele) + end + rs + end + end + + def self.get_attribute(obj, attr_name) + if obj.is_a?(::Hash) + return obj[attr_name] || obj[attr_name.intern] + end + iv = obj.instance_variables + name = XSD::CodeGen::GenSupport.safevarname(attr_name) + if iv.include?("@#{name}") + return obj.instance_variable_get("@#{name}") + elsif iv.include?("@#{attr_name}") + return obj.instance_variable_get("@#{attr_name}") + end + if obj.is_a?(::Struct) or obj.is_a?(Marshallable) + if obj.respond_to?(name) + return obj.__send__(name) + elsif obj.respond_to?(attr_name) + return obj.__send__(attr_name) + end + end + nil + end + + def self.set_attributes(obj, values) + case obj + when ::SOAP::Mapping::Object + values.each do |attr_name, value| + obj.__add_xmlele_value(attr_name, value) + end + else + values.each do |attr_name, value| + name = XSD::CodeGen::GenSupport.safevarname(attr_name) + setter = name + "=" + if obj.respond_to?(setter) + obj.__send__(setter, value) + else + obj.instance_variable_set('@' + name, value) + begin + define_attr_accessor(obj, name, + proc { instance_variable_get('@' + name) }, + proc { |value| instance_variable_set('@' + name, value) }) + rescue TypeError + # singleton class may not exist (e.g. Float) + end + end + end + end + end + + def self.define_attr_accessor(obj, name, getterproc, setterproc = nil) + define_singleton_method(obj, name, &getterproc) + define_singleton_method(obj, name + '=', &setterproc) if setterproc + end + + def self.schema_type_definition(klass) + class_schema_variable(:schema_type, klass) + end + + def self.schema_ns_definition(klass) + class_schema_variable(:schema_ns, klass) + end + + def self.schema_element_definition(klass) + schema_element = class_schema_variable(:schema_element, klass) + return nil unless schema_element + schema_ns = schema_ns_definition(klass) + parse_schema_element_definition(schema_ns, schema_element) + end + + class SchemaElementDefinition + attr_reader :elename, :type + + def initialize(elename, type, as_array) + @elename = elename + @type = type + @as_array = as_array + end + + def as_array? + @as_array + end + end + + class SchemaDefinition + attr_reader :elements + + def initialize(*arg) + super + @elements = [] + @choice = false + @any = false + end + + def choice? + @choice + end + + def have_any? + @any + end + + def set_choice + @choice = true + end + + def set_any + @any = true + end + end + + def self.schema_attribute_definition(klass) + class_schema_variable(:schema_attribute, klass) + end + + class << Mapping + private + + def parse_schema_element_definition(schema_ns, schema_element) + definition = SchemaDefinition.new + if schema_element[0] == :choice + schema_element.shift + definition.set_choice + end + schema_element.each do |element| + varname, info = element + class_name, name = info + as_array = false + if /\[\]$/ =~ class_name + class_name = class_name.sub(/\[\]$/, '') + if class_name.empty? + class_name = nil + end + as_array = true + end + if name == XSD::AnyTypeName + definition.set_any + end + definition.elements << SchemaElementDefinition.new( + name || XSD::QName.new(schema_ns, varname), class_name, as_array) + end + definition + end + + def class_schema_variable(sym, klass) + var = "@@#{sym}" + klass.class_variables.include?(var) ? klass.class_eval(var) : nil + end + + def protect_threadvars(*symbols) + backup = {} + begin + symbols.each do |sym| + backup[sym] = Thread.current[sym] + end + yield + ensure + symbols.each do |sym| + Thread.current[sym] = backup[sym] + end + end + end + + def add_md_ary(md_ary, ary, indices, registry) + for idx in 0..(ary.size - 1) + if ary[idx].is_a?(Array) + add_md_ary(md_ary, ary[idx], indices + [idx], registry) + else + md_ary[*(indices + [idx])] = _obj2soap(ary[idx], registry) + end + end + end + end +end + + +end diff --git a/lib/soap/mapping/registry.rb b/lib/soap/mapping/registry.rb new file mode 100644 index 0000000..823e806 --- /dev/null +++ b/lib/soap/mapping/registry.rb @@ -0,0 +1,541 @@ +# SOAP4R - Mapping registry. +# Copyright (C) 2000, 2001, 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/baseData' +require 'soap/mapping/mapping' +require 'soap/mapping/typeMap' +require 'soap/mapping/factory' +require 'soap/mapping/rubytypeFactory' + + +module SOAP + + +module Marshallable + # @@type_ns = Mapping::RubyCustomTypeNamespace +end + + +module Mapping + + +module MappedException; end + + +RubyTypeName = XSD::QName.new(RubyTypeInstanceNamespace, 'rubyType') +RubyExtendName = XSD::QName.new(RubyTypeInstanceNamespace, 'extends') +RubyIVarName = XSD::QName.new(RubyTypeInstanceNamespace, 'ivars') + + +# Inner class to pass an exception. +class SOAPException; include Marshallable + attr_reader :excn_type_name, :cause + def initialize(e) + @excn_type_name = Mapping.name2elename(e.class.to_s) + @cause = e + end + + def to_e + if @cause.is_a?(::Exception) + @cause.extend(::SOAP::Mapping::MappedException) + return @cause + elsif @cause.respond_to?(:message) and @cause.respond_to?(:backtrace) + e = RuntimeError.new(@cause.message) + e.set_backtrace(@cause.backtrace) + return e + end + klass = Mapping.class_from_name(Mapping.elename2name(@excn_type_name.to_s)) + if klass.nil? or not klass <= ::Exception + return RuntimeError.new(@cause.inspect) + end + obj = klass.new(@cause.message) + obj.extend(::SOAP::Mapping::MappedException) + obj + end +end + + +# For anyType object: SOAP::Mapping::Object not ::Object +class Object; include Marshallable + def initialize + @__xmlele_type = {} + @__xmlele = [] + @__xmlattr = {} + end + + def inspect + sprintf("#<%s:0x%x%s>", self.class.name, __id__, + @__xmlele.collect { |name, value| " #{name}=#{value.inspect}" }.join) + end + + def __xmlattr + @__xmlattr + end + + def __xmlele + @__xmlele + end + + def [](qname) + unless qname.is_a?(XSD::QName) + qname = XSD::QName.new(nil, qname) + end + @__xmlele.each do |k, v| + return v if k == qname + end + # fallback + @__xmlele.each do |k, v| + return v if k.name == qname.name + end + nil + end + + def []=(qname, value) + unless qname.is_a?(XSD::QName) + qname = XSD::QName.new(nil, qname) + end + found = false + @__xmlele.each do |pair| + if pair[0] == qname + found = true + pair[1] = value + end + end + unless found + __define_attr_accessor(qname) + @__xmlele << [qname, value] + end + @__xmlele_type[qname] = :single + end + + def __add_xmlele_value(qname, value) + found = false + @__xmlele.map! do |k, v| + if k == qname + found = true + [k, __set_xmlele_value(k, v, value)] + else + [k, v] + end + end + unless found + __define_attr_accessor(qname) + @__xmlele << [qname, value] + @__xmlele_type[qname] = :single + end + value + end + +private + + if RUBY_VERSION > "1.7.0" + def __define_attr_accessor(qname) + name = XSD::CodeGen::GenSupport.safemethodname(qname.name) + Mapping.define_attr_accessor(self, name, + proc { self[qname] }, + proc { |value| self[qname] = value }) + end + else + def __define_attr_accessor(qname) + name = XSD::CodeGen::GenSupport.safemethodname(qname.name) + instance_eval <<-EOS + def #{name} + self[#{qname.dump}] + end + + def #{name}=(value) + self[#{qname.dump}] = value + end + EOS + end + end + + def __set_xmlele_value(key, org, value) + case @__xmlele_type[key] + when :multi + org << value + org + when :single + @__xmlele_type[key] = :multi + [org, value] + else + raise RuntimeError.new("unknown type") + end + end +end + + +class MappingError < Error; end + + +class Registry + class Map + def initialize(registry) + @obj2soap = {} + @soap2obj = {} + @registry = registry + end + + def obj2soap(obj) + klass = obj.class + if map = @obj2soap[klass] + map.each do |soap_class, factory, info| + ret = factory.obj2soap(soap_class, obj, info, @registry) + return ret if ret + end + end + ancestors = klass.ancestors + ancestors.delete(klass) + ancestors.delete(::Object) + ancestors.delete(::Kernel) + ancestors.each do |klass| + if map = @obj2soap[klass] + map.each do |soap_class, factory, info| + if info[:derived_class] + ret = factory.obj2soap(soap_class, obj, info, @registry) + return ret if ret + end + end + end + end + nil + end + + def soap2obj(node, klass = nil) + if map = @soap2obj[node.class] + map.each do |obj_class, factory, info| + next if klass and obj_class != klass + conv, obj = factory.soap2obj(obj_class, node, info, @registry) + return true, obj if conv + end + end + return false, nil + end + + # Give priority to former entry. + def init(init_map = []) + clear + init_map.reverse_each do |obj_class, soap_class, factory, info| + add(obj_class, soap_class, factory, info) + end + end + + # Give priority to latter entry. + def add(obj_class, soap_class, factory, info) + info ||= {} + (@obj2soap[obj_class] ||= []).unshift([soap_class, factory, info]) + (@soap2obj[soap_class] ||= []).unshift([obj_class, factory, info]) + end + + def clear + @obj2soap.clear + @soap2obj.clear + end + + def find_mapped_soap_class(target_obj_class) + map = @obj2soap[target_obj_class] + map.empty? ? nil : map[0][1] + end + + def find_mapped_obj_class(target_soap_class) + map = @soap2obj[target_soap_class] + map.empty? ? nil : map[0][0] + end + end + + StringFactory = StringFactory_.new + BasetypeFactory = BasetypeFactory_.new + DateTimeFactory = DateTimeFactory_.new + ArrayFactory = ArrayFactory_.new + Base64Factory = Base64Factory_.new + URIFactory = URIFactory_.new + TypedArrayFactory = TypedArrayFactory_.new + TypedStructFactory = TypedStructFactory_.new + + HashFactory = HashFactory_.new + + SOAPBaseMap = [ + [::NilClass, ::SOAP::SOAPNil, BasetypeFactory], + [::TrueClass, ::SOAP::SOAPBoolean, BasetypeFactory], + [::FalseClass, ::SOAP::SOAPBoolean, BasetypeFactory], + [::String, ::SOAP::SOAPString, StringFactory], + [::DateTime, ::SOAP::SOAPDateTime, DateTimeFactory], + [::Date, ::SOAP::SOAPDate, DateTimeFactory], + [::Time, ::SOAP::SOAPDateTime, DateTimeFactory], + [::Time, ::SOAP::SOAPTime, DateTimeFactory], + [::Float, ::SOAP::SOAPDouble, BasetypeFactory, + {:derived_class => true}], + [::Float, ::SOAP::SOAPFloat, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPInt, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPLong, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPShort, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPByte, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPNonPositiveInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPNegativeInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPNonNegativeInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPPositiveInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedLong, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedInt, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedShort, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedByte, BasetypeFactory, + {:derived_class => true}], + [::URI::Generic, ::SOAP::SOAPAnyURI, URIFactory, + {:derived_class => true}], + [::String, ::SOAP::SOAPBase64, Base64Factory], + [::String, ::SOAP::SOAPHexBinary, Base64Factory], + [::String, ::SOAP::SOAPDecimal, BasetypeFactory], + [::String, ::SOAP::SOAPDuration, BasetypeFactory], + [::String, ::SOAP::SOAPGYearMonth, BasetypeFactory], + [::String, ::SOAP::SOAPGYear, BasetypeFactory], + [::String, ::SOAP::SOAPGMonthDay, BasetypeFactory], + [::String, ::SOAP::SOAPGDay, BasetypeFactory], + [::String, ::SOAP::SOAPGMonth, BasetypeFactory], + [::String, ::SOAP::SOAPQName, BasetypeFactory], + + [::Hash, ::SOAP::SOAPArray, HashFactory], + [::Hash, ::SOAP::SOAPStruct, HashFactory], + + [::Array, ::SOAP::SOAPArray, ArrayFactory, + {:derived_class => true}], + + [::SOAP::Mapping::SOAPException, + ::SOAP::SOAPStruct, TypedStructFactory, + {:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}], + ] + + RubyOriginalMap = [ + [::NilClass, ::SOAP::SOAPNil, BasetypeFactory], + [::TrueClass, ::SOAP::SOAPBoolean, BasetypeFactory], + [::FalseClass, ::SOAP::SOAPBoolean, BasetypeFactory], + [::String, ::SOAP::SOAPString, StringFactory], + [::DateTime, ::SOAP::SOAPDateTime, DateTimeFactory], + [::Date, ::SOAP::SOAPDate, DateTimeFactory], + [::Time, ::SOAP::SOAPDateTime, DateTimeFactory], + [::Time, ::SOAP::SOAPTime, DateTimeFactory], + [::Float, ::SOAP::SOAPDouble, BasetypeFactory, + {:derived_class => true}], + [::Float, ::SOAP::SOAPFloat, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPInt, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPLong, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPShort, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPByte, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPNonPositiveInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPNegativeInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPNonNegativeInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPPositiveInteger, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedLong, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedInt, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedShort, BasetypeFactory, + {:derived_class => true}], + [::Integer, ::SOAP::SOAPUnsignedByte, BasetypeFactory, + {:derived_class => true}], + [::URI::Generic, ::SOAP::SOAPAnyURI, URIFactory, + {:derived_class => true}], + [::String, ::SOAP::SOAPBase64, Base64Factory], + [::String, ::SOAP::SOAPHexBinary, Base64Factory], + [::String, ::SOAP::SOAPDecimal, BasetypeFactory], + [::String, ::SOAP::SOAPDuration, BasetypeFactory], + [::String, ::SOAP::SOAPGYearMonth, BasetypeFactory], + [::String, ::SOAP::SOAPGYear, BasetypeFactory], + [::String, ::SOAP::SOAPGMonthDay, BasetypeFactory], + [::String, ::SOAP::SOAPGDay, BasetypeFactory], + [::String, ::SOAP::SOAPGMonth, BasetypeFactory], + [::String, ::SOAP::SOAPQName, BasetypeFactory], + + [::Hash, ::SOAP::SOAPArray, HashFactory], + [::Hash, ::SOAP::SOAPStruct, HashFactory], + + # Does not allow Array's subclass here. + [::Array, ::SOAP::SOAPArray, ArrayFactory], + + [::SOAP::Mapping::SOAPException, + ::SOAP::SOAPStruct, TypedStructFactory, + {:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}], + ] + + attr_accessor :default_factory + attr_accessor :excn_handler_obj2soap + attr_accessor :excn_handler_soap2obj + + def initialize(config = {}) + @config = config + @map = Map.new(self) + if @config[:allow_original_mapping] + @allow_original_mapping = true + @map.init(RubyOriginalMap) + else + @allow_original_mapping = false + @map.init(SOAPBaseMap) + end + @allow_untyped_struct = @config.key?(:allow_untyped_struct) ? + @config[:allow_untyped_struct] : true + @rubytype_factory = RubytypeFactory.new( + :allow_untyped_struct => @allow_untyped_struct, + :allow_original_mapping => @allow_original_mapping + ) + @default_factory = @rubytype_factory + @excn_handler_obj2soap = nil + @excn_handler_soap2obj = nil + end + + def add(obj_class, soap_class, factory, info = nil) + @map.add(obj_class, soap_class, factory, info) + end + alias set add + + # general Registry ignores type_qname + def obj2soap(obj, type_qname = nil) + soap = _obj2soap(obj) + if @allow_original_mapping + addextend2soap(soap, obj) + end + soap + end + + def soap2obj(node, klass = nil) + obj = _soap2obj(node, klass) + if @allow_original_mapping + addextend2obj(obj, node.extraattr[RubyExtendName]) + addiv2obj(obj, node.extraattr[RubyIVarName]) + end + obj + end + + def find_mapped_soap_class(obj_class) + @map.find_mapped_soap_class(obj_class) + end + + def find_mapped_obj_class(soap_class) + @map.find_mapped_obj_class(soap_class) + end + +private + + def _obj2soap(obj) + ret = nil + if obj.is_a?(SOAPStruct) or obj.is_a?(SOAPArray) + obj.replace do |ele| + Mapping._obj2soap(ele, self) + end + return obj + elsif obj.is_a?(SOAPBasetype) + return obj + end + begin + ret = @map.obj2soap(obj) || + @default_factory.obj2soap(nil, obj, nil, self) + return ret if ret + rescue MappingError + end + if @excn_handler_obj2soap + ret = @excn_handler_obj2soap.call(obj) { |yield_obj| + Mapping._obj2soap(yield_obj, self) + } + return ret if ret + end + raise MappingError.new("Cannot map #{ obj.class.name } to SOAP/OM.") + end + + # Might return nil as a mapping result. + def _soap2obj(node, klass = nil) + if node.extraattr.key?(RubyTypeName) + conv, obj = @rubytype_factory.soap2obj(nil, node, nil, self) + return obj if conv + else + conv, obj = @map.soap2obj(node, klass) + return obj if conv + conv, obj = @default_factory.soap2obj(nil, node, nil, self) + return obj if conv + end + if @excn_handler_soap2obj + begin + return @excn_handler_soap2obj.call(node) { |yield_node| + Mapping._soap2obj(yield_node, self) + } + rescue Exception + end + end + raise MappingError.new("Cannot map #{ node.type.name } to Ruby object.") + end + + def addiv2obj(obj, attr) + return unless attr + vars = {} + attr.__getobj__.each do |name, value| + vars[name] = Mapping._soap2obj(value, self) + end + Mapping.set_attributes(obj, vars) + end + + if RUBY_VERSION >= '1.8.0' + def addextend2obj(obj, attr) + return unless attr + attr.split(/ /).reverse_each do |mstr| + obj.extend(Mapping.module_from_name(mstr)) + end + end + else + # (class < false; self; end).ancestors includes "TrueClass" under 1.6... + def addextend2obj(obj, attr) + return unless attr + attr.split(/ /).reverse_each do |mstr| + m = Mapping.module_from_name(mstr) + obj.extend(m) + end + end + end + + def addextend2soap(node, obj) + return if obj.is_a?(Symbol) or obj.is_a?(Fixnum) + list = (class << obj; self; end).ancestors - obj.class.ancestors + unless list.empty? + node.extraattr[RubyExtendName] = list.collect { |c| + if c.name.empty? + raise TypeError.new("singleton can't be dumped #{ obj }") + end + c.name + }.join(" ") + end + end + +end + + +DefaultRegistry = Registry.new +RubyOriginalRegistry = Registry.new(:allow_original_mapping => true) + + +end +end diff --git a/lib/soap/mapping/rubytypeFactory.rb b/lib/soap/mapping/rubytypeFactory.rb new file mode 100644 index 0000000..61c21d8 --- /dev/null +++ b/lib/soap/mapping/rubytypeFactory.rb @@ -0,0 +1,475 @@ +# SOAP4R - Ruby type mapping factory. +# Copyright (C) 2000-2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module SOAP +module Mapping + + +class RubytypeFactory < Factory + TYPE_STRING = XSD::QName.new(RubyTypeNamespace, 'String') + TYPE_TIME = XSD::QName.new(RubyTypeNamespace, 'Time') + TYPE_ARRAY = XSD::QName.new(RubyTypeNamespace, 'Array') + TYPE_REGEXP = XSD::QName.new(RubyTypeNamespace, 'Regexp') + TYPE_RANGE = XSD::QName.new(RubyTypeNamespace, 'Range') + TYPE_CLASS = XSD::QName.new(RubyTypeNamespace, 'Class') + TYPE_MODULE = XSD::QName.new(RubyTypeNamespace, 'Module') + TYPE_SYMBOL = XSD::QName.new(RubyTypeNamespace, 'Symbol') + TYPE_STRUCT = XSD::QName.new(RubyTypeNamespace, 'Struct') + TYPE_HASH = XSD::QName.new(RubyTypeNamespace, 'Map') + + def initialize(config = {}) + @config = config + @allow_untyped_struct = @config.key?(:allow_untyped_struct) ? + @config[:allow_untyped_struct] : true + @allow_original_mapping = @config.key?(:allow_original_mapping) ? + @config[:allow_original_mapping] : false + @string_factory = StringFactory_.new(true) + @basetype_factory = BasetypeFactory_.new(true) + @datetime_factory = DateTimeFactory_.new(true) + @array_factory = ArrayFactory_.new(true) + @hash_factory = HashFactory_.new(true) + end + + def obj2soap(soap_class, obj, info, map) + param = nil + case obj + when ::String + unless @allow_original_mapping + return nil + end + param = @string_factory.obj2soap(SOAPString, obj, info, map) + if obj.class != String + param.extraattr[RubyTypeName] = obj.class.name + end + addiv2soapattr(param, obj, map) + when ::Time + unless @allow_original_mapping + return nil + end + param = @datetime_factory.obj2soap(SOAPDateTime, obj, info, map) + if obj.class != Time + param.extraattr[RubyTypeName] = obj.class.name + end + addiv2soapattr(param, obj, map) + when ::Array + unless @allow_original_mapping + return nil + end + param = @array_factory.obj2soap(nil, obj, info, map) + if obj.class != Array + param.extraattr[RubyTypeName] = obj.class.name + end + addiv2soapattr(param, obj, map) + when ::NilClass + unless @allow_original_mapping + return nil + end + param = @basetype_factory.obj2soap(SOAPNil, obj, info, map) + addiv2soapattr(param, obj, map) + when ::FalseClass, ::TrueClass + unless @allow_original_mapping + return nil + end + param = @basetype_factory.obj2soap(SOAPBoolean, obj, info, map) + addiv2soapattr(param, obj, map) + when ::Integer + unless @allow_original_mapping + return nil + end + param = @basetype_factory.obj2soap(SOAPInt, obj, info, map) + param ||= @basetype_factory.obj2soap(SOAPInteger, obj, info, map) + param ||= @basetype_factory.obj2soap(SOAPDecimal, obj, info, map) + addiv2soapattr(param, obj, map) + when ::Float + unless @allow_original_mapping + return nil + end + param = @basetype_factory.obj2soap(SOAPDouble, obj, info, map) + if obj.class != Float + param.extraattr[RubyTypeName] = obj.class.name + end + addiv2soapattr(param, obj, map) + when ::Hash + unless @allow_original_mapping + return nil + end + if obj.respond_to?(:default_proc) && obj.default_proc + raise TypeError.new("cannot dump hash with default proc") + end + param = SOAPStruct.new(TYPE_HASH) + mark_marshalled_obj(obj, param) + if obj.class != Hash + param.extraattr[RubyTypeName] = obj.class.name + end + obj.each do |key, value| + elem = SOAPStruct.new # Undefined type. + elem.add("key", Mapping._obj2soap(key, map)) + elem.add("value", Mapping._obj2soap(value, map)) + param.add("item", elem) + end + param.add('default', Mapping._obj2soap(obj.default, map)) + addiv2soapattr(param, obj, map) + when ::Regexp + unless @allow_original_mapping + return nil + end + param = SOAPStruct.new(TYPE_REGEXP) + mark_marshalled_obj(obj, param) + if obj.class != Regexp + param.extraattr[RubyTypeName] = obj.class.name + end + param.add('source', SOAPBase64.new(obj.source)) + if obj.respond_to?('options') + # Regexp#options is from Ruby/1.7 + options = obj.options + else + options = 0 + obj.inspect.sub(/^.*\//, '').each_byte do |c| + options += case c + when ?i + 1 + when ?x + 2 + when ?m + 4 + when ?n + 16 + when ?e + 32 + when ?s + 48 + when ?u + 64 + end + end + end + param.add('options', SOAPInt.new(options)) + addiv2soapattr(param, obj, map) + when ::Range + unless @allow_original_mapping + return nil + end + param = SOAPStruct.new(TYPE_RANGE) + mark_marshalled_obj(obj, param) + if obj.class != Range + param.extraattr[RubyTypeName] = obj.class.name + end + param.add('begin', Mapping._obj2soap(obj.begin, map)) + param.add('end', Mapping._obj2soap(obj.end, map)) + param.add('exclude_end', SOAP::SOAPBoolean.new(obj.exclude_end?)) + addiv2soapattr(param, obj, map) + when ::Class + unless @allow_original_mapping + return nil + end + if obj.to_s[0] == ?# + raise TypeError.new("can't dump anonymous class #{obj}") + end + param = SOAPStruct.new(TYPE_CLASS) + mark_marshalled_obj(obj, param) + param.add('name', SOAPString.new(obj.name)) + addiv2soapattr(param, obj, map) + when ::Module + unless @allow_original_mapping + return nil + end + if obj.to_s[0] == ?# + raise TypeError.new("can't dump anonymous module #{obj}") + end + param = SOAPStruct.new(TYPE_MODULE) + mark_marshalled_obj(obj, param) + param.add('name', SOAPString.new(obj.name)) + addiv2soapattr(param, obj, map) + when ::Symbol + unless @allow_original_mapping + return nil + end + param = SOAPStruct.new(TYPE_SYMBOL) + mark_marshalled_obj(obj, param) + param.add('id', SOAPString.new(obj.id2name)) + addiv2soapattr(param, obj, map) + when ::Struct + unless @allow_original_mapping + # treat it as an user defined class. [ruby-talk:104980] + #param = unknownobj2soap(soap_class, obj, info, map) + param = SOAPStruct.new(XSD::AnyTypeName) + mark_marshalled_obj(obj, param) + obj.members.each do |member| + param.add(Mapping.name2elename(member), + Mapping._obj2soap(obj[member], map)) + end + else + param = SOAPStruct.new(TYPE_STRUCT) + mark_marshalled_obj(obj, param) + param.add('type', ele_type = SOAPString.new(obj.class.to_s)) + ele_member = SOAPStruct.new + obj.members.each do |member| + ele_member.add(Mapping.name2elename(member), + Mapping._obj2soap(obj[member], map)) + end + param.add('member', ele_member) + addiv2soapattr(param, obj, map) + end + when ::IO, ::Binding, ::Continuation, ::Data, ::Dir, ::File::Stat, + ::MatchData, Method, ::Proc, ::Thread, ::ThreadGroup + # from 1.8: Process::Status, UnboundMethod + return nil + when ::SOAP::Mapping::Object + param = SOAPStruct.new(XSD::AnyTypeName) + mark_marshalled_obj(obj, param) + obj.__xmlele.each do |key, value| + param.add(key.name, Mapping._obj2soap(value, map)) + end + obj.__xmlattr.each do |key, value| + param.extraattr[key] = value + end + when ::Exception + typestr = Mapping.name2elename(obj.class.to_s) + param = SOAPStruct.new(XSD::QName.new(RubyTypeNamespace, typestr)) + mark_marshalled_obj(obj, param) + param.add('message', Mapping._obj2soap(obj.message, map)) + param.add('backtrace', Mapping._obj2soap(obj.backtrace, map)) + addiv2soapattr(param, obj, map) + else + param = unknownobj2soap(soap_class, obj, info, map) + end + param + end + + def soap2obj(obj_class, node, info, map) + rubytype = node.extraattr[RubyTypeName] + if rubytype or node.type.namespace == RubyTypeNamespace + rubytype2obj(node, info, map, rubytype) + elsif node.type == XSD::AnyTypeName or node.type == XSD::AnySimpleTypeName + anytype2obj(node, info, map) + else + unknowntype2obj(node, info, map) + end + end + +private + + def addiv2soapattr(node, obj, map) + return if obj.instance_variables.empty? + ivars = SOAPStruct.new # Undefined type. + setiv2soap(ivars, obj, map) + node.extraattr[RubyIVarName] = ivars + end + + def unknownobj2soap(soap_class, obj, info, map) + if obj.class.name.empty? + raise TypeError.new("can't dump anonymous class #{obj}") + end + singleton_class = class << obj; self; end + if !singleton_methods_true(obj).empty? or + !singleton_class.instance_variables.empty? + raise TypeError.new("singleton can't be dumped #{obj}") + end + if !(singleton_class.ancestors - obj.class.ancestors).empty? + typestr = Mapping.name2elename(obj.class.to_s) + type = XSD::QName.new(RubyTypeNamespace, typestr) + else + type = Mapping.class2element(obj.class) + end + param = SOAPStruct.new(type) + mark_marshalled_obj(obj, param) + setiv2soap(param, obj, map) + param + end + + if RUBY_VERSION >= '1.8.0' + def singleton_methods_true(obj) + obj.singleton_methods(true) + end + else + def singleton_methods_true(obj) + obj.singleton_methods + end + end + + def rubytype2obj(node, info, map, rubytype) + klass = rubytype ? Mapping.class_from_name(rubytype) : nil + obj = nil + case node + when SOAPString + return @string_factory.soap2obj(klass || String, node, info, map) + when SOAPDateTime + #return @datetime_factory.soap2obj(klass || Time, node, info, map) + klass ||= Time + t = node.to_time + arg = [t.year, t.month, t.mday, t.hour, t.min, t.sec, t.usec] + obj = t.gmt? ? klass.gm(*arg) : klass.local(*arg) + mark_unmarshalled_obj(node, obj) + return true, obj + when SOAPArray + return @array_factory.soap2obj(klass || Array, node, info, map) + when SOAPNil, SOAPBoolean, SOAPInt, SOAPInteger, SOAPDecimal, SOAPDouble + return @basetype_factory.soap2obj(nil, node, info, map) + when SOAPStruct + return rubytypestruct2obj(node, info, map, rubytype) + else + raise + end + end + + def rubytypestruct2obj(node, info, map, rubytype) + klass = rubytype ? Mapping.class_from_name(rubytype) : nil + obj = nil + case node.type + when TYPE_HASH + klass = rubytype ? Mapping.class_from_name(rubytype) : Hash + obj = Mapping.create_empty_object(klass) + mark_unmarshalled_obj(node, obj) + node.each do |key, value| + next unless key == 'item' + obj[Mapping._soap2obj(value['key'], map)] = + Mapping._soap2obj(value['value'], map) + end + if node.key?('default') + obj.default = Mapping._soap2obj(node['default'], map) + end + when TYPE_REGEXP + klass = rubytype ? Mapping.class_from_name(rubytype) : Regexp + obj = Mapping.create_empty_object(klass) + mark_unmarshalled_obj(node, obj) + source = node['source'].string + options = node['options'].data || 0 + Regexp.instance_method(:initialize).bind(obj).call(source, options) + when TYPE_RANGE + klass = rubytype ? Mapping.class_from_name(rubytype) : Range + obj = Mapping.create_empty_object(klass) + mark_unmarshalled_obj(node, obj) + first = Mapping._soap2obj(node['begin'], map) + last = Mapping._soap2obj(node['end'], map) + exclude_end = node['exclude_end'].data + Range.instance_method(:initialize).bind(obj).call(first, last, exclude_end) + when TYPE_CLASS + obj = Mapping.class_from_name(node['name'].data) + when TYPE_MODULE + obj = Mapping.class_from_name(node['name'].data) + when TYPE_SYMBOL + obj = node['id'].data.intern + when TYPE_STRUCT + typestr = Mapping.elename2name(node['type'].data) + klass = Mapping.class_from_name(typestr) + if klass.nil? + return false + end + unless klass <= ::Struct + return false + end + obj = Mapping.create_empty_object(klass) + mark_unmarshalled_obj(node, obj) + node['member'].each do |name, value| + obj[Mapping.elename2name(name)] = Mapping._soap2obj(value, map) + end + else + return unknowntype2obj(node, info, map) + end + return true, obj + end + + def anytype2obj(node, info, map) + case node + when SOAPBasetype + return true, node.data + when SOAPStruct + klass = ::SOAP::Mapping::Object + obj = klass.new + mark_unmarshalled_obj(node, obj) + node.each do |name, value| + obj.__add_xmlele_value(XSD::QName.new(nil, name), + Mapping._soap2obj(value, map)) + end + unless node.extraattr.empty? + obj.instance_variable_set('@__xmlattr', node.extraattr) + end + return true, obj + else + return false + end + end + + def unknowntype2obj(node, info, map) + case node + when SOAPBasetype + return true, node.data + when SOAPArray + return @array_factory.soap2obj(Array, node, info, map) + when SOAPStruct + obj = unknownstruct2obj(node, info, map) + return true, obj if obj + if !@allow_untyped_struct + return false + end + return anytype2obj(node, info, map) + else + # Basetype which is not defined... + return false + end + end + + def unknownstruct2obj(node, info, map) + unless node.type.name + return nil + end + typestr = Mapping.elename2name(node.type.name) + klass = Mapping.class_from_name(typestr) + if klass.nil? and @allow_untyped_struct + klass = Mapping.class_from_name(typestr, true) # lenient + end + if klass.nil? + return nil + end + if klass <= ::Exception + return exception2obj(klass, node, map) + end + klass_type = Mapping.class2qname(klass) + return nil unless node.type.match(klass_type) + obj = nil + begin + obj = Mapping.create_empty_object(klass) + rescue + # type name "data" tries Data.new which raises TypeError + nil + end + mark_unmarshalled_obj(node, obj) + setiv2obj(obj, node, map) + obj + end + + def exception2obj(klass, node, map) + message = Mapping._soap2obj(node['message'], map) + backtrace = Mapping._soap2obj(node['backtrace'], map) + obj = Mapping.create_empty_object(klass) + obj = obj.exception(message) + mark_unmarshalled_obj(node, obj) + obj.set_backtrace(backtrace) + obj + end + + # Only creates empty array. Do String#replace it with real string. + def array2obj(node, map, rubytype) + klass = rubytype ? Mapping.class_from_name(rubytype) : Array + obj = Mapping.create_empty_object(klass) + mark_unmarshalled_obj(node, obj) + obj + end + + # Only creates empty string. Do String#replace it with real string. + def string2obj(node, map, rubytype) + klass = rubytype ? Mapping.class_from_name(rubytype) : String + obj = Mapping.create_empty_object(klass) + mark_unmarshalled_obj(node, obj) + obj + end +end + + +end +end diff --git a/lib/soap/mapping/typeMap.rb b/lib/soap/mapping/typeMap.rb new file mode 100644 index 0000000..b794f9b --- /dev/null +++ b/lib/soap/mapping/typeMap.rb @@ -0,0 +1,82 @@ +# SOAP4R - Base type mapping definition +# Copyright (C) 2000, 2001, 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module SOAP + + +TypeMap = { + XSD::XSDAnySimpleType::Type => SOAPAnySimpleType, + + XSD::XSDString::Type => SOAPString, + XSD::XSDBoolean::Type => SOAPBoolean, + XSD::XSDDecimal::Type => SOAPDecimal, + XSD::XSDFloat::Type => SOAPFloat, + XSD::XSDDouble::Type => SOAPDouble, + XSD::XSDDuration::Type => SOAPDuration, + XSD::XSDDateTime::Type => SOAPDateTime, + XSD::XSDTime::Type => SOAPTime, + XSD::XSDDate::Type => SOAPDate, + XSD::XSDGYearMonth::Type => SOAPGYearMonth, + XSD::XSDGYear::Type => SOAPGYear, + XSD::XSDGMonthDay::Type => SOAPGMonthDay, + XSD::XSDGDay::Type => SOAPGDay, + XSD::XSDGMonth::Type => SOAPGMonth, + XSD::XSDHexBinary::Type => SOAPHexBinary, + XSD::XSDBase64Binary::Type => SOAPBase64, + XSD::XSDAnyURI::Type => SOAPAnyURI, + XSD::XSDQName::Type => SOAPQName, + XSD::XSDInteger::Type => SOAPInteger, + XSD::XSDNonPositiveInteger::Type => SOAPNonPositiveInteger, + XSD::XSDNegativeInteger::Type => SOAPNegativeInteger, + XSD::XSDLong::Type => SOAPLong, + XSD::XSDInt::Type => SOAPInt, + XSD::XSDShort::Type => SOAPShort, + XSD::XSDByte::Type => SOAPByte, + XSD::XSDNonNegativeInteger::Type => SOAPNonNegativeInteger, + XSD::XSDUnsignedLong::Type => SOAPUnsignedLong, + XSD::XSDUnsignedInt::Type => SOAPUnsignedInt, + XSD::XSDUnsignedShort::Type => SOAPUnsignedShort, + XSD::XSDUnsignedByte::Type => SOAPUnsignedByte, + XSD::XSDPositiveInteger::Type => SOAPPositiveInteger, + + # soap4r does not use soapenc types actively but it should be accepted. + SOAP::SOAPString::SOAPENCType => SOAPString, + SOAP::SOAPBoolean::SOAPENCType => SOAPBoolean, + SOAP::SOAPDecimal::SOAPENCType => SOAPDecimal, + SOAP::SOAPFloat::SOAPENCType => SOAPFloat, + SOAP::SOAPDouble::SOAPENCType => SOAPDouble, + SOAP::SOAPDuration::SOAPENCType => SOAPDuration, + SOAP::SOAPDateTime::SOAPENCType => SOAPDateTime, + SOAP::SOAPTime::SOAPENCType => SOAPTime, + SOAP::SOAPDate::SOAPENCType => SOAPDate, + SOAP::SOAPGYearMonth::SOAPENCType => SOAPGYearMonth, + SOAP::SOAPGYear::SOAPENCType => SOAPGYear, + SOAP::SOAPGMonthDay::SOAPENCType => SOAPGMonthDay, + SOAP::SOAPGDay::SOAPENCType => SOAPGDay, + SOAP::SOAPGMonth::SOAPENCType => SOAPGMonth, + SOAP::SOAPHexBinary::SOAPENCType => SOAPHexBinary, + SOAP::SOAPBase64::SOAPENCType => SOAPBase64, + SOAP::SOAPAnyURI::SOAPENCType => SOAPAnyURI, + SOAP::SOAPQName::SOAPENCType => SOAPQName, + SOAP::SOAPInteger::SOAPENCType => SOAPInteger, + SOAP::SOAPNonPositiveInteger::SOAPENCType => SOAPNonPositiveInteger, + SOAP::SOAPNegativeInteger::SOAPENCType => SOAPNegativeInteger, + SOAP::SOAPLong::SOAPENCType => SOAPLong, + SOAP::SOAPInt::SOAPENCType => SOAPInt, + SOAP::SOAPShort::SOAPENCType => SOAPShort, + SOAP::SOAPByte::SOAPENCType => SOAPByte, + SOAP::SOAPNonNegativeInteger::SOAPENCType => SOAPNonNegativeInteger, + SOAP::SOAPUnsignedLong::SOAPENCType => SOAPUnsignedLong, + SOAP::SOAPUnsignedInt::SOAPENCType => SOAPUnsignedInt, + SOAP::SOAPUnsignedShort::SOAPENCType => SOAPUnsignedShort, + SOAP::SOAPUnsignedByte::SOAPENCType => SOAPUnsignedByte, + SOAP::SOAPPositiveInteger::SOAPENCType => SOAPPositiveInteger, +} + + +end diff --git a/lib/soap/mapping/wsdlencodedregistry.rb b/lib/soap/mapping/wsdlencodedregistry.rb new file mode 100644 index 0000000..3af45a8 --- /dev/null +++ b/lib/soap/mapping/wsdlencodedregistry.rb @@ -0,0 +1,289 @@ +# SOAP4R - WSDL encoded mapping registry. +# Copyright (C) 2000-2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'xsd/namedelements' +require 'soap/baseData' +require 'soap/mapping/mapping' +require 'soap/mapping/typeMap' + + +module SOAP +module Mapping + + +class WSDLEncodedRegistry < Registry + include TraverseSupport + + attr_reader :definedelements + attr_reader :definedtypes + attr_accessor :excn_handler_obj2soap + attr_accessor :excn_handler_soap2obj + + def initialize(definedtypes = XSD::NamedElements::Empty) + @definedtypes = definedtypes + # @definedelements = definedelements needed? + @excn_handler_obj2soap = nil + @excn_handler_soap2obj = nil + # For mapping AnyType element. + @rubytype_factory = RubytypeFactory.new( + :allow_untyped_struct => true, + :allow_original_mapping => true + ) + @schema_element_cache = {} + end + + def obj2soap(obj, qname = nil) + soap_obj = nil + if type = @definedtypes[qname] + soap_obj = obj2typesoap(obj, type) + else + soap_obj = any2soap(obj, qname) + end + return soap_obj if soap_obj + if @excn_handler_obj2soap + soap_obj = @excn_handler_obj2soap.call(obj) { |yield_obj| + Mapping._obj2soap(yield_obj, self) + } + return soap_obj if soap_obj + end + if qname + raise MappingError.new("cannot map #{obj.class.name} as #{qname}") + else + raise MappingError.new("cannot map #{obj.class.name} to SOAP/OM") + end + end + + # map anything for now: must refer WSDL while mapping. [ToDo] + def soap2obj(node, obj_class = nil) + begin + return any2obj(node, obj_class) + rescue MappingError + end + if @excn_handler_soap2obj + begin + return @excn_handler_soap2obj.call(node) { |yield_node| + Mapping._soap2obj(yield_node, self) + } + rescue Exception + end + end + raise MappingError.new("cannot map #{node.type.name} to Ruby object") + end + +private + + def any2soap(obj, qname) + if obj.nil? + SOAPNil.new + elsif qname.nil? or qname == XSD::AnyTypeName + @rubytype_factory.obj2soap(nil, obj, nil, self) + elsif obj.is_a?(XSD::NSDBase) + soap2soap(obj, qname) + elsif type = TypeMap[qname] + base2soap(obj, type) + else + nil + end + end + + def soap2soap(obj, type_qname) + if obj.is_a?(SOAPBasetype) + obj + elsif obj.is_a?(SOAPStruct) && (type = @definedtypes[type_qname]) + soap_obj = obj + mark_marshalled_obj(obj, soap_obj) + elements2soap(obj, soap_obj, type.content.elements) + soap_obj + elsif obj.is_a?(SOAPArray) && (type = @definedtypes[type_qname]) + soap_obj = obj + contenttype = type.child_type + mark_marshalled_obj(obj, soap_obj) + obj.replace do |ele| + Mapping._obj2soap(ele, self, contenttype) + end + soap_obj + else + nil + end + end + + def obj2typesoap(obj, type) + if type.is_a?(::WSDL::XMLSchema::SimpleType) + simpleobj2soap(obj, type) + else + complexobj2soap(obj, type) + end + end + + def simpleobj2soap(obj, type) + type.check_lexical_format(obj) + return SOAPNil.new if obj.nil? # ToDo: check nillable. + if type.base + base2soap(obj, TypeMap[type.base]) + elsif type.list + base2soap(obj.join(" "), SOAP::SOAPString) + else + raise MappingError.new("unsupported simpleType: #{type}") + end + end + + def complexobj2soap(obj, type) + case type.compoundtype + when :TYPE_STRUCT + struct2soap(obj, type.name, type) + when :TYPE_ARRAY + array2soap(obj, type.name, type) + when :TYPE_MAP + map2soap(obj, type.name, type) + when :TYPE_SIMPLE + simpleobj2soap(obj, type.simplecontent) + when :TYPE_EMPTY + raise MappingError.new("should be empty") unless obj.nil? + SOAPNil.new + else + raise MappingError.new("unknown compound type: #{type.compoundtype}") + end + end + + def base2soap(obj, type) + soap_obj = nil + if type <= XSD::XSDString + str = XSD::Charset.encoding_conv(obj.to_s, + Thread.current[:SOAPExternalCES], XSD::Charset.encoding) + soap_obj = type.new(str) + mark_marshalled_obj(obj, soap_obj) + else + soap_obj = type.new(obj) + end + soap_obj + end + + def struct2soap(obj, type_qname, type) + return SOAPNil.new if obj.nil? # ToDo: check nillable. + soap_obj = SOAPStruct.new(type_qname) + unless obj.nil? + mark_marshalled_obj(obj, soap_obj) + elements2soap(obj, soap_obj, type.content.elements) + end + soap_obj + end + + def array2soap(obj, type_qname, type) + return SOAPNil.new if obj.nil? # ToDo: check nillable. + arytype = type.child_type + soap_obj = SOAPArray.new(ValueArrayName, 1, arytype) + unless obj.nil? + mark_marshalled_obj(obj, soap_obj) + obj.each do |item| + soap_obj.add(Mapping._obj2soap(item, self, arytype)) + end + end + soap_obj + end + + MapKeyName = XSD::QName.new(nil, "key") + MapValueName = XSD::QName.new(nil, "value") + def map2soap(obj, type_qname, type) + return SOAPNil.new if obj.nil? # ToDo: check nillable. + keytype = type.child_type(MapKeyName) || XSD::AnyTypeName + valuetype = type.child_type(MapValueName) || XSD::AnyTypeName + soap_obj = SOAPStruct.new(MapQName) + unless obj.nil? + mark_marshalled_obj(obj, soap_obj) + obj.each do |key, value| + elem = SOAPStruct.new + elem.add("key", Mapping._obj2soap(key, self, keytype)) + elem.add("value", Mapping._obj2soap(value, self, valuetype)) + # ApacheAxis allows only 'item' here. + soap_obj.add("item", elem) + end + end + soap_obj + end + + def elements2soap(obj, soap_obj, elements) + elements.each do |element| + name = element.name.name + child_obj = Mapping.get_attribute(obj, name) + soap_obj.add(name, + Mapping._obj2soap(child_obj, self, element.type || element.name)) + end + end + + def any2obj(node, obj_class) + unless obj_class + typestr = XSD::CodeGen::GenSupport.safeconstname(node.elename.name) + obj_class = Mapping.class_from_name(typestr) + end + if obj_class and obj_class.class_variables.include?('@@schema_element') + soap2stubobj(node, obj_class) + else + Mapping._soap2obj(node, Mapping::DefaultRegistry, obj_class) + end + end + + def soap2stubobj(node, obj_class) + obj = Mapping.create_empty_object(obj_class) + unless node.is_a?(SOAPNil) + add_elements2stubobj(node, obj) + end + obj + end + + def add_elements2stubobj(node, obj) + definition = schema_element_definition(obj.class) + vars = {} + node.each do |name, value| + item = definition.elements.find { |k, v| k.elename.name == name } + if item and item.type + if klass = Mapping.class_from_name(item.type) + # klass must be a SOAPBasetype or a class + if klass.ancestors.include?(::SOAP::SOAPBasetype) + if value.respond_to?(:data) + child = klass.new(value.data).data + else + child = klass.new(nil).data + end + else + child = Mapping._soap2obj(value, self, klass) + end + elsif klass = Mapping.module_from_name(item.type) + # simpletype + if value.respond_to?(:data) + child = value.data + else + raise MappingError.new("cannot map to a module value: #{item.type}") + end + else + raise MappingError.new("unknown class: #{item.type}") + end + else # untyped element is treated as anyType. + child = Mapping._soap2obj(value, self) + end + vars[name] = child + end + if obj.is_a?(::Array) + vars.values.flatten.each do |item| + obj << item + end + else + Mapping.set_attributes(obj, vars) + end + end + + # it caches @@schema_element. this means that @@schema_element must not be + # changed while a lifetime of a WSDLLiteralRegistry. + def schema_element_definition(klass) + @schema_element_cache[klass] ||= Mapping.schema_element_definition(klass) + end +end + + +end +end diff --git a/lib/soap/mapping/wsdlliteralregistry.rb b/lib/soap/mapping/wsdlliteralregistry.rb new file mode 100644 index 0000000..17afa11 --- /dev/null +++ b/lib/soap/mapping/wsdlliteralregistry.rb @@ -0,0 +1,549 @@ +# SOAP4R - WSDL literal mapping registry. +# Copyright (C) 2004, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/baseData' +require 'soap/mapping/mapping' +require 'soap/mapping/typeMap' +require 'xsd/codegen/gensupport' +require 'xsd/namedelements' + + +module SOAP +module Mapping + + +class WSDLLiteralRegistry < Registry + attr_reader :definedelements + attr_reader :definedtypes + attr_accessor :excn_handler_obj2soap + attr_accessor :excn_handler_soap2obj + + def initialize(definedtypes = XSD::NamedElements::Empty, + definedelements = XSD::NamedElements::Empty) + @definedtypes = definedtypes + @definedelements = definedelements + @excn_handler_obj2soap = nil + @excn_handler_soap2obj = nil + @schema_element_cache = {} + @schema_attribute_cache = {} + end + + def obj2soap(obj, qname) + soap_obj = nil + if obj.is_a?(SOAPElement) + soap_obj = obj + elsif eledef = @definedelements[qname] + soap_obj = obj2elesoap(obj, eledef) + elsif type = @definedtypes[qname] + soap_obj = obj2typesoap(obj, type, true) + else + soap_obj = any2soap(obj, qname) + end + return soap_obj if soap_obj + if @excn_handler_obj2soap + soap_obj = @excn_handler_obj2soap.call(obj) { |yield_obj| + Mapping.obj2soap(yield_obj, nil, nil, MAPPING_OPT) + } + return soap_obj if soap_obj + end + raise MappingError.new("cannot map #{obj.class.name} as #{qname}") + end + + # node should be a SOAPElement + def soap2obj(node, obj_class = nil) + # obj_class is given when rpc/literal service. but ignored for now. + begin + return any2obj(node) + rescue MappingError + end + if @excn_handler_soap2obj + begin + return @excn_handler_soap2obj.call(node) { |yield_node| + Mapping.soap2obj(yield_node, nil, nil, MAPPING_OPT) + } + rescue Exception + end + end + if node.respond_to?(:type) + raise MappingError.new("cannot map #{node.type.name} to Ruby object") + else + raise MappingError.new("cannot map #{node.elename.name} to Ruby object") + end + end + +private + + MAPPING_OPT = { :no_reference => true } + + def obj2elesoap(obj, eledef) + ele = nil + qualified = (eledef.elementform == 'qualified') + if eledef.type + if type = @definedtypes[eledef.type] + ele = obj2typesoap(obj, type, qualified) + elsif type = TypeMap[eledef.type] + ele = base2soap(obj, type) + else + raise MappingError.new("cannot find type #{eledef.type}") + end + elsif eledef.local_complextype + ele = obj2typesoap(obj, eledef.local_complextype, qualified) + elsif eledef.local_simpletype + ele = obj2typesoap(obj, eledef.local_simpletype, qualified) + else + raise MappingError.new('illegal schema?') + end + ele.elename = eledef.name + ele + end + + def obj2typesoap(obj, type, qualified) + ele = nil + if type.is_a?(::WSDL::XMLSchema::SimpleType) + ele = simpleobj2soap(obj, type) + elsif type.simplecontent + ele = simpleobj2soap(obj, type.simplecontent) + else + ele = complexobj2soap(obj, type, qualified) + end + add_attributes2soap(obj, ele) + ele + end + + def simpleobj2soap(obj, type) + type.check_lexical_format(obj) + return SOAPNil.new if obj.nil? # TODO: check nillable. + if type.base + ele = base2soap(obj, TypeMap[type.base]) + elsif type.list + ele = base2soap(obj.join(" "), SOAP::SOAPString) + else + raise MappingError.new("unsupported simpleType: #{type}") + end + ele + end + + def complexobj2soap(obj, type, qualified) + ele = SOAPElement.new(type.name) + ele.qualified = qualified + if type.choice? + complexobj2choicesoap(obj, ele, type) + else + complexobj2sequencesoap(obj, ele, type) + end + end + + def complexobj2sequencesoap(obj, ele, type) + elements = type.elements + any = nil + if type.have_any? + any = scan_any(obj, elements) + end + elements.each do |child_ele| + case child_ele + when WSDL::XMLSchema::Any + if any + SOAPElement.from_objs(any).each do |child| + ele.add(child) + end + end + when WSDL::XMLSchema::Element + complexobj2soapchildren(obj, ele, child_ele) + when WSDL::XMLSchema::Sequence + complexobj2sequencesoap(obj, child_ele, type) + when WSDL::XMLSchema::Choice + complexobj2choicesoap(obj, child_ele, type) + else + raise MappingError.new("unknown type: #{child_ele}") + end + end + ele + end + + def complexobj2choicesoap(obj, ele, type) + elements = type.elements + any = nil + if type.have_any? + raise MappingError.new( + " in is not supported: #{ele.name.name}") + end + elements.each do |child_ele| + break if complexobj2soapchildren(obj, ele, child_ele, true) + end + ele + end + + def complexobj2soapchildren(obj, ele, child_ele, allow_nil_value = false) + if child_ele.map_as_array? + complexobj2soapchildren_array(obj, ele, child_ele, allow_nil_value) + else + complexobj2soapchildren_single(obj, ele, child_ele, allow_nil_value) + end + end + + def complexobj2soapchildren_array(obj, ele, child_ele, allow_nil_value) + child = Mapping.get_attribute(obj, child_ele.name.name) + if child.nil? and obj.respond_to?(:each) + child = obj + end + if child.nil? + return false if allow_nil_value + if child_soap = nil2soap(child_ele) + ele.add(child_soap) + return true + else + return false + end + end + unless child.respond_to?(:each) + return false + end + child.each do |item| + if item.is_a?(SOAPElement) + ele.add(item) + else + child_soap = obj2elesoap(item, child_ele) + ele.add(child_soap) + end + end + true + end + + def complexobj2soapchildren_single(obj, ele, child_ele, allow_nil_value) + child = Mapping.get_attribute(obj, child_ele.name.name) + case child + when NilClass + return false if allow_nil_value + if child_soap = nil2soap(child_ele) + ele.add(child_soap) + true + else + false + end + when SOAPElement + ele.add(child) + true + else + child_soap = obj2elesoap(child, child_ele) + ele.add(child_soap) + true + end + end + + def scan_any(obj, elements) + if obj.respond_to?(:__xmlele_any) + obj.__xmlele_any + else + any = Mapping.get_attributes(obj) + if elements + elements.each do |child_ele| + child = Mapping.get_attribute(obj, child_ele.name.name) + if k = any.key(child) + any.delete(k) + end + end + end + any + end + end + + def nil2soap(ele) + if ele.nillable + obj2elesoap(nil, ele) # add an empty element + elsif Integer(ele.minoccurs) == 0 + nil # intends no element + else + raise MappingError.new("nil not allowed: #{ele.name.name}") + end + end + + def any2soap(obj, qname) + ele = nil + if obj.class.class_variables.include?('@@schema_element') + ele = stubobj2soap(obj, qname) + elsif obj.is_a?(SOAP::Mapping::Object) + ele = mappingobj2soap(obj, qname) + elsif obj.is_a?(Hash) + ele = SOAPElement.from_obj(obj) + ele.elename = qname + elsif obj.is_a?(Array) + # treat as a list of simpletype + ele = SOAPElement.new(qname, obj.join(" ")) + elsif obj.is_a?(XSD::QName) + ele = SOAPElement.new(qname) + ele.text = obj + else + # expected to be a basetype or an anyType. + # SOAPStruct, etc. is used instead of SOAPElement. + begin + ele = Mapping.obj2soap(obj, nil, nil, MAPPING_OPT) + ele.elename = qname + rescue MappingError + ele = SOAPElement.new(qname, obj.to_s) + end + end + add_attributes2soap(obj, ele) + ele + end + + def stubobj2soap(obj, qname) + ele = SOAPElement.new(qname) + ele.qualified = + (obj.class.class_variables.include?('@@schema_qualified') and + obj.class.class_eval('@@schema_qualified')) + add_elements2soap(obj, ele) + ele + end + + def mappingobj2soap(obj, qname) + ele = SOAPElement.new(qname) + obj.__xmlele.each do |key, value| + if value.is_a?(::Array) + value.each do |item| + ele.add(obj2soap(item, key)) + end + else + ele.add(obj2soap(value, key)) + end + end + ele + end + + def add_elements2soap(obj, ele) + definition = schema_element_definition(obj.class) + any = nil + if definition.have_any? + any = scan_any(obj, definition.elements) + end + definition.elements.each do |eledef| + if eledef.elename == XSD::AnyTypeName + if any + SOAPElement.from_objs(any).each do |child| + ele.add(child) + end + end + elsif child = Mapping.get_attribute(obj, eledef.elename.name) + if eledef.as_array? + child.each do |item| + ele.add(obj2soap(item, eledef.elename)) + end + else + ele.add(obj2soap(child, eledef.elename)) + end + elsif obj.respond_to?(:each) and eledef.as_array? + obj.each do |item| + ele.add(obj2soap(item, eledef.elename)) + end + end + end + end + + def add_attributes2soap(obj, ele) + attributes = schema_attribute_definition(obj.class) + if attributes + attributes.each do |qname, param| + attr = obj.__send__( + XSD::CodeGen::GenSupport.safemethodname('xmlattr_' + qname.name)) + ele.extraattr[qname] = attr + end + elsif obj.respond_to?(:__xmlattr) + obj.__xmlattr.each do |key, value| + ele.extraattr[key] = value + end + end + end + + def base2soap(obj, type) + soap_obj = nil + if type <= XSD::XSDString + str = XSD::Charset.encoding_conv(obj.to_s, + Thread.current[:SOAPExternalCES], XSD::Charset.encoding) + soap_obj = type.new(str) + else + soap_obj = type.new(obj) + end + soap_obj + end + + def any2obj(node, obj_class = nil) + unless obj_class + typestr = XSD::CodeGen::GenSupport.safeconstname(node.elename.name) + obj_class = Mapping.class_from_name(typestr) + end + if node.is_a?(SOAPElement) or node.is_a?(SOAPStruct) + if obj_class and obj_class.class_variables.include?('@@schema_element') + elesoap2stubobj(node, obj_class) + else + # SOAPArray for literal? + elesoap2plainobj(node) + end + else + obj = Mapping.soap2obj(node, nil, obj_class, MAPPING_OPT) + add_attributes2obj(node, obj) + obj + end + end + + def elesoap2stubobj(node, obj_class) + obj = Mapping.create_empty_object(obj_class) + add_elesoap2stubobj(node, obj) + add_attributes2stubobj(node, obj) + obj + end + + def elesoap2plainobj(node) + obj = anytype2obj(node) + add_elesoap2plainobj(node, obj) + add_attributes2obj(node, obj) + obj + end + + def anytype2obj(node) + if node.is_a?(::SOAP::SOAPBasetype) + return node.data + end + klass = ::SOAP::Mapping::Object + obj = klass.new + obj + end + + def add_elesoap2stubobj(node, obj) + definition = schema_element_definition(obj.class) + vars = {} + node.each do |name, value| + item = definition.elements.find { |k, v| k.elename.name == name } + if item and item.type + if klass = Mapping.class_from_name(item.type) + # klass must be a SOAPBasetype or a class + if klass.ancestors.include?(::SOAP::SOAPBasetype) + if value.respond_to?(:data) + child = klass.new(value.data).data + else + child = klass.new(nil).data + end + else + child = any2obj(value, klass) + end + elsif klass = Mapping.module_from_name(item.type) + # simpletype + if value.respond_to?(:data) + child = value.data + else + raise MappingError.new("cannot map to a module value: #{item.type}") + end + else + raise MappingError.new("unknown class/module: #{item.type}") + end + else # untyped element is treated as anyType. + child = any2obj(value) + end + if item and item.as_array? + (vars[name] ||= []) << child + else + vars[name] = child + end + end + if obj.is_a?(::Array) + vars.values.flatten.each do |item| + obj << item + end + else + Mapping.set_attributes(obj, vars) + end + end + + def add_attributes2stubobj(node, obj) + if attributes = schema_attribute_definition(obj.class) + define_xmlattr(obj) + attributes.each do |qname, class_name| + attr = node.extraattr[qname] + next if attr.nil? or attr.empty? + klass = Mapping.class_from_name(class_name) + if klass.ancestors.include?(::SOAP::SOAPBasetype) + child = klass.new(attr).data + else + child = attr + end + obj.__xmlattr[qname] = child + define_xmlattr_accessor(obj, qname) + end + end + end + + def add_elesoap2plainobj(node, obj) + node.each do |name, value| + obj.__add_xmlele_value(value.elename, any2obj(value)) + end + end + + def add_attributes2obj(node, obj) + return if node.extraattr.empty? + define_xmlattr(obj) + node.extraattr.each do |qname, value| + obj.__xmlattr[qname] = value + define_xmlattr_accessor(obj, qname) + end + end + + if RUBY_VERSION > "1.7.0" + def define_xmlattr_accessor(obj, qname) + name = XSD::CodeGen::GenSupport.safemethodname('xmlattr_' + qname.name) + Mapping.define_attr_accessor(obj, name, + proc { @__xmlattr[qname] }, + proc { |value| @__xmlattr[qname] = value }) + end + else + def define_xmlattr_accessor(obj, qname) + name = XSD::CodeGen::GenSupport.safemethodname('xmlattr_' + qname.name) + obj.instance_eval <<-EOS + def #{name} + @__xmlattr[#{qname.dump}] + end + + def #{name}=(value) + @__xmlattr[#{qname.dump}] = value + end + EOS + end + end + + if RUBY_VERSION > "1.7.0" + def define_xmlattr(obj) + obj.instance_variable_set('@__xmlattr', {}) + unless obj.respond_to?(:__xmlattr) + Mapping.define_attr_accessor(obj, :__xmlattr, proc { @__xmlattr }) + end + end + else + def define_xmlattr(obj) + obj.instance_variable_set('@__xmlattr', {}) + unless obj.respond_to?(:__xmlattr) + obj.instance_eval <<-EOS + def __xmlattr + @__xmlattr + end + EOS + end + end + end + + # it caches @@schema_element. this means that @@schema_element must not be + # changed while a lifetime of a WSDLLiteralRegistry. + def schema_element_definition(klass) + @schema_element_cache[klass] ||= Mapping.schema_element_definition(klass) + end + + def schema_attribute_definition(klass) + @schema_attribute_cache[klass] ||= + Mapping.schema_attribute_definition(klass) + end +end + + +end +end diff --git a/lib/soap/mappingRegistry.rb b/lib/soap/mappingRegistry.rb new file mode 100644 index 0000000..9fd1c4b --- /dev/null +++ b/lib/soap/mappingRegistry.rb @@ -0,0 +1,9 @@ +# SOAP4R - RPC utility -- Mapping registry. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/marshal.rb b/lib/soap/marshal.rb new file mode 100644 index 0000000..1c3d5b0 --- /dev/null +++ b/lib/soap/marshal.rb @@ -0,0 +1,59 @@ +# SOAP4R - Marshalling/Unmarshalling Ruby's object using SOAP Encoding. +# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require "soap/mapping" +require "soap/processor" + + +module SOAP + + +module Marshal + # Trying xsd:dateTime data to be recovered as aTime. + MarshalMappingRegistry = Mapping::Registry.new( + :allow_original_mapping => true) + MarshalMappingRegistry.add( + Time, + ::SOAP::SOAPDateTime, + ::SOAP::Mapping::Registry::DateTimeFactory + ) + + class << self + public + def dump(obj, io = nil) + marshal(obj, MarshalMappingRegistry, io) + end + + def load(stream) + unmarshal(stream, MarshalMappingRegistry) + end + + def marshal(obj, mapping_registry = MarshalMappingRegistry, io = nil) + elename = Mapping.name2elename(obj.class.to_s) + soap_obj = Mapping.obj2soap(obj, mapping_registry) + body = SOAPBody.new + body.add(elename, soap_obj) + env = SOAPEnvelope.new(nil, body) + SOAP::Processor.marshal(env, {}, io) + end + + def unmarshal(stream, mapping_registry = MarshalMappingRegistry) + env = SOAP::Processor.unmarshal(stream) + if env.nil? + raise ArgumentError.new("Illegal SOAP marshal format.") + end + Mapping.soap2obj(env.body.root_node, mapping_registry) + end + end +end + + +end + + +SOAPMarshal = SOAP::Marshal diff --git a/lib/soap/mimemessage.rb b/lib/soap/mimemessage.rb new file mode 100644 index 0000000..acb4322 --- /dev/null +++ b/lib/soap/mimemessage.rb @@ -0,0 +1,240 @@ +# SOAP4R - MIME Message implementation. +# Copyright (C) 2002 Jamie Herre. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/attachment' + + +module SOAP + + +# Classes for MIME message handling. Should be put somewhere else! +# Tried using the 'tmail' module but found that I needed something +# lighter in weight. + + +class MIMEMessage + class MIMEMessageError < StandardError; end + + MultipartContentType = 'multipart/\w+' + + class Header + attr_accessor :str, :key, :root + + def initialize + @attrs = {} + end + + def [](key) + @attrs[key] + end + + def []=(key, value) + @attrs[key] = value + end + + def to_s + @key + ": " + @str + end + end + + class Headers < Hash + def self.parse(str) + new.parse(str) + end + + def parse(str) + header_cache = nil + str.each do |line| + case line + when /^\A[^\: \t]+:\s*.+$/ + parse_line(header_cache) if header_cache + header_cache = line.sub(/\r?\n\z/, '') + when /^\A\s+(.*)$/ + # a continuous line at the beginning line crashes here. + header_cache << line + else + raise RuntimeError.new("unexpected header: #{line.inspect}") + end + end + parse_line(header_cache) if header_cache + self + end + + def parse_line(line) + if /^\A([^\: \t]+):\s*(.+)\z/ =~ line + header = parse_rhs($2.strip) + header.key = $1.strip + self[header.key.downcase] = header + else + raise RuntimeError.new("unexpected header line: #{line.inspect}") + end + end + + def parse_rhs(str) + a = str.split(/;+\s+/) + header = Header.new + header.str = str + header.root = a.shift + a.each do |pair| + if pair =~ /(\w+)\s*=\s*"?([^"]+)"?/ + header[$1.downcase] = $2 + else + raise RuntimeError.new("unexpected header component: #{pair.inspect}") + end + end + header + end + + def add(key, value) + if key != nil and value != nil + header = parse_rhs(value) + header.key = key + self[key.downcase] = header + end + end + + def to_s + self.values.collect { |hdr| + hdr.to_s + }.join("\r\n") + end + end + + class Part + attr_accessor :headers, :body + + def initialize + @headers = Headers.new + @headers.add("Content-Transfer-Encoding", "8bit") + @body = nil + @contentid = nil + end + + def self.parse(str) + new.parse(str) + end + + def parse(str) + headers, body = str.split(/\r\n\r\n/s) + if headers != nil and body != nil + @headers = Headers.parse(headers) + @body = body.sub(/\r\n\z/, '') + else + raise RuntimeError.new("unexpected part: #{str.inspect}") + end + self + end + + def contentid + if @contentid == nil and @headers.key?('content-id') + @contentid = @headers['content-id'].str + @contentid = $1 if @contentid =~ /^<(.+)>$/ + end + @contentid + end + + alias content body + + def to_s + @headers.to_s + "\r\n\r\n" + @body + end + end + + def initialize + @parts = [] + @headers = Headers.new + @root = nil + end + + def self.parse(head, str) + new.parse(head, str) + end + + attr_reader :parts, :headers + + def close + @headers.add( + "Content-Type", + "multipart/related; type=\"text/xml\"; boundary=\"#{boundary}\"; start=\"#{@parts[0].contentid}\"" + ) + end + + def parse(head, str) + @headers = Headers.parse(head + "\r\n" + "From: jfh\r\n") + boundary = @headers['content-type']['boundary'] + if boundary != nil + parts = str.split(/--#{Regexp.quote(boundary)}\s*(?:\r\n|--\r\n)/) + part = parts.shift # preamble must be ignored. + @parts = parts.collect { |part| Part.parse(part) } + else + @parts = [Part.parse(str)] + end + if @parts.length < 1 + raise MIMEMessageError.new("This message contains no valid parts!") + end + self + end + + def root + if @root == nil + start = @headers['content-type']['start'] + @root = (start && @parts.find { |prt| prt.contentid == start }) || + @parts[0] + end + @root + end + + def boundary + if @boundary == nil + @boundary = "----=Part_" + __id__.to_s + rand.to_s + end + @boundary + end + + def add_part(content) + part = Part.new + part.headers.add("Content-Type", + "text/xml; charset=" + XSD::Charset.xml_encoding_label) + part.headers.add("Content-ID", Attachment.contentid(part)) + part.body = content + @parts.unshift(part) + end + + def add_attachment(attach) + part = Part.new + part.headers.add("Content-Type", attach.contenttype) + part.headers.add("Content-ID", attach.mime_contentid) + part.body = attach.content + @parts.unshift(part) + end + + def has_parts? + (@parts.length > 0) + end + + def headers_str + @headers.to_s + end + + def content_str + str = '' + @parts.each do |prt| + str << "--" + boundary + "\r\n" + str << prt.to_s + "\r\n" + end + str << '--' + boundary + "--\r\n" + str + end + + def to_s + str = headers_str + "\r\n\r\n" + conent_str + end +end + + +end diff --git a/lib/soap/namespace.rb b/lib/soap/namespace.rb new file mode 100644 index 0000000..df420bc --- /dev/null +++ b/lib/soap/namespace.rb @@ -0,0 +1,9 @@ +# SOAP4R - Namespace library +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/netHttpClient.rb b/lib/soap/netHttpClient.rb new file mode 100644 index 0000000..10d68e2 --- /dev/null +++ b/lib/soap/netHttpClient.rb @@ -0,0 +1,190 @@ +# SOAP4R - net/http wrapper +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'net/http' + + +module SOAP + + +class NetHttpClient + + SSLEnabled = begin + require 'net/https' + true + rescue LoadError + false + end + + attr_reader :proxy + attr_accessor :no_proxy + attr_accessor :debug_dev + attr_accessor :ssl_config # ignored for now. + attr_accessor :protocol_version # ignored for now. + attr_accessor :connect_timeout + attr_accessor :send_timeout # ignored for now. + attr_accessor :receive_timeout + + def initialize(proxy = nil, agent = nil) + @proxy = proxy ? URI.parse(proxy) : nil + @agent = agent + @debug_dev = nil + @session_manager = SessionManager.new + @no_proxy = @ssl_config = @protocol_version = nil + @connect_timeout = @send_timeout = @receive_timeout = nil + end + + def test_loopback_response + raise NotImplementedError.new("not supported for now") + end + + def proxy=(proxy) + if proxy.nil? + @proxy = nil + else + if proxy.is_a?(URI) + @proxy = proxy + else + @proxy = URI.parse(proxy) + end + if @proxy.scheme == nil or @proxy.scheme.downcase != 'http' or + @proxy.host == nil or @proxy.port == nil + raise ArgumentError.new("unsupported proxy `#{proxy}'") + end + end + reset_all + @proxy + end + + def set_basic_auth(uri, user_id, passwd) + # net/http does not handle url. + @basic_auth = [user_id, passwd] + raise NotImplementedError.new("basic_auth is not supported under soap4r + net/http.") + end + + def set_cookie_store(filename) + raise NotImplementedError.new + end + + def save_cookie_store(filename) + raise NotImplementedError.new + end + + def reset(url) + # no persistent connection. ignored. + end + + def reset_all + # no persistent connection. ignored. + end + + def post(url, req_body, header = {}) + unless url.is_a?(URI) + url = URI.parse(url) + end + extra = header.dup + extra['User-Agent'] = @agent if @agent + res = start(url) { |http| + http.post(url.request_uri, req_body, extra) + } + Response.new(res) + end + + def get_content(url, header = {}) + unless url.is_a?(URI) + url = URI.parse(url) + end + extra = header.dup + extra['User-Agent'] = @agent if @agent + res = start(url) { |http| + http.get(url.request_uri, extra) + } + res.body + end + +private + + def start(url) + http = create_connection(url) + response = nil + http.start { |worker| + response = yield(worker) + worker.finish + } + @debug_dev << response.body if @debug_dev + response + end + + def create_connection(url) + proxy_host = proxy_port = nil + unless no_proxy?(url) + proxy_host = @proxy.host + proxy_port = @proxy.port + end + http = Net::HTTP::Proxy(proxy_host, proxy_port).new(url.host, url.port) + if http.respond_to?(:set_debug_output) + http.set_debug_output(@debug_dev) + end + http.open_timeout = @connect_timeout if @connect_timeout + http.read_timeout = @receive_timeout if @receive_timeout + case url + when URI::HTTPS + if SSLEnabled + http.use_ssl = true + else + raise RuntimeError.new("Cannot connect to #{url} (OpenSSL is not installed.)") + end + when URI::HTTP + # OK + else + raise RuntimeError.new("Cannot connect to #{url} (Not HTTP.)") + end + http + end + + NO_PROXY_HOSTS = ['localhost'] + + def no_proxy?(uri) + if !@proxy or NO_PROXY_HOSTS.include?(uri.host) + return true + end + if @no_proxy + @no_proxy.scan(/([^:,]*)(?::(\d+))?/) do |host, port| + if /(\A|\.)#{Regexp.quote(host)}\z/i =~ uri.host && + (!port || uri.port == port.to_i) + return true + end + end + else + false + end + end + + class SessionManager + attr_accessor :connect_timeout + attr_accessor :send_timeout + attr_accessor :receive_timeout + end + + class Response + attr_reader :content + attr_reader :status + attr_reader :reason + attr_reader :contenttype + + def initialize(res) + @status = res.code.to_i + @reason = res.message + @contenttype = res['content-type'] + @content = res.body + end + end +end + + +end diff --git a/lib/soap/parser.rb b/lib/soap/parser.rb new file mode 100644 index 0000000..412fd48 --- /dev/null +++ b/lib/soap/parser.rb @@ -0,0 +1,251 @@ +# SOAP4R - SOAP XML Instance Parser library. +# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/ns' +require 'xsd/xmlparser' +require 'soap/soap' +require 'soap/baseData' +require 'soap/encodingstyle/handler' + + +module SOAP + + +class Parser + include SOAP + + class ParseError < Error; end + class FormatDecodeError < ParseError; end + class UnexpectedElementError < ParseError; end + +private + + class ParseFrame + attr_reader :node + attr_reader :name + attr_reader :ns, :encodingstyle + + class NodeContainer + def initialize(node) + @node = node + end + + def node + @node + end + + def replace_node(node) + @node = node + end + end + + public + + def initialize(ns, name, node, encodingstyle) + @ns = ns + @name = name + self.node = node + @encodingstyle = encodingstyle + end + + def node=(node) + @node = NodeContainer.new(node) + end + end + +public + + attr_accessor :envelopenamespace + attr_accessor :default_encodingstyle + attr_accessor :decode_typemap + attr_accessor :allow_unqualified_element + + def initialize(opt = {}) + @opt = opt + @parser = XSD::XMLParser.create_parser(self, opt) + @parsestack = nil + @lastnode = nil + @handlers = {} + @envelopenamespace = opt[:envelopenamespace] || EnvelopeNamespace + @default_encodingstyle = opt[:default_encodingstyle] || EncodingNamespace + @decode_typemap = opt[:decode_typemap] || nil + @allow_unqualified_element = opt[:allow_unqualified_element] || false + end + + def charset + @parser.charset + end + + def parse(string_or_readable) + @parsestack = [] + @lastnode = nil + + @handlers.each do |uri, handler| + handler.decode_prologue + end + + @parser.do_parse(string_or_readable) + + unless @parsestack.empty? + raise FormatDecodeError.new("Unbalanced tag in XML.") + end + + @handlers.each do |uri, handler| + handler.decode_epilogue + end + + @lastnode + end + + def start_element(name, attrs) + lastframe = @parsestack.last + ns = parent = parent_encodingstyle = nil + if lastframe + ns = lastframe.ns.clone_ns + parent = lastframe.node + parent_encodingstyle = lastframe.encodingstyle + else + ns = XSD::NS.new + parent = ParseFrame::NodeContainer.new(nil) + parent_encodingstyle = nil + end + + attrs = XSD::XMLParser.filter_ns(ns, attrs) + encodingstyle = find_encodingstyle(ns, attrs) + + # Children's encodingstyle is derived from its parent. + if encodingstyle.nil? + if parent.node.is_a?(SOAPHeader) + encodingstyle = LiteralNamespace + else + encodingstyle = parent_encodingstyle || @default_encodingstyle + end + end + + node = decode_tag(ns, name, attrs, parent, encodingstyle) + + @parsestack << ParseFrame.new(ns, name, node, encodingstyle) + end + + def characters(text) + lastframe = @parsestack.last + if lastframe + # Need not to be cloned because character does not have attr. + decode_text(lastframe.ns, text, lastframe.encodingstyle) + else + # Ignore Text outside of SOAP Envelope. + p text if $DEBUG + end + end + + def end_element(name) + lastframe = @parsestack.pop + unless name == lastframe.name + raise UnexpectedElementError.new("Closing element name '#{ name }' does not match with opening element '#{ lastframe.name }'.") + end + decode_tag_end(lastframe.ns, lastframe.node, lastframe.encodingstyle) + @lastnode = lastframe.node.node + end + +private + + def find_encodingstyle(ns, attrs) + attrs.each do |key, value| + if (ns.compare(@envelopenamespace, AttrEncodingStyle, key)) + return value + end + end + nil + end + + def decode_tag(ns, name, attrs, parent, encodingstyle) + ele = ns.parse(name) + + # Envelope based parsing. + if ((ele.namespace == @envelopenamespace) || + (@allow_unqualified_element && ele.namespace.nil?)) + o = decode_soap_envelope(ns, ele, attrs, parent) + return o if o + end + + # Encoding based parsing. + handler = find_handler(encodingstyle) + if handler + return handler.decode_tag(ns, ele, attrs, parent) + else + raise FormatDecodeError.new("Unknown encodingStyle: #{ encodingstyle }.") + end + end + + def decode_tag_end(ns, node, encodingstyle) + return unless encodingstyle + + handler = find_handler(encodingstyle) + if handler + return handler.decode_tag_end(ns, node) + else + raise FormatDecodeError.new("Unknown encodingStyle: #{ encodingstyle }.") + end + end + + def decode_text(ns, text, encodingstyle) + handler = find_handler(encodingstyle) + + if handler + handler.decode_text(ns, text) + else + # How should I do? + end + end + + def decode_soap_envelope(ns, ele, attrs, parent) + o = nil + if ele.name == EleEnvelope + o = SOAPEnvelope.new + if ext = @opt[:external_content] + ext.each do |k, v| + o.external_content[k] = v + end + end + elsif ele.name == EleHeader + unless parent.node.is_a?(SOAPEnvelope) + raise FormatDecodeError.new("Header should be a child of Envelope.") + end + o = SOAPHeader.new + parent.node.header = o + elsif ele.name == EleBody + unless parent.node.is_a?(SOAPEnvelope) + raise FormatDecodeError.new("Body should be a child of Envelope.") + end + o = SOAPBody.new + parent.node.body = o + elsif ele.name == EleFault + unless parent.node.is_a?(SOAPBody) + raise FormatDecodeError.new("Fault should be a child of Body.") + end + o = SOAPFault.new + parent.node.fault = o + end + o + end + + def find_handler(encodingstyle) + unless @handlers.key?(encodingstyle) + handler_factory = SOAP::EncodingStyle::Handler.handler(encodingstyle) || + SOAP::EncodingStyle::Handler.handler(EncodingNamespace) + handler = handler_factory.new(@parser.charset) + handler.decode_typemap = @decode_typemap + handler.decode_prologue + @handlers[encodingstyle] = handler + end + @handlers[encodingstyle] + end +end + + +end diff --git a/lib/soap/processor.rb b/lib/soap/processor.rb new file mode 100644 index 0000000..3c6dbed --- /dev/null +++ b/lib/soap/processor.rb @@ -0,0 +1,66 @@ +# SOAP4R - marshal/unmarshal interface. +# Copyright (C) 2000, 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/datatypes' +require 'soap/soap' +require 'soap/element' +require 'soap/parser' +require 'soap/generator' +require 'soap/encodingstyle/soapHandler' +require 'soap/encodingstyle/literalHandler' +require 'soap/encodingstyle/aspDotNetHandler' + + +module SOAP + + +module Processor + @@default_parser_option = {} + + class << self + public + + def marshal(env, opt = {}, io = nil) + generator = create_generator(opt) + marshalled_str = generator.generate(env, io) + unless env.external_content.empty? + opt[:external_content] = env.external_content + end + marshalled_str + end + + def unmarshal(stream, opt = {}) + parser = create_parser(opt) + parser.parse(stream) + end + + def default_parser_option=(rhs) + @@default_parser_option = rhs + end + + def default_parser_option + @@default_parser_option + end + + private + + def create_generator(opt) + SOAPGenerator.new(opt) + end + + def create_parser(opt) + if opt.empty? + opt = @@default_parser_option + end + ::SOAP::Parser.new(opt) + end + end +end + + +end diff --git a/lib/soap/property.rb b/lib/soap/property.rb new file mode 100644 index 0000000..882dcc6 --- /dev/null +++ b/lib/soap/property.rb @@ -0,0 +1,333 @@ +# soap/property.rb: SOAP4R - Property implementation. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module SOAP + + +# Property stream format: +# +# line separator is \r?\n. 1 line per a property. +# line which begins with '#' is a comment line. empty line is ignored, too. +# key/value separator is ':' or '='. +# '\' as escape character. but line separator cannot be escaped. +# \s at the head/tail of key/value are trimmed. +# +# '[' + key + ']' indicates property section. for example, +# +# [aaa.bbb] +# ccc = ddd +# eee.fff = ggg +# [] +# aaa.hhh = iii +# +# is the same as; +# +# aaa.bbb.ccc = ddd +# aaa.bbb.eee.fff = ggg +# aaa.hhh = iii +# +class Property + FrozenError = (RUBY_VERSION >= "1.9.0") ? RuntimeError : TypeError + + include Enumerable + + module Util + def const_from_name(fqname) + fqname.split("::").inject(Kernel) { |klass, name| klass.const_get(name) } + end + module_function :const_from_name + + def require_from_name(fqname) + require File.join(fqname.split("::").collect { |ele| ele.downcase }) + end + module_function :require_from_name + end + + def self.load(stream) + new.load(stream) + end + + def self.loadproperty(propname) + new.loadproperty(propname) + end + + def initialize + @store = Hash.new + @hook = Hash.new + @self_hook = Array.new + @locked = false + end + + KEY_REGSRC = '([^=:\\\\]*(?:\\\\.[^=:\\\\]*)*)' + DEF_REGSRC = '\\s*' + KEY_REGSRC + '\\s*[=:]\\s*(.*)' + COMMENT_REGEXP = Regexp.new('^(?:#.*|)$') + CATDEF_REGEXP = Regexp.new("^\\[\\s*#{KEY_REGSRC}\\s*\\]$") + LINE_REGEXP = Regexp.new("^#{DEF_REGSRC}$") + def load(stream) + key_prefix = "" + stream.each_with_index do |line, lineno| + line.sub!(/\r?\n\z/, '') + case line + when COMMENT_REGEXP + next + when CATDEF_REGEXP + key_prefix = $1.strip + when LINE_REGEXP + key, value = $1.strip, $2.strip + key = "#{key_prefix}.#{key}" unless key_prefix.empty? + key, value = loadstr(key), loadstr(value) + self[key] = value + else + raise TypeError.new( + "property format error at line #{lineno + 1}: `#{line}'") + end + end + self + end + + # find property from $:. + def loadproperty(propname) + return loadpropertyfile(propname) if File.file?(propname) + $:.each do |path| + if File.file?(file = File.join(path, propname)) + return loadpropertyfile(file) + end + end + nil + end + + # name: a Symbol, String or an Array + def [](name) + referent(name_to_a(name)) + end + + # name: a Symbol, String or an Array + # value: an Object + def []=(name, value) + name_pair = name_to_a(name).freeze + hooks = assign(name_pair, value) + hooks.each do |hook| + hook.call(name_pair, value) + end + value + end + + # value: an Object + # key is generated by property + def <<(value) + self[generate_new_key] = value + end + + # name: a Symbol, String or an Array; nil means hook to the root + # cascade: true/false; for cascading hook of sub key + # hook: block which will be called with 2 args, name and value + def add_hook(name = nil, cascade = false, &hook) + if name == nil or name == true or name == false + cascade = name + assign_self_hook(cascade, &hook) + else + assign_hook(name_to_a(name), cascade, &hook) + end + end + + def each + @store.each do |key, value| + yield(key, value) + end + end + + def empty? + @store.empty? + end + + def keys + @store.keys + end + + def values + @store.values + end + + def lock(cascade = false) + if cascade + each_key do |key| + key.lock(cascade) + end + end + @locked = true + self + end + + def unlock(cascade = false) + @locked = false + if cascade + each_key do |key| + key.unlock(cascade) + end + end + self + end + + def locked? + @locked + end + +protected + + def deref_key(key) + check_lock(key) + ref = @store[key] ||= self.class.new + unless propkey?(ref) + raise ArgumentError.new("key `#{key}' already defined as a value") + end + ref + end + + def local_referent(key) + check_lock(key) + if propkey?(@store[key]) and @store[key].locked? + raise FrozenError.new("cannot split any key from locked property") + end + @store[key] + end + + def local_assign(key, value) + check_lock(key) + if @locked + if propkey?(value) + raise FrozenError.new("cannot add any key to locked property") + elsif propkey?(@store[key]) + raise FrozenError.new("cannot override any key in locked property") + end + end + @store[key] = value + end + + def local_hook(key, direct) + hooks = [] + (@self_hook + (@hook[key] || NO_HOOK)).each do |hook, cascade| + hooks << hook if direct or cascade + end + hooks + end + + def local_assign_hook(key, cascade, &hook) + check_lock(key) + @store[key] ||= nil + (@hook[key] ||= []) << [hook, cascade] + end + +private + + NO_HOOK = [].freeze + + def referent(ary) + ary[0..-2].inject(self) { |ref, name| + ref.deref_key(to_key(name)) + }.local_referent(to_key(ary.last)) + end + + def assign(ary, value) + ref = self + hook = NO_HOOK + ary[0..-2].each do |name| + key = to_key(name) + hook += ref.local_hook(key, false) + ref = ref.deref_key(key) + end + last_key = to_key(ary.last) + ref.local_assign(last_key, value) + hook + ref.local_hook(last_key, true) + end + + def assign_hook(ary, cascade, &hook) + ary[0..-2].inject(self) { |ref, name| + ref.deref_key(to_key(name)) + }.local_assign_hook(to_key(ary.last), cascade, &hook) + end + + def assign_self_hook(cascade, &hook) + check_lock(nil) + @self_hook << [hook, cascade] + end + + def each_key + self.each do |key, value| + if propkey?(value) + yield(value) + end + end + end + + def check_lock(key) + if @locked and (key.nil? or !@store.key?(key)) + raise FrozenError.new("cannot add any key to locked property") + end + end + + def propkey?(value) + value.is_a?(::SOAP::Property) + end + + def name_to_a(name) + case name + when Symbol + [name] + when String + name.scan(/[^.\\]+(?:\\.[^.\\])*/) # split with unescaped '.' + when Array + name + else + raise ArgumentError.new("Unknown name #{name}(#{name.class})") + end + end + + def to_key(name) + name.to_s.downcase + end + + def generate_new_key + if @store.empty? + "0" + else + (key_max + 1).to_s + end + end + + def key_max + (@store.keys.max { |l, r| l.to_s.to_i <=> r.to_s.to_i }).to_s.to_i + end + + def loadpropertyfile(file) + puts "find property at #{file}" if $DEBUG + File.open(file) do |f| + load(f) + end + end + + def loadstr(str) + str.gsub(/\\./) { |c| eval("\"#{c}\"") } + end +end + + +end + + +# for ruby/1.6. +unless Enumerable.instance_methods.include?('inject') + module Enumerable + def inject(init) + result = init + each do |item| + result = yield(result, item) + end + result + end + end +end diff --git a/lib/soap/proxy.rb b/lib/soap/proxy.rb new file mode 100644 index 0000000..673aaf3 --- /dev/null +++ b/lib/soap/proxy.rb @@ -0,0 +1,14 @@ +# SOAP4R - Proxy library. +# Copyright (C) 2000, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/rpc/proxy' + + +module SOAP + SOAPProxy = RPC::Proxy +end diff --git a/lib/soap/qname.rb b/lib/soap/qname.rb new file mode 100644 index 0000000..497c028 --- /dev/null +++ b/lib/soap/qname.rb @@ -0,0 +1,9 @@ +# SOAP4R - XML QName definition. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/rpc/cgistub.rb b/lib/soap/rpc/cgistub.rb new file mode 100644 index 0000000..487f05a --- /dev/null +++ b/lib/soap/rpc/cgistub.rb @@ -0,0 +1,206 @@ +# SOAP4R - CGI/mod_ruby stub library +# Copyright (C) 2001, 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/streamHandler' +require 'webrick/httpresponse' +require 'webrick/httpstatus' +require 'logger' +require 'soap/rpc/soaplet' + + +module SOAP +module RPC + + +### +# SYNOPSIS +# CGIStub.new +# +# DESCRIPTION +# To be written... +# +class CGIStub < Logger::Application + include SOAP + include WEBrick + + class SOAPRequest + attr_reader :body + + def [](var); end + + def meta_vars; end + end + + class SOAPStdinRequest < SOAPRequest + attr_reader :body + + def initialize(stream) + size = ENV['CONTENT_LENGTH'].to_i || 0 + @body = stream.read(size) + end + + def [](var) + ENV[var.gsub(/-/, '_').upcase] + end + + def meta_vars + { + 'HTTP_SOAPACTION' => ENV['HTTP_SOAPAction'] + } + end + end + + class SOAPFCGIRequest < SOAPRequest + attr_reader :body + + def initialize(request) + @request = request + @body = @request.in.read + end + + def [](var) + @request.env[var.gsub(/-/, '_').upcase] + end + + def meta_vars + { + 'HTTP_SOAPACTION' => @request.env['HTTP_SOAPAction'] + } + end + end + + def initialize(appname, default_namespace) + super(appname) + set_log(STDERR) + self.level = ERROR + @default_namespace = default_namespace + @remote_host = ENV['REMOTE_HOST'] || ENV['REMOTE_ADDR'] || 'unknown' + @router = ::SOAP::RPC::Router.new(self.class.name) + @soaplet = ::SOAP::RPC::SOAPlet.new(@router) + on_init + end + + def on_init + # do extra initialization in a derived class if needed. + end + + def mapping_registry + @router.mapping_registry + end + + def mapping_registry=(value) + @router.mapping_registry = value + end + + def generate_explicit_type + @router.generate_explicit_type + end + + def generate_explicit_type=(generate_explicit_type) + @router.generate_explicit_type = generate_explicit_type + end + + # servant entry interface + + def add_rpc_servant(obj, namespace = @default_namespace) + @router.add_rpc_servant(obj, namespace) + end + alias add_servant add_rpc_servant + + def add_headerhandler(obj) + @router.add_headerhandler(obj) + end + alias add_rpc_headerhandler add_headerhandler + + # method entry interface + + def add_rpc_method(obj, name, *param) + add_rpc_method_with_namespace_as(@default_namespace, obj, name, name, *param) + end + alias add_method add_rpc_method + + def add_rpc_method_as(obj, name, name_as, *param) + add_rpc_method_with_namespace_as(@default_namespace, obj, name, name_as, *param) + end + alias add_method_as add_rpc_method_as + + def add_rpc_method_with_namespace(namespace, obj, name, *param) + add_rpc_method_with_namespace_as(namespace, obj, name, name, *param) + end + alias add_method_with_namespace add_rpc_method_with_namespace + + def add_rpc_method_with_namespace_as(namespace, obj, name, name_as, *param) + qname = XSD::QName.new(namespace, name_as) + soapaction = nil + param_def = SOAPMethod.derive_rpc_param_def(obj, name, *param) + @router.add_rpc_operation(obj, qname, soapaction, name, param_def) + end + alias add_method_with_namespace_as add_rpc_method_with_namespace_as + + def add_rpc_operation(receiver, qname, soapaction, name, param_def, opt = {}) + @router.add_rpc_operation(receiver, qname, soapaction, name, param_def, opt) + end + + def add_document_operation(receiver, soapaction, name, param_def, opt = {}) + @router.add_document_operation(receiver, soapaction, name, param_def, opt) + end + + def set_fcgi_request(request) + @fcgi = request + end + +private + + HTTPVersion = WEBrick::HTTPVersion.new('1.0') # dummy; ignored + + def run + res = WEBrick::HTTPResponse.new({:HTTPVersion => HTTPVersion}) + begin + @log.info { "received a request from '#{ @remote_host }'" } + if @fcgi + req = SOAPFCGIRequest.new(@fcgi) + else + req = SOAPStdinRequest.new($stdin) + end + @soaplet.do_POST(req, res) + rescue HTTPStatus::EOFError, HTTPStatus::RequestTimeout => ex + res.set_error(ex) + rescue HTTPStatus::Error => ex + res.set_error(ex) + rescue HTTPStatus::Status => ex + res.status = ex.code + rescue StandardError, NameError => ex # for Ruby 1.6 + res.set_error(ex, true) + ensure + if defined?(MOD_RUBY) + r = Apache.request + r.status = res.status + r.content_type = res.content_type + r.send_http_header + buf = res.body + else + buf = '' + res.send_response(buf) + buf.sub!(/^[^\r]+\r\n/, '') # Trim status line. + end + @log.debug { "SOAP CGI Response:\n#{ buf }" } + if @fcgi + @fcgi.out.print buf + @fcgi.finish + @fcgi = nil + else + print buf + end + end + 0 + end +end + + +end +end diff --git a/lib/soap/rpc/driver.rb b/lib/soap/rpc/driver.rb new file mode 100644 index 0000000..0fb4e82 --- /dev/null +++ b/lib/soap/rpc/driver.rb @@ -0,0 +1,254 @@ +# SOAP4R - SOAP RPC driver +# Copyright (C) 2000, 2001, 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/soap' +require 'soap/mapping' +require 'soap/mapping/wsdlliteralregistry' +require 'soap/rpc/rpc' +require 'soap/rpc/proxy' +require 'soap/rpc/element' +require 'soap/streamHandler' +require 'soap/property' +require 'soap/header/handlerset' + + +module SOAP +module RPC + + +class Driver + class << self + if RUBY_VERSION >= "1.7.0" + def __attr_proxy(symbol, assignable = false) + name = symbol.to_s + define_method(name) { + @proxy.__send__(name) + } + if assignable + aname = name + '=' + define_method(aname) { |rhs| + @proxy.__send__(aname, rhs) + } + end + end + else + def __attr_proxy(symbol, assignable = false) + name = symbol.to_s + module_eval <<-EOS + def #{name} + @proxy.#{name} + end + EOS + if assignable + module_eval <<-EOS + def #{name}=(value) + @proxy.#{name} = value + end + EOS + end + end + end + end + + __attr_proxy :endpoint_url, true + __attr_proxy :mapping_registry, true + __attr_proxy :default_encodingstyle, true + __attr_proxy :generate_explicit_type, true + __attr_proxy :allow_unqualified_element, true + __attr_proxy :headerhandler + __attr_proxy :streamhandler + __attr_proxy :test_loopback_response + __attr_proxy :reset_stream + + attr_reader :proxy + attr_reader :options + attr_accessor :soapaction + + def inspect + "#<#{self.class}:#{@proxy.inspect}>" + end + + def httpproxy + options["protocol.http.proxy"] + end + + def httpproxy=(httpproxy) + options["protocol.http.proxy"] = httpproxy + end + + def wiredump_dev + options["protocol.http.wiredump_dev"] + end + + def wiredump_dev=(wiredump_dev) + options["protocol.http.wiredump_dev"] = wiredump_dev + end + + def mandatorycharset + options["protocol.mandatorycharset"] + end + + def mandatorycharset=(mandatorycharset) + options["protocol.mandatorycharset"] = mandatorycharset + end + + def wiredump_file_base + options["protocol.wiredump_file_base"] + end + + def wiredump_file_base=(wiredump_file_base) + options["protocol.wiredump_file_base"] = wiredump_file_base + end + + def initialize(endpoint_url, namespace = nil, soapaction = nil) + @namespace = namespace + @soapaction = soapaction + @options = setup_options + @wiredump_file_base = nil + @proxy = Proxy.new(endpoint_url, @soapaction, @options) + end + + def loadproperty(propertyname) + unless options.loadproperty(propertyname) + raise LoadError.new("No such property to load -- #{propertyname}") + end + end + + def add_rpc_method(name, *params) + add_rpc_method_with_soapaction_as(name, name, @soapaction, *params) + end + + def add_rpc_method_as(name, name_as, *params) + add_rpc_method_with_soapaction_as(name, name_as, @soapaction, *params) + end + + def add_rpc_method_with_soapaction(name, soapaction, *params) + add_rpc_method_with_soapaction_as(name, name, soapaction, *params) + end + + def add_rpc_method_with_soapaction_as(name, name_as, soapaction, *params) + param_def = SOAPMethod.create_rpc_param_def(params) + qname = XSD::QName.new(@namespace, name_as) + @proxy.add_rpc_method(qname, soapaction, name, param_def) + add_rpc_method_interface(name, param_def) + end + + # add_method is for shortcut of typical rpc/encoded method definition. + alias add_method add_rpc_method + alias add_method_as add_rpc_method_as + alias add_method_with_soapaction add_rpc_method_with_soapaction + alias add_method_with_soapaction_as add_rpc_method_with_soapaction_as + + def add_document_method(name, soapaction, req_qname, res_qname) + param_def = SOAPMethod.create_doc_param_def(req_qname, res_qname) + @proxy.add_document_method(soapaction, name, param_def) + add_document_method_interface(name, param_def) + end + + def add_rpc_operation(qname, soapaction, name, param_def, opt = {}) + @proxy.add_rpc_operation(qname, soapaction, name, param_def, opt) + add_rpc_method_interface(name, param_def) + end + + def add_document_operation(soapaction, name, param_def, opt = {}) + @proxy.add_document_operation(soapaction, name, param_def, opt) + add_document_method_interface(name, param_def) + end + + def invoke(headers, body) + if headers and !headers.is_a?(SOAPHeader) + headers = create_header(headers) + end + set_wiredump_file_base(body.elename.name) + env = @proxy.invoke(headers, body) + if env.nil? + return nil, nil + else + return env.header, env.body + end + end + + def call(name, *params) + set_wiredump_file_base(name) + @proxy.call(name, *params) + end + +private + + def set_wiredump_file_base(name) + if @wiredump_file_base + @proxy.set_wiredump_file_base("#{@wiredump_file_base}_#{name}") + end + end + + def create_header(headers) + header = SOAPHeader.new() + headers.each do |content, mustunderstand, encodingstyle| + header.add(SOAPHeaderItem.new(content, mustunderstand, encodingstyle)) + end + header + end + + def setup_options + if opt = Property.loadproperty(::SOAP::PropertyName) + opt = opt["client"] + end + opt ||= Property.new + opt.add_hook("protocol.mandatorycharset") do |key, value| + @proxy.mandatorycharset = value + end + opt.add_hook("protocol.wiredump_file_base") do |key, value| + @wiredump_file_base = value + end + opt["protocol.http.charset"] ||= XSD::Charset.xml_encoding_label + opt["protocol.http.proxy"] ||= Env::HTTP_PROXY + opt["protocol.http.no_proxy"] ||= Env::NO_PROXY + opt + end + + def add_rpc_method_interface(name, param_def) + param_count = RPC::SOAPMethod.param_count(param_def, + RPC::SOAPMethod::IN, RPC::SOAPMethod::INOUT) + add_method_interface(name, param_count) + end + + def add_document_method_interface(name, param_def) + param_count = RPC::SOAPMethod.param_count(param_def, RPC::SOAPMethod::IN) + add_method_interface(name, param_count) + end + + if RUBY_VERSION > "1.7.0" + def add_method_interface(name, param_count) + ::SOAP::Mapping.define_singleton_method(self, name) do |*arg| + unless arg.size == param_count + raise ArgumentError.new( + "wrong number of arguments (#{arg.size} for #{param_count})") + end + call(name, *arg) + end + self.method(name) + end + else + def add_method_interface(name, param_count) + instance_eval <<-EOS + def #{name}(*arg) + unless arg.size == #{param_count} + raise ArgumentError.new( + "wrong number of arguments (\#{arg.size} for #{param_count})") + end + call(#{name.dump}, *arg) + end + EOS + self.method(name) + end + end +end + + +end +end diff --git a/lib/soap/rpc/element.rb b/lib/soap/rpc/element.rb new file mode 100644 index 0000000..52d50ba --- /dev/null +++ b/lib/soap/rpc/element.rb @@ -0,0 +1,330 @@ +# SOAP4R - RPC element definition. +# Copyright (C) 2000, 2001, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/baseData' + + +module SOAP + +# Add method definitions for RPC to common definition in element.rb +class SOAPBody < SOAPStruct + public + + def request + root_node + end + + def response + root = root_node + if !@is_fault + if root.nil? + nil + elsif root.is_a?(SOAPBasetype) + root + else + # Initial element is [retval]. + root[0] + end + else + root + end + end + + def outparams + root = root_node + if !@is_fault and !root.nil? and !root.is_a?(SOAPBasetype) + op = root[1..-1] + op = nil if op && op.empty? + op + else + nil + end + end + + def fault + if @is_fault + self['fault'] + else + nil + end + end + + def fault=(fault) + @is_fault = true + add_member('fault', fault) + end +end + + +module RPC + + +class RPCError < Error; end +class MethodDefinitionError < RPCError; end +class ParameterError < RPCError; end + +class SOAPMethod < SOAPStruct + RETVAL = 'retval' + IN = 'in' + OUT = 'out' + INOUT = 'inout' + + attr_reader :param_def + attr_reader :inparam + attr_reader :outparam + attr_reader :retval_name + attr_reader :retval_class_name + + def initialize(qname, param_def = nil) + super(nil) + @elename = qname + @encodingstyle = nil + + @param_def = param_def + + @signature = [] + @inparam_names = [] + @inoutparam_names = [] + @outparam_names = [] + + @inparam = {} + @outparam = {} + @retval_name = nil + @retval_class_name = nil + + init_param(@param_def) if @param_def + end + + def have_outparam? + @outparam_names.size > 0 + end + + def input_params + collect_params(IN, INOUT) + end + + def output_params + collect_params(OUT, INOUT) + end + + def set_param(params) + params.each do |param, data| + @inparam[param] = data + data.elename.name = param + data.parent = self + end + end + + def set_outparam(params) + params.each do |param, data| + @outparam[param] = data + data.elename.name = param + end + end + + def SOAPMethod.param_count(param_def, *type) + count = 0 + param_def.each do |io_type, name, param_type| + if type.include?(io_type) + count += 1 + end + end + count + end + + def SOAPMethod.derive_rpc_param_def(obj, name, *param) + if param.size == 1 and param[0].is_a?(Array) + return param[0] + end + if param.empty? + method = obj.method(name) + param_names = (1..method.arity.abs).collect { |i| "p#{i}" } + else + param_names = param + end + create_rpc_param_def(param_names) + end + + def SOAPMethod.create_rpc_param_def(param_names) + param_def = [] + param_names.each do |param_name| + param_def.push([IN, param_name, nil]) + end + param_def.push([RETVAL, 'return', nil]) + param_def + end + + def SOAPMethod.create_doc_param_def(req_qnames, res_qnames) + req_qnames = [req_qnames] if req_qnames.is_a?(XSD::QName) + res_qnames = [res_qnames] if res_qnames.is_a?(XSD::QName) + param_def = [] + # req_qnames and res_qnames can be nil + if req_qnames + req_qnames.each do |qname| + param_def << [IN, qname.name, [nil, qname.namespace, qname.name]] + end + end + if res_qnames + res_qnames.each do |qname| + param_def << [OUT, qname.name, [nil, qname.namespace, qname.name]] + end + end + param_def + end + +private + + def collect_params(*type) + names = [] + @signature.each do |io_type, name, param_type| + names << name if type.include?(io_type) + end + names + end + + def init_param(param_def) + param_def.each do |io_type, name, param_type| + case io_type + when IN + @signature.push([IN, name, param_type]) + @inparam_names.push(name) + when OUT + @signature.push([OUT, name, param_type]) + @outparam_names.push(name) + when INOUT + @signature.push([INOUT, name, param_type]) + @inoutparam_names.push(name) + when RETVAL + if @retval_name + raise MethodDefinitionError.new('duplicated retval') + end + @retval_name = name + @retval_class_name = nil + if param_type + if param_type[0].is_a?(String) + @retval_class_name = Mapping.class_from_name(param_type[0]) + else + @retval_class_name = param_type[0] + end + end + else + raise MethodDefinitionError.new("unknown type: #{io_type}") + end + end + end +end + + +class SOAPMethodRequest < SOAPMethod + attr_accessor :soapaction + + def SOAPMethodRequest.create_request(qname, *params) + param_def = [] + param_value = [] + i = 0 + params.each do |param| + param_name = "p#{i}" + i += 1 + param_def << [IN, param_name, nil] + param_value << [param_name, param] + end + param_def << [RETVAL, 'return', nil] + o = new(qname, param_def) + o.set_param(param_value) + o + end + + def initialize(qname, param_def = nil, soapaction = nil) + check_elename(qname) + super(qname, param_def) + @soapaction = soapaction + end + + def each + input_params.each do |name| + unless @inparam[name] + raise ParameterError.new("parameter: #{name} was not given") + end + yield(name, @inparam[name]) + end + end + + def dup + req = self.class.new(@elename.dup, @param_def, @soapaction) + req.encodingstyle = @encodingstyle + req + end + + def create_method_response(response_name = nil) + response_name ||= + XSD::QName.new(@elename.namespace, @elename.name + 'Response') + SOAPMethodResponse.new(response_name, @param_def) + end + +private + + def check_elename(qname) + # NCName & ruby's method name + unless /\A[\w_][\w\d_\-]*\z/ =~ qname.name + raise MethodDefinitionError.new("element name '#{qname.name}' not allowed") + end + end +end + + +class SOAPMethodResponse < SOAPMethod + + def initialize(qname, param_def = nil) + super(qname, param_def) + @retval = nil + end + + def retval=(retval) + @retval = retval + @retval.elename = @retval.elename.dup_name(@retval_name || 'return') + retval.parent = self + retval + end + + def each + if @retval_name and !@retval.is_a?(SOAPVoid) + yield(@retval_name, @retval) + end + + output_params.each do |name| + unless @outparam[name] + raise ParameterError.new("parameter: #{name} was not given") + end + yield(name, @outparam[name]) + end + end +end + + +# To return(?) void explicitly. +# def foo(input_var) +# ... +# return SOAP::RPC::SOAPVoid.new +# end +class SOAPVoid < XSD::XSDAnySimpleType + include SOAPBasetype + extend SOAPModuleUtils + Name = XSD::QName.new(Mapping::RubyCustomTypeNamespace, nil) + +public + def initialize() + @elename = Name + @id = nil + @precedents = [] + @parent = nil + end +end + + +end +end diff --git a/lib/soap/rpc/httpserver.rb b/lib/soap/rpc/httpserver.rb new file mode 100644 index 0000000..c78c0ab --- /dev/null +++ b/lib/soap/rpc/httpserver.rb @@ -0,0 +1,135 @@ +# SOAP4R - WEBrick HTTP Server +# Copyright (C) 2003, 2004, 2005 by NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'logger' +require 'soap/rpc/soaplet' +require 'soap/streamHandler' +require 'webrick' + + +module SOAP +module RPC + + +class HTTPServer < Logger::Application + attr_reader :server + attr_accessor :default_namespace + + def initialize(config) + actor = config[:SOAPHTTPServerApplicationName] || self.class.name + super(actor) + @default_namespace = config[:SOAPDefaultNamespace] + @webrick_config = config.dup + self.level = Logger::Severity::ERROR # keep silent by default + @webrick_config[:Logger] ||= @log + @log = @webrick_config[:Logger] # sync logger of App and HTTPServer + @router = ::SOAP::RPC::Router.new(actor) + @soaplet = ::SOAP::RPC::SOAPlet.new(@router) + on_init + @server = WEBrick::HTTPServer.new(@webrick_config) + @server.mount('/soaprouter', @soaplet) + if wsdldir = config[:WSDLDocumentDirectory] + @server.mount('/wsdl', WEBrick::HTTPServlet::FileHandler, wsdldir) + end + # for backward compatibility + @server.mount('/', @soaplet) + end + + def on_init + # do extra initialization in a derived class if needed. + end + + def status + @server.status if @server + end + + def shutdown + @server.shutdown if @server + end + + def mapping_registry + @router.mapping_registry + end + + def mapping_registry=(mapping_registry) + @router.mapping_registry = mapping_registry + end + + def generate_explicit_type + @router.generate_explicit_type + end + + def generate_explicit_type=(generate_explicit_type) + @router.generate_explicit_type = generate_explicit_type + end + + # servant entry interface + + def add_rpc_request_servant(factory, namespace = @default_namespace) + @router.add_rpc_request_servant(factory, namespace) + end + + def add_rpc_servant(obj, namespace = @default_namespace) + @router.add_rpc_servant(obj, namespace) + end + + def add_request_headerhandler(factory) + @router.add_request_headerhandler(factory) + end + + def add_headerhandler(obj) + @router.add_headerhandler(obj) + end + alias add_rpc_headerhandler add_headerhandler + + # method entry interface + + def add_rpc_method(obj, name, *param) + add_rpc_method_as(obj, name, name, *param) + end + alias add_method add_rpc_method + + def add_rpc_method_as(obj, name, name_as, *param) + qname = XSD::QName.new(@default_namespace, name_as) + soapaction = nil + param_def = SOAPMethod.derive_rpc_param_def(obj, name, *param) + @router.add_rpc_operation(obj, qname, soapaction, name, param_def) + end + alias add_method_as add_rpc_method_as + + def add_document_method(obj, soapaction, name, req_qnames, res_qnames) + param_def = SOAPMethod.create_doc_param_def(req_qnames, res_qnames) + @router.add_document_operation(obj, soapaction, name, param_def) + end + + def add_rpc_operation(receiver, qname, soapaction, name, param_def, opt = {}) + @router.add_rpc_operation(receiver, qname, soapaction, name, param_def, opt) + end + + def add_rpc_request_operation(factory, qname, soapaction, name, param_def, opt = {}) + @router.add_rpc_request_operation(factory, qname, soapaction, name, param_def, opt) + end + + def add_document_operation(receiver, soapaction, name, param_def, opt = {}) + @router.add_document_operation(receiver, soapaction, name, param_def, opt) + end + + def add_document_request_operation(factory, soapaction, name, param_def, opt = {}) + @router.add_document_request_operation(factory, soapaction, name, param_def, opt) + end + +private + + def run + @server.start + end +end + + +end +end diff --git a/lib/soap/rpc/proxy.rb b/lib/soap/rpc/proxy.rb new file mode 100644 index 0000000..9524cbb --- /dev/null +++ b/lib/soap/rpc/proxy.rb @@ -0,0 +1,511 @@ +# SOAP4R - RPC Proxy library. +# Copyright (C) 2000, 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/soap' +require 'soap/processor' +require 'soap/mapping' +require 'soap/rpc/rpc' +require 'soap/rpc/element' +require 'soap/streamHandler' +require 'soap/mimemessage' + + +module SOAP +module RPC + + +class Proxy + include SOAP + +public + + attr_accessor :soapaction + attr_accessor :mandatorycharset + attr_accessor :allow_unqualified_element + attr_accessor :default_encodingstyle + attr_accessor :generate_explicit_type + attr_reader :headerhandler + attr_reader :streamhandler + + attr_accessor :mapping_registry + attr_accessor :literal_mapping_registry + + attr_reader :operation + + def initialize(endpoint_url, soapaction, options) + @endpoint_url = endpoint_url + @soapaction = soapaction + @options = options + @protocol_option = options["protocol"] ||= ::SOAP::Property.new + initialize_streamhandler(@protocol_option) + @operation = {} + @mandatorycharset = nil + @allow_unqualified_element = true + @default_encodingstyle = nil + @generate_explicit_type = true + @headerhandler = Header::HandlerSet.new + @mapping_registry = nil + @literal_mapping_registry = ::SOAP::Mapping::WSDLLiteralRegistry.new + end + + def inspect + "#<#{self.class}:#{@endpoint_url}>" + end + + def endpoint_url + @endpoint_url + end + + def endpoint_url=(endpoint_url) + @endpoint_url = endpoint_url + reset_stream + end + + def reset_stream + @streamhandler.reset(@endpoint_url) + end + + def set_wiredump_file_base(wiredump_file_base) + @streamhandler.wiredump_file_base = wiredump_file_base + end + + def test_loopback_response + @streamhandler.test_loopback_response + end + + def add_rpc_operation(qname, soapaction, name, param_def, opt = {}) + opt[:request_qname] = qname + opt[:request_style] ||= :rpc + opt[:response_style] ||= :rpc + opt[:request_use] ||= :encoded + opt[:response_use] ||= :encoded + @operation[name] = Operation.new(soapaction, param_def, opt) + end + + def add_document_operation(soapaction, name, param_def, opt = {}) + opt[:request_style] ||= :document + opt[:response_style] ||= :document + opt[:request_use] ||= :literal + opt[:response_use] ||= :literal + # default values of these values are unqualified in XML Schema. + # set true for backward compatibility. + unless opt.key?(:elementformdefault) + opt[:elementformdefault] = true + end + unless opt.key?(:attributeformdefault) + opt[:attributeformdefault] = true + end + @operation[name] = Operation.new(soapaction, param_def, opt) + end + + # add_method is for shortcut of typical rpc/encoded method definition. + alias add_method add_rpc_operation + alias add_rpc_method add_rpc_operation + alias add_document_method add_document_operation + + def invoke(req_header, req_body, opt = nil) + opt ||= create_encoding_opt + route(req_header, req_body, opt, opt) + end + + def call(name, *params) + unless op_info = @operation[name] + raise MethodDefinitionError, "method: #{name} not defined" + end + mapping_opt = create_mapping_opt + req_header = create_request_header + req_body = SOAPBody.new( + op_info.request_body(params, @mapping_registry, + @literal_mapping_registry, mapping_opt) + ) + reqopt = create_encoding_opt( + :soapaction => op_info.soapaction || @soapaction, + :envelopenamespace => @options["soap.envelope.requestnamespace"], + :default_encodingstyle => + @default_encodingstyle || op_info.request_default_encodingstyle, + :elementformdefault => op_info.elementformdefault, + :attributeformdefault => op_info.attributeformdefault + ) + resopt = create_encoding_opt( + :envelopenamespace => @options["soap.envelope.responsenamespace"], + :default_encodingstyle => + @default_encodingstyle || op_info.response_default_encodingstyle, + :elementformdefault => op_info.elementformdefault, + :attributeformdefault => op_info.attributeformdefault + ) + env = route(req_header, req_body, reqopt, resopt) + raise EmptyResponseError unless env + receive_headers(env.header) + begin + check_fault(env.body) + rescue ::SOAP::FaultError => e + op_info.raise_fault(e, @mapping_registry, @literal_mapping_registry) + end + op_info.response_obj(env.body, @mapping_registry, + @literal_mapping_registry, mapping_opt) + end + + def route(req_header, req_body, reqopt, resopt) + req_env = ::SOAP::SOAPEnvelope.new(req_header, req_body) + unless reqopt[:envelopenamespace].nil? + set_envelopenamespace(req_env, reqopt[:envelopenamespace]) + end + reqopt[:external_content] = nil + conn_data = marshal(req_env, reqopt) + if ext = reqopt[:external_content] + mime = MIMEMessage.new + ext.each do |k, v| + mime.add_attachment(v.data) + end + mime.add_part(conn_data.send_string + "\r\n") + mime.close + conn_data.send_string = mime.content_str + conn_data.send_contenttype = mime.headers['content-type'].str + end + conn_data = @streamhandler.send(@endpoint_url, conn_data, + reqopt[:soapaction]) + if conn_data.receive_string.empty? + return nil + end + unmarshal(conn_data, resopt) + end + + def check_fault(body) + if body.fault + raise SOAP::FaultError.new(body.fault) + end + end + +private + + def initialize_streamhandler(options) + value = options["streamhandler"] + if value and !value.empty? + factory = Property::Util.const_from_name(value) + else + factory = HTTPStreamHandler + end + @streamhandler = factory.create(options) + options.add_hook("streamhandler") do |key, value| + @streamhandler.reset + if value.respond_to?(:create) + factory = value + elsif value and !value.to_str.empty? + factory = Property::Util.const_from_name(value.to_str) + else + factory = HTTPStreamHandler + end + options.unlock(true) + @streamhandler = factory.create(options) + end + end + + def set_envelopenamespace(env, namespace) + env.elename = XSD::QName.new(namespace, env.elename.name) + if env.header + env.header.elename = XSD::QName.new(namespace, env.header.elename.name) + end + if env.body + env.body.elename = XSD::QName.new(namespace, env.body.elename.name) + end + end + + def create_request_header + headers = @headerhandler.on_outbound + if headers.empty? + nil + else + h = ::SOAP::SOAPHeader.new + headers.each do |header| + h.add(header.elename.name, header) + end + h + end + end + + def receive_headers(headers) + @headerhandler.on_inbound(headers) if headers + end + + def marshal(env, opt) + send_string = Processor.marshal(env, opt) + StreamHandler::ConnectionData.new(send_string) + end + + def unmarshal(conn_data, opt) + contenttype = conn_data.receive_contenttype + if /#{MIMEMessage::MultipartContentType}/i =~ contenttype + opt[:external_content] = {} + mime = MIMEMessage.parse("Content-Type: " + contenttype, + conn_data.receive_string) + mime.parts.each do |part| + value = Attachment.new(part.content) + value.contentid = part.contentid + obj = SOAPAttachment.new(value) + opt[:external_content][value.contentid] = obj if value.contentid + end + opt[:charset] = @mandatorycharset || + StreamHandler.parse_media_type(mime.root.headers['content-type'].str) + env = Processor.unmarshal(mime.root.content, opt) + else + opt[:charset] = @mandatorycharset || + ::SOAP::StreamHandler.parse_media_type(contenttype) + env = Processor.unmarshal(conn_data.receive_string, opt) + end + unless env.is_a?(::SOAP::SOAPEnvelope) + raise ResponseFormatError.new( + "response is not a SOAP envelope: #{conn_data.receive_string}") + end + env + end + + def create_encoding_opt(hash = nil) + opt = {} + opt[:default_encodingstyle] = @default_encodingstyle + opt[:allow_unqualified_element] = @allow_unqualified_element + opt[:generate_explicit_type] = @generate_explicit_type + opt[:no_indent] = @options["soap.envelope.no_indent"] + opt[:use_numeric_character_reference] = + @options["soap.envelope.use_numeric_character_reference"] + opt.update(hash) if hash + opt + end + + def create_mapping_opt(hash = nil) + opt = { + :external_ces => @options["soap.mapping.external_ces"] + } + opt.update(hash) if hash + opt + end + + class Operation + attr_reader :soapaction + attr_reader :request_style + attr_reader :response_style + attr_reader :request_use + attr_reader :response_use + attr_reader :elementformdefault + attr_reader :attributeformdefault + + def initialize(soapaction, param_def, opt) + @soapaction = soapaction + @request_style = opt[:request_style] + @response_style = opt[:response_style] + @request_use = opt[:request_use] + @response_use = opt[:response_use] + # set nil(unqualified) by default + @elementformdefault = opt[:elementformdefault] + @attributeformdefault = opt[:attributeformdefault] + check_style(@request_style) + check_style(@response_style) + check_use(@request_use) + check_use(@response_use) + if @request_style == :rpc + @rpc_request_qname = opt[:request_qname] + if @rpc_request_qname.nil? + raise MethodDefinitionError.new("rpc_request_qname must be given") + end + @rpc_method_factory = + RPC::SOAPMethodRequest.new(@rpc_request_qname, param_def, @soapaction) + else + @doc_request_qnames = [] + @doc_request_qualified = [] + @doc_response_qnames = [] + @doc_response_qualified = [] + param_def.each do |inout, paramname, typeinfo, eleinfo| + klass_not_used, nsdef, namedef = typeinfo + qualified = eleinfo + if namedef.nil? + raise MethodDefinitionError.new("qname must be given") + end + case inout + when SOAPMethod::IN + @doc_request_qnames << XSD::QName.new(nsdef, namedef) + @doc_request_qualified << qualified + when SOAPMethod::OUT + @doc_response_qnames << XSD::QName.new(nsdef, namedef) + @doc_response_qualified << qualified + else + raise MethodDefinitionError.new( + "illegal inout definition for document style: #{inout}") + end + end + end + end + + def request_default_encodingstyle + (@request_use == :encoded) ? EncodingNamespace : LiteralNamespace + end + + def response_default_encodingstyle + (@response_use == :encoded) ? EncodingNamespace : LiteralNamespace + end + + def request_body(values, mapping_registry, literal_mapping_registry, opt) + if @request_style == :rpc + request_rpc(values, mapping_registry, literal_mapping_registry, opt) + else + request_doc(values, mapping_registry, literal_mapping_registry, opt) + end + end + + def response_obj(body, mapping_registry, literal_mapping_registry, opt) + if @response_style == :rpc + response_rpc(body, mapping_registry, literal_mapping_registry, opt) + else + response_doc(body, mapping_registry, literal_mapping_registry, opt) + end + end + + def raise_fault(e, mapping_registry, literal_mapping_registry) + if @response_style == :rpc + Mapping.fault2exception(e, mapping_registry) + else + Mapping.fault2exception(e, literal_mapping_registry) + end + end + + private + + def check_style(style) + unless [:rpc, :document].include?(style) + raise MethodDefinitionError.new("unknown style: #{style}") + end + end + + def check_use(use) + unless [:encoded, :literal].include?(use) + raise MethodDefinitionError.new("unknown use: #{use}") + end + end + + def request_rpc(values, mapping_registry, literal_mapping_registry, opt) + if @request_use == :encoded + request_rpc_enc(values, mapping_registry, opt) + else + request_rpc_lit(values, literal_mapping_registry, opt) + end + end + + def request_doc(values, mapping_registry, literal_mapping_registry, opt) + if @request_use == :encoded + request_doc_enc(values, mapping_registry, opt) + else + request_doc_lit(values, literal_mapping_registry, opt) + end + end + + def request_rpc_enc(values, mapping_registry, opt) + method = @rpc_method_factory.dup + names = method.input_params + obj = create_request_obj(names, values) + soap = Mapping.obj2soap(obj, mapping_registry, @rpc_request_qname, opt) + method.set_param(soap) + method + end + + def request_rpc_lit(values, mapping_registry, opt) + method = @rpc_method_factory.dup + params = {} + idx = 0 + method.input_params.each do |name| + params[name] = Mapping.obj2soap(values[idx], mapping_registry, + XSD::QName.new(nil, name), opt) + idx += 1 + end + method.set_param(params) + method + end + + def request_doc_enc(values, mapping_registry, opt) + (0...values.size).collect { |idx| + ele = Mapping.obj2soap(values[idx], mapping_registry, nil, opt) + ele.elename = @doc_request_qnames[idx] + ele + } + end + + def request_doc_lit(values, mapping_registry, opt) + (0...values.size).collect { |idx| + ele = Mapping.obj2soap(values[idx], mapping_registry, + @doc_request_qnames[idx], opt) + ele.encodingstyle = LiteralNamespace + if ele.respond_to?(:qualified) + ele.qualified = @doc_request_qualified[idx] + end + ele + } + end + + def response_rpc(body, mapping_registry, literal_mapping_registry, opt) + if @response_use == :encoded + response_rpc_enc(body, mapping_registry, opt) + else + response_rpc_lit(body, literal_mapping_registry, opt) + end + end + + def response_doc(body, mapping_registry, literal_mapping_registry, opt) + if @response_use == :encoded + return *response_doc_enc(body, mapping_registry, opt) + else + return *response_doc_lit(body, literal_mapping_registry, opt) + end + end + + def response_rpc_enc(body, mapping_registry, opt) + ret = nil + if body.response + ret = Mapping.soap2obj(body.response, mapping_registry, + @rpc_method_factory.retval_class_name, opt) + end + if body.outparams + outparams = body.outparams.collect { |outparam| + Mapping.soap2obj(outparam, mapping_registry, nil, opt) + } + [ret].concat(outparams) + else + ret + end + end + + def response_rpc_lit(body, mapping_registry, opt) + body.root_node.collect { |key, value| + Mapping.soap2obj(value, mapping_registry, + @rpc_method_factory.retval_class_name, opt) + } + end + + def response_doc_enc(body, mapping_registry, opt) + body.collect { |key, value| + Mapping.soap2obj(value, mapping_registry, nil, opt) + } + end + + def response_doc_lit(body, mapping_registry, opt) + body.collect { |key, value| + Mapping.soap2obj(value, mapping_registry) + } + end + + def create_request_obj(names, params) + o = Object.new + idx = 0 + while idx < params.length + o.instance_variable_set('@' + names[idx], params[idx]) + idx += 1 + end + o + end + end +end + + +end +end diff --git a/lib/soap/rpc/router.rb b/lib/soap/rpc/router.rb new file mode 100644 index 0000000..fc03dcf --- /dev/null +++ b/lib/soap/rpc/router.rb @@ -0,0 +1,601 @@ +# SOAP4R - RPC Routing library +# Copyright (C) 2001, 2002, 2004, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/soap' +require 'soap/processor' +require 'soap/mapping' +require 'soap/mapping/wsdlliteralregistry' +require 'soap/rpc/rpc' +require 'soap/rpc/element' +require 'soap/streamHandler' +require 'soap/mimemessage' +require 'soap/header/handlerset' + + +module SOAP +module RPC + + +class Router + include SOAP + + attr_reader :actor + attr_accessor :mapping_registry + attr_accessor :literal_mapping_registry + attr_accessor :generate_explicit_type + attr_accessor :external_ces + + def initialize(actor) + @actor = actor + @mapping_registry = nil + @headerhandler = Header::HandlerSet.new + @literal_mapping_registry = ::SOAP::Mapping::WSDLLiteralRegistry.new + @generate_explicit_type = true + @external_ces = nil + @operation_by_soapaction = {} + @operation_by_qname = {} + @headerhandlerfactory = [] + end + + ### + ## header handler interface + # + def add_request_headerhandler(factory) + unless factory.respond_to?(:create) + raise TypeError.new("factory must respond to 'create'") + end + @headerhandlerfactory << factory + end + + def add_headerhandler(handler) + @headerhandler.add(handler) + end + + ### + ## servant definition interface + # + def add_rpc_request_servant(factory, namespace) + unless factory.respond_to?(:create) + raise TypeError.new("factory must respond to 'create'") + end + obj = factory.create # a dummy instance for introspection + ::SOAP::RPC.defined_methods(obj).each do |name| + begin + qname = XSD::QName.new(namespace, name) + param_def = ::SOAP::RPC::SOAPMethod.derive_rpc_param_def(obj, name) + opt = create_styleuse_option(:rpc, :encoded) + add_rpc_request_operation(factory, qname, nil, name, param_def, opt) + rescue SOAP::RPC::MethodDefinitionError => e + p e if $DEBUG + end + end + end + + def add_rpc_servant(obj, namespace) + ::SOAP::RPC.defined_methods(obj).each do |name| + begin + qname = XSD::QName.new(namespace, name) + param_def = ::SOAP::RPC::SOAPMethod.derive_rpc_param_def(obj, name) + opt = create_styleuse_option(:rpc, :encoded) + add_rpc_operation(obj, qname, nil, name, param_def, opt) + rescue SOAP::RPC::MethodDefinitionError => e + p e if $DEBUG + end + end + end + alias add_servant add_rpc_servant + + ### + ## operation definition interface + # + def add_rpc_operation(receiver, qname, soapaction, name, param_def, opt = {}) + ensure_styleuse_option(opt, :rpc, :encoded) + opt[:request_qname] = qname + op = ApplicationScopeOperation.new(soapaction, receiver, name, param_def, + opt) + if opt[:request_style] != :rpc + raise RPCRoutingError.new("illegal request_style given") + end + assign_operation(soapaction, qname, op) + end + alias add_method add_rpc_operation + alias add_rpc_method add_rpc_operation + + def add_rpc_request_operation(factory, qname, soapaction, name, param_def, opt = {}) + ensure_styleuse_option(opt, :rpc, :encoded) + opt[:request_qname] = qname + op = RequestScopeOperation.new(soapaction, factory, name, param_def, opt) + if opt[:request_style] != :rpc + raise RPCRoutingError.new("illegal request_style given") + end + assign_operation(soapaction, qname, op) + end + + def add_document_operation(receiver, soapaction, name, param_def, opt = {}) + # + # adopt workaround for doc/lit wrapper method + # (you should consider to simply use rpc/lit service) + # + #unless soapaction + # raise RPCRoutingError.new("soapaction is a must for document method") + #end + ensure_styleuse_option(opt, :document, :literal) + op = ApplicationScopeOperation.new(soapaction, receiver, name, param_def, + opt) + if opt[:request_style] != :document + raise RPCRoutingError.new("illegal request_style given") + end + assign_operation(soapaction, first_input_part_qname(param_def), op) + end + alias add_document_method add_document_operation + + def add_document_request_operation(factory, soapaction, name, param_def, opt = {}) + # + # adopt workaround for doc/lit wrapper method + # (you should consider to simply use rpc/lit service) + # + #unless soapaction + # raise RPCRoutingError.new("soapaction is a must for document method") + #end + ensure_styleuse_option(opt, :document, :literal) + op = RequestScopeOperation.new(soapaction, receiver, name, param_def, opt) + if opt[:request_style] != :document + raise RPCRoutingError.new("illegal request_style given") + end + assign_operation(soapaction, first_input_part_qname(param_def), op) + end + + def route(conn_data) + # we cannot set request_default_encodingsyle before parsing the content. + env = unmarshal(conn_data) + if env.nil? + raise ArgumentError.new("illegal SOAP marshal format") + end + op = lookup_operation(conn_data.soapaction, env.body) + headerhandler = @headerhandler.dup + @headerhandlerfactory.each do |f| + headerhandler.add(f.create) + end + soap_response = default_encodingstyle = nil + begin + receive_headers(headerhandler, env.header) + soap_response = + op.call(env.body, @mapping_registry, @literal_mapping_registry, + create_mapping_opt) + default_encodingstyle = op.response_default_encodingstyle + rescue Exception + soap_response = fault($!) + default_encodingstyle = nil + end + conn_data.is_fault = true if soap_response.is_a?(SOAPFault) + header = call_headers(headerhandler) + body = SOAPBody.new(soap_response) + env = SOAPEnvelope.new(header, body) + marshal(conn_data, env, default_encodingstyle) + end + + # Create fault response string. + def create_fault_response(e) + env = SOAPEnvelope.new(SOAPHeader.new, SOAPBody.new(fault(e))) + opt = {} + opt[:external_content] = nil + response_string = Processor.marshal(env, opt) + conn_data = StreamHandler::ConnectionData.new(response_string) + conn_data.is_fault = true + if ext = opt[:external_content] + mimeize(conn_data, ext) + end + conn_data + end + +private + + def first_input_part_qname(param_def) + param_def.each do |inout, paramname, typeinfo| + if inout == SOAPMethod::IN + klass, nsdef, namedef = typeinfo + return XSD::QName.new(nsdef, namedef) + end + end + nil + end + + def create_styleuse_option(style, use) + opt = {} + opt[:request_style] = opt[:response_style] = style + opt[:request_use] = opt[:response_use] = use + opt + end + + def ensure_styleuse_option(opt, style, use) + opt[:request_style] ||= style + opt[:response_style] ||= style + opt[:request_use] ||= use + opt[:response_use] ||= use + end + + def assign_operation(soapaction, qname, op) + assigned = false + if soapaction and !soapaction.empty? + @operation_by_soapaction[soapaction] = op + assigned = true + end + if qname + @operation_by_qname[qname] = op + assigned = true + end + unless assigned + raise RPCRoutingError.new("cannot assign operation") + end + end + + def lookup_operation(soapaction, body) + if op = @operation_by_soapaction[soapaction] + return op + end + qname = body.root_node.elename + if op = @operation_by_qname[qname] + return op + end + if soapaction + raise RPCRoutingError.new( + "operation: #{soapaction} #{qname} not supported") + else + raise RPCRoutingError.new("operation: #{qname} not supported") + end + end + + def call_headers(headerhandler) + headers = headerhandler.on_outbound + if headers.empty? + nil + else + h = ::SOAP::SOAPHeader.new + headers.each do |header| + h.add(header.elename.name, header) + end + h + end + end + + def receive_headers(headerhandler, headers) + headerhandler.on_inbound(headers) if headers + end + + def unmarshal(conn_data) + opt = {} + contenttype = conn_data.receive_contenttype + if /#{MIMEMessage::MultipartContentType}/i =~ contenttype + opt[:external_content] = {} + mime = MIMEMessage.parse("Content-Type: " + contenttype, + conn_data.receive_string) + mime.parts.each do |part| + value = Attachment.new(part.content) + value.contentid = part.contentid + obj = SOAPAttachment.new(value) + opt[:external_content][value.contentid] = obj if value.contentid + end + opt[:charset] = + StreamHandler.parse_media_type(mime.root.headers['content-type'].str) + env = Processor.unmarshal(mime.root.content, opt) + else + opt[:charset] = ::SOAP::StreamHandler.parse_media_type(contenttype) + env = Processor.unmarshal(conn_data.receive_string, opt) + end + charset = opt[:charset] + conn_data.send_contenttype = "text/xml; charset=\"#{charset}\"" + env + end + + def marshal(conn_data, env, default_encodingstyle = nil) + opt = {} + opt[:external_content] = nil + opt[:default_encodingstyle] = default_encodingstyle + opt[:generate_explicit_type] = @generate_explicit_type + response_string = Processor.marshal(env, opt) + conn_data.send_string = response_string + if ext = opt[:external_content] + mimeize(conn_data, ext) + end + conn_data + end + + def mimeize(conn_data, ext) + mime = MIMEMessage.new + ext.each do |k, v| + mime.add_attachment(v.data) + end + mime.add_part(conn_data.send_string + "\r\n") + mime.close + conn_data.send_string = mime.content_str + conn_data.send_contenttype = mime.headers['content-type'].str + conn_data + end + + # Create fault response. + def fault(e) + if e.is_a?(UnhandledMustUnderstandHeaderError) + faultcode = FaultCode::MustUnderstand + else + faultcode = FaultCode::Server + end + detail = Mapping::SOAPException.new(e) + SOAPFault.new( + SOAPElement.new(nil, faultcode), + SOAPString.new(e.to_s), + SOAPString.new(@actor), + Mapping.obj2soap(detail, @mapping_registry)) + end + + def create_mapping_opt + { :external_ces => @external_ces } + end + + class Operation + attr_reader :name + attr_reader :soapaction + attr_reader :request_style + attr_reader :response_style + attr_reader :request_use + attr_reader :response_use + + def initialize(soapaction, name, param_def, opt) + @soapaction = soapaction + @name = name + @request_style = opt[:request_style] + @response_style = opt[:response_style] + @request_use = opt[:request_use] + @response_use = opt[:response_use] + check_style(@request_style) + check_style(@response_style) + check_use(@request_use) + check_use(@response_use) + if @response_style == :rpc + request_qname = opt[:request_qname] or raise + @rpc_method_factory = + RPC::SOAPMethodRequest.new(request_qname, param_def, @soapaction) + @rpc_response_qname = opt[:response_qname] + else + @doc_request_qnames = [] + @doc_request_qualified = [] + @doc_response_qnames = [] + @doc_response_qualified = [] + param_def.each do |inout, paramname, typeinfo, eleinfo| + klass, nsdef, namedef = typeinfo + qualified = eleinfo + case inout + when SOAPMethod::IN + @doc_request_qnames << XSD::QName.new(nsdef, namedef) + @doc_request_qualified << qualified + when SOAPMethod::OUT + @doc_response_qnames << XSD::QName.new(nsdef, namedef) + @doc_response_qualified << qualified + else + raise ArgumentError.new( + "illegal inout definition for document style: #{inout}") + end + end + end + end + + def request_default_encodingstyle + (@request_use == :encoded) ? EncodingNamespace : LiteralNamespace + end + + def response_default_encodingstyle + (@response_use == :encoded) ? EncodingNamespace : LiteralNamespace + end + + def call(body, mapping_registry, literal_mapping_registry, opt) + if @request_style == :rpc + values = request_rpc(body, mapping_registry, literal_mapping_registry, + opt) + else + values = request_document(body, mapping_registry, + literal_mapping_registry, opt) + end + result = receiver.method(@name.intern).call(*values) + return result if result.is_a?(SOAPFault) + if @response_style == :rpc + response_rpc(result, mapping_registry, literal_mapping_registry, opt) + else + response_doc(result, mapping_registry, literal_mapping_registry, opt) + end + end + + private + + def receiver + raise NotImplementedError.new('must be defined in derived class') + end + + def request_rpc(body, mapping_registry, literal_mapping_registry, opt) + request = body.request + unless request.is_a?(SOAPStruct) + raise RPCRoutingError.new("not an RPC style") + end + if @request_use == :encoded + request_rpc_enc(request, mapping_registry, opt) + else + request_rpc_lit(request, literal_mapping_registry, opt) + end + end + + def request_document(body, mapping_registry, literal_mapping_registry, opt) + # ToDo: compare names with @doc_request_qnames + if @request_use == :encoded + request_doc_enc(body, mapping_registry, opt) + else + request_doc_lit(body, literal_mapping_registry, opt) + end + end + + def request_rpc_enc(request, mapping_registry, opt) + param = Mapping.soap2obj(request, mapping_registry, nil, opt) + request.collect { |key, value| + param[key] + } + end + + def request_rpc_lit(request, mapping_registry, opt) + request.collect { |key, value| + Mapping.soap2obj(value, mapping_registry, nil, opt) + } + end + + def request_doc_enc(body, mapping_registry, opt) + body.collect { |key, value| + Mapping.soap2obj(value, mapping_registry, nil, opt) + } + end + + def request_doc_lit(body, mapping_registry, opt) + body.collect { |key, value| + Mapping.soap2obj(value, mapping_registry, nil, opt) + } + end + + def response_rpc(result, mapping_registry, literal_mapping_registry, opt) + if @response_use == :encoded + response_rpc_enc(result, mapping_registry, opt) + else + response_rpc_lit(result, literal_mapping_registry, opt) + end + end + + def response_doc(result, mapping_registry, literal_mapping_registry, opt) + if @doc_response_qnames.size == 0 + result = [] + elsif @doc_response_qnames.size == 1 and !result.is_a?(Array) + result = [result] + end + if result.size != @doc_response_qnames.size + raise "required #{@doc_response_qnames.size} responses " + + "but #{result.size} given" + end + if @response_use == :encoded + response_doc_enc(result, mapping_registry, opt) + else + response_doc_lit(result, literal_mapping_registry, opt) + end + end + + def response_rpc_enc(result, mapping_registry, opt) + soap_response = + @rpc_method_factory.create_method_response(@rpc_response_qname) + if soap_response.have_outparam? + unless result.is_a?(Array) + raise RPCRoutingError.new("out parameter was not returned") + end + outparams = {} + i = 1 + soap_response.output_params.each do |outparam| + outparams[outparam] = Mapping.obj2soap(result[i], mapping_registry, + nil, opt) + i += 1 + end + soap_response.set_outparam(outparams) + soap_response.retval = Mapping.obj2soap(result[0], mapping_registry, + nil, opt) + else + soap_response.retval = Mapping.obj2soap(result, mapping_registry, nil, + opt) + end + soap_response + end + + def response_rpc_lit(result, mapping_registry, opt) + soap_response = + @rpc_method_factory.create_method_response(@rpc_response_qname) + if soap_response.have_outparam? + unless result.is_a?(Array) + raise RPCRoutingError.new("out parameter was not returned") + end + outparams = {} + i = 1 + soap_response.output_params.each do |outparam| + outparams[outparam] = Mapping.obj2soap(result[i], mapping_registry, + XSD::QName.new(nil, outparam), opt) + i += 1 + end + soap_response.set_outparam(outparams) + soap_response.retval = Mapping.obj2soap(result[0], mapping_registry, + XSD::QName.new(nil, soap_response.elename), opt) + else + soap_response.retval = Mapping.obj2soap(result, mapping_registry, + XSD::QName.new(nil, soap_response.elename), opt) + end + soap_response + end + + def response_doc_enc(result, mapping_registry, opt) + (0...result.size).collect { |idx| + ele = Mapping.obj2soap(result[idx], mapping_registry, nil, opt) + ele.elename = @doc_response_qnames[idx] + ele + } + end + + def response_doc_lit(result, mapping_registry, opt) + (0...result.size).collect { |idx| + ele = Mapping.obj2soap(result[idx], mapping_registry, + @doc_response_qnames[idx]) + ele.encodingstyle = LiteralNamespace + if ele.respond_to?(:qualified) + ele.qualified = @doc_response_qualified[idx] + end + ele + } + end + + def check_style(style) + unless [:rpc, :document].include?(style) + raise ArgumentError.new("unknown style: #{style}") + end + end + + def check_use(use) + unless [:encoded, :literal].include?(use) + raise ArgumentError.new("unknown use: #{use}") + end + end + end + + class ApplicationScopeOperation < Operation + def initialize(soapaction, receiver, name, param_def, opt) + super(soapaction, name, param_def, opt) + @receiver = receiver + end + + private + + def receiver + @receiver + end + end + + class RequestScopeOperation < Operation + def initialize(soapaction, receiver_factory, name, param_def, opt) + super(soapaction, name, param_def, opt) + unless receiver_factory.respond_to?(:create) + raise TypeError.new("factory must respond to 'create'") + end + @receiver_factory = receiver_factory + end + + private + + def receiver + @receiver_factory.create + end + end +end + + +end +end diff --git a/lib/soap/rpc/rpc.rb b/lib/soap/rpc/rpc.rb new file mode 100644 index 0000000..a48b525 --- /dev/null +++ b/lib/soap/rpc/rpc.rb @@ -0,0 +1,25 @@ +# SOAP4R - RPC utility. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module SOAP + + +module RPC + ServerException = Mapping::MappedException + + def self.defined_methods(obj) + if obj.is_a?(Module) + obj.methods - Module.methods + else + obj.methods - Object.instance_methods(true) + end + end +end + + +end diff --git a/lib/soap/rpc/soaplet.rb b/lib/soap/rpc/soaplet.rb new file mode 100644 index 0000000..7cccdd3 --- /dev/null +++ b/lib/soap/rpc/soaplet.rb @@ -0,0 +1,162 @@ +# SOAP4R - SOAP handler servlet for WEBrick +# Copyright (C) 2001-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'webrick/httpservlet/abstract' +require 'webrick/httpstatus' +require 'soap/rpc/router' +require 'soap/streamHandler' +begin + require 'stringio' + require 'zlib' +rescue LoadError + warn("Loading stringio or zlib failed. No gzipped response supported.") if $DEBUG +end + + +warn("Overriding WEBrick::Log#debug") if $DEBUG +require 'webrick/log' +module WEBrick + class Log < BasicLog + alias __debug debug + def debug(msg = nil) + if block_given? and msg.nil? + __debug(yield) + else + __debug(msg) + end + end + end +end + + +module SOAP +module RPC + + +class SOAPlet < WEBrick::HTTPServlet::AbstractServlet +public + attr_reader :options + + def initialize(router = nil) + @router = router || ::SOAP::RPC::Router.new(self.class.name) + @options = {} + @config = {} + end + + # for backward compatibility + def app_scope_router + @router + end + + # for backward compatibility + def add_servant(obj, namespace) + @router.add_rpc_servant(obj, namespace) + end + + def allow_content_encoding_gzip=(allow) + @options[:allow_content_encoding_gzip] = allow + end + + ### + ## Servlet interfaces for WEBrick. + # + def get_instance(config, *options) + @config = config + self + end + + def require_path_info? + false + end + + def do_GET(req, res) + res.header['Allow'] = 'POST' + raise WEBrick::HTTPStatus::MethodNotAllowed, "GET request not allowed" + end + + def do_POST(req, res) + logger.debug { "SOAP request: " + req.body } if logger + begin + conn_data = ::SOAP::StreamHandler::ConnectionData.new + setup_req(conn_data, req) + @router.external_ces = @options[:external_ces] + conn_data = @router.route(conn_data) + setup_res(conn_data, req, res) + rescue Exception => e + conn_data = @router.create_fault_response(e) + res.status = WEBrick::HTTPStatus::RC_INTERNAL_SERVER_ERROR + res.body = conn_data.send_string + res['content-type'] = conn_data.send_contenttype || "text/xml" + end + if res.body.is_a?(IO) + res.chunked = true + logger.debug { "SOAP response: (chunked response not logged)" } if logger + else + logger.debug { "SOAP response: " + res.body } if logger + end + end + +private + + def logger + @config[:Logger] + end + + def setup_req(conn_data, req) + conn_data.receive_string = req.body + conn_data.receive_contenttype = req['content-type'] + conn_data.soapaction = parse_soapaction(req.meta_vars['HTTP_SOAPACTION']) + end + + def setup_res(conn_data, req, res) + res['content-type'] = conn_data.send_contenttype + if conn_data.is_fault + res.status = WEBrick::HTTPStatus::RC_INTERNAL_SERVER_ERROR + end + if outstring = encode_gzip(req, conn_data.send_string) + res['content-encoding'] = 'gzip' + res['content-length'] = outstring.size + res.body = outstring + else + res.body = conn_data.send_string + end + end + + def parse_soapaction(soapaction) + if !soapaction.nil? and !soapaction.empty? + if /^"(.+)"$/ =~ soapaction + return $1 + end + end + nil + end + + def encode_gzip(req, outstring) + unless encode_gzip?(req) + return nil + end + begin + ostream = StringIO.new + gz = Zlib::GzipWriter.new(ostream) + gz.write(outstring) + ostream.string + ensure + gz.close + end + end + + def encode_gzip?(req) + @options[:allow_content_encoding_gzip] and defined?(::Zlib) and + req['accept-encoding'] and + req['accept-encoding'].split(/,\s*/).include?('gzip') + end +end + + +end +end diff --git a/lib/soap/rpc/standaloneServer.rb b/lib/soap/rpc/standaloneServer.rb new file mode 100644 index 0000000..080343b --- /dev/null +++ b/lib/soap/rpc/standaloneServer.rb @@ -0,0 +1,43 @@ +# SOAP4R - WEBrick Server +# Copyright (C) 2003 by NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/rpc/httpserver' + + +module SOAP +module RPC + + +class StandaloneServer < HTTPServer + def initialize(appname, default_namespace, host = "0.0.0.0", port = 8080) + @appname = appname + @default_namespace = default_namespace + @host = host + @port = port + super(create_config) + end + + alias add_servant add_rpc_servant + alias add_headerhandler add_rpc_headerhandler + +private + + def create_config + { + :BindAddress => @host, + :Port => @port, + :AccessLog => [], + :SOAPDefaultNamespace => @default_namespace, + :SOAPHTTPServerApplicationName => @appname, + } + end +end + + +end +end diff --git a/lib/soap/rpcRouter.rb b/lib/soap/rpcRouter.rb new file mode 100644 index 0000000..d72788f --- /dev/null +++ b/lib/soap/rpcRouter.rb @@ -0,0 +1,9 @@ +# SOAP4R - RPC Routing library +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/rpcUtils.rb b/lib/soap/rpcUtils.rb new file mode 100644 index 0000000..9d759ba --- /dev/null +++ b/lib/soap/rpcUtils.rb @@ -0,0 +1,9 @@ +# SOAP4R - RPC utility. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/server.rb b/lib/soap/server.rb new file mode 100644 index 0000000..d38a9b4 --- /dev/null +++ b/lib/soap/server.rb @@ -0,0 +1,9 @@ +# SOAP4R - Server implementation +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/soap.rb b/lib/soap/soap.rb new file mode 100644 index 0000000..07be075 --- /dev/null +++ b/lib/soap/soap.rb @@ -0,0 +1,150 @@ +# soap/soap.rb: SOAP4R - Base definitions. +# Copyright (C) 2000-2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'xsd/charset' + + +module SOAP + + +VERSION = Version = '1.5.5' +PropertyName = 'soap/property' + +EnvelopeNamespace = 'http://schemas.xmlsoap.org/soap/envelope/' +EncodingNamespace = 'http://schemas.xmlsoap.org/soap/encoding/' +LiteralNamespace = 'http://xml.apache.org/xml-soap/literalxml' + +NextActor = 'http://schemas.xmlsoap.org/soap/actor/next' + +EleEnvelope = 'Envelope' +EleHeader = 'Header' +EleBody = 'Body' +EleFault = 'Fault' +EleFaultString = 'faultstring' +EleFaultActor = 'faultactor' +EleFaultCode = 'faultcode' +EleFaultDetail = 'detail' + +AttrMustUnderstand = 'mustUnderstand' +AttrEncodingStyle = 'encodingStyle' +AttrActor = 'actor' +AttrRoot = 'root' +AttrArrayType = 'arrayType' +AttrOffset = 'offset' +AttrPosition = 'position' +ValueArray = 'Array' + +EleEnvelopeName = XSD::QName.new(EnvelopeNamespace, EleEnvelope).freeze +EleHeaderName = XSD::QName.new(EnvelopeNamespace, EleHeader).freeze +EleBodyName = XSD::QName.new(EnvelopeNamespace, EleBody).freeze +EleFaultName = XSD::QName.new(EnvelopeNamespace, EleFault).freeze +EleFaultStringName = XSD::QName.new(nil, EleFaultString).freeze +EleFaultActorName = XSD::QName.new(nil, EleFaultActor).freeze +EleFaultCodeName = XSD::QName.new(nil, EleFaultCode).freeze +EleFaultDetailName = XSD::QName.new(nil, EleFaultDetail).freeze +AttrActorName = XSD::QName.new(EnvelopeNamespace, AttrActor).freeze +AttrMustUnderstandName = XSD::QName.new(EnvelopeNamespace, AttrMustUnderstand).freeze +AttrEncodingStyleName = XSD::QName.new(EnvelopeNamespace, AttrEncodingStyle).freeze +AttrRootName = XSD::QName.new(EncodingNamespace, AttrRoot).freeze +AttrArrayTypeName = XSD::QName.new(EncodingNamespace, AttrArrayType).freeze +AttrOffsetName = XSD::QName.new(EncodingNamespace, AttrOffset).freeze +AttrPositionName = XSD::QName.new(EncodingNamespace, AttrPosition).freeze +ValueArrayName = XSD::QName.new(EncodingNamespace, ValueArray).freeze + +Base64Literal = 'base64' + +SOAPNamespaceTag = 'env' +XSDNamespaceTag = 'xsd' +XSINamespaceTag = 'xsi' + +MediaType = 'text/xml' + +class Error < StandardError; end + +class StreamError < Error; end +class HTTPStreamError < StreamError; end +class PostUnavailableError < HTTPStreamError; end +class MPostUnavailableError < HTTPStreamError; end + +class ArrayIndexOutOfBoundsError < Error; end +class ArrayStoreError < Error; end + +class RPCRoutingError < Error; end +class EmptyResponseError < Error; end +class ResponseFormatError < Error; end + +class UnhandledMustUnderstandHeaderError < Error; end + + +module FaultCode + VersionMismatch = XSD::QName.new(EnvelopeNamespace, 'VersionMismatch').freeze + MustUnderstand = XSD::QName.new(EnvelopeNamespace, 'MustUnderstand').freeze + Client = XSD::QName.new(EnvelopeNamespace, 'Client').freeze + Server = XSD::QName.new(EnvelopeNamespace, 'Server').freeze +end + + +class FaultError < Error + attr_reader :faultcode + attr_reader :faultstring + attr_reader :faultactor + attr_accessor :detail + + def initialize(fault) + @faultcode = fault.faultcode + @faultstring = fault.faultstring + @faultactor = fault.faultactor + @detail = fault.detail + super(self.to_s) + end + + def to_s + str = nil + if @faultstring and @faultstring.respond_to?('data') + str = @faultstring.data + end + str || '(No faultstring)' + end +end + + +module Env + def self.getenv(name) + ENV[name.downcase] || ENV[name.upcase] + end + + use_proxy = getenv('soap_use_proxy') == 'on' + HTTP_PROXY = use_proxy ? getenv('http_proxy') : nil + NO_PROXY = use_proxy ? getenv('no_proxy') : nil +end + + +end + + +unless Object.respond_to?(:instance_variable_get) + class Object + def instance_variable_get(ivarname) + instance_eval(ivarname) + end + + def instance_variable_set(ivarname, value) + instance_eval("#{ivarname} = value") + end + end +end + + +unless Kernel.respond_to?(:warn) + module Kernel + def warn(msg) + STDERR.puts(msg + "\n") unless $VERBOSE.nil? + end + end +end diff --git a/lib/soap/standaloneServer.rb b/lib/soap/standaloneServer.rb new file mode 100644 index 0000000..e44a92c --- /dev/null +++ b/lib/soap/standaloneServer.rb @@ -0,0 +1,9 @@ +# SOAP4R - Standalone Server +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/compat' diff --git a/lib/soap/streamHandler.rb b/lib/soap/streamHandler.rb new file mode 100644 index 0000000..807b444 --- /dev/null +++ b/lib/soap/streamHandler.rb @@ -0,0 +1,258 @@ +# SOAP4R - Stream handler. +# Copyright (C) 2000, 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/soap' +require 'soap/httpconfigloader' +begin + require 'stringio' + require 'zlib' +rescue LoadError + warn("Loading stringio or zlib failed. No gzipped response support.") if $DEBUG +end + + +module SOAP + + +class StreamHandler + RUBY_VERSION_STRING = "ruby #{ RUBY_VERSION } (#{ RUBY_RELEASE_DATE }) [#{ RUBY_PLATFORM }]" + + class ConnectionData + attr_accessor :send_string + attr_accessor :send_contenttype + attr_accessor :receive_string + attr_accessor :receive_contenttype + attr_accessor :is_fault + attr_accessor :soapaction + + def initialize(send_string = nil) + @send_string = send_string + @send_contenttype = nil + @receive_string = nil + @receive_contenttype = nil + @is_fault = false + @soapaction = nil + end + end + + def self.parse_media_type(str) + if /^#{ MediaType }(?:\s*;\s*charset=([^"]+|"[^"]+"))?$/i !~ str + return nil + end + charset = $1 + charset.gsub!(/"/, '') if charset + charset || 'us-ascii' + end + + def self.create_media_type(charset) + "#{ MediaType }; charset=#{ charset }" + end + + def send(endpoint_url, conn_data, soapaction = nil, charset = nil) + # send a ConnectionData to specified endpoint_url. + # return value is a ConnectionData with receive_* property filled. + # You can fill values of given conn_data and return it. + end + + def reset(endpoint_url = nil) + # for initializing connection status if needed. + # return value is not expected. + end + + def set_wiredump_file_base(wiredump_file_base) + # for logging. return value is not expected. + # Override it when you want. + raise NotImplementedError + end + + def test_loopback_response + # for loopback testing. see HTTPStreamHandler for more detail. + # return value is an Array of loopback responses. + # Override it when you want. + raise NotImplementedError + end +end + + +class HTTPStreamHandler < StreamHandler + include SOAP + + begin + require 'http-access2' + if HTTPAccess2::VERSION < "2.0" + raise LoadError.new("http-access/2.0 or later is required.") + end + Client = HTTPAccess2::Client + RETRYABLE = true + rescue LoadError + warn("Loading http-access2 failed. Net/http is used.") if $DEBUG + require 'soap/netHttpClient' + Client = SOAP::NetHttpClient + RETRYABLE = false + end + + +public + + attr_reader :client + attr_accessor :wiredump_file_base + + MAX_RETRY_COUNT = 10 # [times] + + def self.create(options) + new(options) + end + + def initialize(options) + super() + @client = Client.new(nil, "SOAP4R/#{ Version }") + @wiredump_file_base = nil + @charset = @wiredump_dev = nil + @options = options + set_options + @client.debug_dev = @wiredump_dev + @cookie_store = nil + @accept_encoding_gzip = false + end + + def test_loopback_response + @client.test_loopback_response + end + + def accept_encoding_gzip=(allow) + @accept_encoding_gzip = allow + end + + def inspect + "#<#{self.class}>" + end + + def send(endpoint_url, conn_data, soapaction = nil, charset = @charset) + conn_data.soapaction ||= soapaction # for backward conpatibility + send_post(endpoint_url, conn_data, charset) + end + + def reset(endpoint_url = nil) + if endpoint_url.nil? + @client.reset_all + else + @client.reset(endpoint_url) + end + @client.save_cookie_store if @cookie_store + end + +private + + def set_options + @options["http"] ||= ::SOAP::Property.new + HTTPConfigLoader.set_options(@client, @options["http"]) + @charset = @options["http.charset"] || XSD::Charset.xml_encoding_label + @options.add_hook("http.charset") do |key, value| + @charset = value + end + @wiredump_dev = @options["http.wiredump_dev"] + @options.add_hook("http.wiredump_dev") do |key, value| + @wiredump_dev = value + @client.debug_dev = @wiredump_dev + end + set_cookie_store_file(@options["http.cookie_store_file"]) + @options.add_hook("http.cookie_store_file") do |key, value| + set_cookie_store_file(value) + end + ssl_config = @options["http.ssl_config"] + basic_auth = @options["http.basic_auth"] + @options["http"].lock(true) + ssl_config.unlock + basic_auth.unlock + end + + def set_cookie_store_file(value) + value = nil if value and value.empty? + @cookie_store = value + @client.set_cookie_store(@cookie_store) if @cookie_store + end + + def send_post(endpoint_url, conn_data, charset) + conn_data.send_contenttype ||= StreamHandler.create_media_type(charset) + + if @wiredump_file_base + filename = @wiredump_file_base + '_request.xml' + f = File.open(filename, "w") + f << conn_data.send_string + f.close + end + + extra = {} + extra['Content-Type'] = conn_data.send_contenttype + extra['SOAPAction'] = "\"#{ conn_data.soapaction }\"" + extra['Accept-Encoding'] = 'gzip' if send_accept_encoding_gzip? + send_string = conn_data.send_string + @wiredump_dev << "Wire dump:\n\n" if @wiredump_dev + begin + retry_count = 0 + while true + res = @client.post(endpoint_url, send_string, extra) + if RETRYABLE and HTTP::Status.redirect?(res.status) + retry_count += 1 + if retry_count >= MAX_RETRY_COUNT + raise HTTPStreamError.new("redirect count exceeded") + end + endpoint_url = res.header["location"][0] + puts "redirected to #{endpoint_url}" if $DEBUG + else + break + end + end + rescue + @client.reset(endpoint_url) + raise + end + @wiredump_dev << "\n\n" if @wiredump_dev + receive_string = res.content + if @wiredump_file_base + filename = @wiredump_file_base + '_response.xml' + f = File.open(filename, "w") + f << receive_string + f.close + end + case res.status + when 405 + raise PostUnavailableError.new("#{ res.status }: #{ res.reason }") + when 200, 500 + # Nothing to do. + else + raise HTTPStreamError.new("#{ res.status }: #{ res.reason }") + end + if res.respond_to?(:header) and !res.header['content-encoding'].empty? and + res.header['content-encoding'][0].downcase == 'gzip' + receive_string = decode_gzip(receive_string) + end + conn_data.receive_string = receive_string + conn_data.receive_contenttype = res.contenttype + conn_data + end + + def send_accept_encoding_gzip? + @accept_encoding_gzip and defined?(::Zlib) + end + + def decode_gzip(instring) + unless send_accept_encoding_gzip? + raise HTTPStreamError.new("Gzipped response content.") + end + begin + gz = Zlib::GzipReader.new(StringIO.new(instring)) + gz.read + ensure + gz.close + end + end +end + + +end diff --git a/lib/soap/wsdlDriver.rb b/lib/soap/wsdlDriver.rb new file mode 100644 index 0000000..eba9608 --- /dev/null +++ b/lib/soap/wsdlDriver.rb @@ -0,0 +1,575 @@ +# SOAP4R - SOAP WSDL driver +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/parser' +require 'wsdl/importer' +require 'xsd/qname' +require 'xsd/codegen/gensupport' +require 'soap/mapping/wsdlencodedregistry' +require 'soap/mapping/wsdlliteralregistry' +require 'soap/rpc/driver' +require 'wsdl/soap/methodDefCreator' + + +module SOAP + + +class WSDLDriverFactory + class FactoryError < StandardError; end + + attr_reader :wsdl + + def initialize(wsdl) + @wsdl = import(wsdl) + @methoddefcreator = WSDL::SOAP::MethodDefCreator.new(@wsdl) + end + + def inspect + "#<#{self.class}:#{@wsdl.name}>" + end + + def create_rpc_driver(servicename = nil, portname = nil) + port = find_port(servicename, portname) + drv = SOAP::RPC::Driver.new(port.soap_address.location) + init_driver(drv, port) + add_operation(drv, port) + drv + end + + # depricated old interface + def create_driver(servicename = nil, portname = nil) + warn("WSDLDriverFactory#create_driver is depricated. Use create_rpc_driver instead.") + port = find_port(servicename, portname) + WSDLDriver.new(@wsdl, port, nil) + end + + # Backward compatibility. + alias createDriver create_driver + +private + + def find_port(servicename = nil, portname = nil) + service = port = nil + if servicename + service = @wsdl.service( + XSD::QName.new(@wsdl.targetnamespace, servicename)) + else + service = @wsdl.services[0] + end + if service.nil? + raise FactoryError.new("service #{servicename} not found in WSDL") + end + if portname + port = service.ports[XSD::QName.new(@wsdl.targetnamespace, portname)] + if port.nil? + raise FactoryError.new("port #{portname} not found in WSDL") + end + else + port = service.ports.find { |port| !port.soap_address.nil? } + if port.nil? + raise FactoryError.new("no ports have soap:address") + end + end + if port.soap_address.nil? + raise FactoryError.new("soap:address element not found in WSDL") + end + port + end + + def init_driver(drv, port) + wsdl_elements = @wsdl.collect_elements + wsdl_types = @wsdl.collect_complextypes + @wsdl.collect_simpletypes + rpc_decode_typemap = wsdl_types + + @wsdl.soap_rpc_complextypes(port.find_binding) + drv.proxy.mapping_registry = + Mapping::WSDLEncodedRegistry.new(rpc_decode_typemap) + drv.proxy.literal_mapping_registry = + Mapping::WSDLLiteralRegistry.new(wsdl_types, wsdl_elements) + end + + def add_operation(drv, port) + port.find_binding.operations.each do |op_bind| + op_name = op_bind.soapoperation_name + soapaction = op_bind.soapaction || '' + orgname = op_name.name + name = XSD::CodeGen::GenSupport.safemethodname(orgname) + param_def = create_param_def(op_bind) + opt = { + :request_style => op_bind.soapoperation_style, + :response_style => op_bind.soapoperation_style, + :request_use => op_bind.input.soapbody_use, + :response_use => op_bind.output.soapbody_use, + :elementformdefault => false, + :attributeformdefault => false + } + if op_bind.soapoperation_style == :rpc + drv.add_rpc_operation(op_name, soapaction, name, param_def, opt) + else + drv.add_document_operation(soapaction, name, param_def, opt) + end + if orgname != name and orgname.capitalize == name.capitalize + ::SOAP::Mapping.define_singleton_method(drv, orgname) do |*arg| + __send__(name, *arg) + end + end + end + end + + def import(location) + WSDL::Importer.import(location) + end + + def create_param_def(op_bind) + op = op_bind.find_operation + if op_bind.soapoperation_style == :rpc + param_def = @methoddefcreator.collect_rpcparameter(op) + else + param_def = @methoddefcreator.collect_documentparameter(op) + end + # the first element of typedef in param_def is a String like + # "::SOAP::SOAPStruct". turn this String to a class. + param_def.collect { |io, name, typedef| + typedef[0] = Mapping.class_from_name(typedef[0]) + [io, name, typedef] + } + end + + def partqname(part) + if part.type + part.type + else + part.element + end + end + + def param_def(type, name, klass, partqname) + [type, name, [klass, partqname.namespace, partqname.name]] + end + + def filter_parts(partsdef, partssource) + parts = partsdef.split(/\s+/) + partssource.find_all { |part| parts.include?(part.name) } + end +end + + +class WSDLDriver + class << self + if RUBY_VERSION >= "1.7.0" + def __attr_proxy(symbol, assignable = false) + name = symbol.to_s + define_method(name) { + @servant.__send__(name) + } + if assignable + aname = name + '=' + define_method(aname) { |rhs| + @servant.__send__(aname, rhs) + } + end + end + else + def __attr_proxy(symbol, assignable = false) + name = symbol.to_s + module_eval <<-EOS + def #{name} + @servant.#{name} + end + EOS + if assignable + module_eval <<-EOS + def #{name}=(value) + @servant.#{name} = value + end + EOS + end + end + end + end + + __attr_proxy :options + __attr_proxy :headerhandler + __attr_proxy :streamhandler + __attr_proxy :test_loopback_response + __attr_proxy :endpoint_url, true + __attr_proxy :mapping_registry, true # for RPC unmarshal + __attr_proxy :wsdl_mapping_registry, true # for RPC marshal + __attr_proxy :default_encodingstyle, true + __attr_proxy :generate_explicit_type, true + __attr_proxy :allow_unqualified_element, true + + def httpproxy + @servant.options["protocol.http.proxy"] + end + + def httpproxy=(httpproxy) + @servant.options["protocol.http.proxy"] = httpproxy + end + + def wiredump_dev + @servant.options["protocol.http.wiredump_dev"] + end + + def wiredump_dev=(wiredump_dev) + @servant.options["protocol.http.wiredump_dev"] = wiredump_dev + end + + def mandatorycharset + @servant.options["protocol.mandatorycharset"] + end + + def mandatorycharset=(mandatorycharset) + @servant.options["protocol.mandatorycharset"] = mandatorycharset + end + + def wiredump_file_base + @servant.options["protocol.wiredump_file_base"] + end + + def wiredump_file_base=(wiredump_file_base) + @servant.options["protocol.wiredump_file_base"] = wiredump_file_base + end + + def initialize(wsdl, port, logdev) + @servant = Servant__.new(self, wsdl, port, logdev) + end + + def inspect + "#<#{self.class}:#{@servant.port.name}>" + end + + def reset_stream + @servant.reset_stream + end + + # Backward compatibility. + alias generateEncodeType= generate_explicit_type= + + class Servant__ + include SOAP + + attr_reader :options + attr_reader :port + + attr_accessor :soapaction + attr_accessor :default_encodingstyle + attr_accessor :allow_unqualified_element + attr_accessor :generate_explicit_type + attr_accessor :mapping_registry + attr_accessor :wsdl_mapping_registry + + def initialize(host, wsdl, port, logdev) + @host = host + @wsdl = wsdl + @port = port + @logdev = logdev + @soapaction = nil + @options = setup_options + @default_encodingstyle = nil + @allow_unqualified_element = nil + @generate_explicit_type = false + @mapping_registry = nil # for rpc unmarshal + @wsdl_mapping_registry = nil # for rpc marshal + @wiredump_file_base = nil + @mandatorycharset = nil + @wsdl_elements = @wsdl.collect_elements + @wsdl_types = @wsdl.collect_complextypes + @wsdl.collect_simpletypes + @rpc_decode_typemap = @wsdl_types + + @wsdl.soap_rpc_complextypes(port.find_binding) + @wsdl_mapping_registry = Mapping::WSDLEncodedRegistry.new( + @rpc_decode_typemap) + @doc_mapper = Mapping::WSDLLiteralRegistry.new( + @wsdl_types, @wsdl_elements) + endpoint_url = @port.soap_address.location + # Convert a map which key is QName, to a Hash which key is String. + @operation = {} + @port.inputoperation_map.each do |op_name, op_info| + orgname = op_name.name + name = XSD::CodeGen::GenSupport.safemethodname(orgname) + @operation[name] = @operation[orgname] = op_info + add_method_interface(op_info) + end + @proxy = ::SOAP::RPC::Proxy.new(endpoint_url, @soapaction, @options) + end + + def inspect + "#<#{self.class}:#{@proxy.inspect}>" + end + + def endpoint_url + @proxy.endpoint_url + end + + def endpoint_url=(endpoint_url) + @proxy.endpoint_url = endpoint_url + end + + def headerhandler + @proxy.headerhandler + end + + def streamhandler + @proxy.streamhandler + end + + def test_loopback_response + @proxy.test_loopback_response + end + + def reset_stream + @proxy.reset_stream + end + + def rpc_call(name, *values) + set_wiredump_file_base(name) + unless op_info = @operation[name] + raise RuntimeError, "method: #{name} not defined" + end + req_header = create_request_header + req_body = create_request_body(op_info, *values) + reqopt = create_options({ + :soapaction => op_info.soapaction || @soapaction}) + resopt = create_options({ + :decode_typemap => @rpc_decode_typemap}) + env = @proxy.route(req_header, req_body, reqopt, resopt) + raise EmptyResponseError unless env + receive_headers(env.header) + begin + @proxy.check_fault(env.body) + rescue ::SOAP::FaultError => e + Mapping.fault2exception(e) + end + ret = env.body.response ? + Mapping.soap2obj(env.body.response, @mapping_registry) : nil + if env.body.outparams + outparams = env.body.outparams.collect { |outparam| + Mapping.soap2obj(outparam) + } + return [ret].concat(outparams) + else + return ret + end + end + + # req_header: [[element, mustunderstand, encodingstyle(QName/String)], ...] + # req_body: SOAPBasetype/SOAPCompoundtype + def document_send(name, header_obj, body_obj) + set_wiredump_file_base(name) + unless op_info = @operation[name] + raise RuntimeError, "method: #{name} not defined" + end + req_header = header_obj ? header_from_obj(header_obj, op_info) : nil + req_body = body_from_obj(body_obj, op_info) + opt = create_options({ + :soapaction => op_info.soapaction || @soapaction, + :decode_typemap => @wsdl_types}) + env = @proxy.invoke(req_header, req_body, opt) + raise EmptyResponseError unless env + if env.body.fault + raise ::SOAP::FaultError.new(env.body.fault) + end + res_body_obj = env.body.response ? + Mapping.soap2obj(env.body.response, @mapping_registry) : nil + return env.header, res_body_obj + end + + private + + def create_options(hash = nil) + opt = {} + opt[:default_encodingstyle] = @default_encodingstyle + opt[:allow_unqualified_element] = @allow_unqualified_element + opt[:generate_explicit_type] = @generate_explicit_type + opt.update(hash) if hash + opt + end + + def set_wiredump_file_base(name) + if @wiredump_file_base + @proxy.set_wiredump_file_base(@wiredump_file_base + "_#{name}") + end + end + + def create_request_header + headers = @proxy.headerhandler.on_outbound + if headers.empty? + nil + else + h = SOAPHeader.new + headers.each do |header| + h.add(header.elename.name, header) + end + h + end + end + + def receive_headers(headers) + @proxy.headerhandler.on_inbound(headers) if headers + end + + def create_request_body(op_info, *values) + method = create_method_struct(op_info, *values) + SOAPBody.new(method) + end + + def create_method_struct(op_info, *params) + parts_names = op_info.bodyparts.collect { |part| part.name } + obj = create_method_obj(parts_names, params) + method = Mapping.obj2soap(obj, @wsdl_mapping_registry, op_info.op_name) + if method.members.size != parts_names.size + new_method = SOAPStruct.new + method.each do |key, value| + if parts_names.include?(key) + new_method.add(key, value) + end + end + method = new_method + end + method.elename = op_info.op_name + method.type = XSD::QName.new # Request should not be typed. + method + end + + def create_method_obj(names, params) + o = Object.new + idx = 0 + while idx < params.length + o.instance_variable_set('@' + names[idx], params[idx]) + idx += 1 + end + o + end + + def header_from_obj(obj, op_info) + if obj.is_a?(SOAPHeader) + obj + elsif op_info.headerparts.empty? + if obj.nil? + nil + else + raise RuntimeError.new("no header definition in schema: #{obj}") + end + elsif op_info.headerparts.size == 1 + part = op_info.headerparts[0] + header = SOAPHeader.new() + header.add(headeritem_from_obj(obj, part.element || part.eletype)) + header + else + header = SOAPHeader.new() + op_info.headerparts.each do |part| + child = Mapping.get_attribute(obj, part.name) + ele = headeritem_from_obj(child, part.element || part.eletype) + header.add(part.name, ele) + end + header + end + end + + def headeritem_from_obj(obj, name) + if obj.nil? + SOAPElement.new(name) + elsif obj.is_a?(SOAPHeaderItem) + obj + else + Mapping.obj2soap(obj, @doc_mapper, name) + end + end + + def body_from_obj(obj, op_info) + if obj.is_a?(SOAPBody) + obj + elsif op_info.bodyparts.empty? + if obj.nil? + nil + else + raise RuntimeError.new("no body found in schema") + end + elsif op_info.bodyparts.size == 1 + part = op_info.bodyparts[0] + ele = bodyitem_from_obj(obj, part.element || part.type) + SOAPBody.new(ele) + else + body = SOAPBody.new + op_info.bodyparts.each do |part| + child = Mapping.get_attribute(obj, part.name) + ele = bodyitem_from_obj(child, part.element || part.type) + body.add(ele.elename.name, ele) + end + body + end + end + + def bodyitem_from_obj(obj, name) + if obj.nil? + SOAPElement.new(name) + elsif obj.is_a?(SOAPElement) + obj + else + Mapping.obj2soap(obj, @doc_mapper, name) + end + end + + def add_method_interface(op_info) + name = XSD::CodeGen::GenSupport.safemethodname(op_info.op_name.name) + orgname = op_info.op_name.name + parts_names = op_info.bodyparts.collect { |part| part.name } + case op_info.style + when :document + if orgname != name and orgname.capitalize == name.capitalize + add_document_method_interface(orgname, parts_names) + end + add_document_method_interface(name, parts_names) + when :rpc + if orgname != name and orgname.capitalize == name.capitalize + add_rpc_method_interface(orgname, parts_names) + end + add_rpc_method_interface(name, parts_names) + else + raise RuntimeError.new("unknown style: #{op_info.style}") + end + end + + def add_rpc_method_interface(name, parts_names) + ::SOAP::Mapping.define_singleton_method(@host, name) do |*arg| + unless arg.size == parts_names.size + raise ArgumentError.new( + "wrong number of arguments (#{arg.size} for #{parts_names.size})") + end + @servant.rpc_call(name, *arg) + end + @host.method(name) + end + + def add_document_method_interface(name, parts_names) + ::SOAP::Mapping.define_singleton_method(@host, name) do |h, b| + @servant.document_send(name, h, b) + end + @host.method(name) + end + + def setup_options + if opt = Property.loadproperty(::SOAP::PropertyName) + opt = opt["client"] + end + opt ||= Property.new + opt.add_hook("protocol.mandatorycharset") do |key, value| + @mandatorycharset = value + end + opt.add_hook("protocol.wiredump_file_base") do |key, value| + @wiredump_file_base = value + end + opt["protocol.http.charset"] ||= XSD::Charset.xml_encoding_label + opt["protocol.http.proxy"] ||= Env::HTTP_PROXY + opt["protocol.http.no_proxy"] ||= Env::NO_PROXY + opt + end + end +end + + +end diff --git a/lib/tasks/capistrano.rake b/lib/tasks/capistrano.rake new file mode 100644 index 0000000..d83042f --- /dev/null +++ b/lib/tasks/capistrano.rake @@ -0,0 +1,102 @@ +# ============================================================================= +# A set of rake tasks for invoking the Capistrano automation utility. +# ============================================================================= + +# Invoke the given actions via Capistrano +def cap(*parameters) + begin + require 'rubygems' + rescue LoadError + # no rubygems to load, so we fail silently + end + + require 'capistrano/cli' + + STDERR.puts "Capistrano/Rake integration is deprecated." + STDERR.puts "Please invoke the 'cap' command directly: `cap #{parameters.join(" ")}'" + + Capistrano::CLI.new(parameters.map { |param| param.to_s }).execute! +end + +namespace :remote do + desc "Removes unused releases from the releases directory." + task(:cleanup) { cap :cleanup } + + desc "Used only for deploying when the spinner isn't running." + task(:cold_deploy) { cap :cold_deploy } + + desc "A macro-task that updates the code, fixes the symlink, and restarts the application servers." + task(:deploy) { cap :deploy } + + desc "Similar to deploy, but it runs the migrate task on the new release before updating the symlink." + task(:deploy_with_migrations) { cap :deploy_with_migrations } + + desc "Displays the diff between HEAD and what was last deployed." + task(:diff_from_last_deploy) { cap :diff_from_last_deploy } + + desc "Disable the web server by writing a \"maintenance.html\" file to the web servers." + task(:disable_web) { cap :disable_web } + + desc "Re-enable the web server by deleting any \"maintenance.html\" file." + task(:enable_web) { cap :enable_web } + + desc "A simple task for performing one-off commands that may not require a full task to be written for them." + task(:invoke) { cap :invoke } + + desc "Run the migrate rake task." + task(:migrate) { cap :migrate } + + desc "Restart the FCGI processes on the app server." + task(:restart) { cap :restart } + + desc "A macro-task that rolls back the code and restarts the application servers." + task(:rollback) { cap :rollback } + + desc "Rollback the latest checked-out version to the previous one by fixing the symlinks and deleting the current release from all servers." + task(:rollback_code) { cap :rollback_code } + + desc "Sets group permissions on checkout." + task(:set_permissions) { cap :set_permissions } + + desc "Set up the expected application directory structure on all boxes" + task(:setup) { cap :setup } + + desc "Begin an interactive Capistrano session." + task(:shell) { cap :shell } + + desc "Enumerate and describe every available task." + task(:show_tasks) { cap :show_tasks, '-q' } + + desc "Start the spinner daemon for the application (requires script/spin)." + task(:spinner) { cap :spinner } + + desc "Update the 'current' symlink to point to the latest version of the application's code." + task(:symlink) { cap :symlink } + + desc "Updates the code and fixes the symlink under a transaction" + task(:update) { cap :update } + + desc "Update all servers with the latest release of the source code." + task(:update_code) { cap :update_code } + + desc "Update the currently released version of the software directly via an SCM update operation" + task(:update_current) { cap :update_current } + + desc "Execute a specific action using capistrano" + task :exec do + unless ENV['ACTION'] + raise "Please specify an action (or comma separated list of actions) via the ACTION environment variable" + end + + actions = ENV['ACTION'].split(",") + actions.concat(ENV['PARAMS'].split(" ")) if ENV['PARAMS'] + + cap(*actions) + end +end + +desc "Push the latest revision into production (delegates to remote:deploy)" +task :deploy => "remote:deploy" + +desc "Rollback to the release before the current release in production (delegates to remote:rollback)" +task :rollback => "remote:rollback" diff --git a/lib/tasks/gems.rake b/lib/tasks/gems.rake new file mode 100644 index 0000000..8c755be --- /dev/null +++ b/lib/tasks/gems.rake @@ -0,0 +1,34 @@ +desc "Copy third-party gems into ./lib" +task :freeze_other_gems do + # TODO Get this list from parsing environment.rb + libraries = %w(vpaypal) + require 'rubygems' + require 'find' + + libraries.each do |library| + library_gem = Gem.cache.search(library).sort_by { |g| g.version }.last + puts "Freezing #{library} for #{library_gem.version}..." + + # TODO Add dependencies to list of libraries to freeze + #library_gem.dependencies.each { |g| libraries << g } + + folder_for_library = "#{library_gem.name}-#{library_gem.version}" + system "cd vendor; gem unpack -v '#{library_gem.version}' #{library_gem.name};" + + # Copy files recursively to ./lib + folder_for_library_with_lib = "vendor/#{folder_for_library}/lib/" + Find.find(folder_for_library_with_lib) do |original_file| + destination_file = "./lib/" + original_file.gsub(folder_for_library_with_lib, '') + + if File.directory?(original_file) + if !File.exist?(destination_file) + Dir.mkdir destination_file + end + else + File.copy original_file, destination_file + end + end + + system "rm -r vendor/#{folder_for_library}" + end +end diff --git a/lib/wsdl/binding.rb b/lib/wsdl/binding.rb new file mode 100644 index 0000000..58a21d8 --- /dev/null +++ b/lib/wsdl/binding.rb @@ -0,0 +1,65 @@ +# WSDL4R - WSDL binding definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL + + +class Binding < Info + attr_reader :name # required + attr_reader :type # required + attr_reader :operations + attr_reader :soapbinding + + def initialize + super + @name = nil + @type = nil + @operations = XSD::NamedElements.new + @soapbinding = nil + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + case element + when OperationName + o = OperationBinding.new + @operations << o + o + when SOAPBindingName + o = WSDL::SOAP::Binding.new + @soapbinding = o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + when TypeAttrName + @type = value + else + nil + end + end +end + + +end diff --git a/lib/wsdl/data.rb b/lib/wsdl/data.rb new file mode 100644 index 0000000..45eaad8 --- /dev/null +++ b/lib/wsdl/data.rb @@ -0,0 +1,64 @@ +# WSDL4R - WSDL data definitions. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'wsdl/documentation' +require 'wsdl/definitions' +require 'wsdl/types' +require 'wsdl/message' +require 'wsdl/part' +require 'wsdl/portType' +require 'wsdl/operation' +require 'wsdl/param' +require 'wsdl/binding' +require 'wsdl/operationBinding' +require 'wsdl/service' +require 'wsdl/port' +require 'wsdl/import' + + +module WSDL + + +ArrayTypeAttrName = XSD::QName.new(Namespace, 'arrayType') +BindingName = XSD::QName.new(Namespace, 'binding') +DefinitionsName = XSD::QName.new(Namespace, 'definitions') +DocumentationName = XSD::QName.new(Namespace, 'documentation') +FaultName = XSD::QName.new(Namespace, 'fault') +ImportName = XSD::QName.new(Namespace, 'import') +InputName = XSD::QName.new(Namespace, 'input') +MessageName = XSD::QName.new(Namespace, 'message') +OperationName = XSD::QName.new(Namespace, 'operation') +OutputName = XSD::QName.new(Namespace, 'output') +PartName = XSD::QName.new(Namespace, 'part') +PortName = XSD::QName.new(Namespace, 'port') +PortTypeName = XSD::QName.new(Namespace, 'portType') +ServiceName = XSD::QName.new(Namespace, 'service') +TypesName = XSD::QName.new(Namespace, 'types') + +SchemaName = XSD::QName.new(XSD::Namespace, 'schema') + +SOAPAddressName = XSD::QName.new(SOAPBindingNamespace, 'address') +SOAPBindingName = XSD::QName.new(SOAPBindingNamespace, 'binding') +SOAPHeaderName = XSD::QName.new(SOAPBindingNamespace, 'header') +SOAPBodyName = XSD::QName.new(SOAPBindingNamespace, 'body') +SOAPFaultName = XSD::QName.new(SOAPBindingNamespace, 'fault') +SOAPOperationName = XSD::QName.new(SOAPBindingNamespace, 'operation') + +BindingAttrName = XSD::QName.new(nil, 'binding') +ElementAttrName = XSD::QName.new(nil, 'element') +LocationAttrName = XSD::QName.new(nil, 'location') +MessageAttrName = XSD::QName.new(nil, 'message') +NameAttrName = XSD::QName.new(nil, 'name') +NamespaceAttrName = XSD::QName.new(nil, 'namespace') +ParameterOrderAttrName = XSD::QName.new(nil, 'parameterOrder') +TargetNamespaceAttrName = XSD::QName.new(nil, 'targetNamespace') +TypeAttrName = XSD::QName.new(nil, 'type') + + +end diff --git a/lib/wsdl/definitions.rb b/lib/wsdl/definitions.rb new file mode 100644 index 0000000..5235037 --- /dev/null +++ b/lib/wsdl/definitions.rb @@ -0,0 +1,250 @@ +# WSDL4R - WSDL definitions. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL + + +class Definitions < Info + attr_reader :name + attr_reader :targetnamespace + attr_reader :imports + + attr_accessor :location + attr_reader :importedschema + + def initialize + super + @name = nil + @targetnamespace = nil + @location = nil + @importedschema = {} + + @types = nil + @imports = [] + @messages = XSD::NamedElements.new + @porttypes = XSD::NamedElements.new + @bindings = XSD::NamedElements.new + @services = XSD::NamedElements.new + + @anontypes = XSD::NamedElements.new + @root = self + end + + def inspect + sprintf("#<%s:0x%x %s>", self.class.name, __id__, @name || '(unnamed)') + end + + def targetnamespace=(targetnamespace) + @targetnamespace = targetnamespace + if @name + @name = XSD::QName.new(@targetnamespace, @name.name) + end + end + + def collect_attributes + result = XSD::NamedElements.new + if @types + @types.schemas.each do |schema| + result.concat(schema.collect_attributes) + end + end + @imports.each do |import| + result.concat(import.content.collect_attributes) + end + result + end + + def collect_elements + result = XSD::NamedElements.new + if @types + @types.schemas.each do |schema| + result.concat(schema.collect_elements) + end + end + @imports.each do |import| + result.concat(import.content.collect_elements) + end + result + end + + def collect_complextypes + result = @anontypes.dup + if @types + @types.schemas.each do |schema| + result.concat(schema.collect_complextypes) + end + end + @imports.each do |import| + result.concat(import.content.collect_complextypes) + end + result + end + + def collect_simpletypes + result = XSD::NamedElements.new + if @types + @types.schemas.each do |schema| + result.concat(schema.collect_simpletypes) + end + end + @imports.each do |import| + result.concat(import.content.collect_simpletypes) + end + result + end + + # ToDo: simpletype must be accepted... + def add_type(complextype) + @anontypes << complextype + end + + def messages + result = @messages.dup + @imports.each do |import| + result.concat(import.content.messages) if self.class === import.content + end + result + end + + def porttypes + result = @porttypes.dup + @imports.each do |import| + result.concat(import.content.porttypes) if self.class === import.content + end + result + end + + def bindings + result = @bindings.dup + @imports.each do |import| + result.concat(import.content.bindings) if self.class === import.content + end + result + end + + def services + result = @services.dup + @imports.each do |import| + result.concat(import.content.services) if self.class === import.content + end + result + end + + def message(name) + message = @messages[name] + return message if message + @imports.each do |import| + message = import.content.message(name) if self.class === import.content + return message if message + end + nil + end + + def porttype(name) + porttype = @porttypes[name] + return porttype if porttype + @imports.each do |import| + porttype = import.content.porttype(name) if self.class === import.content + return porttype if porttype + end + nil + end + + def binding(name) + binding = @bindings[name] + return binding if binding + @imports.each do |import| + binding = import.content.binding(name) if self.class === import.content + return binding if binding + end + nil + end + + def service(name) + service = @services[name] + return service if service + @imports.each do |import| + service = import.content.service(name) if self.class === import.content + return service if service + end + nil + end + + def porttype_binding(name) + binding = @bindings.find { |item| item.type == name } + return binding if binding + @imports.each do |import| + binding = import.content.porttype_binding(name) if self.class === import.content + return binding if binding + end + nil + end + + def parse_element(element) + case element + when ImportName + o = Import.new + @imports << o + o + when TypesName + o = Types.new + @types = o + o + when MessageName + o = Message.new + @messages << o + o + when PortTypeName + o = PortType.new + @porttypes << o + o + when BindingName + o = Binding.new + @bindings << o + o + when ServiceName + o = Service.new + @services << o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + when TargetNamespaceAttrName + self.targetnamespace = value.source + else + nil + end + end + + def self.parse_element(element) + if element == DefinitionsName + Definitions.new + else + nil + end + end + +private + +end + + +end diff --git a/lib/wsdl/documentation.rb b/lib/wsdl/documentation.rb new file mode 100644 index 0000000..3a7fd7d --- /dev/null +++ b/lib/wsdl/documentation.rb @@ -0,0 +1,32 @@ +# WSDL4R - WSDL SOAP documentation element. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class Documentation < Info + def initialize + super + end + + def parse_element(element) + # Accepts any element. + self + end + + def parse_attr(attr, value) + # Accepts any attribute. + true + end +end + + +end diff --git a/lib/wsdl/import.rb b/lib/wsdl/import.rb new file mode 100644 index 0000000..faf6087 --- /dev/null +++ b/lib/wsdl/import.rb @@ -0,0 +1,80 @@ +# WSDL4R - WSDL import definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/importer' + + +module WSDL + + +class Import < Info + attr_reader :namespace + attr_reader :location + attr_reader :content + + def initialize + super + @namespace = nil + @location = nil + @content = nil + @web_client = nil + end + + def parse_element(element) + case element + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NamespaceAttrName + @namespace = value.source + if @content + @content.targetnamespace = @namespace + end + @namespace + when LocationAttrName + @location = URI.parse(value.source) + if @location.relative? and !parent.location.nil? and + !parent.location.relative? + @location = parent.location + @location + end + if root.importedschema.key?(@location) + @content = root.importedschema[@location] + else + root.importedschema[@location] = nil # placeholder + @content = import(@location) + if @content.is_a?(Definitions) + @content.root = root + if @namespace + @content.targetnamespace = @namespace + end + end + root.importedschema[@location] = @content + end + @location + else + nil + end + end + +private + + def import(location) + Importer.import(location, root) + end +end + + +end diff --git a/lib/wsdl/importer.rb b/lib/wsdl/importer.rb new file mode 100644 index 0000000..481bd81 --- /dev/null +++ b/lib/wsdl/importer.rb @@ -0,0 +1,38 @@ +# WSDL4R - WSDL importer library. +# Copyright (C) 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/xmlSchema/importer' +require 'wsdl/parser' + + +module WSDL + + +class Importer < WSDL::XMLSchema::Importer + def self.import(location, originalroot = nil) + new.import(location, originalroot) + end + +private + + def parse(content, location, originalroot) + opt = { + :location => location, + :originalroot => originalroot + } + begin + WSDL::Parser.new(opt).parse(content) + rescue WSDL::Parser::ParseError + super(content, location, originalroot) + end + end + +end + + +end diff --git a/lib/wsdl/info.rb b/lib/wsdl/info.rb new file mode 100644 index 0000000..ffd9039 --- /dev/null +++ b/lib/wsdl/info.rb @@ -0,0 +1,39 @@ +# WSDL4R - WSDL information base. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module WSDL + + +class Info + attr_accessor :root + attr_accessor :parent + attr_accessor :id + + def initialize + @root = nil + @parent = nil + @id = nil + end + + def inspect + if self.respond_to?(:name) + sprintf("#<%s:0x%x %s>", self.class.name, __id__, self.name) + else + sprintf("#<%s:0x%x>", self.class.name, __id__) + end + end + + def parse_element(element); end # abstract + + def parse_attr(attr, value); end # abstract + + def parse_epilogue; end # abstract +end + + +end diff --git a/lib/wsdl/message.rb b/lib/wsdl/message.rb new file mode 100644 index 0000000..cecc602 --- /dev/null +++ b/lib/wsdl/message.rb @@ -0,0 +1,54 @@ +# WSDL4R - WSDL message definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class Message < Info + attr_reader :name # required + attr_reader :parts + + def initialize + super + @name = nil + @parts = [] + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + case element + when PartName + o = Part.new + @parts << o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(parent.targetnamespace, value.source) + else + nil + end + end +end + + +end diff --git a/lib/wsdl/operation.rb b/lib/wsdl/operation.rb new file mode 100644 index 0000000..6c3c656 --- /dev/null +++ b/lib/wsdl/operation.rb @@ -0,0 +1,172 @@ +# WSDL4R - WSDL operation definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class Operation < Info + class NameInfo + attr_reader :op_name + attr_reader :optype_name + attr_reader :parts + def initialize(op_name, optype_name, parts) + @op_name = op_name + @optype_name = optype_name + @parts = parts + end + end + + attr_reader :name # required + attr_reader :parameter_order # optional + attr_reader :input + attr_reader :output + attr_reader :fault + attr_reader :type # required + + def initialize + super + @name = nil + @type = nil + @parameter_order = nil + @input = nil + @output = nil + @fault = [] + end + + def targetnamespace + parent.targetnamespace + end + + def input_info + if message = input_message + typename = message.name + else + typename = nil + end + NameInfo.new(@name, typename, inputparts) + end + + def output_info + if message = output_message + typename = message.name + else + typename = nil + end + NameInfo.new(@name, typename, outputparts) + end + + EMPTY = [].freeze + + def inputparts + if message = input_message + sort_parts(message.parts) + else + EMPTY + end + end + + def inputname + if input + XSD::QName.new(targetnamespace, input.name ? input.name.name : @name.name) + else + nil + end + end + + def outputparts + if message = output_message + sort_parts(message.parts) + else + EMPTY + end + end + + def outputname + if output + XSD::QName.new(targetnamespace, + output.name ? output.name.name : @name.name + 'Response') + else + nil + end + end + + def parse_element(element) + case element + when InputName + o = Param.new + @input = o + o + when OutputName + o = Param.new + @output = o + o + when FaultName + o = Param.new + @fault << o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + when TypeAttrName + @type = value + when ParameterOrderAttrName + @parameter_order = value.source.split(/\s+/) + else + nil + end + end + +private + + def input_message + if input and message = input.find_message + message + else + nil + end + end + + def output_message + if output and message = output.find_message + message + else + nil + end + end + + def sort_parts(parts) + return parts.dup unless parameter_order + result = [] + parameter_order.each do |orderitem| + if (ele = parts.find { |part| part.name == orderitem }) + result << ele + end + end + if result.length == 0 + return parts.dup + end + # result length can be shorter than parts's. + # return part must not be a part of the parameterOrder. + result + end +end + + +end diff --git a/lib/wsdl/operationBinding.rb b/lib/wsdl/operationBinding.rb new file mode 100644 index 0000000..c2b8cd6 --- /dev/null +++ b/lib/wsdl/operationBinding.rb @@ -0,0 +1,108 @@ +# WSDL4R - WSDL bound operation definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class OperationBinding < Info + attr_reader :name # required + attr_reader :input + attr_reader :output + attr_reader :fault + attr_reader :soapoperation + + def initialize + super + @name = nil + @input = nil + @output = nil + @fault = [] + @soapoperation = nil + end + + def targetnamespace + parent.targetnamespace + end + + def porttype + root.porttype(parent.type) + end + + def find_operation + porttype.operations[@name] or raise RuntimeError.new("#{@name} not found") + end + + def soapoperation_name + if @soapoperation + @soapoperation.input_info.op_name + else + find_operation.name + end + end + + def soapoperation_style + style = nil + if @soapoperation + style = @soapoperation.operation_style + elsif parent.soapbinding + style = parent.soapbinding.style + else + raise TypeError.new("operation style definition not found") + end + style || :document + end + + def soapaction + if @soapoperation + @soapoperation.soapaction + else + nil + end + end + + def parse_element(element) + case element + when InputName + o = Param.new + @input = o + o + when OutputName + o = Param.new + @output = o + o + when FaultName + o = Param.new + @fault << o + o + when SOAPOperationName + o = WSDL::SOAP::Operation.new + @soapoperation = o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + else + nil + end + end +end + + +end diff --git a/lib/wsdl/param.rb b/lib/wsdl/param.rb new file mode 100644 index 0000000..b6836b7 --- /dev/null +++ b/lib/wsdl/param.rb @@ -0,0 +1,85 @@ +# WSDL4R - WSDL param definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class Param < Info + attr_reader :message # required + attr_reader :name # optional but required for fault. + attr_reader :soapbody + attr_reader :soapheader + attr_reader :soapfault + + def initialize + super + @message = nil + @name = nil + @soapbody = nil + @soapheader = [] + @soapfault = nil + end + + def targetnamespace + parent.targetnamespace + end + + def find_message + root.message(@message) or raise RuntimeError.new("#{@message} not found") + end + + def soapbody_use + if @soapbody + @soapbody.use || :literal + else + raise RuntimeError.new("soap:body not found") + end + end + + def parse_element(element) + case element + when SOAPBodyName + o = WSDL::SOAP::Body.new + @soapbody = o + o + when SOAPHeaderName + o = WSDL::SOAP::Header.new + @soapheader << o + o + when SOAPFaultName + o = WSDL::SOAP::Fault.new + @soap_fault = o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when MessageAttrName + if value.namespace.nil? + value = XSD::QName.new(targetnamespace, value.source) + end + @message = value + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + else + nil + end + end +end + + +end diff --git a/lib/wsdl/parser.rb b/lib/wsdl/parser.rb new file mode 100644 index 0000000..f24a54c --- /dev/null +++ b/lib/wsdl/parser.rb @@ -0,0 +1,163 @@ +# WSDL4R - WSDL XML Instance parser library. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'xsd/ns' +require 'xsd/charset' +require 'xsd/datatypes' +require 'xsd/xmlparser' +require 'wsdl/wsdl' +require 'wsdl/data' +require 'wsdl/xmlSchema/data' +require 'wsdl/soap/data' + + +module WSDL + + +class Parser + include WSDL + + class ParseError < Error; end + class FormatDecodeError < ParseError; end + class UnknownElementError < FormatDecodeError; end + class UnknownAttributeError < FormatDecodeError; end + class UnexpectedElementError < FormatDecodeError; end + class ElementConstraintError < FormatDecodeError; end + class AttributeConstraintError < FormatDecodeError; end + +private + + class ParseFrame + attr_reader :ns + attr_reader :name + attr_accessor :node + + private + + def initialize(ns, name, node) + @ns = ns + @name = name + @node = node + end + end + +public + + def initialize(opt = {}) + @parser = XSD::XMLParser.create_parser(self, opt) + @parsestack = nil + @lastnode = nil + @ignored = {} + @location = opt[:location] + @originalroot = opt[:originalroot] + end + + def parse(string_or_readable) + @parsestack = [] + @lastnode = nil + @textbuf = '' + @parser.do_parse(string_or_readable) + @lastnode + end + + def charset + @parser.charset + end + + def start_element(name, attrs) + lastframe = @parsestack.last + ns = parent = nil + if lastframe + ns = lastframe.ns.clone_ns + parent = lastframe.node + else + ns = XSD::NS.new + parent = nil + end + attrs = XSD::XMLParser.filter_ns(ns, attrs) + node = decode_tag(ns, name, attrs, parent) + @parsestack << ParseFrame.new(ns, name, node) + end + + def characters(text) + lastframe = @parsestack.last + if lastframe + # Need not to be cloned because character does not have attr. + ns = lastframe.ns + decode_text(ns, text) + else + p text if $DEBUG + end + end + + def end_element(name) + lastframe = @parsestack.pop + unless name == lastframe.name + raise UnexpectedElementError.new("closing element name '#{name}' does not match with opening element '#{lastframe.name}'") + end + decode_tag_end(lastframe.ns, lastframe.node) + @lastnode = lastframe.node + end + +private + + def decode_tag(ns, name, attrs, parent) + o = nil + elename = ns.parse(name) + if !parent + if elename == DefinitionsName + o = Definitions.parse_element(elename) + o.location = @location + else + raise UnknownElementError.new("unknown element: #{elename}") + end + o.root = @originalroot if @originalroot # o.root = o otherwise + else + if elename == XMLSchema::AnnotationName + # only the first annotation element is allowed for each xsd element. + o = XMLSchema::Annotation.new + else + o = parent.parse_element(elename) + end + if o.nil? + unless @ignored.key?(elename) + warn("ignored element: #{elename}") + @ignored[elename] = elename + end + o = Documentation.new # which accepts any element. + end + # node could be a pseudo element. pseudo element has its own parent. + o.root = parent.root + o.parent = parent if o.parent.nil? + end + attrs.each do |key, value| + attr_ele = ns.parse(key, true) + value_ele = ns.parse(value, true) + value_ele.source = value # for recovery; value may not be a QName + if o.parse_attr(attr_ele, value_ele).nil? + unless @ignored.key?(attr_ele) + warn("ignored attr: #{attr_ele}") + @ignored[attr_ele] = attr_ele + end + end + end + o + end + + def decode_tag_end(ns, node) + node.parse_epilogue + end + + def decode_text(ns, text) + @textbuf << text + end +end + + +end diff --git a/lib/wsdl/part.rb b/lib/wsdl/part.rb new file mode 100644 index 0000000..5dafd4e --- /dev/null +++ b/lib/wsdl/part.rb @@ -0,0 +1,52 @@ +# WSDL4R - WSDL part definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class Part < Info + attr_reader :name # required + attr_reader :element # optional + attr_reader :type # optional + + def initialize + super + @name = nil + @element = nil + @type = nil + end + + def parse_element(element) + case element + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = value.source + when ElementAttrName + @element = value + when TypeAttrName + @type = value + else + nil + end + end +end + + +end diff --git a/lib/wsdl/port.rb b/lib/wsdl/port.rb new file mode 100644 index 0000000..883cc32 --- /dev/null +++ b/lib/wsdl/port.rb @@ -0,0 +1,84 @@ +# WSDL4R - WSDL port definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class Port < Info + attr_reader :name # required + attr_reader :binding # required + attr_reader :soap_address + + def initialize + super + @name = nil + @binding = nil + @soap_address = nil + end + + def targetnamespace + parent.targetnamespace + end + + def porttype + root.porttype(find_binding.type) + end + + def find_binding + root.binding(@binding) or raise RuntimeError.new("#{@binding} not found") + end + + def inputoperation_map + result = {} + find_binding.operations.each do |op_bind| + op_info = op_bind.soapoperation.input_info + result[op_info.op_name] = op_info + end + result + end + + def outputoperation_map + result = {} + find_binding.operations.each do |op_bind| + op_info = op_bind.soapoperation.output_info + result[op_info.op_name] = op_info + end + result + end + + def parse_element(element) + case element + when SOAPAddressName + o = WSDL::SOAP::Address.new + @soap_address = o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + when BindingAttrName + @binding = value + else + nil + end + end +end + + +end diff --git a/lib/wsdl/portType.rb b/lib/wsdl/portType.rb new file mode 100644 index 0000000..03e3769 --- /dev/null +++ b/lib/wsdl/portType.rb @@ -0,0 +1,73 @@ +# WSDL4R - WSDL portType definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL + + +class PortType < Info + attr_reader :name # required + attr_reader :operations + + def targetnamespace + parent.targetnamespace + end + + def initialize + super + @name = nil + @operations = XSD::NamedElements.new + end + + def find_binding + root.bindings.find { |item| item.type == @name } or + raise RuntimeError.new("#{@name} not found") + end + + def locations + bind_name = find_binding.name + result = [] + root.services.each do |service| + service.ports.each do |port| + if port.binding == bind_name + result << port.soap_address.location if port.soap_address + end + end + end + result + end + + def parse_element(element) + case element + when OperationName + o = Operation.new + @operations << o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + else + nil + end + end +end + + +end diff --git a/lib/wsdl/service.rb b/lib/wsdl/service.rb new file mode 100644 index 0000000..652b127 --- /dev/null +++ b/lib/wsdl/service.rb @@ -0,0 +1,61 @@ +# WSDL4R - WSDL service definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL + + +class Service < Info + attr_reader :name # required + attr_reader :ports + attr_reader :soap_address + + def initialize + super + @name = nil + @ports = XSD::NamedElements.new + @soap_address = nil + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + case element + when PortName + o = Port.new + @ports << o + o + when SOAPAddressName + o = WSDL::SOAP::Address.new + @soap_address = o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + else + nil + end + end +end + + +end diff --git a/lib/wsdl/soap/address.rb b/lib/wsdl/soap/address.rb new file mode 100644 index 0000000..0b2b59c --- /dev/null +++ b/lib/wsdl/soap/address.rb @@ -0,0 +1,40 @@ +# WSDL4R - WSDL SOAP address definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module SOAP + + +class Address < Info + attr_reader :location + + def initialize + super + @location = nil + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when LocationAttrName + @location = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/soap/binding.rb b/lib/wsdl/soap/binding.rb new file mode 100644 index 0000000..7e15a99 --- /dev/null +++ b/lib/wsdl/soap/binding.rb @@ -0,0 +1,49 @@ +# WSDL4R - WSDL SOAP binding definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module SOAP + + +class Binding < Info + attr_reader :style + attr_reader :transport + + def initialize + super + @style = nil + @transport = nil + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when StyleAttrName + if ["document", "rpc"].include?(value.source) + @style = value.source.intern + else + raise Parser::AttributeConstraintError.new( + "Unexpected value #{ value }.") + end + when TransportAttrName + @transport = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/soap/body.rb b/lib/wsdl/soap/body.rb new file mode 100644 index 0000000..824f812 --- /dev/null +++ b/lib/wsdl/soap/body.rb @@ -0,0 +1,56 @@ +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module SOAP + + +class Body < Info + attr_reader :parts + attr_reader :use # required + attr_reader :encodingstyle + attr_reader :namespace + + def initialize + super + @parts = nil + @use = nil + @encodingstyle = nil + @namespace = nil + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when PartsAttrName + @parts = value.source + when UseAttrName + if ['literal', 'encoded'].include?(value.source) + @use = value.source.intern + else + raise RuntimeError.new("unknown use of soap:body: #{value.source}") + end + when EncodingStyleAttrName + @encodingstyle = value.source + when NamespaceAttrName + @namespace = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/soap/cgiStubCreator.rb b/lib/wsdl/soap/cgiStubCreator.rb new file mode 100644 index 0000000..2c4dff2 --- /dev/null +++ b/lib/wsdl/soap/cgiStubCreator.rb @@ -0,0 +1,76 @@ +# WSDL4R - Creating CGI stub code from WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/soap/mappingRegistryCreator' +require 'wsdl/soap/methodDefCreator' +require 'wsdl/soap/classDefCreatorSupport' + + +module WSDL +module SOAP + + +class CGIStubCreator + include ClassDefCreatorSupport + + attr_reader :definitions + + def initialize(definitions) + @definitions = definitions + end + + def dump(service_name) + warn("CGI stub can have only 1 port. Creating stub for the first port... Rests are ignored.") + port = @definitions.service(service_name).ports[0] + dump_porttype(port.porttype.name) + end + +private + + def dump_porttype(name) + class_name = create_class_name(name) + methoddef, types = MethodDefCreator.new(@definitions).dump(name) + mr_creator = MappingRegistryCreator.new(@definitions) + c1 = XSD::CodeGen::ClassDef.new(class_name) + c1.def_require("soap/rpc/cgistub") + c1.def_require("soap/mapping/registry") + c1.def_const("MappingRegistry", "::SOAP::Mapping::Registry.new") + c1.def_code(mr_creator.dump(types)) + c1.def_code <<-EOD +Methods = [ +#{methoddef.gsub(/^/, " ")} +] + EOD + c2 = XSD::CodeGen::ClassDef.new(class_name + "App", + "::SOAP::RPC::CGIStub") + c2.def_method("initialize", "*arg") do + <<-EOD + super(*arg) + servant = #{class_name}.new + #{class_name}::Methods.each do |definitions| + opt = definitions.last + if opt[:request_style] == :document + @router.add_document_operation(servant, *definitions) + else + @router.add_rpc_operation(servant, *definitions) + end + end + self.mapping_registry = #{class_name}::MappingRegistry + self.level = Logger::Severity::ERROR + EOD + end + c1.dump + "\n" + c2.dump + format(<<-EOD) + #{class_name}App.new('app', nil).start + EOD + end +end + + +end +end diff --git a/lib/wsdl/soap/classDefCreator.rb b/lib/wsdl/soap/classDefCreator.rb new file mode 100644 index 0000000..7786dad --- /dev/null +++ b/lib/wsdl/soap/classDefCreator.rb @@ -0,0 +1,431 @@ +# WSDL4R - Creating class definition from WSDL +# Copyright (C) 2002, 2003, 2004, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/data' +require 'wsdl/soap/classDefCreatorSupport' +require 'xsd/codegen' + + +module WSDL +module SOAP + + +class ClassDefCreator + include ClassDefCreatorSupport + include XSD::CodeGen + + def initialize(definitions) + @elements = definitions.collect_elements + @elements.uniq! + @attributes = definitions.collect_attributes + @attributes.uniq! + @simpletypes = definitions.collect_simpletypes + @simpletypes.uniq! + @complextypes = definitions.collect_complextypes + @complextypes.uniq! + @faulttypes = nil + if definitions.respond_to?(:collect_faulttypes) + @faulttypes = definitions.collect_faulttypes + end + end + + def dump(type = nil) + result = "require 'xsd/qname'\n" + if type + result = dump_classdef(type.name, type) + else + str = dump_element + unless str.empty? + result << "\n" unless result.empty? + result << str + end + str = dump_attribute + unless str.empty? + result << "\n" unless result.empty? + result << str + end + str = dump_complextype + unless str.empty? + result << "\n" unless result.empty? + result << str + end + str = dump_simpletype + unless str.empty? + result << "\n" unless result.empty? + result << str + end + end + result + end + +private + + def dump_element + @elements.collect { |ele| + if ele.local_complextype + qualified = ele.elementform == 'qualified' + dump_complextypedef(ele.name, ele.local_complextype, qualified) + elsif ele.local_simpletype + dump_simpletypedef(ele.name, ele.local_simpletype) + else + nil + end + }.compact.join("\n") + end + + def dump_attribute + @attributes.collect { |attr| + if attr.local_simpletype + dump_simpletypedef(attr.name, attr.local_simpletype) + end + }.compact.join("\n") + end + + def dump_simpletype + @simpletypes.collect { |type| + dump_simpletypedef(type.name, type) + }.compact.join("\n") + end + + def dump_complextype + @complextypes.collect { |type| + dump_complextypedef(type.name, type) + }.compact.join("\n") + end + + def dump_simpletypedef(qname, simpletype) + if simpletype.restriction + dump_simpletypedef_restriction(qname, simpletype.restriction) + elsif simpletype.list + dump_simpletypedef_list(qname, simpletype.list) + else + raise RuntimeError.new("unknown kind of simpletype: #{simpletype}") + end + end + + def dump_simpletypedef_restriction(qname, restriction) + if restriction.enumeration.empty? + # not supported. minlength? + return nil + end + c = ModuleDef.new(create_class_name(qname)) + c.comment = "#{qname}" + define_enum_restriction(c, restriction.enumeration) + c.dump + end + + def dump_simpletypedef_list(qname, list) + c = ClassDef.new(create_class_name(qname), '::Array') + c.comment = "#{qname}" + if simpletype = list.local_simpletype + if simpletype.restriction.nil? + raise RuntimeError.new( + "unknown kind of simpletype: #{simpletype}") + end + define_enum_restriction(c, simpletype.restriction.enumeration) + c.comment << "\n contains list of #{create_class_name(qname)}::*" + elsif list.itemtype + c.comment << "\n contains list of #{create_class_name(list.itemtype)}::*" + else + raise RuntimeError.new("unknown kind of list: #{list}") + end + c.dump + end + + def define_enum_restriction(c, enumeration) + const = {} + enumeration.each do |value| + constname = safeconstname(value) + const[constname] ||= 0 + if (const[constname] += 1) > 1 + constname += "_#{const[constname]}" + end + c.def_const(constname, ndq(value)) + end + end + + def dump_simpleclassdef(qname, type_or_element) + base = basetype_class(type_or_element.simplecontent.base) + c = ClassDef.new(create_class_name(qname), '::String') + c.comment = "#{qname}\n contains #{base}" + init_lines = [] + unless type_or_element.attributes.empty? + define_attribute(c, type_or_element.attributes) + init_lines << "@__xmlattr = {}" + end + c.def_method('initialize', '*arg') do + "super\n" + init_lines.join("\n") + end + c.dump + end + + def dump_complextypedef(qname, type, qualified = false) + case type.compoundtype + when :TYPE_STRUCT, :TYPE_EMPTY + dump_classdef(qname, type, qualified) + when :TYPE_ARRAY + dump_arraydef(qname, type) + when :TYPE_SIMPLE + dump_simpleclassdef(qname, type) + when :TYPE_MAP + # mapped as a general Hash + nil + else + raise RuntimeError.new( + "unknown kind of complexContent: #{type.compoundtype}") + end + end + + def dump_classdef(qname, typedef, qualified = false) + if @faulttypes and @faulttypes.index(qname) + c = ClassDef.new(create_class_name(qname), '::StandardError') + else + c = ClassDef.new(create_class_name(qname)) + end + c.comment = "#{qname}" + c.def_classvar('schema_type', ndq(qname.name)) + c.def_classvar('schema_ns', ndq(qname.namespace)) + c.def_classvar('schema_qualified', dq('true')) if qualified + schema_element, init_lines, init_params = + parse_elements(c, typedef.elements, qname.namespace) + if typedef.choice? + schema_element.unshift(:choice) + end + unless typedef.attributes.empty? + define_attribute(c, typedef.attributes) + init_lines << "@__xmlattr = {}" + end + c.def_classvar('schema_element', + dump_schema_element_definition(schema_element, 2) + ) + c.def_method('initialize', *init_params) do + init_lines.join("\n") + end + c.dump + end + + def dump_schema_element_definition(definition, indent = 0) + return '[]' if definition.empty? + if definition[0] == :choice + definition.shift + "[ :choice,\n" + ' ' * indent + + dump_schema_element(definition, indent) + "\n]" + elsif definition[0].is_a?(::Array) + "[\n" + ' ' * indent + + dump_schema_element(definition, indent) + "\n]" + else + varname, name, type = definition + '[' + + ( + if name + varname.dump + ', [' + ndq(type) + ', ' + dqname(name) + ']' + else + varname.dump + ', ' + ndq(type) + end + ) + + ']' + end + end + + def dump_schema_element(schema_element, indent = 0) + delimiter = ",\n" + " " * indent + schema_element.collect { |definition| + dump_schema_element_definition(definition, indent + 2) + }.join(delimiter) + end + + def parse_elements(c, elements, base_namespace) + schema_element = [] + init_lines = [] + init_params = [] + any = false + elements.each do |element| + case element + when XMLSchema::Any + # only 1 is allowed for now. + raise RuntimeError.new("duplicated 'any'") if any + any = true + attrname = '__xmlele_any' + c.def_attr(attrname, false, attrname) + c.def_method('set_any', 'elements') do + '@__xmlele_any = elements' + end + init_lines << "@__xmlele_any = nil" + varname = 'any' # not used + eleqname = XSD::AnyTypeName + type = nil + schema_element << [varname, eleqname, type] + when XMLSchema::Element + if element.type == XSD::AnyTypeName + type = nil + elsif klass = element_basetype(element) + type = klass.name + elsif element.type + type = create_class_name(element.type) + elsif element.ref + type = create_class_name(element.ref) + else + type = nil # means anyType. + # do we define a class for local complexType from it's name? + # type = create_class_name(element.name) + # + # + # + # + # + end + name = name_element(element).name + #attrname = safemethodname?(name) ? name : safemethodname(name) + attrname = safemethodname(name) + varname = safevarname(name) + c.def_attr(attrname, true, varname) + init_lines << "@#{varname} = #{varname}" + if element.map_as_array? + init_params << "#{varname} = []" + if type + type << '[]' + else + type = '[]' + end + else + init_params << "#{varname} = nil" + end + # nil means @@schema_ns + varname + eleqname = element.name || element.ref.name + if eleqname && varname == name && eleqname.namespace == base_namespace + eleqname = nil + end + schema_element << [varname, eleqname, type] + when WSDL::XMLSchema::Sequence + child_schema_element, child_init_lines, child_init_params = + parse_elements(c, element.elements, base_namespace) + schema_element << child_schema_element + init_lines.concat(child_init_lines) + init_params.concat(child_init_params) + when WSDL::XMLSchema::Choice + child_schema_element, child_init_lines, child_init_params = + parse_elements(c, element.elements, base_namespace) + child_schema_element.unshift(:choice) + schema_element << child_schema_element + init_lines.concat(child_init_lines) + init_params.concat(child_init_params) + else + raise RuntimeError.new("unknown type: #{element}") + end + end + [schema_element, init_lines, init_params] + end + + def element_basetype(ele) + if klass = basetype_class(ele.type) + klass + elsif ele.local_simpletype + basetype_class(ele.local_simpletype.base) + else + nil + end + end + + def attribute_basetype(attr) + if klass = basetype_class(attr.type) + klass + elsif attr.local_simpletype + basetype_class(attr.local_simpletype.base) + else + nil + end + end + + def basetype_class(type) + return nil if type.nil? + if simpletype = @simpletypes[type] + basetype_mapped_class(simpletype.base) + else + basetype_mapped_class(type) + end + end + + def define_attribute(c, attributes) + schema_attribute = [] + attributes.each do |attribute| + name = name_attribute(attribute) + if klass = attribute_basetype(attribute) + type = klass.name + else + type = nil + end + methodname = safemethodname('xmlattr_' + name.name) + c.def_method(methodname) do <<-__EOD__ + (@__xmlattr ||= {})[#{dqname(name)}] + __EOD__ + end + c.def_method(methodname + '=', 'value') do <<-__EOD__ + (@__xmlattr ||= {})[#{dqname(name)}] = value + __EOD__ + end + schema_attribute << [name, type] + end + c.def_classvar('schema_attribute', + "{\n " + + schema_attribute.collect { |name, type| + dqname(name) + ' => ' + ndq(type) + }.join(",\n ") + + "\n}" + ) + end + + def name_element(element) + return element.name if element.name + return element.ref if element.ref + raise RuntimeError.new("cannot define name of #{element}") + end + + def name_attribute(attribute) + return attribute.name if attribute.name + return attribute.ref if attribute.ref + raise RuntimeError.new("cannot define name of #{attribute}") + end + + DEFAULT_ITEM_NAME = XSD::QName.new(nil, 'item') + + def dump_arraydef(qname, complextype) + c = ClassDef.new(create_class_name(qname), '::Array') + c.comment = "#{qname}" + child_type = complextype.child_type + c.def_classvar('schema_type', ndq(child_type.name)) + c.def_classvar('schema_ns', ndq(child_type.namespace)) + child_element = complextype.find_aryelement + schema_element = [] + if child_type == XSD::AnyTypeName + type = nil + elsif child_element and (klass = element_basetype(child_element)) + type = klass.name + elsif child_type + type = create_class_name(child_type) + else + type = nil + end + if child_element + if child_element.map_as_array? + type << '[]' if type + end + child_element_name = child_element.name + else + child_element_name = DEFAULT_ITEM_NAME + end + schema_element << [child_element_name.name, child_element_name, type] + c.def_classvar('schema_element', + dump_schema_element_definition(schema_element, 2) + ) + c.dump + end +end + + +end +end diff --git a/lib/wsdl/soap/classDefCreatorSupport.rb b/lib/wsdl/soap/classDefCreatorSupport.rb new file mode 100644 index 0000000..8f33565 --- /dev/null +++ b/lib/wsdl/soap/classDefCreatorSupport.rb @@ -0,0 +1,126 @@ +# WSDL4R - Creating class code support from WSDL. +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'soap/mapping' +require 'soap/mapping/typeMap' +require 'xsd/codegen/gensupport' + + +module WSDL +module SOAP + + +module ClassDefCreatorSupport + include XSD::CodeGen::GenSupport + + def create_class_name(qname) + if klass = basetype_mapped_class(qname) + ::SOAP::Mapping::DefaultRegistry.find_mapped_obj_class(klass).name + else + safeconstname(qname.name) + end + end + + def basetype_mapped_class(name) + ::SOAP::TypeMap[name] + end + + def dump_method_signature(operation) + name = operation.name.name + input = operation.input + output = operation.output + fault = operation.fault + signature = "#{ name }#{ dump_inputparam(input) }" + str = <<__EOD__ +# SYNOPSIS +# #{name}#{dump_inputparam(input)} +# +# ARGS +#{dump_inout_type(input).chomp} +# +# RETURNS +#{dump_inout_type(output).chomp} +# +__EOD__ + unless fault.empty? + faultstr = (fault.collect { |f| dump_inout_type(f).chomp }).join(', ') + str <<<<__EOD__ +# RAISES +# #{faultstr} +# +__EOD__ + end + str + end + + def dq(ele) + ele.dump + end + + def ndq(ele) + ele.nil? ? 'nil' : dq(ele) + end + + def sym(ele) + ':' + ele + end + + def dqname(qname) + qname.dump + end + +private + + def dump_inout_type(param) + if param + message = param.find_message + params = "" + message.parts.each do |part| + name = safevarname(part.name) + if part.type + typename = safeconstname(part.type.name) + params << add_at("# #{name}", "#{typename} - #{part.type}\n", 20) + elsif part.element + typename = safeconstname(part.element.name) + params << add_at("# #{name}", "#{typename} - #{part.element}\n", 20) + end + end + unless params.empty? + return params + end + end + "# N/A\n" + end + + def dump_inputparam(input) + message = input.find_message + params = "" + message.parts.each do |part| + params << ", " unless params.empty? + params << safevarname(part.name) + end + if params.empty? + "" + else + "(#{ params })" + end + end + + def add_at(base, str, pos) + if base.size >= pos + base + ' ' + str + else + base + ' ' * (pos - base.size) + str + end + end +end + + +end +end diff --git a/lib/wsdl/soap/clientSkeltonCreator.rb b/lib/wsdl/soap/clientSkeltonCreator.rb new file mode 100644 index 0000000..916f0d4 --- /dev/null +++ b/lib/wsdl/soap/clientSkeltonCreator.rb @@ -0,0 +1,78 @@ +# WSDL4R - Creating client skelton code from WSDL. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/soap/classDefCreatorSupport' + + +module WSDL +module SOAP + + +class ClientSkeltonCreator + include ClassDefCreatorSupport + + attr_reader :definitions + + def initialize(definitions) + @definitions = definitions + end + + def dump(service_name) + result = "" + @definitions.service(service_name).ports.each do |port| + result << dump_porttype(port.porttype.name) + result << "\n" + end + result + end + +private + + def dump_porttype(name) + drv_name = create_class_name(name) + + result = "" + result << <<__EOD__ +endpoint_url = ARGV.shift +obj = #{ drv_name }.new(endpoint_url) + +# run ruby with -d to see SOAP wiredumps. +obj.wiredump_dev = STDERR if $DEBUG + +__EOD__ + @definitions.porttype(name).operations.each do |operation| + result << dump_method_signature(operation) + result << dump_input_init(operation.input) << "\n" + result << dump_operation(operation) << "\n\n" + end + result + end + + def dump_operation(operation) + name = operation.name + input = operation.input + "puts obj.#{ safemethodname(name.name) }#{ dump_inputparam(input) }" + end + + def dump_input_init(input) + result = input.find_message.parts.collect { |part| + safevarname(part.name) + }.join(" = ") + if result.empty? + "" + else + result << " = nil" + end + result + end +end + + +end +end diff --git a/lib/wsdl/soap/complexType.rb b/lib/wsdl/soap/complexType.rb new file mode 100644 index 0000000..04510f2 --- /dev/null +++ b/lib/wsdl/soap/complexType.rb @@ -0,0 +1,166 @@ +# WSDL4R - SOAP complexType definition for WSDL. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/xmlSchema/complexType' +require 'soap/mapping' + + +module WSDL +module XMLSchema + + +class ComplexType < Info + def compoundtype + @compoundtype ||= check_type + end + + def check_type + if have_any? + :TYPE_STRUCT + elsif content + e = elements + if attributes.empty? and e.size == 1 and e[0].maxoccurs != '1' + if name == ::SOAP::Mapping::MapQName + :TYPE_MAP + else + :TYPE_ARRAY + end + else + :TYPE_STRUCT + end + elsif complexcontent + complexcontent.check_type + elsif simplecontent + :TYPE_SIMPLE + elsif !attributes.empty? + :TYPE_STRUCT + else # empty complexType definition (seen in partner.wsdl of salesforce) + :TYPE_EMPTY + end + end + + def child_type(name = nil) + case compoundtype + when :TYPE_STRUCT + if ele = find_element(name) + ele.type + elsif ele = find_element_by_name(name.name) + ele.type + end + when :TYPE_ARRAY + @contenttype ||= content_arytype + when :TYPE_MAP + item_ele = find_element_by_name("item") or + raise RuntimeError.new("'item' element not found in Map definition.") + content = item_ele.local_complextype or + raise RuntimeError.new("No complexType definition for 'item'.") + if ele = content.find_element(name) + ele.type + elsif ele = content.find_element_by_name(name.name) + ele.type + end + else + raise NotImplementedError.new("Unknown kind of complexType.") + end + end + + def child_defined_complextype(name) + ele = nil + case compoundtype + when :TYPE_STRUCT, :TYPE_MAP + unless ele = find_element(name) + if name.namespace.nil? + ele = find_element_by_name(name.name) + end + end + when :TYPE_ARRAY + e = elements + if e.size == 1 + ele = e[0] + else + raise RuntimeError.new("Assert: must not reach.") + end + else + raise RuntimeError.new("Assert: Not implemented.") + end + unless ele + raise RuntimeError.new("Cannot find #{name} as a children of #{@name}.") + end + ele.local_complextype + end + + def find_arytype + unless compoundtype == :TYPE_ARRAY + raise RuntimeError.new("Assert: not for array") + end + if complexcontent + if complexcontent.restriction + complexcontent.restriction.attributes.each do |attribute| + if attribute.ref == ::SOAP::AttrArrayTypeName + return attribute.arytype + end + end + end + end + if check_array_content + return element_simpletype(elements[0]) + end + raise RuntimeError.new("Assert: Unknown array definition.") + end + + def find_aryelement + unless compoundtype == :TYPE_ARRAY + raise RuntimeError.new("Assert: not for array") + end + if check_array_content + return elements[0] + end + nil # use default item name + end + +private + + def element_simpletype(element) + case element + when XMLSchema::Element + if element.type + element.type + elsif element.local_simpletype + element.local_simpletype.base + else + # element definition + element.name + end + when XMLSchema::Any + XSD::AnyTypeName + else + nil + end + end + + def check_array_content + e = elements + e.size == 1 and e[0].maxoccurs != '1' + # content and content.elements.size == 1 and + # content.elements[0].maxoccurs != '1' + end + + def content_arytype + if arytype = find_arytype + ns = arytype.namespace + name = arytype.name.sub(/\[(?:,)*\]$/, '') + XSD::QName.new(ns, name) + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/soap/data.rb b/lib/wsdl/soap/data.rb new file mode 100644 index 0000000..48512d3 --- /dev/null +++ b/lib/wsdl/soap/data.rb @@ -0,0 +1,42 @@ +# WSDL4R - WSDL SOAP binding data definitions. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'wsdl/soap/definitions' +require 'wsdl/soap/binding' +require 'wsdl/soap/operation' +require 'wsdl/soap/body' +require 'wsdl/soap/element' +require 'wsdl/soap/header' +require 'wsdl/soap/headerfault' +require 'wsdl/soap/fault' +require 'wsdl/soap/address' +require 'wsdl/soap/complexType' + + +module WSDL +module SOAP + + +HeaderFaultName = XSD::QName.new(SOAPBindingNamespace, 'headerfault') + +LocationAttrName = XSD::QName.new(nil, 'location') +StyleAttrName = XSD::QName.new(nil, 'style') +TransportAttrName = XSD::QName.new(nil, 'transport') +UseAttrName = XSD::QName.new(nil, 'use') +PartsAttrName = XSD::QName.new(nil, 'parts') +PartAttrName = XSD::QName.new(nil, 'part') +NameAttrName = XSD::QName.new(nil, 'name') +MessageAttrName = XSD::QName.new(nil, 'message') +EncodingStyleAttrName = XSD::QName.new(nil, 'encodingStyle') +NamespaceAttrName = XSD::QName.new(nil, 'namespace') +SOAPActionAttrName = XSD::QName.new(nil, 'soapAction') + + +end +end diff --git a/lib/wsdl/soap/definitions.rb b/lib/wsdl/soap/definitions.rb new file mode 100644 index 0000000..2aed48d --- /dev/null +++ b/lib/wsdl/soap/definitions.rb @@ -0,0 +1,150 @@ +# WSDL4R - WSDL additional definitions for SOAP. +# Copyright (C) 2002-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' +require 'soap/mapping' + + +module WSDL + + +class Definitions < Info + def self.soap_rpc_complextypes + types = XSD::NamedElements.new + types << array_complextype + types << fault_complextype + types << exception_complextype + types + end + + def self.array_complextype + type = XMLSchema::ComplexType.new(::SOAP::ValueArrayName) + type.complexcontent = XMLSchema::ComplexContent.new + type.complexcontent.restriction = XMLSchema::ComplexRestriction.new + type.complexcontent.restriction.base = ::SOAP::ValueArrayName + attr = XMLSchema::Attribute.new + attr.ref = ::SOAP::AttrArrayTypeName + anytype = XSD::AnyTypeName.dup + anytype.name += '[]' + attr.arytype = anytype + type.complexcontent.restriction.attributes << attr + type + end + +=begin + + + + + + + + +=end + def self.fault_complextype + type = XMLSchema::ComplexType.new(::SOAP::EleFaultName) + faultcode = XMLSchema::Element.new(::SOAP::EleFaultCodeName, XSD::XSDQName::Type) + faultstring = XMLSchema::Element.new(::SOAP::EleFaultStringName, XSD::XSDString::Type) + faultactor = XMLSchema::Element.new(::SOAP::EleFaultActorName, XSD::XSDAnyURI::Type) + faultactor.minoccurs = 0 + detail = XMLSchema::Element.new(::SOAP::EleFaultDetailName, XSD::AnyTypeName) + detail.minoccurs = 0 + type.all_elements = [faultcode, faultstring, faultactor, detail] + type.final = 'extension' + type + end + + def self.exception_complextype + type = XMLSchema::ComplexType.new(XSD::QName.new( + ::SOAP::Mapping::RubyCustomTypeNamespace, 'SOAPException')) + excn_name = XMLSchema::Element.new(XSD::QName.new(nil, 'excn_type_name'), XSD::XSDString::Type) + cause = XMLSchema::Element.new(XSD::QName.new(nil, 'cause'), XSD::AnyTypeName) + backtrace = XMLSchema::Element.new(XSD::QName.new(nil, 'backtrace'), ::SOAP::ValueArrayName) + message = XMLSchema::Element.new(XSD::QName.new(nil, 'message'), XSD::XSDString::Type) + type.all_elements = [excn_name, cause, backtrace, message] + type + end + + def soap_rpc_complextypes(binding) + types = rpc_operation_complextypes(binding) + types + self.class.soap_rpc_complextypes + end + + def collect_faulttypes + result = [] + collect_fault_messages.each do |name| + faultparts = message(name).parts + if faultparts.size != 1 + raise RuntimeError.new("expecting fault message to have only 1 part") + end + if result.index(faultparts[0].type).nil? + result << faultparts[0].type + end + end + result + end + +private + + def collect_fault_messages + result = [] + porttypes.each do |porttype| + porttype.operations.each do |operation| + operation.fault.each do |fault| + if result.index(fault.message).nil? + result << fault.message + end + end + end + end + result + end + + def rpc_operation_complextypes(binding) + types = XSD::NamedElements.new + binding.operations.each do |op_bind| + if op_bind_rpc?(op_bind) + operation = op_bind.find_operation + if op_bind.input + type = XMLSchema::ComplexType.new(op_bind.soapoperation_name) + message = messages[operation.input.message] + type.sequence_elements = elements_from_message(message) + types << type + end + if op_bind.output + type = XMLSchema::ComplexType.new(operation.outputname) + message = messages[operation.output.message] + type.sequence_elements = elements_from_message(message) + types << type + end + end + end + types + end + + def op_bind_rpc?(op_bind) + op_bind.soapoperation_style == :rpc + end + + def elements_from_message(message) + message.parts.collect { |part| + if part.element + collect_elements[part.element] + elsif part.name.nil? or part.type.nil? + raise RuntimeError.new("part of a message must be an element or typed") + else + qname = XSD::QName.new(nil, part.name) + XMLSchema::Element.new(qname, part.type) + end + } + end +end + + +end diff --git a/lib/wsdl/soap/driverCreator.rb b/lib/wsdl/soap/driverCreator.rb new file mode 100644 index 0000000..25b0d42 --- /dev/null +++ b/lib/wsdl/soap/driverCreator.rb @@ -0,0 +1,95 @@ +# WSDL4R - Creating driver code from WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/soap/mappingRegistryCreator' +require 'wsdl/soap/methodDefCreator' +require 'wsdl/soap/classDefCreatorSupport' +require 'xsd/codegen' + + +module WSDL +module SOAP + + +class DriverCreator + include ClassDefCreatorSupport + + attr_reader :definitions + + def initialize(definitions) + @definitions = definitions + end + + def dump(porttype = nil) + if porttype.nil? + result = "" + @definitions.porttypes.each do |type| + result << dump_porttype(type.name) + result << "\n" + end + else + result = dump_porttype(porttype) + end + result + end + +private + + def dump_porttype(porttype) + class_name = create_class_name(porttype) + methoddef, types = MethodDefCreator.new(@definitions).dump(porttype) + mr_creator = MappingRegistryCreator.new(@definitions) + binding = @definitions.bindings.find { |item| item.type == porttype } + return '' unless binding.soapbinding # not a SOAP binding + address = @definitions.porttype(porttype).locations[0] + + c = XSD::CodeGen::ClassDef.new(class_name, "::SOAP::RPC::Driver") + c.def_require("soap/rpc/driver") + c.def_const("MappingRegistry", "::SOAP::Mapping::Registry.new") + c.def_const("DefaultEndpointUrl", ndq(address)) + c.def_code(mr_creator.dump(types)) + c.def_code <<-EOD +Methods = [ +#{methoddef.gsub(/^/, " ")} +] + EOD + c.def_method("initialize", "endpoint_url = nil") do + <<-EOD + endpoint_url ||= DefaultEndpointUrl + super(endpoint_url, nil) + self.mapping_registry = MappingRegistry + init_methods + EOD + end + c.def_privatemethod("init_methods") do + <<-EOD + Methods.each do |definitions| + opt = definitions.last + if opt[:request_style] == :document + add_document_operation(*definitions) + else + add_rpc_operation(*definitions) + qname = definitions[0] + name = definitions[2] + if qname.name != name and qname.name.capitalize == name.capitalize + ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| + __send__(name, *arg) + end + end + end + end + EOD + end + c.dump + end +end + + +end +end diff --git a/lib/wsdl/soap/element.rb b/lib/wsdl/soap/element.rb new file mode 100644 index 0000000..0fa6017 --- /dev/null +++ b/lib/wsdl/soap/element.rb @@ -0,0 +1,28 @@ +# WSDL4R - XMLSchema element definition for WSDL. +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/xmlSchema/element' + + +module WSDL +module XMLSchema + + +class Element < Info + def map_as_array? + maxoccurs != '1' + end + + def attributes + @local_complextype.attributes + end +end + + +end +end diff --git a/lib/wsdl/soap/fault.rb b/lib/wsdl/soap/fault.rb new file mode 100644 index 0000000..2862b65 --- /dev/null +++ b/lib/wsdl/soap/fault.rb @@ -0,0 +1,56 @@ +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module SOAP + + +class Fault < Info + attr_reader :name # required + attr_reader :use # required + attr_reader :encodingstyle + attr_reader :namespace + + def initialize + super + @name = nil + @use = nil + @encodingstyle = nil + @namespace = nil + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + when UseAttrName + @use = value.source + when EncodingStyleAttrName + @encodingstyle = value.source + when NamespaceAttrName + @namespace = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/soap/header.rb b/lib/wsdl/soap/header.rb new file mode 100644 index 0000000..8d7c4e9 --- /dev/null +++ b/lib/wsdl/soap/header.rb @@ -0,0 +1,86 @@ +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module SOAP + + +class Header < Info + attr_reader :headerfault + + attr_reader :message # required + attr_reader :part # required + attr_reader :use # required + attr_reader :encodingstyle + attr_reader :namespace + + def initialize + super + @message = nil + @part = nil + @use = nil + @encodingstyle = nil + @namespace = nil + @headerfault = nil + end + + def targetnamespace + parent.targetnamespace + end + + def find_message + root.message(@message) or raise RuntimeError.new("#{@message} not found") + end + + def find_part + find_message.parts.each do |part| + if part.name == @part + return part + end + end + raise RuntimeError.new("#{@part} not found") + end + + def parse_element(element) + case element + when HeaderFaultName + o = WSDL::SOAP::HeaderFault.new + @headerfault = o + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when MessageAttrName + if value.namespace.nil? + value = XSD::QName.new(targetnamespace, value.source) + end + @message = value + when PartAttrName + @part = value.source + when UseAttrName + @use = value.source + when EncodingStyleAttrName + @encodingstyle = value.source + when NamespaceAttrName + @namespace = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/soap/headerfault.rb b/lib/wsdl/soap/headerfault.rb new file mode 100644 index 0000000..d6b14f2 --- /dev/null +++ b/lib/wsdl/soap/headerfault.rb @@ -0,0 +1,56 @@ +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module SOAP + + +class HeaderFault < Info + attr_reader :message # required + attr_reader :part # required + attr_reader :use # required + attr_reader :encodingstyle + attr_reader :namespace + + def initialize + super + @message = nil + @part = nil + @use = nil + @encodingstyle = nil + @namespace = nil + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when MessageAttrName + @message = value + when PartAttrName + @part = value.source + when UseAttrName + @use = value.source + when EncodingStyleAttrName + @encodingstyle = value.source + when NamespaceAttrName + @namespace = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/soap/mappingRegistryCreator.rb b/lib/wsdl/soap/mappingRegistryCreator.rb new file mode 100644 index 0000000..8669339 --- /dev/null +++ b/lib/wsdl/soap/mappingRegistryCreator.rb @@ -0,0 +1,92 @@ +# WSDL4R - Creating MappingRegistry code from WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/soap/classDefCreatorSupport' + + +module WSDL +module SOAP + + +class MappingRegistryCreator + include ClassDefCreatorSupport + + attr_reader :definitions + + def initialize(definitions) + @definitions = definitions + @complextypes = @definitions.collect_complextypes + @types = nil + end + + def dump(types) + @types = types + map_cache = [] + map = "" + @types.each do |type| + if map_cache.index(type).nil? + map_cache << type + if type.namespace != XSD::Namespace + if typemap = dump_typemap(type) + map << typemap + end + end + end + end + return map + end + +private + + def dump_typemap(type) + if definedtype = @complextypes[type] + case definedtype.compoundtype + when :TYPE_STRUCT + dump_struct_typemap(definedtype) + when :TYPE_ARRAY + dump_array_typemap(definedtype) + when :TYPE_MAP, :TYPE_EMPTY + nil + else + raise NotImplementedError.new("must not reach here") + end + end + end + + def dump_struct_typemap(definedtype) + ele = definedtype.name + return <<__EOD__ +MappingRegistry.set( + #{create_class_name(ele)}, + ::SOAP::SOAPStruct, + ::SOAP::Mapping::Registry::TypedStructFactory, + { :type => #{dqname(ele)} } +) +__EOD__ + end + + def dump_array_typemap(definedtype) + ele = definedtype.name + arytype = definedtype.find_arytype || XSD::AnyTypeName + type = XSD::QName.new(arytype.namespace, arytype.name.sub(/\[(?:,)*\]$/, '')) + @types << type + return <<__EOD__ +MappingRegistry.set( + #{create_class_name(ele)}, + ::SOAP::SOAPArray, + ::SOAP::Mapping::Registry::TypedArrayFactory, + { :type => #{dqname(type)} } +) +__EOD__ + end +end + + +end +end diff --git a/lib/wsdl/soap/methodDefCreator.rb b/lib/wsdl/soap/methodDefCreator.rb new file mode 100644 index 0000000..62516e2 --- /dev/null +++ b/lib/wsdl/soap/methodDefCreator.rb @@ -0,0 +1,248 @@ +# WSDL4R - Creating driver code from WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/soap/classDefCreatorSupport' +require 'soap/rpc/element' + + +module WSDL +module SOAP + + +class MethodDefCreator + include ClassDefCreatorSupport + + attr_reader :definitions + + def initialize(definitions) + @definitions = definitions + @simpletypes = @definitions.collect_simpletypes + @complextypes = @definitions.collect_complextypes + @elements = @definitions.collect_elements + @types = [] + end + + def dump(porttype) + @types.clear + result = "" + port = @definitions.porttype(porttype) + port.find_binding.operations.each do |op_bind| + op = op_bind.find_operation + next unless op_bind # no binding is defined + next unless op_bind.soapoperation # not a SOAP operation binding + result << ",\n" unless result.empty? + result << dump_method(op, op_bind).chomp + end + return result, @types + end + + def collect_rpcparameter(operation) + result = operation.inputparts.collect { |part| + collect_type(part.type) + param_set(::SOAP::RPC::SOAPMethod::IN, part.name, rpcdefinedtype(part)) + } + outparts = operation.outputparts + if outparts.size > 0 + retval = outparts[0] + collect_type(retval.type) + result << param_set(::SOAP::RPC::SOAPMethod::RETVAL, retval.name, + rpcdefinedtype(retval)) + cdr(outparts).each { |part| + collect_type(part.type) + result << param_set(::SOAP::RPC::SOAPMethod::OUT, part.name, + rpcdefinedtype(part)) + } + end + result + end + + def collect_documentparameter(operation) + param = [] + operation.inputparts.each do |input| + param << param_set(::SOAP::RPC::SOAPMethod::IN, input.name, + documentdefinedtype(input), elementqualified(input)) + end + operation.outputparts.each do |output| + param << param_set(::SOAP::RPC::SOAPMethod::OUT, output.name, + documentdefinedtype(output), elementqualified(output)) + end + param + end + +private + + def dump_method(operation, binding) + name = safemethodname(operation.name.name) + name_as = operation.name.name + style = binding.soapoperation_style + inputuse = binding.input.soapbody_use + outputuse = binding.output.soapbody_use + namespace = binding.input.soapbody.namespace + if style == :rpc + qname = XSD::QName.new(namespace, name_as) + paramstr = param2str(collect_rpcparameter(operation)) + else + qname = nil + paramstr = param2str(collect_documentparameter(operation)) + end + if paramstr.empty? + paramstr = '[]' + else + paramstr = "[ " << paramstr.split(/\r?\n/).join("\n ") << " ]" + end + definitions = <<__EOD__ +#{ndq(binding.soapaction)}, + #{dq(name)}, + #{paramstr}, + { :request_style => #{sym(style.id2name)}, :request_use => #{sym(inputuse.id2name)}, + :response_style => #{sym(style.id2name)}, :response_use => #{sym(outputuse.id2name)} } +__EOD__ + if style == :rpc + return <<__EOD__ +[ #{qname.dump}, + #{definitions}] +__EOD__ + else + return <<__EOD__ +[ #{definitions}] +__EOD__ + end + end + + def rpcdefinedtype(part) + if mapped = basetype_mapped_class(part.type) + ['::' + mapped.name] + elsif definedtype = @simpletypes[part.type] + if definedtype.base + ['::' + basetype_mapped_class(definedtype.base).name] + else + raise RuntimeError.new("unsupported simpleType: #{definedtype}") + end + elsif definedtype = @elements[part.element] + #['::SOAP::SOAPStruct', part.element.namespace, part.element.name] + ['nil', part.element.namespace, part.element.name] + elsif definedtype = @complextypes[part.type] + case definedtype.compoundtype + when :TYPE_STRUCT, :TYPE_EMPTY # ToDo: empty should be treated as void. + type = create_class_name(part.type) + [type, part.type.namespace, part.type.name] + when :TYPE_MAP + [Hash.name, part.type.namespace, part.type.name] + when :TYPE_ARRAY + arytype = definedtype.find_arytype || XSD::AnyTypeName + ns = arytype.namespace + name = arytype.name.sub(/\[(?:,)*\]$/, '') + type = create_class_name(XSD::QName.new(ns, name)) + [type + '[]', ns, name] + else + raise NotImplementedError.new("must not reach here") + end + else + raise RuntimeError.new("part: #{part.name} cannot be resolved") + end + end + + def documentdefinedtype(part) + if mapped = basetype_mapped_class(part.type) + ['::' + mapped.name, nil, part.name] + elsif definedtype = @simpletypes[part.type] + if definedtype.base + ['::' + basetype_mapped_class(definedtype.base).name, nil, part.name] + else + raise RuntimeError.new("unsupported simpleType: #{definedtype}") + end + elsif definedtype = @elements[part.element] + ['::SOAP::SOAPElement', part.element.namespace, part.element.name] + elsif definedtype = @complextypes[part.type] + ['::SOAP::SOAPElement', part.type.namespace, part.type.name] + else + raise RuntimeError.new("part: #{part.name} cannot be resolved") + end + end + + def elementqualified(part) + if mapped = basetype_mapped_class(part.type) + false + elsif definedtype = @simpletypes[part.type] + false + elsif definedtype = @elements[part.element] + definedtype.elementform == 'qualified' + elsif definedtype = @complextypes[part.type] + false + else + raise RuntimeError.new("part: #{part.name} cannot be resolved") + end + end + + def param_set(io_type, name, type, ele = nil) + [io_type, name, type, ele] + end + + def collect_type(type) + # ignore inline type definition. + return if type.nil? + return if @types.include?(type) + @types << type + return unless @complextypes[type] + collect_elements_type(@complextypes[type].elements) + end + + def collect_elements_type(elements) + elements.each do |element| + case element + when WSDL::XMLSchema::Any + # nothing to do + when WSDL::XMLSchema::Element + collect_type(element.type) + when WSDL::XMLSchema::Sequence, WSDL::XMLSchema::Choice + collect_elements_type(element.elements) + else + raise RuntimeError.new("unknown type: #{element}") + end + end + end + + def param2str(params) + params.collect { |param| + io, name, type, ele = param + unless ele.nil? + "[#{dq(io)}, #{dq(name)}, #{type2str(type)}, #{ele2str(ele)}]" + else + "[#{dq(io)}, #{dq(name)}, #{type2str(type)}]" + end + }.join(",\n") + end + + def type2str(type) + if type.size == 1 + "[#{dq(type[0])}]" + else + "[#{dq(type[0])}, #{ndq(type[1])}, #{dq(type[2])}]" + end + end + + def ele2str(ele) + qualified = ele + if qualified + "true" + else + "false" + end + end + + def cdr(ary) + result = ary.dup + result.shift + result + end +end + + +end +end diff --git a/lib/wsdl/soap/operation.rb b/lib/wsdl/soap/operation.rb new file mode 100644 index 0000000..502d34a --- /dev/null +++ b/lib/wsdl/soap/operation.rb @@ -0,0 +1,122 @@ +# WSDL4R - WSDL SOAP operation definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module SOAP + + +class Operation < Info + class OperationInfo + attr_reader :style + attr_reader :op_name + attr_reader :optype_name + attr_reader :headerparts + attr_reader :bodyparts + attr_reader :faultpart + attr_reader :soapaction + + def initialize(style, op_name, optype_name, headerparts, bodyparts, faultpart, soapaction) + @style = style + @op_name = op_name + @optype_name = optype_name + @headerparts = headerparts + @bodyparts = bodyparts + @faultpart = faultpart + @soapaction = soapaction + end + end + + attr_reader :soapaction + attr_reader :style + + def initialize + super + @soapaction = nil + @style = nil + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when StyleAttrName + if ["document", "rpc"].include?(value.source) + @style = value.source.intern + else + raise Parser::AttributeConstraintError.new( + "Unexpected value #{ value }.") + end + when SOAPActionAttrName + @soapaction = value.source + else + nil + end + end + + def input_info + name_info = parent.find_operation.input_info + param_info(name_info, parent.input) + end + + def output_info + name_info = parent.find_operation.output_info + param_info(name_info, parent.output) + end + + def operation_style + return @style if @style + if parent_binding.soapbinding + return parent_binding.soapbinding.style + end + nil + end + +private + + def parent_binding + parent.parent + end + + def param_info(name_info, param) + op_name = name_info.op_name + optype_name = name_info.optype_name + + soapheader = param.soapheader + headerparts = soapheader.collect { |item| item.find_part } + + soapbody = param.soapbody + if soapbody.encodingstyle and + soapbody.encodingstyle != ::SOAP::EncodingNamespace + raise NotImplementedError.new( + "EncodingStyle '#{ soapbody.encodingstyle }' not supported.") + end + if soapbody.namespace + op_name = XSD::QName.new(soapbody.namespace, op_name.name) + end + if soapbody.parts + target = soapbody.parts.split(/\s+/) + bodyparts = name_info.parts.find_all { |part| + target.include?(part.name) + } + else + bodyparts = name_info.parts + end + + faultpart = nil + OperationInfo.new(operation_style, op_name, optype_name, headerparts, bodyparts, faultpart, parent.soapaction) + end +end + + +end +end diff --git a/lib/wsdl/soap/servantSkeltonCreator.rb b/lib/wsdl/soap/servantSkeltonCreator.rb new file mode 100644 index 0000000..88294ff --- /dev/null +++ b/lib/wsdl/soap/servantSkeltonCreator.rb @@ -0,0 +1,67 @@ +# WSDL4R - Creating servant skelton code from WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/soap/classDefCreatorSupport' +require 'xsd/codegen' + + +module WSDL +module SOAP + + +class ServantSkeltonCreator + include ClassDefCreatorSupport + include XSD::CodeGen::GenSupport + + attr_reader :definitions + + def initialize(definitions) + @definitions = definitions + end + + def dump(porttype = nil) + if porttype.nil? + result = "" + @definitions.porttypes.each do |type| + result << dump_porttype(type.name) + result << "\n" + end + else + result = dump_porttype(porttype) + end + result + end + +private + + def dump_porttype(name) + class_name = create_class_name(name) + c = XSD::CodeGen::ClassDef.new(class_name) + operations = @definitions.porttype(name).operations + operations.each do |operation| + name = safemethodname(operation.name.name) + input = operation.input + params = input.find_message.parts.collect { |part| + safevarname(part.name) + } + m = XSD::CodeGen::MethodDef.new(name, params) do <<-EOD + p [#{params.join(", ")}] + raise NotImplementedError.new + EOD + end + m.comment = dump_method_signature(operation) + c.add_method(m) + end + c.dump + end +end + + +end +end diff --git a/lib/wsdl/soap/standaloneServerStubCreator.rb b/lib/wsdl/soap/standaloneServerStubCreator.rb new file mode 100644 index 0000000..0b751b5 --- /dev/null +++ b/lib/wsdl/soap/standaloneServerStubCreator.rb @@ -0,0 +1,85 @@ +# WSDL4R - Creating standalone server stub code from WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/soap/mappingRegistryCreator' +require 'wsdl/soap/methodDefCreator' +require 'wsdl/soap/classDefCreatorSupport' + + +module WSDL +module SOAP + + +class StandaloneServerStubCreator + include ClassDefCreatorSupport + + attr_reader :definitions + + def initialize(definitions) + @definitions = definitions + end + + def dump(service_name) + warn("- Standalone stub can have only 1 port for now. So creating stub for the first port and rests are ignored.") + warn("- Standalone server stub ignores port location defined in WSDL. Location is http://localhost:10080/ by default. Generated client from WSDL must be configured to point this endpoint manually.") + port = @definitions.service(service_name).ports[0] + dump_porttype(port.porttype.name) + end + +private + + def dump_porttype(name) + class_name = create_class_name(name) + methoddef, types = MethodDefCreator.new(@definitions).dump(name) + mr_creator = MappingRegistryCreator.new(@definitions) + + c1 = XSD::CodeGen::ClassDef.new(class_name) + c1.def_require("soap/rpc/standaloneServer") + c1.def_require("soap/mapping/registry") + c1.def_const("MappingRegistry", "::SOAP::Mapping::Registry.new") + c1.def_code(mr_creator.dump(types)) + c1.def_code <<-EOD +Methods = [ +#{methoddef.gsub(/^/, " ")} +] + EOD + c2 = XSD::CodeGen::ClassDef.new(class_name + "App", + "::SOAP::RPC::StandaloneServer") + c2.def_method("initialize", "*arg") do + <<-EOD + super(*arg) + servant = #{class_name}.new + #{class_name}::Methods.each do |definitions| + opt = definitions.last + if opt[:request_style] == :document + @router.add_document_operation(servant, *definitions) + else + @router.add_rpc_operation(servant, *definitions) + end + end + self.mapping_registry = #{class_name}::MappingRegistry + EOD + end + c1.dump + "\n" + c2.dump + format(<<-EOD) + + if $0 == __FILE__ + # Change listen port. + server = #{class_name}App.new('app', nil, '0.0.0.0', 10080) + trap(:INT) do + server.shutdown + end + server.start + end + EOD + end +end + + +end +end diff --git a/lib/wsdl/soap/wsdl2ruby.rb b/lib/wsdl/soap/wsdl2ruby.rb new file mode 100644 index 0000000..1e8a65c --- /dev/null +++ b/lib/wsdl/soap/wsdl2ruby.rb @@ -0,0 +1,180 @@ +# WSDL4R - WSDL to ruby mapping library. +# Copyright (C) 2002-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'logger' +require 'xsd/qname' +require 'wsdl/importer' +require 'wsdl/soap/classDefCreator' +require 'wsdl/soap/servantSkeltonCreator' +require 'wsdl/soap/driverCreator' +require 'wsdl/soap/clientSkeltonCreator' +require 'wsdl/soap/standaloneServerStubCreator' +require 'wsdl/soap/cgiStubCreator' + + +module WSDL +module SOAP + + +class WSDL2Ruby + attr_accessor :location + attr_reader :opt + attr_accessor :logger + attr_accessor :basedir + + def run + unless @location + raise RuntimeError, "WSDL location not given" + end + @wsdl = import(@location) + if @opt['classdef'] + @name = @opt['classdef'] + else + @name = @wsdl.name ? @wsdl.name.name : 'default' + end + create_file + end + +private + + def initialize + @location = nil + @opt = {} + @logger = Logger.new(STDERR) + @basedir = nil + @wsdl = nil + @name = nil + end + + def create_file + create_classdef if @opt.key?('classdef') + create_servant_skelton(@opt['servant_skelton']) if @opt.key?('servant_skelton') + create_cgi_stub(@opt['cgi_stub']) if @opt.key?('cgi_stub') + create_standalone_server_stub(@opt['standalone_server_stub']) if @opt.key?('standalone_server_stub') + create_driver(@opt['driver']) if @opt.key?('driver') + create_client_skelton(@opt['client_skelton']) if @opt.key?('client_skelton') + end + + def create_classdef + @logger.info { "Creating class definition." } + @classdef_filename = @name + '.rb' + check_file(@classdef_filename) or return + write_file(@classdef_filename) do |f| + f << WSDL::SOAP::ClassDefCreator.new(@wsdl).dump + end + end + + def create_client_skelton(servicename) + @logger.info { "Creating client skelton." } + servicename ||= @wsdl.services[0].name.name + @client_skelton_filename = servicename + 'Client.rb' + check_file(@client_skelton_filename) or return + write_file(@client_skelton_filename) do |f| + f << shbang << "\n" + f << "require '#{@driver_filename}'\n\n" if @driver_filename + f << WSDL::SOAP::ClientSkeltonCreator.new(@wsdl).dump( + create_name(servicename)) + end + end + + def create_servant_skelton(porttypename) + @logger.info { "Creating servant skelton." } + @servant_skelton_filename = (porttypename || @name + 'Servant') + '.rb' + check_file(@servant_skelton_filename) or return + write_file(@servant_skelton_filename) do |f| + f << "require '#{@classdef_filename}'\n\n" if @classdef_filename + f << WSDL::SOAP::ServantSkeltonCreator.new(@wsdl).dump( + create_name(porttypename)) + end + end + + def create_cgi_stub(servicename) + @logger.info { "Creating CGI stub." } + servicename ||= @wsdl.services[0].name.name + @cgi_stubFilename = servicename + '.cgi' + check_file(@cgi_stubFilename) or return + write_file(@cgi_stubFilename) do |f| + f << shbang << "\n" + if @servant_skelton_filename + f << "require '#{@servant_skelton_filename}'\n\n" + end + f << WSDL::SOAP::CGIStubCreator.new(@wsdl).dump(create_name(servicename)) + end + end + + def create_standalone_server_stub(servicename) + @logger.info { "Creating standalone stub." } + servicename ||= @wsdl.services[0].name.name + @standalone_server_stub_filename = servicename + '.rb' + check_file(@standalone_server_stub_filename) or return + write_file(@standalone_server_stub_filename) do |f| + f << shbang << "\n" + f << "require '#{@servant_skelton_filename}'\n\n" if @servant_skelton_filename + f << WSDL::SOAP::StandaloneServerStubCreator.new(@wsdl).dump( + create_name(servicename)) + end + end + + def create_driver(porttypename) + @logger.info { "Creating driver." } + @driver_filename = (porttypename || @name) + 'Driver.rb' + check_file(@driver_filename) or return + write_file(@driver_filename) do |f| + f << "require '#{@classdef_filename}'\n\n" if @classdef_filename + f << WSDL::SOAP::DriverCreator.new(@wsdl).dump( + create_name(porttypename)) + end + end + + def write_file(filename) + if @basedir + filename = File.join(basedir, filename) + end + File.open(filename, "w") do |f| + yield f + end + end + + def check_file(filename) + if @basedir + filename = File.join(basedir, filename) + end + if FileTest.exist?(filename) + if @opt.key?('force') + @logger.warn { + "File '#{filename}' exists but overrides it." + } + true + else + @logger.warn { + "File '#{filename}' exists. #{$0} did not override it." + } + false + end + else + @logger.info { "Creates file '#{filename}'." } + true + end + end + + def shbang + "#!/usr/bin/env ruby" + end + + def create_name(name) + name ? XSD::QName.new(@wsdl.targetnamespace, name) : nil + end + + def import(location) + WSDL::Importer.import(location) + end +end + + +end +end diff --git a/lib/wsdl/types.rb b/lib/wsdl/types.rb new file mode 100644 index 0000000..96ae5a4 --- /dev/null +++ b/lib/wsdl/types.rb @@ -0,0 +1,43 @@ +# WSDL4R - WSDL types definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL + + +class Types < Info + attr_reader :schemas + + def initialize + super + @schemas = [] + end + + def parse_element(element) + case element + when SchemaName + o = XMLSchema::Schema.new + @schemas << o + o + when DocumentationName + o = Documentation.new + o + else + nil + end + end + + def parse_attr(attr, value) + nil + end +end + + +end diff --git a/lib/wsdl/wsdl.rb b/lib/wsdl/wsdl.rb new file mode 100644 index 0000000..eb13c18 --- /dev/null +++ b/lib/wsdl/wsdl.rb @@ -0,0 +1,23 @@ +# WSDL4R - Base definitions. +# Copyright (C) 2000, 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' + + +module WSDL + + +Version = '0.0.2' + +Namespace = 'http://schemas.xmlsoap.org/wsdl/' +SOAPBindingNamespace ='http://schemas.xmlsoap.org/wsdl/soap/' + +class Error < StandardError; end + + +end diff --git a/lib/wsdl/xmlSchema/all.rb b/lib/wsdl/xmlSchema/all.rb new file mode 100644 index 0000000..69649e2 --- /dev/null +++ b/lib/wsdl/xmlSchema/all.rb @@ -0,0 +1,24 @@ +# WSDL4R - XMLSchema complexType definition for WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/xmlSchema/content' + + +module WSDL +module XMLSchema + + +class All < Content + def initialize + super() + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/annotation.rb b/lib/wsdl/xmlSchema/annotation.rb new file mode 100644 index 0000000..633bd19 --- /dev/null +++ b/lib/wsdl/xmlSchema/annotation.rb @@ -0,0 +1,34 @@ +# WSDL4R - WSDL SOAP documentation element. +# Copyright (C) 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Annotation < Info + def initialize + super + end + + def parse_element(element) + # Accepts any element. + self + end + + def parse_attr(attr, value) + # Accepts any attribute. + true + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/any.rb b/lib/wsdl/xmlSchema/any.rb new file mode 100644 index 0000000..72d25e8 --- /dev/null +++ b/lib/wsdl/xmlSchema/any.rb @@ -0,0 +1,56 @@ +# WSDL4R - XMLSchema any definition for WSDL. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Any < Info + attr_accessor :maxoccurs + attr_accessor :minoccurs + attr_accessor :namespace + attr_accessor :process_contents + + def initialize + super() + @maxoccurs = '1' + @minoccurs = '1' + @namespace = '##any' + @process_contents = 'strict' + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when MaxOccursAttrName + @maxoccurs = value.source + when MinOccursAttrName + @minoccurs = value.source + when NamespaceAttrName + @namespace = value.source + when ProcessContentsAttrName + @process_contents = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/attribute.rb b/lib/wsdl/xmlSchema/attribute.rb new file mode 100644 index 0000000..f904866 --- /dev/null +++ b/lib/wsdl/xmlSchema/attribute.rb @@ -0,0 +1,127 @@ +# WSDL4R - XMLSchema attribute definition for WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Attribute < Info + class << self + if RUBY_VERSION > "1.7.0" + def attr_reader_ref(symbol) + name = symbol.to_s + define_method(name) { + instance_variable_get("@#{name}") || + (refelement ? refelement.__send__(name) : nil) + } + end + else + def attr_reader_ref(symbol) + name = symbol.to_s + module_eval <<-EOS + def #{name} + @#{name} || (refelement ? refelement.#{name} : nil) + end + EOS + end + end + end + + attr_writer :use + attr_writer :form + attr_writer :name + attr_writer :type + attr_writer :local_simpletype + attr_writer :default + attr_writer :fixed + + attr_reader_ref :use + attr_reader_ref :form + attr_reader_ref :name + attr_reader_ref :type + attr_reader_ref :local_simpletype + attr_reader_ref :default + attr_reader_ref :fixed + + attr_accessor :ref + attr_accessor :arytype + + def initialize + super + @use = nil + @form = nil + @name = nil + @type = nil + @local_simpletype = nil + @default = nil + @fixed = nil + @ref = nil + @refelement = nil + @arytype = nil + end + + def refelement + @refelement ||= root.collect_attributes[@ref] + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + case element + when SimpleTypeName + @local_simpletype = SimpleType.new + @local_simpletype + end + end + + def parse_attr(attr, value) + case attr + when RefAttrName + @ref = value + when UseAttrName + @use = value.source + when FormAttrName + @form = value.source + when NameAttrName + if directelement? + @name = XSD::QName.new(targetnamespace, value.source) + else + @name = XSD::QName.new(nil, value.source) + end + when TypeAttrName + @type = value + when DefaultAttrName + @default = value.source + when FixedAttrName + @fixed = value.source + when ArrayTypeAttrName + @arytype = if value.namespace.nil? + XSD::QName.new(XSD::Namespace, value.source) + else + value + end + else + nil + end + end + +private + + def directelement? + parent.is_a?(Schema) + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/choice.rb b/lib/wsdl/xmlSchema/choice.rb new file mode 100644 index 0000000..371de30 --- /dev/null +++ b/lib/wsdl/xmlSchema/choice.rb @@ -0,0 +1,55 @@ +# WSDL4R - XMLSchema complexType definition for WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/xmlSchema/content' + + +module WSDL +module XMLSchema + + +class Choice < Content + attr_reader :any + + def initialize + super() + @any = nil + end + + def have_any? + !!@any + end + + def choice? + true + end + + def parse_element(element) + case element + when SequenceName + o = Sequence.new + @elements << o + o + when ChoiceName + o = Choice.new + @elements << o + o + when AnyName + raise ElementConstraintError.new("duplicated element: any") if @any + @any = Any.new + @elements << @any + @any + else + super(element) + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/complexContent.rb b/lib/wsdl/xmlSchema/complexContent.rb new file mode 100644 index 0000000..c923930 --- /dev/null +++ b/lib/wsdl/xmlSchema/complexContent.rb @@ -0,0 +1,81 @@ +# WSDL4R - XMLSchema complexContent definition for WSDL. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class ComplexContent < Info + attr_accessor :restriction + attr_accessor :extension + + def initialize + super + @restriction = nil + @extension = nil + end + + def targetnamespace + parent.targetnamespace + end + + def elementformdefault + parent.elementformdefault + end + + def content + @extension || @restriction + end + + def have_any? + content ? content.have_any? : nil + end + + def choice? + content ? content.choice? : nil + end + + def elements + content ? content.elements : XSD::NamedElements::Empty + end + + def attributes + content.attributes + end + + def check_type + if content + content.check_type + else + raise ArgumentError.new("incomplete complexContent") + end + end + + def parse_element(element) + case element + when RestrictionName + raise ArgumentError.new("incomplete complexContent") if content + @restriction = ComplexRestriction.new + when ExtensionName + raise ArgumentError.new("incomplete complexContent") if content + @extension = ComplexExtension.new + end + end + + def parse_attr(attr, value) + nil + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/complexExtension.rb b/lib/wsdl/xmlSchema/complexExtension.rb new file mode 100644 index 0000000..0abb49e --- /dev/null +++ b/lib/wsdl/xmlSchema/complexExtension.rb @@ -0,0 +1,99 @@ +# WSDL4R - XMLSchema complexType extension definition for WSDL. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class ComplexExtension < Info + attr_accessor :base + attr_reader :content + attr_reader :attributes + + def initialize + super + @base = nil + @basetype = nil + @content = nil + @attributes = XSD::NamedElements.new + end + + def targetnamespace + parent.targetnamespace + end + + def elementformdefault + parent.elementformdefault + end + + def have_any? + basetype.have_any? or (@content and @content.have_any?) + end + + def choice? + @content and @content.choice? + end + + def elements + result = XSD::NamedElements.new + result.concat(basetype.elements) + result.concat(@content.elements) if @content + result + end + + def check_type + if @base == ::SOAP::ValueArrayName + :TYPE_ARRAY + else + basetype.check_type + end + end + + def parse_element(element) + case element + when AllName + @content = All.new + @content + when SequenceName + @content = Sequence.new + @content + when ChoiceName + @content = Choice.new + @content + when AttributeName + o = Attribute.new + @attributes << o + o + end + end + + def parse_attr(attr, value) + case attr + when BaseAttrName + @base = value + end + end + +private + + def basetype + @basetype ||= root.collect_complextypes[@base] + unless @basetype + RuntimeError.new("base type definition not found: #{@base}") + end + @basetype + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/complexRestriction.rb b/lib/wsdl/xmlSchema/complexRestriction.rb new file mode 100644 index 0000000..42811cb --- /dev/null +++ b/lib/wsdl/xmlSchema/complexRestriction.rb @@ -0,0 +1,92 @@ +# WSDL4R - XMLSchema complexType restriction definition for WSDL. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class ComplexRestriction < Info + attr_accessor :base + attr_reader :content + attr_reader :attributes + + def initialize + super + @base = nil + @basetype = nil + @content = nil + @attributes = XSD::NamedElements.new + end + + def targetnamespace + parent.targetnamespace + end + + def elementformdefault + parent.elementformdefault + end + + def have_any? + @content and @content.have_any? + end + + def choice? + @content and @content.choice? + end + + def elements + @content ? @content.elements : XSD::NamedElements::Empty + end + + def check_type + if @base == ::SOAP::ValueArrayName + :TYPE_ARRAY + else + basetype.check_type + end + end + + def parse_element(element) + case element + when AllName + @content = All.new + @content + when SequenceName + @content = Sequence.new + @content + when ChoiceName + @content = Choice.new + @content + when AttributeName + o = Attribute.new + @attributes << o + o + end + end + + def parse_attr(attr, value) + case attr + when BaseAttrName + @base = value + end + end + +private + + def basetype + @basetype ||= root.collect_complextypes[@base] + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/complexType.rb b/lib/wsdl/xmlSchema/complexType.rb new file mode 100644 index 0000000..7b7a5bf --- /dev/null +++ b/lib/wsdl/xmlSchema/complexType.rb @@ -0,0 +1,148 @@ +# WSDL4R - XMLSchema complexType definition for WSDL. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/xmlSchema/element' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class ComplexType < Info + attr_accessor :name + attr_accessor :complexcontent + attr_accessor :simplecontent + attr_reader :content + attr_accessor :final + attr_accessor :mixed + + def initialize(name = nil) + super() + @name = name + @complexcontent = nil + @simplecontent = nil + @content = nil + @final = nil + @mixed = false + @attributes = XSD::NamedElements.new + end + + def targetnamespace + # inner elements can be qualified + # parent.is_a?(WSDL::XMLSchema::Element) ? nil : parent.targetnamespace + parent.targetnamespace + end + + def elementformdefault + parent.elementformdefault + end + + def have_any? + if c = @complexcontent || @content + c.have_any? + else + false + end + end + + def choice? + if c = @complexcontent || @content + c.choice? + else + false + end + end + + def elements + if c = @complexcontent || @content + c.elements + else + XSD::NamedElements::Empty + end + end + + def attributes + if @complexcontent + @complexcontent.attributes + elsif @simplecontent + @simplecontent.attributes + else + @attributes + end + end + + def find_element(name) + return nil if name.nil? + elements.each do |element| + return element if name == element.name + end + nil + end + + def find_element_by_name(name) + return nil if name.nil? + elements.each do |element| + return element if name == element.name.name + end + nil + end + + def sequence_elements=(elements) + @content = Sequence.new + elements.each do |element| + @content << element + end + end + + def all_elements=(elements) + @content = All.new + elements.each do |element| + @content << element + end + end + + def parse_element(element) + case element + when AllName + @content = All.new + when SequenceName + @content = Sequence.new + when ChoiceName + @content = Choice.new + when ComplexContentName + @complexcontent = ComplexContent.new + when SimpleContentName + @simplecontent = SimpleContent.new + when AttributeName + o = Attribute.new + @attributes << o + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when FinalAttrName + @final = value.source + when MixedAttrName + @mixed = (value.source == 'true') + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/content.rb b/lib/wsdl/xmlSchema/content.rb new file mode 100644 index 0000000..1df3ddf --- /dev/null +++ b/lib/wsdl/xmlSchema/content.rb @@ -0,0 +1,73 @@ +# WSDL4R - XMLSchema content base definition for WSDL. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Content < Info + attr_reader :minoccurs + attr_reader :maxoccurs + attr_reader :elements + + def initialize + super() + @minoccurs = '1' + @maxoccurs = '1' + @elements = XSD::NamedElements.new + end + + def targetnamespace + parent.targetnamespace + end + + def elementformdefault + parent.elementformdefault + end + + def have_any? + false + end + + def choice? + false + end + + def <<(element) + @elements << element + end + + def parse_element(element) + case element + when ElementName + o = Element.new + @elements << o + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when MaxOccursAttrName + @maxoccurs = value.source + when MinOccursAttrName + @minoccurs = value.source + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/data.rb b/lib/wsdl/xmlSchema/data.rb new file mode 100644 index 0000000..8f88b9c --- /dev/null +++ b/lib/wsdl/xmlSchema/data.rb @@ -0,0 +1,85 @@ +# WSDL4R - XMLSchema data definitions. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/datatypes' +require 'wsdl/xmlSchema/annotation' +require 'wsdl/xmlSchema/schema' +require 'wsdl/xmlSchema/import' +require 'wsdl/xmlSchema/include' +require 'wsdl/xmlSchema/simpleType' +require 'wsdl/xmlSchema/simpleRestriction' +require 'wsdl/xmlSchema/simpleExtension' +require 'wsdl/xmlSchema/complexType' +require 'wsdl/xmlSchema/complexContent' +require 'wsdl/xmlSchema/complexRestriction' +require 'wsdl/xmlSchema/complexExtension' +require 'wsdl/xmlSchema/simpleContent' +require 'wsdl/xmlSchema/any' +require 'wsdl/xmlSchema/element' +require 'wsdl/xmlSchema/all' +require 'wsdl/xmlSchema/choice' +require 'wsdl/xmlSchema/sequence' +require 'wsdl/xmlSchema/list' +require 'wsdl/xmlSchema/attribute' +require 'wsdl/xmlSchema/unique' +require 'wsdl/xmlSchema/enumeration' +require 'wsdl/xmlSchema/length' +require 'wsdl/xmlSchema/pattern' + +module WSDL +module XMLSchema + + +AllName = XSD::QName.new(XSD::Namespace, 'all') +AnnotationName = XSD::QName.new(XSD::Namespace, 'annotation') +AnyName = XSD::QName.new(XSD::Namespace, 'any') +AttributeName = XSD::QName.new(XSD::Namespace, 'attribute') +ChoiceName = XSD::QName.new(XSD::Namespace, 'choice') +ComplexContentName = XSD::QName.new(XSD::Namespace, 'complexContent') +ComplexTypeName = XSD::QName.new(XSD::Namespace, 'complexType') +ElementName = XSD::QName.new(XSD::Namespace, 'element') +EnumerationName = XSD::QName.new(XSD::Namespace, 'enumeration') +ExtensionName = XSD::QName.new(XSD::Namespace, 'extension') +ImportName = XSD::QName.new(XSD::Namespace, 'import') +IncludeName = XSD::QName.new(XSD::Namespace, 'include') +LengthName = XSD::QName.new(XSD::Namespace, 'length') +ListName = XSD::QName.new(XSD::Namespace, 'list') +PatternName = XSD::QName.new(XSD::Namespace, 'pattern') +RestrictionName = XSD::QName.new(XSD::Namespace, 'restriction') +SequenceName = XSD::QName.new(XSD::Namespace, 'sequence') +SchemaName = XSD::QName.new(XSD::Namespace, 'schema') +SimpleContentName = XSD::QName.new(XSD::Namespace, 'simpleContent') +SimpleTypeName = XSD::QName.new(XSD::Namespace, 'simpleType') +UniqueName = XSD::QName.new(XSD::Namespace, 'unique') + +AttributeFormDefaultAttrName = XSD::QName.new(nil, 'attributeFormDefault') +BaseAttrName = XSD::QName.new(nil, 'base') +DefaultAttrName = XSD::QName.new(nil, 'default') +ElementFormDefaultAttrName = XSD::QName.new(nil, 'elementFormDefault') +FinalAttrName = XSD::QName.new(nil, 'final') +FixedAttrName = XSD::QName.new(nil, 'fixed') +FormAttrName = XSD::QName.new(nil, 'form') +IdAttrName = XSD::QName.new(nil, 'id') +ItemTypeAttrName = XSD::QName.new(nil, 'itemType') +MaxOccursAttrName = XSD::QName.new(nil, 'maxOccurs') +MinOccursAttrName = XSD::QName.new(nil, 'minOccurs') +MixedAttrName = XSD::QName.new(nil, 'mixed') +NameAttrName = XSD::QName.new(nil, 'name') +NamespaceAttrName = XSD::QName.new(nil, 'namespace') +NillableAttrName = XSD::QName.new(nil, 'nillable') +ProcessContentsAttrName = XSD::QName.new(nil, 'processContents') +RefAttrName = XSD::QName.new(nil, 'ref') +SchemaLocationAttrName = XSD::QName.new(nil, 'schemaLocation') +TargetNamespaceAttrName = XSD::QName.new(nil, 'targetNamespace') +TypeAttrName = XSD::QName.new(nil, 'type') +UseAttrName = XSD::QName.new(nil, 'use') +ValueAttrName = XSD::QName.new(nil, 'value') + + +end +end diff --git a/lib/wsdl/xmlSchema/element.rb b/lib/wsdl/xmlSchema/element.rb new file mode 100644 index 0000000..ed44031 --- /dev/null +++ b/lib/wsdl/xmlSchema/element.rb @@ -0,0 +1,154 @@ +# WSDL4R - XMLSchema element definition for WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Element < Info + class << self + if RUBY_VERSION > "1.7.0" + def attr_reader_ref(symbol) + name = symbol.to_s + define_method(name) { + instance_variable_get("@#{name}") || + (refelement ? refelement.__send__(name) : nil) + } + end + else + def attr_reader_ref(symbol) + name = symbol.to_s + module_eval <<-EOS + def #{name} + @#{name} || (refelement ? refelement.#{name} : nil) + end + EOS + end + end + end + + attr_writer :name # required + attr_writer :form + attr_writer :type + attr_writer :local_simpletype + attr_writer :local_complextype + attr_writer :constraint + attr_writer :maxoccurs + attr_writer :minoccurs + attr_writer :nillable + + attr_reader_ref :name + attr_reader_ref :form + attr_reader_ref :type + attr_reader_ref :local_simpletype + attr_reader_ref :local_complextype + attr_reader_ref :constraint + attr_reader_ref :maxoccurs + attr_reader_ref :minoccurs + attr_reader_ref :nillable + + attr_accessor :ref + + def initialize(name = nil, type = nil) + super() + @name = name + @form = nil + @type = type + @local_simpletype = @local_complextype = nil + @constraint = nil + @maxoccurs = '1' + @minoccurs = '1' + @nillable = nil + @ref = nil + @refelement = nil + end + + def refelement + @refelement ||= (@ref ? root.collect_elements[@ref] : nil) + end + + def targetnamespace + parent.targetnamespace + end + + def elementformdefault + parent.elementformdefault + end + + def elementform + self.form.nil? ? parent.elementformdefault : self.form + end + + def parse_element(element) + case element + when SimpleTypeName + @local_simpletype = SimpleType.new + @local_simpletype + when ComplexTypeName + @type = nil + @local_complextype = ComplexType.new + @local_complextype + when UniqueName + @constraint = Unique.new + @constraint + else + nil + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + # namespace may be nil + if directelement? or elementform == 'qualified' + @name = XSD::QName.new(targetnamespace, value.source) + else + @name = XSD::QName.new(nil, value.source) + end + when FormAttrName + @form = value.source + when TypeAttrName + @type = value + when RefAttrName + @ref = value + when MaxOccursAttrName + if parent.is_a?(All) + if value.source != '1' + raise Parser::AttributeConstraintError.new( + "cannot parse #{value} for #{attr}") + end + end + @maxoccurs = value.source + when MinOccursAttrName + if parent.is_a?(All) + unless ['0', '1'].include?(value.source) + raise Parser::AttributeConstraintError.new( + "cannot parse #{value} for #{attr}") + end + end + @minoccurs = value.source + when NillableAttrName + @nillable = (value.source == 'true') + else + nil + end + end + +private + + def directelement? + parent.is_a?(Schema) + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/enumeration.rb b/lib/wsdl/xmlSchema/enumeration.rb new file mode 100644 index 0000000..5a16476 --- /dev/null +++ b/lib/wsdl/xmlSchema/enumeration.rb @@ -0,0 +1,36 @@ +# WSDL4R - XMLSchema enumeration definition for WSDL. +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Enumeration < Info + def initialize + super + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when ValueAttrName + parent.enumeration << value.source + value.source + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/import.rb b/lib/wsdl/xmlSchema/import.rb new file mode 100644 index 0000000..d3487af --- /dev/null +++ b/lib/wsdl/xmlSchema/import.rb @@ -0,0 +1,65 @@ +# WSDL4R - XMLSchema import definition. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/xmlSchema/importer' + + +module WSDL +module XMLSchema + + +class Import < Info + attr_reader :namespace + attr_reader :schemalocation + attr_reader :content + + def initialize + super + @namespace = nil + @schemalocation = nil + @content = nil + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when NamespaceAttrName + @namespace = value.source + when SchemaLocationAttrName + @schemalocation = URI.parse(value.source) + if @schemalocation.relative? and !parent.location.nil? and + !parent.location.relative? + @schemalocation = parent.location + @schemalocation + end + if root.importedschema.key?(@schemalocation) + @content = root.importedschema[@schemalocation] + else + root.importedschema[@schemalocation] = nil # placeholder + @content = import(@schemalocation) + root.importedschema[@schemalocation] = @content + end + @schemalocation + else + nil + end + end + +private + + def import(location) + Importer.import(location, root) + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/importer.rb b/lib/wsdl/xmlSchema/importer.rb new file mode 100644 index 0000000..f57bfd9 --- /dev/null +++ b/lib/wsdl/xmlSchema/importer.rb @@ -0,0 +1,87 @@ +# WSDL4R - XSD importer library. +# Copyright (C) 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'soap/httpconfigloader' +require 'wsdl/xmlSchema/parser' + + +module WSDL +module XMLSchema + + +class Importer + def self.import(location, originalroot = nil) + new.import(location, originalroot) + end + + def initialize + @web_client = nil + end + + def import(location, originalroot = nil) + unless location.is_a?(URI) + location = URI.parse(location) + end + content = parse(fetch(location), location, originalroot) + content.location = location + content + end + +private + + def parse(content, location, originalroot) + opt = { + :location => location, + :originalroot => originalroot + } + WSDL::XMLSchema::Parser.new(opt).parse(content) + end + + def fetch(location) + warn("importing: #{location}") if $DEBUG + content = nil + if location.scheme == 'file' or + (location.relative? and FileTest.exist?(location.path)) + content = File.open(location.path).read + elsif location.scheme and location.scheme.size == 1 and + FileTest.exist?(location.to_s) + # ToDo: remove this ugly workaround for a path with drive letter + # (D://foo/bar) + content = File.open(location.to_s).read + else + client = web_client.new(nil, "WSDL4R") + client.proxy = ::SOAP::Env::HTTP_PROXY + client.no_proxy = ::SOAP::Env::NO_PROXY + if opt = ::SOAP::Property.loadproperty(::SOAP::PropertyName) + ::SOAP::HTTPConfigLoader.set_options(client, + opt["client.protocol.http"]) + end + content = client.get_content(location) + end + content + end + + def web_client + @web_client ||= begin + require 'http-access2' + if HTTPAccess2::VERSION < "2.0" + raise LoadError.new("http-access/2.0 or later is required.") + end + HTTPAccess2::Client + rescue LoadError + warn("Loading http-access2 failed. Net/http is used.") if $DEBUG + require 'soap/netHttpClient' + ::SOAP::NetHttpClient + end + @web_client + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/include.rb b/lib/wsdl/xmlSchema/include.rb new file mode 100644 index 0000000..af1ef94 --- /dev/null +++ b/lib/wsdl/xmlSchema/include.rb @@ -0,0 +1,54 @@ +# WSDL4R - XMLSchema include definition. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'wsdl/xmlSchema/importer' + + +module WSDL +module XMLSchema + + +class Include < Info + attr_reader :schemalocation + attr_reader :content + + def initialize + super + @schemalocation = nil + @content = nil + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when SchemaLocationAttrName + @schemalocation = URI.parse(value.source) + if @schemalocation.relative? + @schemalocation = parent.location + @schemalocation + end + @content = import(@schemalocation) + @schemalocation + else + nil + end + end + +private + + def import(location) + Importer.import(location) + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/length.rb b/lib/wsdl/xmlSchema/length.rb new file mode 100644 index 0000000..7f61602 --- /dev/null +++ b/lib/wsdl/xmlSchema/length.rb @@ -0,0 +1,35 @@ +# WSDL4R - XMLSchema length definition for WSDL. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Length < Info + def initialize + super + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when ValueAttrName + value.source + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/list.rb b/lib/wsdl/xmlSchema/list.rb new file mode 100644 index 0000000..555b7fc --- /dev/null +++ b/lib/wsdl/xmlSchema/list.rb @@ -0,0 +1,48 @@ +# WSDL4R - XMLSchema list definition for WSDL. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class List < Info + attr_reader :itemtype + attr_reader :local_simpletype + + def initialize + super() + @itemtype = nil + @local_simpletype = nil + end + + def parse_element(element) + case element + when SimpleTypeName + @local_simpletype = SimpleType.new + @local_simpletype + else + nil + end + end + + def parse_attr(attr, value) + case attr + when ItemTypeAttrName + @itemtype = value + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/parser.rb b/lib/wsdl/xmlSchema/parser.rb new file mode 100644 index 0000000..82f12ac --- /dev/null +++ b/lib/wsdl/xmlSchema/parser.rb @@ -0,0 +1,166 @@ +# WSDL4R - WSDL XML Instance parser library. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'xsd/ns' +require 'xsd/charset' +require 'xsd/datatypes' +require 'xsd/xmlparser' +require 'wsdl/xmlSchema/data' + + +module WSDL +module XMLSchema + + +class Parser + include XSD + + class ParseError < Error; end + class FormatDecodeError < ParseError; end + class UnknownElementError < FormatDecodeError; end + class UnknownAttributeError < FormatDecodeError; end + class UnexpectedElementError < FormatDecodeError; end + class ElementConstraintError < FormatDecodeError; end + class AttributeConstraintError < FormatDecodeError; end + +private + + class ParseFrame + attr_reader :ns + attr_reader :name + attr_accessor :node + + private + + def initialize(ns, name, node) + @ns = ns + @name = name + @node = node + end + end + +public + + def initialize(opt = {}) + @parser = XSD::XMLParser.create_parser(self, opt) + @parsestack = nil + @lastnode = nil + @ignored = {} + @location = opt[:location] + @originalroot = opt[:originalroot] + end + + def parse(string_or_readable) + @parsestack = [] + @lastnode = nil + @textbuf = '' + @parser.do_parse(string_or_readable) + @lastnode + end + + def charset + @parser.charset + end + + def start_element(name, attrs) + lastframe = @parsestack.last + ns = parent = nil + if lastframe + ns = lastframe.ns.clone_ns + parent = lastframe.node + else + ns = XSD::NS.new + parent = nil + end + attrs = XSD::XMLParser.filter_ns(ns, attrs) + node = decode_tag(ns, name, attrs, parent) + @parsestack << ParseFrame.new(ns, name, node) + end + + def characters(text) + lastframe = @parsestack.last + if lastframe + # Need not to be cloned because character does not have attr. + ns = lastframe.ns + decode_text(ns, text) + else + p text if $DEBUG + end + end + + def end_element(name) + lastframe = @parsestack.pop + unless name == lastframe.name + raise UnexpectedElementError.new("closing element name '#{name}' does not match with opening element '#{lastframe.name}'") + end + decode_tag_end(lastframe.ns, lastframe.node) + @lastnode = lastframe.node + end + +private + + def decode_tag(ns, name, attrs, parent) + o = nil + elename = ns.parse(name) + if !parent + if elename == SchemaName + o = Schema.parse_element(elename) + o.location = @location + else + raise UnknownElementError.new("unknown element: #{elename}") + end + o.root = @originalroot if @originalroot # o.root = o otherwise + else + if elename == AnnotationName + # only the first annotation element is allowed for each element. + o = Annotation.new + else + o = parent.parse_element(elename) + end + if o.nil? + unless @ignored.key?(elename) + warn("ignored element: #{elename} of #{parent.class}") + @ignored[elename] = elename + end + o = Documentation.new # which accepts any element. + end + # node could be a pseudo element. pseudo element has its own parent. + o.root = parent.root + o.parent = parent if o.parent.nil? + end + attrs.each do |key, value| + attr_ele = ns.parse(key, true) + value_ele = ns.parse(value, true) + value_ele.source = value # for recovery; value may not be a QName + if attr_ele == IdAttrName + o.id = value_ele + else + if o.parse_attr(attr_ele, value_ele).nil? + unless @ignored.key?(attr_ele) + warn("ignored attr: #{attr_ele}") + @ignored[attr_ele] = attr_ele + end + end + end + end + o + end + + def decode_tag_end(ns, node) + node.parse_epilogue + end + + def decode_text(ns, text) + @textbuf << text + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/pattern.rb b/lib/wsdl/xmlSchema/pattern.rb new file mode 100644 index 0000000..f826be4 --- /dev/null +++ b/lib/wsdl/xmlSchema/pattern.rb @@ -0,0 +1,36 @@ +# WSDL4R - XMLSchema pattern definition for WSDL. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Pattern < Info + def initialize + super + end + + def parse_element(element) + nil + end + + def parse_attr(attr, value) + case attr + when ValueAttrName + parent.pattern = /\A#{value.source}\z/n + value.source + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/schema.rb b/lib/wsdl/xmlSchema/schema.rb new file mode 100644 index 0000000..ec97d07 --- /dev/null +++ b/lib/wsdl/xmlSchema/schema.rb @@ -0,0 +1,143 @@ +# WSDL4R - XMLSchema schema definition for WSDL. +# Copyright (C) 2002, 2003-2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class Schema < Info + attr_reader :targetnamespace # required + attr_reader :complextypes + attr_reader :simpletypes + attr_reader :elements + attr_reader :attributes + attr_reader :imports + attr_accessor :attributeformdefault + attr_accessor :elementformdefault + + attr_reader :importedschema + + def initialize + super + @targetnamespace = nil + @complextypes = XSD::NamedElements.new + @simpletypes = XSD::NamedElements.new + @elements = XSD::NamedElements.new + @attributes = XSD::NamedElements.new + @imports = [] + @attributeformdefault = "unqualified" + @elementformdefault = "unqualified" + @importedschema = {} + @location = nil + @root = self + end + + def location + @location || (root.nil? ? nil : root.location) + end + + def location=(location) + @location = location + end + + def parse_element(element) + case element + when ImportName + o = Import.new + @imports << o + o + when IncludeName + o = Include.new + @imports << o + o + when ComplexTypeName + o = ComplexType.new + @complextypes << o + o + when SimpleTypeName + o = SimpleType.new + @simpletypes << o + o + when ElementName + o = Element.new + @elements << o + o + when AttributeName + o = Attribute.new + @attributes << o + o + else + nil + end + end + + def parse_attr(attr, value) + case attr + when TargetNamespaceAttrName + @targetnamespace = value.source + when AttributeFormDefaultAttrName + @attributeformdefault = value.source + when ElementFormDefaultAttrName + @elementformdefault = value.source + else + nil + end + end + + def collect_attributes + result = XSD::NamedElements.new + result.concat(@attributes) + @imports.each do |import| + result.concat(import.content.collect_attributes) if import.content + end + result + end + + def collect_elements + result = XSD::NamedElements.new + result.concat(@elements) + @imports.each do |import| + result.concat(import.content.collect_elements) if import.content + end + result + end + + def collect_complextypes + result = XSD::NamedElements.new + result.concat(@complextypes) + @imports.each do |import| + result.concat(import.content.collect_complextypes) if import.content + end + result + end + + def collect_simpletypes + result = XSD::NamedElements.new + result.concat(@simpletypes) + @imports.each do |import| + result.concat(import.content.collect_simpletypes) if import.content + end + result + end + + def self.parse_element(element) + if element == SchemaName + Schema.new + else + nil + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/sequence.rb b/lib/wsdl/xmlSchema/sequence.rb new file mode 100644 index 0000000..1cfd0ed --- /dev/null +++ b/lib/wsdl/xmlSchema/sequence.rb @@ -0,0 +1,51 @@ +# WSDL4R - XMLSchema complexType definition for WSDL. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/xmlSchema/content' + + +module WSDL +module XMLSchema + + +class Sequence < Content + attr_reader :any + + def initialize + super() + @any = nil + end + + def have_any? + !!@any + end + + def parse_element(element) + case element + when SequenceName + o = Sequence.new + @elements << o + o + when ChoiceName + o = Choice.new + @elements << o + o + when AnyName + raise ElementConstraintError.new("duplicated element: any") if @any + @any = Any.new + @elements << @any + @any + else + super(element) + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/simpleContent.rb b/lib/wsdl/xmlSchema/simpleContent.rb new file mode 100644 index 0000000..d26bffa --- /dev/null +++ b/lib/wsdl/xmlSchema/simpleContent.rb @@ -0,0 +1,69 @@ +# WSDL4R - XMLSchema simpleContent definition for WSDL. +# Copyright (C) 2004, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class SimpleContent < Info + attr_reader :restriction + attr_reader :extension + + def check_lexical_format(value) + check(value) + end + + def initialize + super + @restriction = nil + @extension = nil + end + + def base + content.base + end + + def attributes + content.attributes + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + case element + when RestrictionName + @restriction = SimpleRestriction.new + @restriction + when ExtensionName + @extension = SimpleExtension.new + @extension + end + end + +private + + def content + @restriction || @extension + end + + def check(value) + unless content.valid?(value) + raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'") + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/simpleExtension.rb b/lib/wsdl/xmlSchema/simpleExtension.rb new file mode 100644 index 0000000..3c53a73 --- /dev/null +++ b/lib/wsdl/xmlSchema/simpleExtension.rb @@ -0,0 +1,54 @@ +# WSDL4R - XMLSchema simpleType extension definition for WSDL. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class SimpleExtension < Info + attr_reader :base + attr_reader :attributes + + def initialize + super + @base = nil + @attributes = XSD::NamedElements.new + end + + def targetnamespace + parent.targetnamespace + end + + def valid?(value) + true + end + + def parse_element(element) + case element + when AttributeName + o = Attribute.new + @attributes << o + o + end + end + + def parse_attr(attr, value) + case attr + when BaseAttrName + @base = value + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/simpleRestriction.rb b/lib/wsdl/xmlSchema/simpleRestriction.rb new file mode 100644 index 0000000..e8bf3eb --- /dev/null +++ b/lib/wsdl/xmlSchema/simpleRestriction.rb @@ -0,0 +1,73 @@ +# WSDL4R - XMLSchema simpleContent restriction definition for WSDL. +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class SimpleRestriction < Info + attr_reader :base + attr_reader :enumeration + attr_accessor :length + attr_accessor :pattern + + def initialize + super + @base = nil + @enumeration = [] # NamedElements? + @length = nil + @pattern = nil + end + + def valid?(value) + return false unless check_restriction(value) + return false unless check_length(value) + return false unless check_pattern(value) + true + end + + def parse_element(element) + case element + when EnumerationName + Enumeration.new # just a parsing handler + when LengthName + Length.new # just a parsing handler + when PatternName + Pattern.new # just a parsing handler + end + end + + def parse_attr(attr, value) + case attr + when BaseAttrName + @base = value + end + end + +private + + def check_restriction(value) + @enumeration.empty? or @enumeration.include?(value) + end + + def check_length(value) + @length.nil? or value.size == @length + end + + def check_pattern(value) + @pattern.nil? or @pattern =~ value + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/simpleType.rb b/lib/wsdl/xmlSchema/simpleType.rb new file mode 100644 index 0000000..69d8c55 --- /dev/null +++ b/lib/wsdl/xmlSchema/simpleType.rb @@ -0,0 +1,80 @@ +# WSDL4R - XMLSchema simpleType definition for WSDL. +# Copyright (C) 2004, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' +require 'xsd/namedelements' + + +module WSDL +module XMLSchema + + +class SimpleType < Info + attr_accessor :name + attr_reader :restriction + attr_reader :list + + def check_lexical_format(value) + if @restriction + check_restriction(value) + elsif @list + # TODO: check + else + raise ArgumentError.new("incomplete simpleType") + end + end + + def base + if @restriction + @restriction.base + else + nil + end + end + + def initialize(name = nil) + super() + @name = name + @restriction = nil + @list = nil + end + + def targetnamespace + parent.targetnamespace + end + + def parse_element(element) + case element + when RestrictionName + @restriction = SimpleRestriction.new + @restriction + when ListName + @list = List.new + @list + end + end + + def parse_attr(attr, value) + case attr + when NameAttrName + @name = XSD::QName.new(targetnamespace, value.source) + end + end + +private + + def check_restriction(value) + unless @restriction.valid?(value) + raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'") + end + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/unique.rb b/lib/wsdl/xmlSchema/unique.rb new file mode 100644 index 0000000..837ff22 --- /dev/null +++ b/lib/wsdl/xmlSchema/unique.rb @@ -0,0 +1,34 @@ +# WSDL4R - XMLSchema unique element. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'wsdl/info' + + +module WSDL +module XMLSchema + + +class Unique < Info + def initialize + super + end + + def parse_element(element) + # Accepts any element. + self + end + + def parse_attr(attr, value) + # Accepts any attribute. + true + end +end + + +end +end diff --git a/lib/wsdl/xmlSchema/xsd2ruby.rb b/lib/wsdl/xmlSchema/xsd2ruby.rb new file mode 100644 index 0000000..afe5fc5 --- /dev/null +++ b/lib/wsdl/xmlSchema/xsd2ruby.rb @@ -0,0 +1,107 @@ +# XSD4R - XSD to ruby mapping library. +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' +require 'wsdl/xmlSchema/importer' +require 'wsdl/soap/classDefCreator' + + +module WSDL +module XMLSchema + + +class XSD2Ruby + attr_accessor :location + attr_reader :opt + attr_accessor :logger + attr_accessor :basedir + + def run + unless @location + raise RuntimeError, "XML Schema location not given" + end + @xsd = import(@location) + @name = create_classname(@xsd) + create_file + end + +private + + def initialize + @location = nil + @opt = {} + @logger = Logger.new(STDERR) + @basedir = nil + @xsd = nil + @name = nil + end + + def create_file + create_classdef + end + + def create_classdef + @logger.info { "Creating class definition." } + @classdef_filename = @name + '.rb' + check_file(@classdef_filename) or return + write_file(@classdef_filename) do |f| + f << WSDL::SOAP::ClassDefCreator.new(@xsd).dump + end + end + + def write_file(filename) + if @basedir + filename = File.join(basedir, filename) + end + File.open(filename, "w") do |f| + yield f + end + end + + def check_file(filename) + if @basedir + filename = File.join(basedir, filename) + end + if FileTest.exist?(filename) + if @opt.key?('force') + @logger.warn { + "File '#{filename}' exists but overrides it." + } + true + else + @logger.warn { + "File '#{filename}' exists. #{$0} did not override it." + } + false + end + else + @logger.info { "Creates file '#{filename}'." } + true + end + end + + def create_classname(xsd) + name = nil + if xsd.targetnamespace + name = xsd.targetnamespace.scan(/[a-zA-Z0-9]+$/)[0] + end + if name.nil? + 'default' + else + XSD::CodeGen::GenSupport.safevarname(name) + end + end + + def import(location) + WSDL::XMLSchema::Importer.import(location) + end +end + + +end +end diff --git a/lib/xsd/charset.rb b/lib/xsd/charset.rb new file mode 100644 index 0000000..9dd776a --- /dev/null +++ b/lib/xsd/charset.rb @@ -0,0 +1,187 @@ +# XSD4R - Charset handling library. +# Copyright (C) 2001, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module XSD + + +module Charset + @internal_encoding = $KCODE + + class XSDError < StandardError; end + class CharsetError < XSDError; end + class UnknownCharsetError < CharsetError; end + class CharsetConversionError < CharsetError; end + +public + + ### + ## Maps + # + EncodingConvertMap = {} + def Charset.init + EncodingConvertMap[['UTF8', 'X_ISO_8859_1']] = + Proc.new { |str| str.unpack('U*').pack('C*') } + EncodingConvertMap[['X_ISO_8859_1', 'UTF8']] = + Proc.new { |str| str.unpack('C*').pack('U*') } + begin + require 'xsd/iconvcharset' + @internal_encoding = 'UTF8' + sjtag = (/(mswin|bccwin|mingw|cygwin|emx)/ =~ RUBY_PLATFORM) ? 'cp932' : + 'shift_jis' + EncodingConvertMap[['UTF8', 'EUC' ]] = + Proc.new { |str| IconvCharset.safe_iconv("euc-jp", "utf-8", str) } + EncodingConvertMap[['EUC' , 'UTF8']] = + Proc.new { |str| IconvCharset.safe_iconv("utf-8", "euc-jp", str) } + EncodingConvertMap[['EUC' , 'SJIS']] = + Proc.new { |str| IconvCharset.safe_iconv(sjtag, "euc-jp", str) } + EncodingConvertMap[['UTF8', 'SJIS']] = + Proc.new { |str| IconvCharset.safe_iconv(sjtag, "utf-8", str) } + EncodingConvertMap[['SJIS', 'UTF8']] = + Proc.new { |str| IconvCharset.safe_iconv("utf-8", sjtag, str) } + EncodingConvertMap[['SJIS', 'EUC' ]] = + Proc.new { |str| IconvCharset.safe_iconv("euc-jp", sjtag, str) } + rescue LoadError + begin + require 'nkf' + EncodingConvertMap[['EUC' , 'SJIS']] = + Proc.new { |str| NKF.nkf('-sXm0', str) } + EncodingConvertMap[['SJIS', 'EUC' ]] = + Proc.new { |str| NKF.nkf('-eXm0', str) } + rescue LoadError + end + + begin + require 'uconv' + @internal_encoding = 'UTF8' + EncodingConvertMap[['UTF8', 'EUC' ]] = Uconv.method(:u8toeuc) + EncodingConvertMap[['UTF8', 'SJIS']] = Uconv.method(:u8tosjis) + EncodingConvertMap[['EUC' , 'UTF8']] = Uconv.method(:euctou8) + EncodingConvertMap[['SJIS', 'UTF8']] = Uconv.method(:sjistou8) + rescue LoadError + end + end + end + self.init + + CharsetMap = { + 'NONE' => 'us-ascii', + 'EUC' => 'euc-jp', + 'SJIS' => 'shift_jis', + 'UTF8' => 'utf-8', + 'X_ISO_8859_1' => 'iso-8859-1', + 'X_UNKNOWN' => nil, + } + + + ### + ## handlers + # + def Charset.encoding + @internal_encoding + end + + def Charset.encoding=(encoding) + warn("xsd charset is set to #{encoding}") if $DEBUG + @internal_encoding = encoding + end + + def Charset.xml_encoding_label + charset_label(@internal_encoding) + end + + def Charset.encoding_to_xml(str, charset) + encoding_conv(str, @internal_encoding, charset_str(charset)) + end + + def Charset.encoding_from_xml(str, charset) + encoding_conv(str, charset_str(charset), @internal_encoding) + end + + def Charset.encoding_conv(str, enc_from, enc_to) + if enc_from == enc_to or enc_from == 'NONE' or enc_to == 'NONE' + str + elsif converter = EncodingConvertMap[[enc_from, enc_to]] + converter.call(str) + else + raise CharsetConversionError.new( + "Converter not found: #{enc_from} -> #{enc_to}") + end + end + + def Charset.charset_label(encoding) + CharsetMap[encoding.upcase] + end + + def Charset.charset_str(label) + if CharsetMap.respond_to?(:key) + CharsetMap.key(label.downcase) || 'X_UNKNOWN' + else + CharsetMap.index(label.downcase) || 'X_UNKNOWN' + end + end + + # us_ascii = '[\x00-\x7F]' + us_ascii = '[\x9\xa\xd\x20-\x7F]' # XML 1.0 restricted. + USASCIIRegexp = Regexp.new("\\A#{us_ascii}*\\z", nil, "NONE") + + twobytes_euc = '(?:[\x8E\xA1-\xFE][\xA1-\xFE])' + threebytes_euc = '(?:\x8F[\xA1-\xFE][\xA1-\xFE])' + character_euc = "(?:#{us_ascii}|#{twobytes_euc}|#{threebytes_euc})" + EUCRegexp = Regexp.new("\\A#{character_euc}*\\z", nil, "NONE") + + # onebyte_sjis = '[\x00-\x7F\xA1-\xDF]' + onebyte_sjis = '[\x9\xa\xd\x20-\x7F\xA1-\xDF]' # XML 1.0 restricted. + twobytes_sjis = '(?:[\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC])' + character_sjis = "(?:#{onebyte_sjis}|#{twobytes_sjis})" + SJISRegexp = Regexp.new("\\A#{character_sjis}*\\z", nil, "NONE") + + # 0xxxxxxx + # 110yyyyy 10xxxxxx + twobytes_utf8 = '(?:[\xC0-\xDF][\x80-\xBF])' + # 1110zzzz 10yyyyyy 10xxxxxx + threebytes_utf8 = '(?:[\xE0-\xEF][\x80-\xBF][\x80-\xBF])' + # 11110uuu 10uuuzzz 10yyyyyy 10xxxxxx + fourbytes_utf8 = '(?:[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])' + character_utf8 = + "(?:#{us_ascii}|#{twobytes_utf8}|#{threebytes_utf8}|#{fourbytes_utf8})" + UTF8Regexp = Regexp.new("\\A#{character_utf8}*\\z", nil, "NONE") + + def Charset.is_us_ascii(str) + USASCIIRegexp =~ str + end + + def Charset.is_utf8(str) + UTF8Regexp =~ str + end + + def Charset.is_euc(str) + EUCRegexp =~ str + end + + def Charset.is_sjis(str) + SJISRegexp =~ str + end + + def Charset.is_ces(str, code = $KCODE) + case code + when 'NONE' + is_us_ascii(str) + when 'UTF8' + is_utf8(str) + when 'EUC' + is_euc(str) + when 'SJIS' + is_sjis(str) + else + raise UnknownCharsetError.new("Unknown charset: #{code}") + end + end +end + + +end diff --git a/lib/xsd/codegen.rb b/lib/xsd/codegen.rb new file mode 100644 index 0000000..d820ebf --- /dev/null +++ b/lib/xsd/codegen.rb @@ -0,0 +1,12 @@ +# XSD4R - Generating code library +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' +require 'xsd/codegen/moduledef' +require 'xsd/codegen/classdef' +require 'xsd/codegen/methoddef' diff --git a/lib/xsd/codegen/classdef.rb b/lib/xsd/codegen/classdef.rb new file mode 100644 index 0000000..9eb1ce6 --- /dev/null +++ b/lib/xsd/codegen/classdef.rb @@ -0,0 +1,203 @@ +# XSD4R - Generating class definition code +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' +require 'xsd/codegen/moduledef' +require 'xsd/codegen/methoddef' + + +module XSD +module CodeGen + + +class ClassDef < ModuleDef + include GenSupport + + def initialize(name, baseclass = nil) + super(name) + @baseclass = baseclass + @classvar = [] + @attrdef = [] + end + + def def_classvar(var, value) + var = var.sub(/\A@@/, "") + unless safevarname?(var) + raise ArgumentError.new("#{var} seems to be unsafe") + end + @classvar << [var, value] + end + + def def_attr(attrname, writable = true, varname = nil) + unless safevarname?(varname || attrname) + raise ArgumentError.new("#{varname || attrname} seems to be unsafe") + end + @attrdef << [attrname, writable, varname] + end + + def dump + buf = "" + unless @requirepath.empty? + buf << dump_requirepath + end + buf << dump_emptyline unless buf.empty? + package = @name.split(/::/)[0..-2] + buf << dump_package_def(package) unless package.empty? + buf << dump_comment if @comment + buf << dump_class_def + spacer = false + unless @classvar.empty? + spacer = true + buf << dump_classvar + end + unless @const.empty? + buf << dump_emptyline if spacer + spacer = true + buf << dump_const + end + unless @code.empty? + buf << dump_emptyline if spacer + spacer = true + buf << dump_code + end + unless @attrdef.empty? + buf << dump_emptyline if spacer + spacer = true + buf << dump_attributes + end + unless @methoddef.empty? + buf << dump_emptyline if spacer + spacer = true + buf << dump_methods + end + buf << dump_class_def_end + buf << dump_package_def_end(package) unless package.empty? + buf.gsub(/^\s+$/, '') + end + +private + + def dump_class_def + name = @name.to_s.split(/::/) + if @baseclass + format("class #{name.last} < #{@baseclass}") + else + format("class #{name.last}") + end + end + + def dump_class_def_end + str = format("end") + end + + def dump_classvar + dump_static( + @classvar.collect { |var, value| + %Q(@@#{var.sub(/^@@/, "")} = #{dump_value(value)}) + }.join("\n") + ) + end + + def dump_attributes + str = "" + @attrdef.each do |attrname, writable, varname| + varname ||= attrname + if attrname == varname + str << format(dump_accessor(attrname, writable), 2) + end + end + @attrdef.each do |attrname, writable, varname| + varname ||= attrname + if attrname != varname + str << "\n" unless str.empty? + str << format(dump_attribute(attrname, writable, varname), 2) + end + end + str + end + + def dump_accessor(attrname, writable) + if writable + "attr_accessor :#{attrname}" + else + "attr_reader :#{attrname}" + end + end + + def dump_attribute(attrname, writable, varname) + str = nil + mr = MethodDef.new(attrname) + mr.definition = "@#{varname}" + str = mr.dump + if writable + mw = MethodDef.new(attrname + "=", 'value') + mw.definition = "@#{varname} = value" + str << "\n" + mw.dump + end + str + end +end + + +end +end + + +if __FILE__ == $0 + require 'xsd/codegen/classdef' + include XSD::CodeGen + c = ClassDef.new("Foo::Bar::HobbitName", String) + c.def_require("foo/bar") + c.comment = <<-EOD + foo + bar + baz + EOD + c.def_const("FOO", 1) + c.def_classvar("@@foo", "var".dump) + c.def_classvar("baz", "1".dump) + c.def_attr("Foo", true, "foo") + c.def_attr("bar") + c.def_attr("baz", true) + c.def_attr("Foo2", true, "foo2") + c.def_attr("foo3", false, "foo3") + c.def_method("foo") do + <<-EOD + foo.bar = 1 +\tbaz.each do |ele| +\t ele + end + EOD + end + c.def_method("baz", "qux") do + <<-EOD + [1, 2, 3].each do |i| + p i + end + EOD + end + + m = MethodDef.new("qux", "quxx", "quxxx") do + <<-EOD + p quxx + quxxx + EOD + end + m.comment = "hello world\n123" + c.add_method(m) + c.def_code <<-EOD + Foo.new + Bar.z + EOD + c.def_code <<-EOD + Foo.new + Bar.z + EOD + c.def_privatemethod("foo", "baz", "*arg", "&block") + + puts c.dump +end diff --git a/lib/xsd/codegen/commentdef.rb b/lib/xsd/codegen/commentdef.rb new file mode 100644 index 0000000..c9493a1 --- /dev/null +++ b/lib/xsd/codegen/commentdef.rb @@ -0,0 +1,34 @@ +# XSD4R - Generating comment definition code +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' + + +module XSD +module CodeGen + + +module CommentDef + include GenSupport + + attr_accessor :comment + +private + + def dump_comment + if /\A#/ =~ @comment + format(@comment) + else + format(@comment).gsub(/^/, '# ') + end + end +end + + +end +end diff --git a/lib/xsd/codegen/gensupport.rb b/lib/xsd/codegen/gensupport.rb new file mode 100644 index 0000000..1e85d36 --- /dev/null +++ b/lib/xsd/codegen/gensupport.rb @@ -0,0 +1,166 @@ +# XSD4R - Code generation support +# Copyright (C) 2004, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module XSD +module CodeGen + +# from the file 'keywords' in 1.9. +KEYWORD = {} +%w( +__LINE__ +__FILE__ +BEGIN +END +alias +and +begin +break +case +class +def +defined? +do +else +elsif +end +ensure +false +for +if +in +module +next +nil +not +or +redo +rescue +retry +return +self +super +then +true +undef +unless +until +when +while +yield +).each { |k| KEYWORD[k] = nil } + +module GenSupport + def capitalize(target) + target.sub(/^([a-z])/) { $1.tr!('[a-z]', '[A-Z]') } + end + module_function :capitalize + + def uncapitalize(target) + target.sub(/^([A-Z])/) { $1.tr!('[A-Z]', '[a-z]') } + end + module_function :uncapitalize + + def safeconstname(name) + safename = name.scan(/[a-zA-Z0-9_]+/).collect { |ele| + GenSupport.capitalize(ele) + }.join + if /^[A-Z]/ !~ safename or keyword?(safename) + safename = "C_#{safename}" + end + safename + end + module_function :safeconstname + + def safeconstname?(name) + /\A[A-Z][a-zA-Z0-9_]*\z/ =~ name and !keyword?(name) + end + module_function :safeconstname? + + def safemethodname(name) + safename = name.scan(/[a-zA-Z0-9_]+/).join('_') + safename = uncapitalize(safename) + if /^[a-z]/ !~ safename + safename = "m_#{safename}" + end + safename + end + module_function :safemethodname + + def safemethodname?(name) + /\A[a-zA-Z_][a-zA-Z0-9_]*[=!?]?\z/ =~ name + end + module_function :safemethodname? + + def safevarname(name) + safename = uncapitalize(name.scan(/[a-zA-Z0-9_]+/).join('_')) + if /^[a-z]/ !~ safename or keyword?(safename) + "v_#{safename}" + else + safename + end + end + module_function :safevarname + + def safevarname?(name) + /\A[a-z_][a-zA-Z0-9_]*\z/ =~ name and !keyword?(name) + end + module_function :safevarname? + + def keyword?(word) + KEYWORD.key?(word) + end + module_function :keyword? + + def format(str, indent = nil) + str = trim_eol(str) + str = trim_indent(str) + if indent + str.gsub(/^/, " " * indent) + else + str + end + end + +private + + def trim_eol(str) + str.collect { |line| + line.sub(/\r?\n\z/, "") + "\n" + }.join + end + + def trim_indent(str) + indent = nil + str = str.collect { |line| untab(line) }.join + str.each do |line| + head = line.index(/\S/) + if !head.nil? and (indent.nil? or head < indent) + indent = head + end + end + return str unless indent + str.collect { |line| + line.sub(/^ {0,#{indent}}/, "") + }.join + end + + def untab(line, ts = 8) + while pos = line.index(/\t/) + line = line.sub(/\t/, " " * (ts - (pos % ts))) + end + line + end + + def dump_emptyline + "\n" + end +end + + +end +end diff --git a/lib/xsd/codegen/methoddef.rb b/lib/xsd/codegen/methoddef.rb new file mode 100644 index 0000000..15892fc --- /dev/null +++ b/lib/xsd/codegen/methoddef.rb @@ -0,0 +1,63 @@ +# XSD4R - Generating method definition code +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' +require 'xsd/codegen/commentdef' + + +module XSD +module CodeGen + + +class MethodDef + include GenSupport + include CommentDef + + attr_accessor :definition + + def initialize(name, *params) + unless safemethodname?(name) + raise ArgumentError.new("name '#{name}' seems to be unsafe") + end + @name = name + @params = params + @comment = nil + @definition = yield if block_given? + end + + def dump + buf = "" + buf << dump_comment if @comment + buf << dump_method_def + buf << dump_definition if @definition and !@definition.empty? + buf << dump_method_def_end + buf + end + +private + + def dump_method_def + if @params.empty? + format("def #{@name}") + else + format("def #{@name}(#{@params.join(", ")})") + end + end + + def dump_method_def_end + format("end") + end + + def dump_definition + format(@definition, 2) + end +end + + +end +end diff --git a/lib/xsd/codegen/moduledef.rb b/lib/xsd/codegen/moduledef.rb new file mode 100644 index 0000000..744af2f --- /dev/null +++ b/lib/xsd/codegen/moduledef.rb @@ -0,0 +1,191 @@ +# XSD4R - Generating module definition code +# Copyright (C) 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/codegen/gensupport' +require 'xsd/codegen/methoddef' +require 'xsd/codegen/commentdef' + + +module XSD +module CodeGen + + +class ModuleDef + include GenSupport + include CommentDef + + def initialize(name) + @name = name + @comment = nil + @const = [] + @code = [] + @requirepath = [] + @methoddef = [] + end + + def def_require(path) + @requirepath << path + end + + def def_const(const, value) + unless safeconstname?(const) + raise ArgumentError.new("#{const} seems to be unsafe") + end + @const << [const, value] + end + + def def_code(code) + @code << code + end + + def def_method(name, *params) + add_method(MethodDef.new(name, *params) { yield if block_given? }, :public) + end + alias def_publicmethod def_method + + def def_protectedmethod(name, *params) + add_method(MethodDef.new(name, *params) { yield if block_given? }, + :protected) + end + + def def_privatemethod(name, *params) + add_method(MethodDef.new(name, *params) { yield if block_given? }, :private) + end + + def add_method(m, visibility = :public) + @methoddef << [visibility, m] + end + + def dump + buf = "" + unless @requirepath.empty? + buf << dump_requirepath + end + buf << dump_emptyline unless buf.empty? + package = @name.split(/::/)[0..-2] + buf << dump_package_def(package) unless package.empty? + buf << dump_comment if @comment + buf << dump_module_def + spacer = false + unless @const.empty? + buf << dump_emptyline if spacer + spacer = true + buf << dump_const + end + unless @code.empty? + buf << dump_emptyline if spacer + spacer = true + buf << dump_code + end + unless @methoddef.empty? + buf << dump_emptyline if spacer + spacer = true + buf << dump_methods + end + buf << dump_module_def_end + buf << dump_package_def_end(package) unless package.empty? + buf.gsub(/^\s+$/, '') + end + +private + + def dump_requirepath + format( + @requirepath.collect { |path| + %Q(require '#{path}') + }.join("\n") + ) + end + + def dump_const + dump_static( + @const.sort.collect { |var, value| + %Q(#{var} = #{dump_value(value)}) + }.join("\n") + ) + end + + def dump_code + dump_static(@code.join("\n")) + end + + def dump_static(str) + format(str, 2) + end + + def dump_methods + methods = {} + @methoddef.each do |visibility, method| + (methods[visibility] ||= []) << method + end + str = "" + [:public, :protected, :private].each do |visibility| + if methods[visibility] + str << "\n" unless str.empty? + str << visibility.to_s << "\n\n" unless visibility == :public + str << methods[visibility].collect { |m| format(m.dump, 2) }.join("\n") + end + end + str + end + + def dump_value(value) + if value.respond_to?(:to_src) + value.to_src + else + value + end + end + + def dump_package_def(package) + format(package.collect { |ele| "module #{ele}" }.join("; ")) + "\n\n" + end + + def dump_package_def_end(package) + "\n\n" + format(package.collect { |ele| "end" }.join("; ")) + end + + def dump_module_def + name = @name.to_s.split(/::/) + format("module #{name.last}") + end + + def dump_module_def_end + format("end") + end +end + + +end +end + + +if __FILE__ == $0 + require 'xsd/codegen/moduledef' + include XSD::CodeGen + m = ModuleDef.new("Foo::Bar::HobbitName") + m.def_require("foo/bar") + m.def_require("baz") + m.comment = <<-EOD + foo + bar + baz + EOD + m.def_method("foo") do + <<-EOD + foo.bar = 1 + baz.each do |ele| + ele + 1 + end + EOD + end + m.def_method("baz", "qux") + #m.def_protectedmethod("aaa") + m.def_privatemethod("bbb") + puts m.dump +end diff --git a/lib/xsd/datatypes.rb b/lib/xsd/datatypes.rb new file mode 100644 index 0000000..bbe6c85 --- /dev/null +++ b/lib/xsd/datatypes.rb @@ -0,0 +1,1269 @@ +# XSD4R - XML Schema Datatype implementation. +# Copyright (C) 2000, 2001, 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'xsd/charset' +require 'uri' + + +### +## XMLSchamaDatatypes general definitions. +# +module XSD + + +Namespace = 'http://www.w3.org/2001/XMLSchema' +InstanceNamespace = 'http://www.w3.org/2001/XMLSchema-instance' + +AttrType = 'type' +NilValue = 'true' + +AnyTypeLiteral = 'anyType' +AnySimpleTypeLiteral = 'anySimpleType' +NilLiteral = 'nil' +StringLiteral = 'string' +BooleanLiteral = 'boolean' +DecimalLiteral = 'decimal' +FloatLiteral = 'float' +DoubleLiteral = 'double' +DurationLiteral = 'duration' +DateTimeLiteral = 'dateTime' +TimeLiteral = 'time' +DateLiteral = 'date' +GYearMonthLiteral = 'gYearMonth' +GYearLiteral = 'gYear' +GMonthDayLiteral = 'gMonthDay' +GDayLiteral = 'gDay' +GMonthLiteral = 'gMonth' +HexBinaryLiteral = 'hexBinary' +Base64BinaryLiteral = 'base64Binary' +AnyURILiteral = 'anyURI' +QNameLiteral = 'QName' + +NormalizedStringLiteral = 'normalizedString' +#3.3.2 token +#3.3.3 language +#3.3.4 NMTOKEN +#3.3.5 NMTOKENS +#3.3.6 Name +#3.3.7 NCName +#3.3.8 ID +#3.3.9 IDREF +#3.3.10 IDREFS +#3.3.11 ENTITY +#3.3.12 ENTITIES +IntegerLiteral = 'integer' +NonPositiveIntegerLiteral = 'nonPositiveInteger' +NegativeIntegerLiteral = 'negativeInteger' +LongLiteral = 'long' +IntLiteral = 'int' +ShortLiteral = 'short' +ByteLiteral = 'byte' +NonNegativeIntegerLiteral = 'nonNegativeInteger' +UnsignedLongLiteral = 'unsignedLong' +UnsignedIntLiteral = 'unsignedInt' +UnsignedShortLiteral = 'unsignedShort' +UnsignedByteLiteral = 'unsignedByte' +PositiveIntegerLiteral = 'positiveInteger' + +AttrTypeName = QName.new(InstanceNamespace, AttrType) +AttrNilName = QName.new(InstanceNamespace, NilLiteral) + +AnyTypeName = QName.new(Namespace, AnyTypeLiteral) +AnySimpleTypeName = QName.new(Namespace, AnySimpleTypeLiteral) + +class Error < StandardError; end +class ValueSpaceError < Error; end + + +### +## The base class of all datatypes with Namespace. +# +class NSDBase + @@types = [] + + attr_accessor :type + + def self.inherited(klass) + @@types << klass + end + + def self.types + @@types + end + + def initialize + end + + def init(type) + @type = type + end +end + + +### +## The base class of XSD datatypes. +# +class XSDAnySimpleType < NSDBase + include XSD + Type = QName.new(Namespace, AnySimpleTypeLiteral) + + # @data represents canonical space (ex. Integer: 123). + attr_reader :data + # @is_nil represents this data is nil or not. + attr_accessor :is_nil + + def initialize(value = nil) + init(Type, value) + end + + # true or raise + def check_lexical_format(value) + screen_data(value) + true + end + + # set accepts a string which follows lexical space (ex. String: "+123"), or + # an object which follows canonical space (ex. Integer: 123). + def set(value) + if value.nil? + @is_nil = true + @data = nil + _set(nil) + else + @is_nil = false + _set(screen_data(value)) + end + end + + # to_s creates a string which follows lexical space (ex. String: "123"). + def to_s() + if @is_nil + "" + else + _to_s + end + end + +private + + def init(type, value) + super(type) + set(value) + end + + # raises ValueSpaceError if check failed + def screen_data(value) + value + end + + def _set(value) + @data = value + end + + def _to_s + @data.to_s + end +end + +class XSDNil < XSDAnySimpleType + Type = QName.new(Namespace, NilLiteral) + Value = 'true' + + def initialize(value = nil) + init(Type, value) + end +end + + +### +## Primitive datatypes. +# +class XSDString < XSDAnySimpleType + Type = QName.new(Namespace, StringLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + unless XSD::Charset.is_ces(value, XSD::Charset.encoding) + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + value + end +end + +class XSDBoolean < XSDAnySimpleType + Type = QName.new(Namespace, BooleanLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + if value.is_a?(String) + str = value.strip + if str == 'true' || str == '1' + true + elsif str == 'false' || str == '0' + false + else + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + else + value ? true : false + end + end +end + +class XSDDecimal < XSDAnySimpleType + Type = QName.new(Namespace, DecimalLiteral) + + def initialize(value = nil) + init(Type, value) + end + + def nonzero? + (@number != '0') + end + +private + + def screen_data(d) + if d.is_a?(String) + # Integer("00012") => 10 in Ruby. + d.sub!(/^([+\-]?)0*(?=\d)/, "\\1") + end + screen_data_str(d) + end + + def screen_data_str(str) + /^([+\-]?)(\d*)(?:\.(\d*)?)?$/ =~ str.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + sign = $1 || '+' + int_part = $2 + frac_part = $3 + int_part = '0' if int_part.empty? + frac_part = frac_part ? frac_part.sub(/0+$/, '') : '' + point = - frac_part.size + number = int_part + frac_part + # normalize + if sign == '+' + sign = '' + elsif sign == '-' + if number == '0' + sign = '' + end + end + [sign, point, number] + end + + def _set(data) + if data.nil? + @sign = @point = @number = @data = nil + return + end + @sign, @point, @number = data + @data = _to_s + @data.freeze + end + + # 0.0 -> 0; right? + def _to_s + str = @number.dup + if @point.nonzero? + str[@number.size + @point, 0] = '.' + end + @sign + str + end +end + +module FloatConstants + NaN = 0.0/0.0 + POSITIVE_INF = +1.0/0.0 + NEGATIVE_INF = -1.0/0.0 + POSITIVE_ZERO = +1.0/POSITIVE_INF + NEGATIVE_ZERO = -1.0/POSITIVE_INF + MIN_POSITIVE_SINGLE = 2.0 ** -149 +end + +class XSDFloat < XSDAnySimpleType + include FloatConstants + Type = QName.new(Namespace, FloatLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + # "NaN".to_f => 0 in some environment. libc? + if value.is_a?(Float) + return narrow32bit(value) + end + str = value.to_s.strip + if str == 'NaN' + NaN + elsif str == 'INF' + POSITIVE_INF + elsif str == '-INF' + NEGATIVE_INF + else + if /^[+\-\.\deE]+$/ !~ str + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + # Float("-1.4E") might fail on some system. + str << '0' if /e$/i =~ str + begin + return narrow32bit(Float(str)) + rescue ArgumentError + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + end + end + + def _to_s + if @data.nan? + 'NaN' + elsif @data.infinite? == 1 + 'INF' + elsif @data.infinite? == -1 + '-INF' + else + sign = XSDFloat.positive?(@data) ? '+' : '-' + sign + sprintf("%.10g", @data.abs).sub(/[eE]([+-])?0+/) { 'e' + $1 } + end + end + + # Convert to single-precision 32-bit floating point value. + def narrow32bit(f) + if f.nan? || f.infinite? + f + elsif f.abs < MIN_POSITIVE_SINGLE + XSDFloat.positive?(f) ? POSITIVE_ZERO : NEGATIVE_ZERO + else + f + end + end + + def self.positive?(value) + (1 / value) > 0.0 + end +end + +# Ruby's Float is double-precision 64-bit floating point value. +class XSDDouble < XSDAnySimpleType + include FloatConstants + Type = QName.new(Namespace, DoubleLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + # "NaN".to_f => 0 in some environment. libc? + if value.is_a?(Float) + return value + end + str = value.to_s.strip + if str == 'NaN' + NaN + elsif str == 'INF' + POSITIVE_INF + elsif str == '-INF' + NEGATIVE_INF + else + begin + return Float(str) + rescue ArgumentError + # '1.4e' cannot be parsed on some architecture. + if /e\z/i =~ str + begin + return Float(str + '0') + rescue ArgumentError + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + else + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + end + end + end + + def _to_s + if @data.nan? + 'NaN' + elsif @data.infinite? == 1 + 'INF' + elsif @data.infinite? == -1 + '-INF' + else + sign = (1 / @data > 0.0) ? '+' : '-' + sign + sprintf("%.16g", @data.abs).sub(/[eE]([+-])?0+/) { 'e' + $1 } + end + end +end + +class XSDDuration < XSDAnySimpleType + Type = QName.new(Namespace, DurationLiteral) + + attr_accessor :sign + attr_accessor :year + attr_accessor :month + attr_accessor :day + attr_accessor :hour + attr_accessor :min + attr_accessor :sec + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + /^([+\-]?)P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/ =~ value.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + if ($5 and ((!$2 and !$3 and !$4) or (!$6 and !$7 and !$8))) + # Should we allow 'PT5S' here? + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + sign = $1 + year = $2.to_i + month = $3.to_i + day = $4.to_i + hour = $6.to_i + min = $7.to_i + sec = $8 ? XSDDecimal.new($8) : 0 + [sign, year, month, day, hour, min, sec] + end + + def _set(data) + if data.nil? + @sign = @year = @month = @day = @hour = @min = @sec = @data = nil + return + end + @sign, @year, @month, @day, @hour, @min, @sec = data + @data = _to_s + @data.freeze + end + + def _to_s + str = '' + str << @sign if @sign + str << 'P' + l = '' + l << "#{ @year }Y" if @year.nonzero? + l << "#{ @month }M" if @month.nonzero? + l << "#{ @day }D" if @day.nonzero? + r = '' + r << "#{ @hour }H" if @hour.nonzero? + r << "#{ @min }M" if @min.nonzero? + r << "#{ @sec }S" if @sec.nonzero? + str << l + if l.empty? + str << "0D" + end + unless r.empty? + str << "T" << r + end + str + end +end + + +require 'rational' +require 'date' + +module XSDDateTimeImpl + SecInDay = 86400 # 24 * 60 * 60 + + def to_obj(klass) + if klass == Time + to_time + elsif klass == Date + to_date + elsif klass == DateTime + to_datetime + else + nil + end + end + + def to_time + begin + if @data.offset * SecInDay == Time.now.utc_offset + d = @data + usec = (d.sec_fraction * SecInDay * 1000000).round + Time.local(d.year, d.month, d.mday, d.hour, d.min, d.sec, usec) + else + d = @data.newof + usec = (d.sec_fraction * SecInDay * 1000000).round + Time.gm(d.year, d.month, d.mday, d.hour, d.min, d.sec, usec) + end + rescue ArgumentError + nil + end + end + + def to_date + Date.new0(@data.class.jd_to_ajd(@data.jd, 0, 0), 0, @data.start) + end + + def to_datetime + data + end + + def tz2of(str) + /^(?:Z|(?:([+\-])(\d\d):(\d\d))?)$/ =~ str + sign = $1 + hour = $2.to_i + min = $3.to_i + + of = case sign + when '+' + of = +(hour.to_r * 60 + min) / 1440 # 24 * 60 + when '-' + of = -(hour.to_r * 60 + min) / 1440 # 24 * 60 + else + 0 + end + of + end + + def of2tz(offset) + diffmin = offset * 24 * 60 + if diffmin.zero? + 'Z' + else + ((diffmin < 0) ? '-' : '+') << format('%02d:%02d', + (diffmin.abs / 60.0).to_i, (diffmin.abs % 60.0).to_i) + end + end + + def screen_data(t) + # convert t to a DateTime as an internal representation. + if t.respond_to?(:to_datetime) # 1.9 or later + t.to_datetime + elsif t.is_a?(DateTime) + t + elsif t.is_a?(Date) + t = screen_data_str(t) + t <<= 12 if t.year < 0 + t + elsif t.is_a?(Time) + jd = DateTime.civil_to_jd(t.year, t.mon, t.mday, DateTime::ITALY) + fr = DateTime.time_to_day_fraction(t.hour, t.min, [t.sec, 59].min) + + t.usec.to_r / 1000000 / SecInDay + of = t.utc_offset.to_r / SecInDay + DateTime.new0(DateTime.jd_to_ajd(jd, fr, of), of, DateTime::ITALY) + else + screen_data_str(t) + end + end + + def add_tz(s) + s + of2tz(@data.offset) + end +end + +class XSDDateTime < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, DateTimeLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^([+\-]?\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d(?:\.(\d*))?)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + if $1 == '0000' + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + year = $1.to_i + if year < 0 + year += 1 + end + mon = $2.to_i + mday = $3.to_i + hour = $4.to_i + min = $5.to_i + sec = $6.to_i + secfrac = $7 + zonestr = $8 + data = DateTime.civil(year, mon, mday, hour, min, sec, tz2of(zonestr)) + if secfrac + diffday = secfrac.to_i.to_r / (10 ** secfrac.size) / SecInDay + data += diffday + # FYI: new0 and jd_to_rjd are not necessary to use if you don't have + # exceptional reason. + end + [data, secfrac] + end + + def _set(data) + if data.nil? + @data = @secfrac = nil + return + end + @data, @secfrac = data + end + + def _to_s + year = (@data.year > 0) ? @data.year : @data.year - 1 + s = format('%.4d-%02d-%02dT%02d:%02d:%02d', + year, @data.mon, @data.mday, @data.hour, @data.min, @data.sec) + if @data.sec_fraction.nonzero? + if @secfrac + s << ".#{ @secfrac }" + else + s << sprintf("%.16f", + (@data.sec_fraction * SecInDay).to_f).sub(/^0/, '').sub(/0*$/, '') + end + end + add_tz(s) + end +end + +class XSDTime < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, TimeLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^(\d\d):(\d\d):(\d\d(?:\.(\d*))?)(Z|(?:([+\-])(\d\d):(\d\d))?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + hour = $1.to_i + min = $2.to_i + sec = $3.to_i + secfrac = $4 + zonestr = $5 + data = DateTime.civil(1, 1, 1, hour, min, sec, tz2of(zonestr)) + if secfrac + diffday = secfrac.to_i.to_r / (10 ** secfrac.size) / SecInDay + data += diffday + end + [data, secfrac] + end + + def _set(data) + if data.nil? + @data = @secfrac = nil + return + end + @data, @secfrac = data + end + + def _to_s + s = format('%02d:%02d:%02d', @data.hour, @data.min, @data.sec) + if @data.sec_fraction.nonzero? + if @secfrac + s << ".#{ @secfrac }" + else + s << sprintf("%.16f", + (@data.sec_fraction * SecInDay).to_f).sub(/^0/, '').sub(/0*$/, '') + end + end + add_tz(s) + end +end + +class XSDDate < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, DateLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^([+\-]?\d{4,})-(\d\d)-(\d\d)(Z|(?:([+\-])(\d\d):(\d\d))?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + year = $1.to_i + if year < 0 + year += 1 + end + mon = $2.to_i + mday = $3.to_i + zonestr = $4 + DateTime.civil(year, mon, mday, 0, 0, 0, tz2of(zonestr)) + end + + def _to_s + year = (@data.year > 0) ? @data.year : @data.year - 1 + s = format('%.4d-%02d-%02d', year, @data.mon, @data.mday) + add_tz(s) + end +end + +class XSDGYearMonth < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, GYearMonthLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^([+\-]?\d{4,})-(\d\d)(Z|(?:([+\-])(\d\d):(\d\d))?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + year = $1.to_i + if year < 0 + year += 1 + end + mon = $2.to_i + zonestr = $3 + DateTime.civil(year, mon, 1, 0, 0, 0, tz2of(zonestr)) + end + + def _to_s + year = (@data.year > 0) ? @data.year : @data.year - 1 + s = format('%.4d-%02d', year, @data.mon) + add_tz(s) + end +end + +class XSDGYear < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, GYearLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^([+\-]?\d{4,})(Z|(?:([+\-])(\d\d):(\d\d))?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + year = $1.to_i + if year < 0 + year += 1 + end + zonestr = $2 + DateTime.civil(year, 1, 1, 0, 0, 0, tz2of(zonestr)) + end + + def _to_s + year = (@data.year > 0) ? @data.year : @data.year - 1 + s = format('%.4d', year) + add_tz(s) + end +end + +class XSDGMonthDay < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, GMonthDayLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^(\d\d)-(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + mon = $1.to_i + mday = $2.to_i + zonestr = $3 + DateTime.civil(1, mon, mday, 0, 0, 0, tz2of(zonestr)) + end + + def _to_s + s = format('%02d-%02d', @data.mon, @data.mday) + add_tz(s) + end +end + +class XSDGDay < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, GDayLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + mday = $1.to_i + zonestr = $2 + DateTime.civil(1, 1, mday, 0, 0, 0, tz2of(zonestr)) + end + + def _to_s + s = format('%02d', @data.mday) + add_tz(s) + end +end + +class XSDGMonth < XSDAnySimpleType + include XSDDateTimeImpl + Type = QName.new(Namespace, GMonthLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(t) + /^(\d\d)(Z|(?:[+\-]\d\d:\d\d)?)?$/ =~ t.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ t }'.") + end + mon = $1.to_i + zonestr = $2 + DateTime.civil(1, mon, 1, 0, 0, 0, tz2of(zonestr)) + end + + def _to_s + s = format('%02d', @data.mon) + add_tz(s) + end +end + +class XSDHexBinary < XSDAnySimpleType + Type = QName.new(Namespace, HexBinaryLiteral) + + # String in Ruby could be a binary. + def initialize(value = nil) + init(Type, value) + end + + def set_encoded(value) + if /^[0-9a-fA-F]*$/ !~ value + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + @data = String.new(value).strip + @is_nil = false + end + + def string + [@data].pack("H*") + end + +private + + def screen_data(value) + value.unpack("H*")[0].tr('a-f', 'A-F') + end +end + +class XSDBase64Binary < XSDAnySimpleType + Type = QName.new(Namespace, Base64BinaryLiteral) + + # String in Ruby could be a binary. + def initialize(value = nil) + init(Type, value) + end + + def set_encoded(value) + if /^[A-Za-z0-9+\/=]*$/ !~ value + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + @data = String.new(value).strip + @is_nil = false + end + + def string + @data.unpack("m")[0] + end + +private + + def screen_data(value) + [value].pack("m").strip + end +end + +class XSDAnyURI < XSDAnySimpleType + Type = QName.new(Namespace, AnyURILiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + begin + URI.parse(value.to_s.strip) + rescue URI::InvalidURIError + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + end +end + +class XSDQName < XSDAnySimpleType + Type = QName.new(Namespace, QNameLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + /^(?:([^:]+):)?([^:]+)$/ =~ value.to_s.strip + unless Regexp.last_match + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + prefix = $1 + localpart = $2 + [prefix, localpart] + end + + def _set(data) + if data.nil? + @prefix = @localpart = @data = nil + return + end + @prefix, @localpart = data + @data = _to_s + @data.freeze + end + + def _to_s + if @prefix + "#{ @prefix }:#{ @localpart }" + else + "#{ @localpart }" + end + end +end + + +### +## Derived types +# +class XSDNormalizedString < XSDString + Type = QName.new(Namespace, NormalizedStringLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data(value) + if /[\t\r\n]/ =~ value + raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.") + end + super + end +end + +class XSDInteger < XSDDecimal + Type = QName.new(Namespace, IntegerLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def screen_data_str(str) + begin + data = Integer(str) + rescue ArgumentError + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + unless validate(data) + raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.") + end + data + end + + def _set(value) + @data = value + end + + def _to_s() + @data.to_s + end + + def validate(v) + max = maxinclusive + min = mininclusive + (max.nil? or v <= max) and (min.nil? or v >= min) + end + + def maxinclusive + nil + end + + def mininclusive + nil + end + + PositiveMinInclusive = 1 + def positive(v) + PositiveMinInclusive <= v + end +end + +class XSDNonPositiveInteger < XSDInteger + Type = QName.new(Namespace, NonPositiveIntegerLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + 0 + end + + def mininclusive + nil + end +end + +class XSDNegativeInteger < XSDNonPositiveInteger + Type = QName.new(Namespace, NegativeIntegerLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + -1 + end + + def mininclusive + nil + end +end + +class XSDLong < XSDInteger + Type = QName.new(Namespace, LongLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +9223372036854775807 + end + + def mininclusive + -9223372036854775808 + end +end + +class XSDInt < XSDLong + Type = QName.new(Namespace, IntLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +2147483647 + end + + def mininclusive + -2147483648 + end +end + +class XSDShort < XSDInt + Type = QName.new(Namespace, ShortLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +32767 + end + + def mininclusive + -32768 + end +end + +class XSDByte < XSDShort + Type = QName.new(Namespace, ByteLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +127 + end + + def mininclusive + -128 + end +end + +class XSDNonNegativeInteger < XSDInteger + Type = QName.new(Namespace, NonNegativeIntegerLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + nil + end + + def mininclusive + 0 + end +end + +class XSDUnsignedLong < XSDNonNegativeInteger + Type = QName.new(Namespace, UnsignedLongLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +18446744073709551615 + end + + def mininclusive + 0 + end +end + +class XSDUnsignedInt < XSDUnsignedLong + Type = QName.new(Namespace, UnsignedIntLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +4294967295 + end + + def mininclusive + 0 + end +end + +class XSDUnsignedShort < XSDUnsignedInt + Type = QName.new(Namespace, UnsignedShortLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +65535 + end + + def mininclusive + 0 + end +end + +class XSDUnsignedByte < XSDUnsignedShort + Type = QName.new(Namespace, UnsignedByteLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + +255 + end + + def mininclusive + 0 + end +end + +class XSDPositiveInteger < XSDNonNegativeInteger + Type = QName.new(Namespace, PositiveIntegerLiteral) + + def initialize(value = nil) + init(Type, value) + end + +private + + def maxinclusive + nil + end + + def mininclusive + 1 + end +end + + +end diff --git a/lib/xsd/datatypes1999.rb b/lib/xsd/datatypes1999.rb new file mode 100644 index 0000000..c7d6479 --- /dev/null +++ b/lib/xsd/datatypes1999.rb @@ -0,0 +1,20 @@ +# XSD4R - XML Schema Datatype 1999 support +# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/datatypes' + + +module XSD + Namespace.replace('http://www.w3.org/1999/XMLSchema') + InstanceNamespace.replace('http://www.w3.org/1999/XMLSchema-instance') + AnyTypeLiteral.replace('ur-type') + AnySimpleTypeLiteral.replace('ur-type') + NilLiteral.replace('null') + NilValue.replace('1') + DateTimeLiteral.replace('timeInstant') +end diff --git a/lib/xsd/iconvcharset.rb b/lib/xsd/iconvcharset.rb new file mode 100644 index 0000000..7e629d5 --- /dev/null +++ b/lib/xsd/iconvcharset.rb @@ -0,0 +1,33 @@ +# XSD4R - Charset handling with iconv. +# Copyright (C) 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'iconv' + + +module XSD + + +class IconvCharset + def self.safe_iconv(to, from, str) + iconv = Iconv.new(to, from) + out = "" + begin + out << iconv.iconv(str) + rescue Iconv::IllegalSequence => e + out << e.success + ch, str = e.failed.split(//, 2) + out << '?' + warn("Failed to convert #{ch}") + retry + end + return out + end +end + + +end diff --git a/lib/xsd/mapping.rb b/lib/xsd/mapping.rb new file mode 100644 index 0000000..06d30d4 --- /dev/null +++ b/lib/xsd/mapping.rb @@ -0,0 +1,42 @@ +# XSD4R - XML Mapping for Ruby +# Copyright (C) 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require "soap/parser" +require 'soap/encodingstyle/literalHandler' +require "soap/generator" +require "soap/mapping" +require "soap/mapping/wsdlliteralregistry" + + +module XSD + + +module Mapping + MappingRegistry = SOAP::Mapping::WSDLLiteralRegistry.new + MappingOpt = {:default_encodingstyle => SOAP::LiteralNamespace} + + def self.obj2xml(obj, elename = nil, io = nil) + if !elename.nil? and !elename.is_a?(XSD::QName) + elename = XSD::QName.new(nil, elename) + end + elename ||= XSD::QName.new(nil, SOAP::Mapping.name2elename(obj.class.to_s)) + soap = SOAP::Mapping.obj2soap(obj, MappingRegistry) + soap.elename = elename + generator = SOAP::SOAPGenerator.new(MappingOpt) + generator.generate(soap, io) + end + + def self.xml2obj(stream) + parser = SOAP::Parser.new(MappingOpt) + soap = parser.parse(stream) + SOAP::Mapping.soap2obj(soap, MappingRegistry) + end +end + + +end diff --git a/lib/xsd/namedelements.rb b/lib/xsd/namedelements.rb new file mode 100644 index 0000000..5cca058 --- /dev/null +++ b/lib/xsd/namedelements.rb @@ -0,0 +1,108 @@ +# XSD4R - WSDL named element collection. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module XSD + + +class NamedElements + include Enumerable + + def initialize + @elements = [] + @cache = {} + end + + def dup + o = NamedElements.new + o.elements = @elements.dup + o + end + + def freeze + super + @elements.freeze + self + end + + def empty? + size == 0 + end + + def size + @elements.size + end + + def [](idx) + if idx.is_a?(Numeric) + @elements[idx] + else + @cache[idx] ||= @elements.find { |item| item.name == idx } + end + end + + def find_name(name) + @elements.find { |item| item.name.name == name } + end + + def keys + collect { |element| element.name } + end + + def each + @elements.each do |element| + yield(element) + end + end + + def <<(rhs) + @elements << rhs + self + end + + def delete(rhs) + rv = @elements.delete(rhs) + @cache.clear + rv + end + + def +(rhs) + o = NamedElements.new + o.elements = @elements + rhs.elements + o + end + + def concat(rhs) + @elements.concat(rhs.elements) + @cache.clear + self + end + + def uniq + o = NamedElements.new + o.elements = @elements.uniq + o + end + + def uniq! + @elements.uniq! + end + + Empty = NamedElements.new.freeze + +protected + + def elements=(rhs) + @elements = rhs + end + + def elements + @elements + end +end + +end diff --git a/lib/xsd/ns.rb b/lib/xsd/ns.rb new file mode 100644 index 0000000..53eeae7 --- /dev/null +++ b/lib/xsd/ns.rb @@ -0,0 +1,140 @@ +# XSD4R - XML Schema Namespace library +# Copyright (C) 2000-2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/datatypes' + + +module XSD + + +class NS + class Assigner + def initialize + @count = 0 + end + + def assign(ns) + @count += 1 + "n#{@count}" + end + end + + attr_reader :default_namespace + + class FormatError < Error; end + +public + + def initialize(tag2ns = {}) + @tag2ns = tag2ns + @assigner = nil + @ns2tag = {} + @tag2ns.each do |tag, ns| + @ns2tag[ns] = tag + end + @default_namespace = nil + end + + def assign(ns, tag = nil) + if (tag == '') + @default_namespace = ns + tag + else + @assigner ||= Assigner.new + tag ||= @assigner.assign(ns) + @ns2tag[ns] = tag + @tag2ns[tag] = ns + tag + end + end + + def assigned?(ns) + @default_namespace == ns or @ns2tag.key?(ns) + end + + def assigned_tag?(tag) + @tag2ns.key?(tag) + end + + def clone_ns + cloned = NS.new(@tag2ns.dup) + cloned.assigner = @assigner + cloned.assign(@default_namespace, '') if @default_namespace + cloned + end + + def name(name) + if (name.namespace == @default_namespace) + name.name + elsif @ns2tag.key?(name.namespace) + "#{@ns2tag[name.namespace]}:#{name.name}" + else + raise FormatError.new("namespace: #{name.namespace} not defined yet") + end + end + + def compare(ns, name, rhs) + if (ns == @default_namespace) + return true if (name == rhs) + end + @tag2ns.each do |assigned_tag, assigned_ns| + if assigned_ns == ns && "#{assigned_tag}:#{name}" == rhs + return true + end + end + false + end + + # $1 and $2 are necessary. + ParseRegexp = Regexp.new('^([^:]+)(?::(.+))?$') + + def parse(str, local = false) + if ParseRegexp =~ str + if (name = $2) and (ns = @tag2ns[$1]) + return XSD::QName.new(ns, name) + end + end + XSD::QName.new(local ? nil : @default_namespace, str) + end + + # For local attribute key parsing + # + # => + # {}bar, {urn:a}baz + def parse_local(elem) + ParseRegexp =~ elem + if $2 + ns = @tag2ns[$1] + name = $2 + if !ns + raise FormatError.new("unknown namespace qualifier: #{$1}") + end + elsif $1 + ns = nil + name = $1 + else + raise FormatError.new("illegal element format: #{elem}") + end + XSD::QName.new(ns, name) + end + + def each_ns + @ns2tag.each do |ns, tag| + yield(ns, tag) + end + end + +protected + + def assigner=(assigner) + @assigner = assigner + end +end + + +end diff --git a/lib/xsd/qname.rb b/lib/xsd/qname.rb new file mode 100644 index 0000000..bb9763a --- /dev/null +++ b/lib/xsd/qname.rb @@ -0,0 +1,78 @@ +# XSD4R - XML QName definition. +# Copyright (C) 2002, 2003, 2004 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +module XSD + + +class QName + attr_accessor :namespace + attr_accessor :name + attr_accessor :source + + def initialize(namespace = nil, name = nil) + @namespace = namespace + @name = name + @source = nil + end + + def dup_name(name) + XSD::QName.new(@namespace, name) + end + + def dump + ns = @namespace.nil? ? 'nil' : @namespace.dump + name = @name.nil? ? 'nil' : @name.dump + "XSD::QName.new(#{ns}, #{name})" + end + + def match(rhs) + if rhs.namespace and (rhs.namespace != @namespace) + return false + end + if rhs.name and (rhs.name != @name) + return false + end + true + end + + def ==(rhs) + !rhs.nil? and @namespace == rhs.namespace and @name == rhs.name + end + + def ===(rhs) + (self == rhs) + end + + def eql?(rhs) + (self == rhs) + end + + def hash + @namespace.hash ^ @name.hash + end + + def to_s + "{#{ namespace }}#{ name }" + end + + def inspect + sprintf("#<%s:0x%x %s>", self.class.name, __id__, + "{#{ namespace }}#{ name }") + end + + NormalizedNameRegexp = /^\{([^}]*)\}(.*)$/ + def parse(str) + NormalizedNameRegexp =~ str + self.new($1, $2) + end + + EMPTY = QName.new.freeze +end + + +end diff --git a/lib/xsd/xmlparser.rb b/lib/xsd/xmlparser.rb new file mode 100644 index 0000000..e79e36c --- /dev/null +++ b/lib/xsd/xmlparser.rb @@ -0,0 +1,61 @@ +# XSD4R - XML Instance parser library. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/xmlparser/parser' + + +module XSD + + +module XMLParser + def create_parser(host, opt) + XSD::XMLParser::Parser.create_parser(host, opt) + end + module_function :create_parser + + # $1 is necessary. + NSParseRegexp = Regexp.new('^xmlns:?(.*)$') + + def filter_ns(ns, attrs) + return attrs if attrs.nil? or attrs.empty? + newattrs = {} + attrs.each do |key, value| + if (NSParseRegexp =~ key) + # '' means 'default namespace'. + tag = $1 || '' + ns.assign(value, tag) + else + newattrs[key] = value + end + end + newattrs + end + module_function :filter_ns +end + + +end + + +# Try to load XML processor. +loaded = false +[ + 'xsd/xmlparser/xmlparser', + 'xsd/xmlparser/xmlscanner', + 'xsd/xmlparser/rexmlparser', +].each do |lib| + begin + require lib + loaded = true + break + rescue LoadError + end +end +unless loaded + raise RuntimeError.new("XML processor module not found.") +end diff --git a/lib/xsd/xmlparser/parser.rb b/lib/xsd/xmlparser/parser.rb new file mode 100644 index 0000000..ad01d55 --- /dev/null +++ b/lib/xsd/xmlparser/parser.rb @@ -0,0 +1,96 @@ +# XSD4R - XML Instance parser library. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/qname' +require 'xsd/ns' +require 'xsd/charset' + + +module XSD +module XMLParser + + +class Parser + class ParseError < Error; end + class FormatDecodeError < ParseError; end + class UnknownElementError < FormatDecodeError; end + class UnknownAttributeError < FormatDecodeError; end + class UnexpectedElementError < FormatDecodeError; end + class ElementConstraintError < FormatDecodeError; end + + @@parser_factory = nil + + def self.factory + @@parser_factory + end + + def self.create_parser(host, opt = {}) + @@parser_factory.new(host, opt) + end + + def self.add_factory(factory) + if $DEBUG + puts "Set #{ factory } as XML processor." + end + @@parser_factory = factory + end + +public + + attr_accessor :charset + + def initialize(host, opt = {}) + @host = host + @charset = opt[:charset] || nil + end + + def parse(string_or_readable) + @textbuf = '' + prologue + do_parse(string_or_readable) + epilogue + end + +private + + def do_parse(string_or_readable) + raise NotImplementError.new( + 'Method do_parse must be defined in derived class.') + end + + def start_element(name, attrs) + @host.start_element(name, attrs) + end + + def characters(text) + @host.characters(text) + end + + def end_element(name) + @host.end_element(name) + end + + def prologue + end + + def epilogue + end + + def xmldecl_encoding=(charset) + if @charset.nil? + @charset = charset + else + # Definition in a stream (like HTTP) has a priority. + p "encoding definition: #{ charset } is ignored." if $DEBUG + end + end +end + + +end +end diff --git a/lib/xsd/xmlparser/rexmlparser.rb b/lib/xsd/xmlparser/rexmlparser.rb new file mode 100644 index 0000000..61da9aa --- /dev/null +++ b/lib/xsd/xmlparser/rexmlparser.rb @@ -0,0 +1,54 @@ +# XSD4R - REXMLParser XML parser library. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/xmlparser' +require 'rexml/streamlistener' +require 'rexml/document' + + +module XSD +module XMLParser + + +class REXMLParser < XSD::XMLParser::Parser + include REXML::StreamListener + + def do_parse(string_or_readable) + source = nil + source = REXML::SourceFactory.create_from(string_or_readable) + source.encoding = charset if charset + # Listener passes a String in utf-8. + @charset = 'utf-8' + REXML::Document.parse_stream(source, self) + end + + def epilogue + end + + def tag_start(name, attrs) + start_element(name, attrs) + end + + def tag_end(name) + end_element(name) + end + + def text(text) + characters(text) + end + + def xmldecl(version, encoding, standalone) + # Version should be checked. + end + + add_factory(self) +end + + +end +end diff --git a/lib/xsd/xmlparser/xmlparser.rb b/lib/xsd/xmlparser/xmlparser.rb new file mode 100644 index 0000000..6db914c --- /dev/null +++ b/lib/xsd/xmlparser/xmlparser.rb @@ -0,0 +1,50 @@ +# XSD4R - XMLParser XML parser library. +# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/xmlparser' +require 'xml/parser' + + +module XSD +module XMLParser + + +class XMLParser < XSD::XMLParser::Parser + class Listener < XML::Parser + begin + require 'xml/encoding-ja' + include XML::Encoding_ja + rescue LoadError + # uconv may not be installed. + end + end + + def do_parse(string_or_readable) + # XMLParser passes a String in utf-8. + @charset = 'utf-8' + @parser = Listener.new + @parser.parse(string_or_readable) do |type, name, data| + case type + when XML::Parser::START_ELEM + start_element(name, data) + when XML::Parser::END_ELEM + end_element(name) + when XML::Parser::CDATA + characters(data) + else + raise FormatDecodeError.new("Unexpected XML: #{ type }/#{ name }/#{ data }.") + end + end + end + + add_factory(self) +end + + +end +end diff --git a/lib/xsd/xmlparser/xmlscanner.rb b/lib/xsd/xmlparser/xmlscanner.rb new file mode 100644 index 0000000..c80dc23 --- /dev/null +++ b/lib/xsd/xmlparser/xmlscanner.rb @@ -0,0 +1,147 @@ +# XSD4R - XMLScan XML parser library. +# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi . + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. + + +require 'xsd/xmlparser' +require 'xmlscan/scanner' + + +module XSD +module XMLParser + + +class XMLScanner < XSD::XMLParser::Parser + include XMLScan::Visitor + + def do_parse(string_or_readable) + @attrs = {} + @curattr = nil + @scanner = XMLScan::XMLScanner.new(self) + @scanner.kcode = XSD::Charset.charset_str(charset) if charset + @scanner.parse(string_or_readable) + end + + def scanner_kcode=(charset) + @scanner.kcode = XSD::Charset.charset_str(charset) if charset + self.xmldecl_encoding = charset + end + + ENTITY_REF_MAP = { + 'lt' => '<', + 'gt' => '>', + 'amp' => '&', + 'quot' => '"', + 'apos' => '\'' + } + + def parse_error(msg) + raise ParseError.new(msg) + end + + def wellformed_error(msg) + raise NotWellFormedError.new(msg) + end + + def valid_error(msg) + raise NotValidError.new(msg) + end + + def warning(msg) + p msg if $DEBUG + end + + # def on_xmldecl; end + + def on_xmldecl_version(str) + # 1.0 expected. + end + + def on_xmldecl_encoding(str) + self.scanner_kcode = str + end + + # def on_xmldecl_standalone(str); end + + # def on_xmldecl_other(name, value); end + + # def on_xmldecl_end; end + + # def on_doctype(root, pubid, sysid); end + + # def on_prolog_space(str); end + + # def on_comment(str); end + + # def on_pi(target, pi); end + + def on_chardata(str) + characters(str) + end + + # def on_cdata(str); end + + def on_etag(name) + end_element(name) + end + + def on_entityref(ref) + characters(ENTITY_REF_MAP[ref]) + end + + def on_charref(code) + characters([code].pack('U')) + end + + def on_charref_hex(code) + on_charref(code) + end + + # def on_start_document; end + + # def on_end_document; end + + def on_stag(name) + @attrs = {} + end + + def on_attribute(name) + @attrs[name] = @curattr = '' + end + + def on_attr_value(str) + @curattr << str + end + + def on_attr_entityref(ref) + @curattr << ENTITY_REF_MAP[ref] + end + + def on_attr_charref(code) + @curattr << [code].pack('U') + end + + def on_attr_charref_hex(code) + on_attr_charref(code) + end + + # def on_attribute_end(name); end + + def on_stag_end_empty(name) + on_stag_end(name) + on_etag(name) + end + + def on_stag_end(name) + start_element(name, @attrs) + end + + add_factory(self) +end + + +end +end diff --git a/log/development.log b/log/development.log new file mode 100644 index 0000000..d17b031 --- /dev/null +++ b/log/development.log @@ -0,0 +1 @@ +# Logfile created on Thu Jun 21 22:00:57 -0700 2007 by / diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..0d9d5df --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,49 @@ +# Set default charset to unicode +AddDefaultCharSet utf-8 + +# General Apache options +AddHandler fastcgi-script .fcgi +AddHandler cgi-script .cgi +Options +FollowSymLinks +ExecCGI + +# If you don't want Rails to look in certain directories, +# use the following rewrite rules so that Apache won't rewrite certain requests +# +# Example: +# RewriteCond %{REQUEST_URI} ^/notrails.* +# RewriteRule .* - [L] + +# Redirect all requests not available on the filesystem to Rails +# By default the cgi dispatcher is used which is very slow +# +# For better performance replace the dispatcher with the fastcgi one +# +# Example: +# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] + +RewriteEngine On + +# Let rails know that this is an https request so that it can redirect correctly +#RequestHeader set X_FORWARDED_PROTO "https" + +# If your Rails application is accessed via an Alias directive, +# then you MUST also set the RewriteBase in this htaccess file. +# +# Example: +# Alias /myrailsapp /path/to/myrailsapp/public +# RewriteBase /myrailsapp + +RewriteRule ^$ index.html [QSA] +RewriteRule ^([^.]+)$ $1.html [QSA] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ dispatch.cgi [QSA,L] + +# In case Rails experiences terminal errors +# Instead of displaying this message you can supply a file here which will be rendered instead +# +# Example: +# ErrorDocument 500 /500.html + +#ErrorDocument 500 "

Application error

Rails application failed to start properly" + +ErrorDocument 500 /500.html diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..5845005 --- /dev/null +++ b/public/404.html @@ -0,0 +1,42 @@ + + + + + Page Not Found + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+

404 Not Found

+

+ What you are looking for is not here +

+
+
+
+ + + + diff --git a/public/500.html b/public/500.html new file mode 100644 index 0000000..426441a --- /dev/null +++ b/public/500.html @@ -0,0 +1,42 @@ + + + + + Application Error + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+

500 Server Error

+

+ If only you had a nickel for everytime this happened... +

+
+
+
+ + + + diff --git a/public/dispatch.cgi b/public/dispatch.cgi new file mode 100755 index 0000000..9b5ae76 --- /dev/null +++ b/public/dispatch.cgi @@ -0,0 +1,10 @@ +#!/usr/local/bin/ruby + +require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) + +# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: +# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired +require "dispatcher" + +ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) +Dispatcher.dispatch \ No newline at end of file diff --git a/public/dispatch.fcgi b/public/dispatch.fcgi new file mode 100755 index 0000000..664dbbb --- /dev/null +++ b/public/dispatch.fcgi @@ -0,0 +1,24 @@ +#!/usr/bin/env ruby +# +# You may specify the path to the FastCGI crash log (a log of unhandled +# exceptions which forced the FastCGI instance to exit, great for debugging) +# and the number of requests to process before running garbage collection. +# +# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log +# and the GC period is nil (turned off). A reasonable number of requests +# could range from 10-100 depending on the memory footprint of your app. +# +# Example: +# # Default log path, normal GC behavior. +# RailsFCGIHandler.process! +# +# # Default log path, 50 requests between GC. +# RailsFCGIHandler.process! nil, 50 +# +# # Custom log path, normal GC behavior. +# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' +# +require File.dirname(__FILE__) + "/../config/environment" +require 'fcgi_handler' + +RailsFCGIHandler.process! diff --git a/public/dispatch.rb b/public/dispatch.rb new file mode 100755 index 0000000..9b5ae76 --- /dev/null +++ b/public/dispatch.rb @@ -0,0 +1,10 @@ +#!/usr/local/bin/ruby + +require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) + +# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: +# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired +require "dispatcher" + +ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) +Dispatcher.dispatch \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..3afeb1776307b13166a9d7dc05dcfd9ec8b2a0f0 GIT binary patch literal 665 zcmV;K0%rY*P)l?MB@n$p77$)&*UfY?$OU+OyHmc9-qGJ(6&caPOCgHLk|^Zp)eLZ z1|Sn*uhS*W6k4^4qYA8h8BIyNR)l3`NDm^4rQ-Pj?cIF}rAh1=n{R=lF^Fjd8LPd7 z?SaMvtH5*H;m-91PO3QVfggml_68WUHtU0oH8e@ZL{Y6@Z2S>^K>!FHIQgv|2|rx*6?-KJ|s_IDqT)SlyhUTTb|{Cw%S4 z^!lkd#Qc1w61p1`{C4rY=q!V|S&Pob4_-Ml#M4q>D*8&q;(VrZjxvy*Ovb;cRO;h8 z$h%*^RAc#SpW25l*peIeh4w(4u{zdje@JET3y*L8i(_Nh%v>Q4pW zayjGP%^DBy-(|jDA1To=jC>#Z+W)Te9{~mc(@6;M#HTHd00000NkvXXu0mjf^h`6g literal 0 HcmV?d00001 diff --git a/public/images/store/amex.gif b/public/images/store/amex.gif new file mode 100644 index 0000000000000000000000000000000000000000..fd45ef04261ca4d4dfe75d30a407607e1f2a0112 GIT binary patch literal 645 zcmV;00($*NNk%w1VI=?+0M!5h)#&s9XSD!nwMD4ccg5?7yxl~Y%xJsh0CKrksMNOA z>Wj$d09&m9iN+>|!u9(8H>K8Hw&NCiyL-3W0+h{es@4Ag|2B=r>-PI&wci9@ovEBX{Xc=c)Dw_*Cc(v4sNwJp49a8^!E4oVVud{>hdU{)8X&;0DizkjlrS8 z-v9sqA^8LW002J#EC2ui03`qw000L6z~ApcD7ucV;vw=GKy(yJqrs~pt{#Clz!eIK z#-wuDgsh@dD>l3BdNbhSnCv`DscLq+5D-n1P6n#092c4w20ffC54EAOG!n2mk~E&u>is z$dF;6ih;$DRV+4E0S4vDm|?gI@C!#DEmsoh!KA4)gVU(Fp#B`XwW86aGi_+g#|!8+ fxM9auy#d3F+CpyY9-gUqan{7!C^ybrNDu%!L`@`- literal 0 HcmV?d00001 diff --git a/public/images/store/application_icon.png b/public/images/store/application_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3cd950c05c438814fa4a17513d83d091ae114161 GIT binary patch literal 2212 zcmV;V2wV4wP)5%CRJYkwHyYiz zUg8$Kum!mmaRFh%t;h%rbAg%fn`__m%?ym|AnvAzyqq&<=A7p}@8vn~;qZTG85tR{ zSS&`n-CkTlZTIfoJFi{4cIE8Zv$xh;tN1QpX0yd)x0e&xwu{0l8d`%*;&AY&LIXX0%#u)Ri+Z`vwN4 zQRhaZ5r~2SzuynHYfb`VbFo-VIz^1_Ba=bK@d$?_Fk~3=>+9=lNP*kyDo|2Vl6m9C zjn4`S@+(z5pTjm4MG*lyozLgNqI&_7DPu8d5&NDgEh9iSP73>8`iszdA%Ok+_aC@$ z;r#jvJb(UNP%4#$p-?Et?OvpPqVXe1CnGQ!fpG~iB!JS0^lPc-NO3P}YIZhdWo7Yh zw>!9&0y6fGejpAE40NhgJOOcWKw12R449)inT$*MOv1+B5H_D2i=u#n{EcPXw{N$- z&H}RJpufMrkLOhhU=sN%2q#N|a;v~eMY!}zFhh{u3UWi!8!6D;-Q6FJ#t3-zG1$b!8o~XI5GTPMkRL(Zs~Wa86DR<8PwUNMh4u`n~Le_?TOrlfYw05(kT! zuu_3gRt8?&`x0|s4`IW`yuw|(cI`;3z~bVf`^=d$&Dq)6lJ-PKala-`iKHu%Jg}0M zT#~6)I|3J8%zNhR0!VptaQxiqhh&roQ%$ss!O995o@nYyPNhf@CkSKlT%Ty zJR1q)>Q%aXa(OiV=zVZxP0!6c;EM`jZrUfGa*U5WeE9IIv7lfDrogQimSuO z@=c=m_I>n^N3ba`A4Y=~Y)MqDgQue#;V}pF4SVo*#XH8!|GfOE$K!UtLdD5;>C&aY zlO?9gq+MFn$k2%2X% z;q1DKB?Gz1yM(Dn?U1RIS+#rWYS*+tA|Sn1tF?ym)+SI<5s&y7MSPh2t;BRV7ek98 zELI;f1Jmfd*MSGaO4uwF*lo?jhAb^~8ZGoH4$7E_7cL*71Jlqem!RJmL53_+>|1mN z!cho*A?QtaO~vx_^UX(&9BC2+e;k~p8kJvi1rLLcLq*XDa(yFs+}eZ3OBGNS9YRp9 zf?JG2q*6`E%gEmvXvm7LUKjwy*#Op@xE(~*B`1kz*^o!Lfd-p>avkmYq`?26!M6cV0;J6Fws1HVk zh?rV~&<_t_F}n~EZW)Fg12j~!IX$zYW7;{FR)Mjxu~Dbfxsa2cWei3V3Q*1mMn^C+ z(u;ZD0GFVmntVW0GpZpY?3X3QfG(_PFsXYHz>jU?lJ9l~rw9Dae zu)=1D)w(1;5`jcDIW_b1BaKxxm##h<8FtLHCNeO#=F5m`!~r#(jNOuqY^%5LfVb2t zJwPVL$Dz~dFza**e`{&EPT-g6Cp`&JVfBhyX~NL>eAmH-%J1*kW~sZ~*7pyVaB0&p zB^|Z&5^DP5i(A82u6#CsZ+d%s|C|6{APKMa;>yl4 zm>YJM9FB&=d~3(hr?FUU-DjYI#7?q>NlQ!19albioX=&rJW5+%shGa~pPsgI`G);yN@x|$+C~UyxHsC*_W?w5f_i0aXxe9^Q1+0Y|2;pOulAUw!*n( zuYJvCo8qNb`SYyu7uc4rxGN&_mYe_l`SbJV&)>g)|NHmv%JW)&pI{j?q7Rs#er+uzPYx}Zq}tM3}ag|mOpi@ z-ySsYY1*NKVEF(4zp=3~kn~#T42s8wk|4ieAa@`Eg9WR1IxtEX=Dj;p z{_f4ay{jiInf*3OdD}HrPespuY1?MK>DnS(Q@vCj12jHWPCohY#k;)bh_>rorK{Og z_r~346l7T#bn>~oO#Y=me@=BBHQE!rI{NDVAKO#I&;9uOPjczriJ~RUE!IDFr_N`a zd~oNhm;xc6+ZTKE-*yCg*dNI-(QDj$?{RYf@yol}r<@R~Pht=*GG)9YA2usFs7K?H z<}|-7>{4#nJy-7A8B)Z`CQFwGY>5@D4d+g^Ppq)sSiBgj%Fp!(Q(_XJ2O&F z*!a&I1`AKe;A z{|TiU?rTL{SB9)g^EfwcO1x=h*S6Tpff{a=dNO>+=YQL}nsdj(Bde}yMPIofot*r! z!bYIOMTy06f{NtT43oI^+s~^p4f9((`$izy!qL>FVdQ&MBb@06Z!z AY5)KL literal 0 HcmV?d00001 diff --git a/public/images/store/discover.gif b/public/images/store/discover.gif new file mode 100644 index 0000000000000000000000000000000000000000..29ad882356adbb73b9560c9ba04dc15cb53bc4ea GIT binary patch literal 495 zcmVPx^0tNdzmxjdzW@9A_xJb4#l`!}sN&+{z`wutk3#a{)AfltH#If$^YiWP z?f?J(A^8LW002J#EC2ui03`qw000L6z~3)GEE#PR9cZ6nG*}&4JegHz$YBS_T9Q1O`0@3+4a|TI5s&2L}@iH7Xdw3?C^~ z6y#B1H-Uza2=5}?n81Nbh!FzMR3WiJfPjb+qlBnv@glB_Q5qx|(Xk^&GZie9TzPU! lg$_AZ%4{h`q)M4MJ$}(b!bXP-oIovlQbM%ok{>|;06W>9?qC1_ literal 0 HcmV?d00001 diff --git a/public/images/store/gcheckout.gif b/public/images/store/gcheckout.gif new file mode 100644 index 0000000000000000000000000000000000000000..ffe58c1caa687749be28bfb50a043da24beb1de8 GIT binary patch literal 2675 zcmV-(3XJtfNk%w1VR8Tz0QUd@00030|NsB_-RI)T)XlL|ebnhlOYDS(?&#_K^!We$ z|NQ&>(9qGjy1fxNpc6Wy89t#KKA|Z{o-t3KK3SsB*zOZPsue`F7C)yKL8}@`xfnvN z7(uHVN4FO~qZ~`W8A7WYN3d%{gYuIc3K?Xv#ck%ROq$K5NWA zX~;us$VhR^Pb&|7`XYl_omgvoP|(tDNCjHB6=tKFQi+_S{#w#DYMz}~&f z>dDpc!p-N#(dy>w_V4ofKW)xGZOuY(&p~d@M|IIodD2mQ(^7rZTZ7hJh1gz(*k6a( zoU`Jfx8|U?<)yjfrMTX$zvZ^X;Ge6+nxnOon4;h2^z!xls;jN~`~9J|-mkyieu$fn zlblX+rmnx(xyISv;^_DJ{C=Ckr@Pm-#MZ30#*meqkgCeX(A~?_-;kA?7*v-!Y^7X; zvWlk0o3qZo%i1Pmp})k*oS&lg`1|to_Wb?+^!oqh>Fn(D`04HM_y7O*{QT|o^Y!@m zyxz#k;L+ys>M5U3;^pJ3*SU1NiPY!U*Vxzp|K928+yDRk-rn2)|Ni>=`S*?j^<>CGO`p3q^_~yp--@E_(_x`CZ_R^pG`S$yhkdK?ys)$&d&4U;r8izxw{QUg-`uh0z`1SSm^78WT z?(XO3=l}ozA^8LW00930EC2ui0CE5n000R800jtSmP}YGM1~S7T*$DY!-a(s5_02) zO&TCPbnw{7u_MPGL4*VuNwTELlP8C$T)9#tktB--ID00rX0m0e4$YAjpr_BDK!XYm zI?UX+P)Wq>@dGH(pr=ryJ{2S=kkzYLvufSSH4q>`ezaTxvS`~gXakpVdZVdWv3vLM z$(>8LuHC!%?&Uky4_p%+S@iJX)5lMN!-x|rUd*_0<3EKH`{^^7kCrN%tT_|FjM*hQ z!|>%Bjc?en1*21|UaeX|00pf1`n94(&z?PbzI@5UySMM(z=I194o1(QJXyME`2r@- z?b~>6Y}y75nW#kKjOo*tub93}u}o|K-%h@Kd1DKB_0qLqyuN+?+A;W%1q^d9SL|Q; z(uGPF`?>`vAaniwH{gNHZLtM_0eZ2A9Eq4g#u#91am5t|f}w>Dt2na^B97>D%rW{H z!wD*wpkhiY;*99xi!dIe04}@yvcQY{_(RMlHF(iQ7h8Bih!ak8$=F$NbG9?1n37nTu56liGwl7_oQBaSGg^m8YP^wbg$JO>;w4=m)Mvkp3~&=blgn<$dYF1E;Fo*vvp^5_-fEKMNojTM3i$|bC9W@KZDJ~H^ z1H>ay{IC=xC{P2#MS%v(OT!uhu!bOLq6kIM1QEms1U3+X4UX_Z8{A-oJA6+Kb2~y0 z9C$5kOeO_#|NmN5CNmMYuy9Do}?UFu@LN7{L_8 za0d2Sp$&*Yg8bl+2prG=kbran1+t+GH)Mi~U1W!fHi3#$pyC$s=+*&jaffn@3myB& zgebrWieLBw7xFM5JP_ayV2oo4C4j*U#+iZ^;2;MpcmWM?U;`VlQw2CU!VXqo&La3A z1n#uK3w9v?0~P#$2rqa+3w-bc8|2^xI2eKtS|EiUoIwp}_(28MV1W=^00(klLkMU< zgK^Se14|eHGBCjed$hwJ{;&r-z5$+Zu)`j zq6v#&1SKpX0Twvmzz9yTf*$~Z2srq`5RR~f9SngATlm5lhCmD^USP^vXCoLiBA~$$Vg7I zl8rnHB0KrXPd0KRAb|~OP@@_mrb$gWgN$GV0~ufrvzW(>jAWSk%w!g`nVqo>YgB_! z8qJu7GzdWFI@_55($L17@66{u`}xmxmc}%iL5%@egB#00%a#|-=tevG(OZVbGPrRK hYq+@@1IVDy9Gc literal 0 HcmV?d00001 diff --git a/public/images/store/mc.gif b/public/images/store/mc.gif new file mode 100644 index 0000000000000000000000000000000000000000..a2313881a1b8cbe5989a96f71beee4698ac4fd12 GIT binary patch literal 808 zcmZ?wbhEHbRAmrlc$UWS{==7lT6`1Jts~w1|Az=f%J^Pjm6{-IeyBzD1C!v#1(FAk zUj1JuffpYA>{f90bzHqHy`7x{b zKYRXzTaRAYeDMF}&VQo3|4-!HpEU2^xr-Mg<^H{U|L@(Uf1e*V$2t6;Cvsu&rY2FF zi@l2XnZ*u*%vS@_@2_x}&a{!`#P7^Qr0 z{j7iWt^c@r9~_+YZ~o$gZZYYS?*HyRSX}G<@A206Pp|!ZdE|kG#Ct=#HRXm|IaUA1 z3qClu;Qv1V_xlSjoV&1T_1XtLG82p}FQ`~PsL@)(r}O^8)e9|?4=&yIV4Cdz&4%wE zoY=H%-u#6QC^dsiB4*mNjaYTklHI|VrRosls=e3(n{_>TTPXU^DZUN|Imr8g=5 z#$E-UXNGqU=_hS}uswRN;d4faxgpv^LT4dsf{L}r1O)|FMsAh~kv)xTSmk{T z*&obha_sNi8^QD`RJfQ|j=lKyn@o<{$V*0NQ?hEp64q>8Qhr0ohx1r&li|e&3b7U+ vc1;)MNK(>hT;|Zw>ak5(G@|f<17p}kogATtqyy>?nngP0_n+`lV6X-Ns<=sx literal 0 HcmV?d00001 diff --git a/public/images/store/missing_field.png b/public/images/store/missing_field.png new file mode 100644 index 0000000000000000000000000000000000000000..ae54ebf203acf3f8f3f9e643b8d63c88cd87f211 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^JRmj)8<3o<+3y6TSkfJR9T^y|-MHc(VFct$mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-%c;OXKRQgJKk$N2*X8d$j*3k}RH zbGmLeR;UZ)A6VAd$tYUD^wCS9jQNp1PXxo`dY0MJt8Pf2+RuN4y=&v*hB3_oE6oo4+0ZS)`(oi1u8zG6{w#N>;gYi25b&!* z&T!5J4(6HLrc9Y}uT^`Qew&@do$l}o8FpKr>!JjE7M7Yv6eQlCRU_EqT z9?#aR&dDZcpLN&tcIP_~-;y34(>N_z9^5t}MHuLZWa`3ST^9Bnn zWT@ujn6Nu0|8nW(_?+s9FrI4eu+6Ob%dc33^ll6h2rdxd4cRQr^Cl#4sTBu%*RcQRoOocv!o%$X>I(!N3Y{9dmnvl4(YSb$rHe@?DQ3sUl*4`94zgW5 j6D}_CoFcCsm*ROz^?0X|dy(gg4M)4?I|Q~cFjxZsRQQ$2 literal 0 HcmV?d00001 diff --git a/public/images/store/printer.png b/public/images/store/printer.png new file mode 100644 index 0000000000000000000000000000000000000000..a350d1871536eb28fe2949936de1c79c1c26269d GIT binary patch literal 731 zcmV<10wn#3P)^msfbTI z9jQ^EwMRD5xNEm*sJPjH^k)@gXT@kl5ii6#6jNXX`Yb0kVgq(zut?ZfbRr+DS= z>q{33dTpWN$tl6c7nxE)4Qur1GCxuUnp5Y z5HK(>u&W4&EXz<>UtfnPivJ`O3Zb4K8yl-}7K;Uh5XR!-B2uXo6E#Dr&Ck!D<$0b5 zXEK?PNF*3;w;Rc15`MqGDN4rSaGd2kJ3GNmOiaM%^D*ppJL2&;mX?;95{t!PwOY^e z?d|R0=pOKTy$qMj1$rk8qtS@b(NQ*LUtb@(y1JlNtJzsS-`3U!Ze(Pn>hXBkfzr6} z{3Vv(2AlG1;RQN6I#_mYZVs)jt>6p>!_3go(6&ye1Mdo>SRyz&A^1T#%t=UROW6Bf zz^9CeqErU&3`3<-Da~6HQ^UW&yCT)$Cu literal 0 HcmV?d00001 diff --git a/public/images/store/rounded_tr.png b/public/images/store/rounded_tr.png new file mode 100644 index 0000000000000000000000000000000000000000..175f4787a9b2204dca0746907df76c0ba979f5e9 GIT binary patch literal 472 zcmV;}0Vn>6P)yFL5H}l{?gAAN zQBXS6p5N7hMADV74?Ot1yz>11sx%snN+M!<;4AnD-h&U8Wku8gQuzr=)0Aej8D&{U zNs>?;$CT&!E#A2TuMz0|U*>g}Q4~=S1Qdqh8;(Qp57Kpd z--WK0xd#{-8UN4Y|Ns9#mvsY>WFQ(S{$ycfU=U=`0qFqQ$-sIhLBupAb6!SOR}!;9 zfzJ7ovkbh}Mgi~tA6Ou8=)^{;JqwFGO}0%s^J4u9XRr0PuRb1pTeUxifq|#2Z%>;; z{+VD0wx;-ph6;UqpRrZsHfUVQa$#cR_vA_qO~_-&s}(2|U}WKE$*=2(j?c5yEJtc*;_~f!sZoZ3` zE?>ENjgPzX!u30MZ```~@aoO;kDl>yK5^&Ze*5nIhmW7QIV!cj|IijxWUvMR3qpd6 literal 0 HcmV?d00001 diff --git a/public/javascripts/application.js b/public/javascripts/application.js new file mode 100644 index 0000000..fe45776 --- /dev/null +++ b/public/javascripts/application.js @@ -0,0 +1,2 @@ +// Place your application-specific JavaScript functions and classes here +// This file is automatically included by javascript_include_tag :defaults diff --git a/public/javascripts/controls.js b/public/javascripts/controls.js new file mode 100644 index 0000000..8c273f8 --- /dev/null +++ b/public/javascripts/controls.js @@ -0,0 +1,833 @@ +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005, 2006 Ivan Krstic (http://blogs.law.harvard.edu/ivan) +// (c) 2005, 2006 Jon Tirsen (http://www.tirsen.com) +// Contributors: +// Richard Livsey +// Rahul Bhargava +// Rob Wills +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// Autocompleter.Base handles all the autocompletion functionality +// that's independent of the data source for autocompletion. This +// includes drawing the autocompletion menu, observing keyboard +// and mouse events, and similar. +// +// Specific autocompleters need to provide, at the very least, +// a getUpdatedChoices function that will be invoked every time +// the text inside the monitored textbox changes. This method +// should get the text for which to provide autocompletion by +// invoking this.getToken(), NOT by directly accessing +// this.element.value. This is to allow incremental tokenized +// autocompletion. Specific auto-completion logic (AJAX, etc) +// belongs in getUpdatedChoices. +// +// Tokenized incremental autocompletion is enabled automatically +// when an autocompleter is instantiated with the 'tokens' option +// in the options parameter, e.g.: +// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' }); +// will incrementally autocomplete with a comma as the token. +// Additionally, ',' in the above example can be replaced with +// a token array, e.g. { tokens: [',', '\n'] } which +// enables autocompletion on multiple tokens. This is most +// useful when one of the tokens is \n (a newline), as it +// allows smart autocompletion after linebreaks. + +if(typeof Effect == 'undefined') + throw("controls.js requires including script.aculo.us' effects.js library"); + +var Autocompleter = {} +Autocompleter.Base = function() {}; +Autocompleter.Base.prototype = { + baseInitialize: function(element, update, options) { + this.element = $(element); + this.update = $(update); + this.hasFocus = false; + this.changed = false; + this.active = false; + this.index = 0; + this.entryCount = 0; + + if(this.setOptions) + this.setOptions(options); + else + this.options = options || {}; + + this.options.paramName = this.options.paramName || this.element.name; + this.options.tokens = this.options.tokens || []; + this.options.frequency = this.options.frequency || 0.4; + this.options.minChars = this.options.minChars || 1; + this.options.onShow = this.options.onShow || + function(element, update){ + if(!update.style.position || update.style.position=='absolute') { + update.style.position = 'absolute'; + Position.clone(element, update, { + setHeight: false, + offsetTop: element.offsetHeight + }); + } + Effect.Appear(update,{duration:0.15}); + }; + this.options.onHide = this.options.onHide || + function(element, update){ new Effect.Fade(update,{duration:0.15}) }; + + if(typeof(this.options.tokens) == 'string') + this.options.tokens = new Array(this.options.tokens); + + this.observer = null; + + this.element.setAttribute('autocomplete','off'); + + Element.hide(this.update); + + Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); + Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); + }, + + show: function() { + if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update); + if(!this.iefix && + (navigator.appVersion.indexOf('MSIE')>0) && + (navigator.userAgent.indexOf('Opera')<0) && + (Element.getStyle(this.update, 'position')=='absolute')) { + new Insertion.After(this.update, + ''); + this.iefix = $(this.update.id+'_iefix'); + } + if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); + }, + + fixIEOverlapping: function() { + Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); + this.iefix.style.zIndex = 1; + this.update.style.zIndex = 2; + Element.show(this.iefix); + }, + + hide: function() { + this.stopIndicator(); + if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); + if(this.iefix) Element.hide(this.iefix); + }, + + startIndicator: function() { + if(this.options.indicator) Element.show(this.options.indicator); + }, + + stopIndicator: function() { + if(this.options.indicator) Element.hide(this.options.indicator); + }, + + onKeyPress: function(event) { + if(this.active) + switch(event.keyCode) { + case Event.KEY_TAB: + case Event.KEY_RETURN: + this.selectEntry(); + Event.stop(event); + case Event.KEY_ESC: + this.hide(); + this.active = false; + Event.stop(event); + return; + case Event.KEY_LEFT: + case Event.KEY_RIGHT: + return; + case Event.KEY_UP: + this.markPrevious(); + this.render(); + if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); + return; + case Event.KEY_DOWN: + this.markNext(); + this.render(); + if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); + return; + } + else + if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || + (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return; + + this.changed = true; + this.hasFocus = true; + + if(this.observer) clearTimeout(this.observer); + this.observer = + setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); + }, + + activate: function() { + this.changed = false; + this.hasFocus = true; + this.getUpdatedChoices(); + }, + + onHover: function(event) { + var element = Event.findElement(event, 'LI'); + if(this.index != element.autocompleteIndex) + { + this.index = element.autocompleteIndex; + this.render(); + } + Event.stop(event); + }, + + onClick: function(event) { + var element = Event.findElement(event, 'LI'); + this.index = element.autocompleteIndex; + this.selectEntry(); + this.hide(); + }, + + onBlur: function(event) { + // needed to make click events working + setTimeout(this.hide.bind(this), 250); + this.hasFocus = false; + this.active = false; + }, + + render: function() { + if(this.entryCount > 0) { + for (var i = 0; i < this.entryCount; i++) + this.index==i ? + Element.addClassName(this.getEntry(i),"selected") : + Element.removeClassName(this.getEntry(i),"selected"); + + if(this.hasFocus) { + this.show(); + this.active = true; + } + } else { + this.active = false; + this.hide(); + } + }, + + markPrevious: function() { + if(this.index > 0) this.index-- + else this.index = this.entryCount-1; + this.getEntry(this.index).scrollIntoView(true); + }, + + markNext: function() { + if(this.index < this.entryCount-1) this.index++ + else this.index = 0; + this.getEntry(this.index).scrollIntoView(false); + }, + + getEntry: function(index) { + return this.update.firstChild.childNodes[index]; + }, + + getCurrentEntry: function() { + return this.getEntry(this.index); + }, + + selectEntry: function() { + this.active = false; + this.updateElement(this.getCurrentEntry()); + }, + + updateElement: function(selectedElement) { + if (this.options.updateElement) { + this.options.updateElement(selectedElement); + return; + } + var value = ''; + if (this.options.select) { + var nodes = document.getElementsByClassName(this.options.select, selectedElement) || []; + if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); + } else + value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); + + var lastTokenPos = this.findLastToken(); + if (lastTokenPos != -1) { + var newValue = this.element.value.substr(0, lastTokenPos + 1); + var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/); + if (whitespace) + newValue += whitespace[0]; + this.element.value = newValue + value; + } else { + this.element.value = value; + } + this.element.focus(); + + if (this.options.afterUpdateElement) + this.options.afterUpdateElement(this.element, selectedElement); + }, + + updateChoices: function(choices) { + if(!this.changed && this.hasFocus) { + this.update.innerHTML = choices; + Element.cleanWhitespace(this.update); + Element.cleanWhitespace(this.update.down()); + + if(this.update.firstChild && this.update.down().childNodes) { + this.entryCount = + this.update.down().childNodes.length; + for (var i = 0; i < this.entryCount; i++) { + var entry = this.getEntry(i); + entry.autocompleteIndex = i; + this.addObservers(entry); + } + } else { + this.entryCount = 0; + } + + this.stopIndicator(); + this.index = 0; + + if(this.entryCount==1 && this.options.autoSelect) { + this.selectEntry(); + this.hide(); + } else { + this.render(); + } + } + }, + + addObservers: function(element) { + Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); + Event.observe(element, "click", this.onClick.bindAsEventListener(this)); + }, + + onObserverEvent: function() { + this.changed = false; + if(this.getToken().length>=this.options.minChars) { + this.startIndicator(); + this.getUpdatedChoices(); + } else { + this.active = false; + this.hide(); + } + }, + + getToken: function() { + var tokenPos = this.findLastToken(); + if (tokenPos != -1) + var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,''); + else + var ret = this.element.value; + + return /\n/.test(ret) ? '' : ret; + }, + + findLastToken: function() { + var lastTokenPos = -1; + + for (var i=0; i lastTokenPos) + lastTokenPos = thisTokenPos; + } + return lastTokenPos; + } +} + +Ajax.Autocompleter = Class.create(); +Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), { + initialize: function(element, update, url, options) { + this.baseInitialize(element, update, options); + this.options.asynchronous = true; + this.options.onComplete = this.onComplete.bind(this); + this.options.defaultParams = this.options.parameters || null; + this.url = url; + }, + + getUpdatedChoices: function() { + entry = encodeURIComponent(this.options.paramName) + '=' + + encodeURIComponent(this.getToken()); + + this.options.parameters = this.options.callback ? + this.options.callback(this.element, entry) : entry; + + if(this.options.defaultParams) + this.options.parameters += '&' + this.options.defaultParams; + + new Ajax.Request(this.url, this.options); + }, + + onComplete: function(request) { + this.updateChoices(request.responseText); + } + +}); + +// The local array autocompleter. Used when you'd prefer to +// inject an array of autocompletion options into the page, rather +// than sending out Ajax queries, which can be quite slow sometimes. +// +// The constructor takes four parameters. The first two are, as usual, +// the id of the monitored textbox, and id of the autocompletion menu. +// The third is the array you want to autocomplete from, and the fourth +// is the options block. +// +// Extra local autocompletion options: +// - choices - How many autocompletion choices to offer +// +// - partialSearch - If false, the autocompleter will match entered +// text only at the beginning of strings in the +// autocomplete array. Defaults to true, which will +// match text at the beginning of any *word* in the +// strings in the autocomplete array. If you want to +// search anywhere in the string, additionally set +// the option fullSearch to true (default: off). +// +// - fullSsearch - Search anywhere in autocomplete array strings. +// +// - partialChars - How many characters to enter before triggering +// a partial match (unlike minChars, which defines +// how many characters are required to do any match +// at all). Defaults to 2. +// +// - ignoreCase - Whether to ignore case when autocompleting. +// Defaults to true. +// +// It's possible to pass in a custom function as the 'selector' +// option, if you prefer to write your own autocompletion logic. +// In that case, the other options above will not apply unless +// you support them. + +Autocompleter.Local = Class.create(); +Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), { + initialize: function(element, update, array, options) { + this.baseInitialize(element, update, options); + this.options.array = array; + }, + + getUpdatedChoices: function() { + this.updateChoices(this.options.selector(this)); + }, + + setOptions: function(options) { + this.options = Object.extend({ + choices: 10, + partialSearch: true, + partialChars: 2, + ignoreCase: true, + fullSearch: false, + selector: function(instance) { + var ret = []; // Beginning matches + var partial = []; // Inside matches + var entry = instance.getToken(); + var count = 0; + + for (var i = 0; i < instance.options.array.length && + ret.length < instance.options.choices ; i++) { + + var elem = instance.options.array[i]; + var foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase()) : + elem.indexOf(entry); + + while (foundPos != -1) { + if (foundPos == 0 && elem.length != entry.length) { + ret.push("
  • " + elem.substr(0, entry.length) + "" + + elem.substr(entry.length) + "
  • "); + break; + } else if (entry.length >= instance.options.partialChars && + instance.options.partialSearch && foundPos != -1) { + if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { + partial.push("
  • " + elem.substr(0, foundPos) + "" + + elem.substr(foundPos, entry.length) + "" + elem.substr( + foundPos + entry.length) + "
  • "); + break; + } + } + + foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : + elem.indexOf(entry, foundPos + 1); + + } + } + if (partial.length) + ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) + return "
      " + ret.join('') + "
    "; + } + }, options || {}); + } +}); + +// AJAX in-place editor +// +// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor + +// Use this if you notice weird scrolling problems on some browsers, +// the DOM might be a bit confused when this gets called so do this +// waits 1 ms (with setTimeout) until it does the activation +Field.scrollFreeActivate = function(field) { + setTimeout(function() { + Field.activate(field); + }, 1); +} + +Ajax.InPlaceEditor = Class.create(); +Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99"; +Ajax.InPlaceEditor.prototype = { + initialize: function(element, url, options) { + this.url = url; + this.element = $(element); + + this.options = Object.extend({ + paramName: "value", + okButton: true, + okText: "ok", + cancelLink: true, + cancelText: "cancel", + savingText: "Saving...", + clickToEditText: "Click to edit", + okText: "ok", + rows: 1, + onComplete: function(transport, element) { + new Effect.Highlight(element, {startcolor: this.options.highlightcolor}); + }, + onFailure: function(transport) { + alert("Error communicating with the server: " + transport.responseText.stripTags()); + }, + callback: function(form) { + return Form.serialize(form); + }, + handleLineBreaks: true, + loadingText: 'Loading...', + savingClassName: 'inplaceeditor-saving', + loadingClassName: 'inplaceeditor-loading', + formClassName: 'inplaceeditor-form', + highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor, + highlightendcolor: "#FFFFFF", + externalControl: null, + submitOnBlur: false, + ajaxOptions: {}, + evalScripts: false + }, options || {}); + + if(!this.options.formId && this.element.id) { + this.options.formId = this.element.id + "-inplaceeditor"; + if ($(this.options.formId)) { + // there's already a form with that name, don't specify an id + this.options.formId = null; + } + } + + if (this.options.externalControl) { + this.options.externalControl = $(this.options.externalControl); + } + + this.originalBackground = Element.getStyle(this.element, 'background-color'); + if (!this.originalBackground) { + this.originalBackground = "transparent"; + } + + this.element.title = this.options.clickToEditText; + + this.onclickListener = this.enterEditMode.bindAsEventListener(this); + this.mouseoverListener = this.enterHover.bindAsEventListener(this); + this.mouseoutListener = this.leaveHover.bindAsEventListener(this); + Event.observe(this.element, 'click', this.onclickListener); + Event.observe(this.element, 'mouseover', this.mouseoverListener); + Event.observe(this.element, 'mouseout', this.mouseoutListener); + if (this.options.externalControl) { + Event.observe(this.options.externalControl, 'click', this.onclickListener); + Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener); + Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener); + } + }, + enterEditMode: function(evt) { + if (this.saving) return; + if (this.editing) return; + this.editing = true; + this.onEnterEditMode(); + if (this.options.externalControl) { + Element.hide(this.options.externalControl); + } + Element.hide(this.element); + this.createForm(); + this.element.parentNode.insertBefore(this.form, this.element); + if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField); + // stop the event to avoid a page refresh in Safari + if (evt) { + Event.stop(evt); + } + return false; + }, + createForm: function() { + this.form = document.createElement("form"); + this.form.id = this.options.formId; + Element.addClassName(this.form, this.options.formClassName) + this.form.onsubmit = this.onSubmit.bind(this); + + this.createEditField(); + + if (this.options.textarea) { + var br = document.createElement("br"); + this.form.appendChild(br); + } + + if (this.options.okButton) { + okButton = document.createElement("input"); + okButton.type = "submit"; + okButton.value = this.options.okText; + okButton.className = 'editor_ok_button'; + this.form.appendChild(okButton); + } + + if (this.options.cancelLink) { + cancelLink = document.createElement("a"); + cancelLink.href = "#"; + cancelLink.appendChild(document.createTextNode(this.options.cancelText)); + cancelLink.onclick = this.onclickCancel.bind(this); + cancelLink.className = 'editor_cancel'; + this.form.appendChild(cancelLink); + } + }, + hasHTMLLineBreaks: function(string) { + if (!this.options.handleLineBreaks) return false; + return string.match(/
    /i); + }, + convertHTMLLineBreaks: function(string) { + return string.replace(/
    /gi, "\n").replace(//gi, "\n").replace(/<\/p>/gi, "\n").replace(/

    /gi, ""); + }, + createEditField: function() { + var text; + if(this.options.loadTextURL) { + text = this.options.loadingText; + } else { + text = this.getText(); + } + + var obj = this; + + if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) { + this.options.textarea = false; + var textField = document.createElement("input"); + textField.obj = this; + textField.type = "text"; + textField.name = this.options.paramName; + textField.value = text; + textField.style.backgroundColor = this.options.highlightcolor; + textField.className = 'editor_field'; + var size = this.options.size || this.options.cols || 0; + if (size != 0) textField.size = size; + if (this.options.submitOnBlur) + textField.onblur = this.onSubmit.bind(this); + this.editField = textField; + } else { + this.options.textarea = true; + var textArea = document.createElement("textarea"); + textArea.obj = this; + textArea.name = this.options.paramName; + textArea.value = this.convertHTMLLineBreaks(text); + textArea.rows = this.options.rows; + textArea.cols = this.options.cols || 40; + textArea.className = 'editor_field'; + if (this.options.submitOnBlur) + textArea.onblur = this.onSubmit.bind(this); + this.editField = textArea; + } + + if(this.options.loadTextURL) { + this.loadExternalText(); + } + this.form.appendChild(this.editField); + }, + getText: function() { + return this.element.innerHTML; + }, + loadExternalText: function() { + Element.addClassName(this.form, this.options.loadingClassName); + this.editField.disabled = true; + new Ajax.Request( + this.options.loadTextURL, + Object.extend({ + asynchronous: true, + onComplete: this.onLoadedExternalText.bind(this) + }, this.options.ajaxOptions) + ); + }, + onLoadedExternalText: function(transport) { + Element.removeClassName(this.form, this.options.loadingClassName); + this.editField.disabled = false; + this.editField.value = transport.responseText.stripTags(); + Field.scrollFreeActivate(this.editField); + }, + onclickCancel: function() { + this.onComplete(); + this.leaveEditMode(); + return false; + }, + onFailure: function(transport) { + this.options.onFailure(transport); + if (this.oldInnerHTML) { + this.element.innerHTML = this.oldInnerHTML; + this.oldInnerHTML = null; + } + return false; + }, + onSubmit: function() { + // onLoading resets these so we need to save them away for the Ajax call + var form = this.form; + var value = this.editField.value; + + // do this first, sometimes the ajax call returns before we get a chance to switch on Saving... + // which means this will actually switch on Saving... *after* we've left edit mode causing Saving... + // to be displayed indefinitely + this.onLoading(); + + if (this.options.evalScripts) { + new Ajax.Request( + this.url, Object.extend({ + parameters: this.options.callback(form, value), + onComplete: this.onComplete.bind(this), + onFailure: this.onFailure.bind(this), + asynchronous:true, + evalScripts:true + }, this.options.ajaxOptions)); + } else { + new Ajax.Updater( + { success: this.element, + // don't update on failure (this could be an option) + failure: null }, + this.url, Object.extend({ + parameters: this.options.callback(form, value), + onComplete: this.onComplete.bind(this), + onFailure: this.onFailure.bind(this) + }, this.options.ajaxOptions)); + } + // stop the event to avoid a page refresh in Safari + if (arguments.length > 1) { + Event.stop(arguments[0]); + } + return false; + }, + onLoading: function() { + this.saving = true; + this.removeForm(); + this.leaveHover(); + this.showSaving(); + }, + showSaving: function() { + this.oldInnerHTML = this.element.innerHTML; + this.element.innerHTML = this.options.savingText; + Element.addClassName(this.element, this.options.savingClassName); + this.element.style.backgroundColor = this.originalBackground; + Element.show(this.element); + }, + removeForm: function() { + if(this.form) { + if (this.form.parentNode) Element.remove(this.form); + this.form = null; + } + }, + enterHover: function() { + if (this.saving) return; + this.element.style.backgroundColor = this.options.highlightcolor; + if (this.effect) { + this.effect.cancel(); + } + Element.addClassName(this.element, this.options.hoverClassName) + }, + leaveHover: function() { + if (this.options.backgroundColor) { + this.element.style.backgroundColor = this.oldBackground; + } + Element.removeClassName(this.element, this.options.hoverClassName) + if (this.saving) return; + this.effect = new Effect.Highlight(this.element, { + startcolor: this.options.highlightcolor, + endcolor: this.options.highlightendcolor, + restorecolor: this.originalBackground + }); + }, + leaveEditMode: function() { + Element.removeClassName(this.element, this.options.savingClassName); + this.removeForm(); + this.leaveHover(); + this.element.style.backgroundColor = this.originalBackground; + Element.show(this.element); + if (this.options.externalControl) { + Element.show(this.options.externalControl); + } + this.editing = false; + this.saving = false; + this.oldInnerHTML = null; + this.onLeaveEditMode(); + }, + onComplete: function(transport) { + this.leaveEditMode(); + this.options.onComplete.bind(this)(transport, this.element); + }, + onEnterEditMode: function() {}, + onLeaveEditMode: function() {}, + dispose: function() { + if (this.oldInnerHTML) { + this.element.innerHTML = this.oldInnerHTML; + } + this.leaveEditMode(); + Event.stopObserving(this.element, 'click', this.onclickListener); + Event.stopObserving(this.element, 'mouseover', this.mouseoverListener); + Event.stopObserving(this.element, 'mouseout', this.mouseoutListener); + if (this.options.externalControl) { + Event.stopObserving(this.options.externalControl, 'click', this.onclickListener); + Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener); + Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener); + } + } +}; + +Ajax.InPlaceCollectionEditor = Class.create(); +Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype); +Object.extend(Ajax.InPlaceCollectionEditor.prototype, { + createEditField: function() { + if (!this.cached_selectTag) { + var selectTag = document.createElement("select"); + var collection = this.options.collection || []; + var optionTag; + collection.each(function(e,i) { + optionTag = document.createElement("option"); + optionTag.value = (e instanceof Array) ? e[0] : e; + if((typeof this.options.value == 'undefined') && + ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true; + if(this.options.value==optionTag.value) optionTag.selected = true; + optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e)); + selectTag.appendChild(optionTag); + }.bind(this)); + this.cached_selectTag = selectTag; + } + + this.editField = this.cached_selectTag; + if(this.options.loadTextURL) this.loadExternalText(); + this.form.appendChild(this.editField); + this.options.callback = function(form, value) { + return "value=" + encodeURIComponent(value); + } + } +}); + +// Delayed observer, like Form.Element.Observer, +// but waits for delay after last key input +// Ideal for live-search fields + +Form.Element.DelayedObserver = Class.create(); +Form.Element.DelayedObserver.prototype = { + initialize: function(element, delay, callback) { + this.delay = delay || 0.5; + this.element = $(element); + this.callback = callback; + this.timer = null; + this.lastValue = $F(this.element); + Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); + }, + delayedListener: function(event) { + if(this.lastValue == $F(this.element)) return; + if(this.timer) clearTimeout(this.timer); + this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); + this.lastValue = $F(this.element); + }, + onTimerEvent: function() { + this.timer = null; + this.callback(this.element, $F(this.element)); + } +}; diff --git a/public/javascripts/dragdrop.js b/public/javascripts/dragdrop.js new file mode 100644 index 0000000..c71ddb8 --- /dev/null +++ b/public/javascripts/dragdrop.js @@ -0,0 +1,942 @@ +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005, 2006 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +if(typeof Effect == 'undefined') + throw("dragdrop.js requires including script.aculo.us' effects.js library"); + +var Droppables = { + drops: [], + + remove: function(element) { + this.drops = this.drops.reject(function(d) { return d.element==$(element) }); + }, + + add: function(element) { + element = $(element); + var options = Object.extend({ + greedy: true, + hoverclass: null, + tree: false + }, arguments[1] || {}); + + // cache containers + if(options.containment) { + options._containers = []; + var containment = options.containment; + if((typeof containment == 'object') && + (containment.constructor == Array)) { + containment.each( function(c) { options._containers.push($(c)) }); + } else { + options._containers.push($(containment)); + } + } + + if(options.accept) options.accept = [options.accept].flatten(); + + Element.makePositioned(element); // fix IE + options.element = element; + + this.drops.push(options); + }, + + findDeepestChild: function(drops) { + deepest = drops[0]; + + for (i = 1; i < drops.length; ++i) + if (Element.isParent(drops[i].element, deepest.element)) + deepest = drops[i]; + + return deepest; + }, + + isContained: function(element, drop) { + var containmentNode; + if(drop.tree) { + containmentNode = element.treeNode; + } else { + containmentNode = element.parentNode; + } + return drop._containers.detect(function(c) { return containmentNode == c }); + }, + + isAffected: function(point, element, drop) { + return ( + (drop.element!=element) && + ((!drop._containers) || + this.isContained(element, drop)) && + ((!drop.accept) || + (Element.classNames(element).detect( + function(v) { return drop.accept.include(v) } ) )) && + Position.within(drop.element, point[0], point[1]) ); + }, + + deactivate: function(drop) { + if(drop.hoverclass) + Element.removeClassName(drop.element, drop.hoverclass); + this.last_active = null; + }, + + activate: function(drop) { + if(drop.hoverclass) + Element.addClassName(drop.element, drop.hoverclass); + this.last_active = drop; + }, + + show: function(point, element) { + if(!this.drops.length) return; + var affected = []; + + if(this.last_active) this.deactivate(this.last_active); + this.drops.each( function(drop) { + if(Droppables.isAffected(point, element, drop)) + affected.push(drop); + }); + + if(affected.length>0) { + drop = Droppables.findDeepestChild(affected); + Position.within(drop.element, point[0], point[1]); + if(drop.onHover) + drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); + + Droppables.activate(drop); + } + }, + + fire: function(event, element) { + if(!this.last_active) return; + Position.prepare(); + + if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) + if (this.last_active.onDrop) + this.last_active.onDrop(element, this.last_active.element, event); + }, + + reset: function() { + if(this.last_active) + this.deactivate(this.last_active); + } +} + +var Draggables = { + drags: [], + observers: [], + + register: function(draggable) { + if(this.drags.length == 0) { + this.eventMouseUp = this.endDrag.bindAsEventListener(this); + this.eventMouseMove = this.updateDrag.bindAsEventListener(this); + this.eventKeypress = this.keyPress.bindAsEventListener(this); + + Event.observe(document, "mouseup", this.eventMouseUp); + Event.observe(document, "mousemove", this.eventMouseMove); + Event.observe(document, "keypress", this.eventKeypress); + } + this.drags.push(draggable); + }, + + unregister: function(draggable) { + this.drags = this.drags.reject(function(d) { return d==draggable }); + if(this.drags.length == 0) { + Event.stopObserving(document, "mouseup", this.eventMouseUp); + Event.stopObserving(document, "mousemove", this.eventMouseMove); + Event.stopObserving(document, "keypress", this.eventKeypress); + } + }, + + activate: function(draggable) { + if(draggable.options.delay) { + this._timeout = setTimeout(function() { + Draggables._timeout = null; + window.focus(); + Draggables.activeDraggable = draggable; + }.bind(this), draggable.options.delay); + } else { + window.focus(); // allows keypress events if window isn't currently focused, fails for Safari + this.activeDraggable = draggable; + } + }, + + deactivate: function() { + this.activeDraggable = null; + }, + + updateDrag: function(event) { + if(!this.activeDraggable) return; + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + // Mozilla-based browsers fire successive mousemove events with + // the same coordinates, prevent needless redrawing (moz bug?) + if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; + this._lastPointer = pointer; + + this.activeDraggable.updateDrag(event, pointer); + }, + + endDrag: function(event) { + if(this._timeout) { + clearTimeout(this._timeout); + this._timeout = null; + } + if(!this.activeDraggable) return; + this._lastPointer = null; + this.activeDraggable.endDrag(event); + this.activeDraggable = null; + }, + + keyPress: function(event) { + if(this.activeDraggable) + this.activeDraggable.keyPress(event); + }, + + addObserver: function(observer) { + this.observers.push(observer); + this._cacheObserverCallbacks(); + }, + + removeObserver: function(element) { // element instead of observer fixes mem leaks + this.observers = this.observers.reject( function(o) { return o.element==element }); + this._cacheObserverCallbacks(); + }, + + notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' + if(this[eventName+'Count'] > 0) + this.observers.each( function(o) { + if(o[eventName]) o[eventName](eventName, draggable, event); + }); + if(draggable.options[eventName]) draggable.options[eventName](draggable, event); + }, + + _cacheObserverCallbacks: function() { + ['onStart','onEnd','onDrag'].each( function(eventName) { + Draggables[eventName+'Count'] = Draggables.observers.select( + function(o) { return o[eventName]; } + ).length; + }); + } +} + +/*--------------------------------------------------------------------------*/ + +var Draggable = Class.create(); +Draggable._dragging = {}; + +Draggable.prototype = { + initialize: function(element) { + var defaults = { + handle: false, + reverteffect: function(element, top_offset, left_offset) { + var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; + new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, + queue: {scope:'_draggable', position:'end'} + }); + }, + endeffect: function(element) { + var toOpacity = typeof element._opacity == 'number' ? element._opacity : 1.0; + new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, + queue: {scope:'_draggable', position:'end'}, + afterFinish: function(){ + Draggable._dragging[element] = false + } + }); + }, + zindex: 1000, + revert: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } + delay: 0 + }; + + if(!arguments[1] || typeof arguments[1].endeffect == 'undefined') + Object.extend(defaults, { + starteffect: function(element) { + element._opacity = Element.getOpacity(element); + Draggable._dragging[element] = true; + new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); + } + }); + + var options = Object.extend(defaults, arguments[1] || {}); + + this.element = $(element); + + if(options.handle && (typeof options.handle == 'string')) + this.handle = this.element.down('.'+options.handle, 0); + + if(!this.handle) this.handle = $(options.handle); + if(!this.handle) this.handle = this.element; + + if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { + options.scroll = $(options.scroll); + this._isScrollChild = Element.childOf(this.element, options.scroll); + } + + Element.makePositioned(this.element); // fix IE + + this.delta = this.currentDelta(); + this.options = options; + this.dragging = false; + + this.eventMouseDown = this.initDrag.bindAsEventListener(this); + Event.observe(this.handle, "mousedown", this.eventMouseDown); + + Draggables.register(this); + }, + + destroy: function() { + Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); + Draggables.unregister(this); + }, + + currentDelta: function() { + return([ + parseInt(Element.getStyle(this.element,'left') || '0'), + parseInt(Element.getStyle(this.element,'top') || '0')]); + }, + + initDrag: function(event) { + if(typeof Draggable._dragging[this.element] != 'undefined' && + Draggable._dragging[this.element]) return; + if(Event.isLeftClick(event)) { + // abort on form elements, fixes a Firefox issue + var src = Event.element(event); + if(src.tagName && ( + src.tagName=='INPUT' || + src.tagName=='SELECT' || + src.tagName=='OPTION' || + src.tagName=='BUTTON' || + src.tagName=='TEXTAREA')) return; + + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var pos = Position.cumulativeOffset(this.element); + this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); + + Draggables.activate(this); + Event.stop(event); + } + }, + + startDrag: function(event) { + this.dragging = true; + + if(this.options.zindex) { + this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); + this.element.style.zIndex = this.options.zindex; + } + + if(this.options.ghosting) { + this._clone = this.element.cloneNode(true); + Position.absolutize(this.element); + this.element.parentNode.insertBefore(this._clone, this.element); + } + + if(this.options.scroll) { + if (this.options.scroll == window) { + var where = this._getWindowScroll(this.options.scroll); + this.originalScrollLeft = where.left; + this.originalScrollTop = where.top; + } else { + this.originalScrollLeft = this.options.scroll.scrollLeft; + this.originalScrollTop = this.options.scroll.scrollTop; + } + } + + Draggables.notify('onStart', this, event); + + if(this.options.starteffect) this.options.starteffect(this.element); + }, + + updateDrag: function(event, pointer) { + if(!this.dragging) this.startDrag(event); + Position.prepare(); + Droppables.show(pointer, this.element); + Draggables.notify('onDrag', this, event); + + this.draw(pointer); + if(this.options.change) this.options.change(this); + + if(this.options.scroll) { + this.stopScrolling(); + + var p; + if (this.options.scroll == window) { + with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } + } else { + p = Position.page(this.options.scroll); + p[0] += this.options.scroll.scrollLeft + Position.deltaX; + p[1] += this.options.scroll.scrollTop + Position.deltaY; + p.push(p[0]+this.options.scroll.offsetWidth); + p.push(p[1]+this.options.scroll.offsetHeight); + } + var speed = [0,0]; + if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); + if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); + if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); + if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); + this.startScrolling(speed); + } + + // fix AppleWebKit rendering + if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); + + Event.stop(event); + }, + + finishDrag: function(event, success) { + this.dragging = false; + + if(this.options.ghosting) { + Position.relativize(this.element); + Element.remove(this._clone); + this._clone = null; + } + + if(success) Droppables.fire(event, this.element); + Draggables.notify('onEnd', this, event); + + var revert = this.options.revert; + if(revert && typeof revert == 'function') revert = revert(this.element); + + var d = this.currentDelta(); + if(revert && this.options.reverteffect) { + this.options.reverteffect(this.element, + d[1]-this.delta[1], d[0]-this.delta[0]); + } else { + this.delta = d; + } + + if(this.options.zindex) + this.element.style.zIndex = this.originalZ; + + if(this.options.endeffect) + this.options.endeffect(this.element); + + Draggables.deactivate(this); + Droppables.reset(); + }, + + keyPress: function(event) { + if(event.keyCode!=Event.KEY_ESC) return; + this.finishDrag(event, false); + Event.stop(event); + }, + + endDrag: function(event) { + if(!this.dragging) return; + this.stopScrolling(); + this.finishDrag(event, true); + Event.stop(event); + }, + + draw: function(point) { + var pos = Position.cumulativeOffset(this.element); + if(this.options.ghosting) { + var r = Position.realOffset(this.element); + pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; + } + + var d = this.currentDelta(); + pos[0] -= d[0]; pos[1] -= d[1]; + + if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { + pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; + pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; + } + + var p = [0,1].map(function(i){ + return (point[i]-pos[i]-this.offset[i]) + }.bind(this)); + + if(this.options.snap) { + if(typeof this.options.snap == 'function') { + p = this.options.snap(p[0],p[1],this); + } else { + if(this.options.snap instanceof Array) { + p = p.map( function(v, i) { + return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this)) + } else { + p = p.map( function(v) { + return Math.round(v/this.options.snap)*this.options.snap }.bind(this)) + } + }} + + var style = this.element.style; + if((!this.options.constraint) || (this.options.constraint=='horizontal')) + style.left = p[0] + "px"; + if((!this.options.constraint) || (this.options.constraint=='vertical')) + style.top = p[1] + "px"; + + if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering + }, + + stopScrolling: function() { + if(this.scrollInterval) { + clearInterval(this.scrollInterval); + this.scrollInterval = null; + Draggables._lastScrollPointer = null; + } + }, + + startScrolling: function(speed) { + if(!(speed[0] || speed[1])) return; + this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; + this.lastScrolled = new Date(); + this.scrollInterval = setInterval(this.scroll.bind(this), 10); + }, + + scroll: function() { + var current = new Date(); + var delta = current - this.lastScrolled; + this.lastScrolled = current; + if(this.options.scroll == window) { + with (this._getWindowScroll(this.options.scroll)) { + if (this.scrollSpeed[0] || this.scrollSpeed[1]) { + var d = delta / 1000; + this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); + } + } + } else { + this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; + this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; + } + + Position.prepare(); + Droppables.show(Draggables._lastPointer, this.element); + Draggables.notify('onDrag', this); + if (this._isScrollChild) { + Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); + Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; + Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; + if (Draggables._lastScrollPointer[0] < 0) + Draggables._lastScrollPointer[0] = 0; + if (Draggables._lastScrollPointer[1] < 0) + Draggables._lastScrollPointer[1] = 0; + this.draw(Draggables._lastScrollPointer); + } + + if(this.options.change) this.options.change(this); + }, + + _getWindowScroll: function(w) { + var T, L, W, H; + with (w.document) { + if (w.document.documentElement && documentElement.scrollTop) { + T = documentElement.scrollTop; + L = documentElement.scrollLeft; + } else if (w.document.body) { + T = body.scrollTop; + L = body.scrollLeft; + } + if (w.innerWidth) { + W = w.innerWidth; + H = w.innerHeight; + } else if (w.document.documentElement && documentElement.clientWidth) { + W = documentElement.clientWidth; + H = documentElement.clientHeight; + } else { + W = body.offsetWidth; + H = body.offsetHeight + } + } + return { top: T, left: L, width: W, height: H }; + } +} + +/*--------------------------------------------------------------------------*/ + +var SortableObserver = Class.create(); +SortableObserver.prototype = { + initialize: function(element, observer) { + this.element = $(element); + this.observer = observer; + this.lastValue = Sortable.serialize(this.element); + }, + + onStart: function() { + this.lastValue = Sortable.serialize(this.element); + }, + + onEnd: function() { + Sortable.unmark(); + if(this.lastValue != Sortable.serialize(this.element)) + this.observer(this.element) + } +} + +var Sortable = { + SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, + + sortables: {}, + + _findRootElement: function(element) { + while (element.tagName != "BODY") { + if(element.id && Sortable.sortables[element.id]) return element; + element = element.parentNode; + } + }, + + options: function(element) { + element = Sortable._findRootElement($(element)); + if(!element) return; + return Sortable.sortables[element.id]; + }, + + destroy: function(element){ + var s = Sortable.options(element); + + if(s) { + Draggables.removeObserver(s.element); + s.droppables.each(function(d){ Droppables.remove(d) }); + s.draggables.invoke('destroy'); + + delete Sortable.sortables[s.element.id]; + } + }, + + create: function(element) { + element = $(element); + var options = Object.extend({ + element: element, + tag: 'li', // assumes li children, override with tag: 'tagname' + dropOnEmpty: false, + tree: false, + treeTag: 'ul', + overlap: 'vertical', // one of 'vertical', 'horizontal' + constraint: 'vertical', // one of 'vertical', 'horizontal', false + containment: element, // also takes array of elements (or id's); or false + handle: false, // or a CSS class + only: false, + delay: 0, + hoverclass: null, + ghosting: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + format: this.SERIALIZE_RULE, + onChange: Prototype.emptyFunction, + onUpdate: Prototype.emptyFunction + }, arguments[1] || {}); + + // clear any old sortable with same element + this.destroy(element); + + // build options for the draggables + var options_for_draggable = { + revert: true, + scroll: options.scroll, + scrollSpeed: options.scrollSpeed, + scrollSensitivity: options.scrollSensitivity, + delay: options.delay, + ghosting: options.ghosting, + constraint: options.constraint, + handle: options.handle }; + + if(options.starteffect) + options_for_draggable.starteffect = options.starteffect; + + if(options.reverteffect) + options_for_draggable.reverteffect = options.reverteffect; + else + if(options.ghosting) options_for_draggable.reverteffect = function(element) { + element.style.top = 0; + element.style.left = 0; + }; + + if(options.endeffect) + options_for_draggable.endeffect = options.endeffect; + + if(options.zindex) + options_for_draggable.zindex = options.zindex; + + // build options for the droppables + var options_for_droppable = { + overlap: options.overlap, + containment: options.containment, + tree: options.tree, + hoverclass: options.hoverclass, + onHover: Sortable.onHover + } + + var options_for_tree = { + onHover: Sortable.onEmptyHover, + overlap: options.overlap, + containment: options.containment, + hoverclass: options.hoverclass + } + + // fix for gecko engine + Element.cleanWhitespace(element); + + options.draggables = []; + options.droppables = []; + + // drop on empty handling + if(options.dropOnEmpty || options.tree) { + Droppables.add(element, options_for_tree); + options.droppables.push(element); + } + + (this.findElements(element, options) || []).each( function(e) { + // handles are per-draggable + var handle = options.handle ? + $(e).down('.'+options.handle,0) : e; + options.draggables.push( + new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); + Droppables.add(e, options_for_droppable); + if(options.tree) e.treeNode = element; + options.droppables.push(e); + }); + + if(options.tree) { + (Sortable.findTreeElements(element, options) || []).each( function(e) { + Droppables.add(e, options_for_tree); + e.treeNode = element; + options.droppables.push(e); + }); + } + + // keep reference + this.sortables[element.id] = options; + + // for onupdate + Draggables.addObserver(new SortableObserver(element, options.onUpdate)); + + }, + + // return all suitable-for-sortable elements in a guaranteed order + findElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.tag); + }, + + findTreeElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.treeTag); + }, + + onHover: function(element, dropon, overlap) { + if(Element.isParent(dropon, element)) return; + + if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { + return; + } else if(overlap>0.5) { + Sortable.mark(dropon, 'before'); + if(dropon.previousSibling != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, dropon); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } else { + Sortable.mark(dropon, 'after'); + var nextElement = dropon.nextSibling || null; + if(nextElement != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, nextElement); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } + }, + + onEmptyHover: function(element, dropon, overlap) { + var oldParentNode = element.parentNode; + var droponOptions = Sortable.options(dropon); + + if(!Element.isParent(dropon, element)) { + var index; + + var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); + var child = null; + + if(children) { + var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); + + for (index = 0; index < children.length; index += 1) { + if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { + offset -= Element.offsetSize (children[index], droponOptions.overlap); + } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { + child = index + 1 < children.length ? children[index + 1] : null; + break; + } else { + child = children[index]; + break; + } + } + } + + dropon.insertBefore(element, child); + + Sortable.options(oldParentNode).onChange(element); + droponOptions.onChange(element); + } + }, + + unmark: function() { + if(Sortable._marker) Sortable._marker.hide(); + }, + + mark: function(dropon, position) { + // mark on ghosting only + var sortable = Sortable.options(dropon.parentNode); + if(sortable && !sortable.ghosting) return; + + if(!Sortable._marker) { + Sortable._marker = + ($('dropmarker') || Element.extend(document.createElement('DIV'))). + hide().addClassName('dropmarker').setStyle({position:'absolute'}); + document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); + } + var offsets = Position.cumulativeOffset(dropon); + Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); + + if(position=='after') + if(sortable.overlap == 'horizontal') + Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); + else + Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); + + Sortable._marker.show(); + }, + + _tree: function(element, options, parent) { + var children = Sortable.findElements(element, options) || []; + + for (var i = 0; i < children.length; ++i) { + var match = children[i].id.match(options.format); + + if (!match) continue; + + var child = { + id: encodeURIComponent(match ? match[1] : null), + element: element, + parent: parent, + children: [], + position: parent.children.length, + container: $(children[i]).down(options.treeTag) + } + + /* Get the element containing the children and recurse over it */ + if (child.container) + this._tree(child.container, options, child) + + parent.children.push (child); + } + + return parent; + }, + + tree: function(element) { + element = $(element); + var sortableOptions = this.options(element); + var options = Object.extend({ + tag: sortableOptions.tag, + treeTag: sortableOptions.treeTag, + only: sortableOptions.only, + name: element.id, + format: sortableOptions.format + }, arguments[1] || {}); + + var root = { + id: null, + parent: null, + children: [], + container: element, + position: 0 + } + + return Sortable._tree(element, options, root); + }, + + /* Construct a [i] index for a particular node */ + _constructIndex: function(node) { + var index = ''; + do { + if (node.id) index = '[' + node.position + ']' + index; + } while ((node = node.parent) != null); + return index; + }, + + sequence: function(element) { + element = $(element); + var options = Object.extend(this.options(element), arguments[1] || {}); + + return $(this.findElements(element, options) || []).map( function(item) { + return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; + }); + }, + + setSequence: function(element, new_sequence) { + element = $(element); + var options = Object.extend(this.options(element), arguments[2] || {}); + + var nodeMap = {}; + this.findElements(element, options).each( function(n) { + if (n.id.match(options.format)) + nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; + n.parentNode.removeChild(n); + }); + + new_sequence.each(function(ident) { + var n = nodeMap[ident]; + if (n) { + n[1].appendChild(n[0]); + delete nodeMap[ident]; + } + }); + }, + + serialize: function(element) { + element = $(element); + var options = Object.extend(Sortable.options(element), arguments[1] || {}); + var name = encodeURIComponent( + (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); + + if (options.tree) { + return Sortable.tree(element, arguments[1]).children.map( function (item) { + return [name + Sortable._constructIndex(item) + "[id]=" + + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); + }).flatten().join('&'); + } else { + return Sortable.sequence(element, arguments[1]).map( function(item) { + return name + "[]=" + encodeURIComponent(item); + }).join('&'); + } + } +} + +// Returns true if child is contained within element +Element.isParent = function(child, element) { + if (!child.parentNode || child == element) return false; + if (child.parentNode == element) return true; + return Element.isParent(child.parentNode, element); +} + +Element.findChildren = function(element, only, recursive, tagName) { + if(!element.hasChildNodes()) return null; + tagName = tagName.toUpperCase(); + if(only) only = [only].flatten(); + var elements = []; + $A(element.childNodes).each( function(e) { + if(e.tagName && e.tagName.toUpperCase()==tagName && + (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) + elements.push(e); + if(recursive) { + var grandchildren = Element.findChildren(e, only, recursive, tagName); + if(grandchildren) elements.push(grandchildren); + } + }); + + return (elements.length>0 ? elements.flatten() : []); +} + +Element.offsetSize = function (element, type) { + return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; +} diff --git a/public/javascripts/effects.js b/public/javascripts/effects.js new file mode 100644 index 0000000..3b02eda --- /dev/null +++ b/public/javascripts/effects.js @@ -0,0 +1,1088 @@ +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// Contributors: +// Justin Palmer (http://encytemedia.com/) +// Mark Pilgrim (http://diveintomark.org/) +// Martin Bialasinki +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// converts rgb() and #xxx to #xxxxxx format, +// returns self (or first argument) if not convertable +String.prototype.parseColor = function() { + var color = '#'; + if(this.slice(0,4) == 'rgb(') { + var cols = this.slice(4,this.length-1).split(','); + var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); + } else { + if(this.slice(0,1) == '#') { + if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); + if(this.length==7) color = this.toLowerCase(); + } + } + return(color.length==7 ? color : (arguments[0] || this)); +} + +/*--------------------------------------------------------------------------*/ + +Element.collectTextNodes = function(element) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); + }).flatten().join(''); +} + +Element.collectTextNodesIgnoreClass = function(element, className) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? + Element.collectTextNodesIgnoreClass(node, className) : '')); + }).flatten().join(''); +} + +Element.setContentZoom = function(element, percent) { + element = $(element); + element.setStyle({fontSize: (percent/100) + 'em'}); + if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); + return element; +} + +Element.getOpacity = function(element){ + element = $(element); + var opacity; + if (opacity = element.getStyle('opacity')) + return parseFloat(opacity); + if (opacity = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if(opacity[1]) return parseFloat(opacity[1]) / 100; + return 1.0; +} + +Element.setOpacity = function(element, value){ + element= $(element); + if (value == 1){ + element.setStyle({ opacity: + (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? + 0.999999 : 1.0 }); + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.setStyle({filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')}); + } else { + if(value < 0.00001) value = 0; + element.setStyle({opacity: value}); + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.setStyle( + { filter: element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + + 'alpha(opacity='+value*100+')' }); + } + return element; +} + +Element.getInlineOpacity = function(element){ + return $(element).style.opacity || ''; +} + +Element.forceRerendering = function(element) { + try { + element = $(element); + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch(e) { } +}; + +/*--------------------------------------------------------------------------*/ + +Array.prototype.call = function() { + var args = arguments; + this.each(function(f){ f.apply(this, args) }); +} + +/*--------------------------------------------------------------------------*/ + +var Effect = { + _elementDoesNotExistError: { + name: 'ElementDoesNotExistError', + message: 'The specified DOM element does not exist, but is required for this effect to operate' + }, + tagifyText: function(element) { + if(typeof Builder == 'undefined') + throw("Effect.tagifyText requires including script.aculo.us' builder.js library"); + + var tagifyStyle = 'position:relative'; + if(/MSIE/.test(navigator.userAgent) && !window.opera) tagifyStyle += ';zoom:1'; + + element = $(element); + $A(element.childNodes).each( function(child) { + if(child.nodeType==3) { + child.nodeValue.toArray().each( function(character) { + element.insertBefore( + Builder.node('span',{style: tagifyStyle}, + character == ' ' ? String.fromCharCode(160) : character), + child); + }); + Element.remove(child); + } + }); + }, + multiple: function(element, effect) { + var elements; + if(((typeof element == 'object') || + (typeof element == 'function')) && + (element.length)) + elements = element; + else + elements = $(element).childNodes; + + var options = Object.extend({ + speed: 0.1, + delay: 0.0 + }, arguments[2] || {}); + var masterDelay = options.delay; + + $A(elements).each( function(element, index) { + new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); + }); + }, + PAIRS: { + 'slide': ['SlideDown','SlideUp'], + 'blind': ['BlindDown','BlindUp'], + 'appear': ['Appear','Fade'] + }, + toggle: function(element, effect) { + element = $(element); + effect = (effect || 'appear').toLowerCase(); + var options = Object.extend({ + queue: { position:'end', scope:(element.id || 'global'), limit: 1 } + }, arguments[2] || {}); + Effect[element.visible() ? + Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); + } +}; + +var Effect2 = Effect; // deprecated + +/* ------------- transitions ------------- */ + +Effect.Transitions = { + linear: Prototype.K, + sinoidal: function(pos) { + return (-Math.cos(pos*Math.PI)/2) + 0.5; + }, + reverse: function(pos) { + return 1-pos; + }, + flicker: function(pos) { + return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; + }, + wobble: function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; + }, + pulse: function(pos, pulses) { + pulses = pulses || 5; + return ( + Math.round((pos % (1/pulses)) * pulses) == 0 ? + ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : + 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) + ); + }, + none: function(pos) { + return 0; + }, + full: function(pos) { + return 1; + } +}; + +/* ------------- core effects ------------- */ + +Effect.ScopedQueue = Class.create(); +Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { + initialize: function() { + this.effects = []; + this.interval = null; + }, + _each: function(iterator) { + this.effects._each(iterator); + }, + add: function(effect) { + var timestamp = new Date().getTime(); + + var position = (typeof effect.options.queue == 'string') ? + effect.options.queue : effect.options.queue.position; + + switch(position) { + case 'front': + // move unstarted effects after this effect + this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { + e.startOn += effect.finishOn; + e.finishOn += effect.finishOn; + }); + break; + case 'with-last': + timestamp = this.effects.pluck('startOn').max() || timestamp; + break; + case 'end': + // start effect after last queued effect has finished + timestamp = this.effects.pluck('finishOn').max() || timestamp; + break; + } + + effect.startOn += timestamp; + effect.finishOn += timestamp; + + if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) + this.effects.push(effect); + + if(!this.interval) + this.interval = setInterval(this.loop.bind(this), 40); + }, + remove: function(effect) { + this.effects = this.effects.reject(function(e) { return e==effect }); + if(this.effects.length == 0) { + clearInterval(this.interval); + this.interval = null; + } + }, + loop: function() { + var timePos = new Date().getTime(); + this.effects.invoke('loop', timePos); + } +}); + +Effect.Queues = { + instances: $H(), + get: function(queueName) { + if(typeof queueName != 'string') return queueName; + + if(!this.instances[queueName]) + this.instances[queueName] = new Effect.ScopedQueue(); + + return this.instances[queueName]; + } +} +Effect.Queue = Effect.Queues.get('global'); + +Effect.DefaultOptions = { + transition: Effect.Transitions.sinoidal, + duration: 1.0, // seconds + fps: 25.0, // max. 25fps due to Effect.Queue implementation + sync: false, // true for combining + from: 0.0, + to: 1.0, + delay: 0.0, + queue: 'parallel' +} + +Effect.Base = function() {}; +Effect.Base.prototype = { + position: null, + start: function(options) { + this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {}); + this.currentFrame = 0; + this.state = 'idle'; + this.startOn = this.options.delay*1000; + this.finishOn = this.startOn + (this.options.duration*1000); + this.event('beforeStart'); + if(!this.options.sync) + Effect.Queues.get(typeof this.options.queue == 'string' ? + 'global' : this.options.queue.scope).add(this); + }, + loop: function(timePos) { + if(timePos >= this.startOn) { + if(timePos >= this.finishOn) { + this.render(1.0); + this.cancel(); + this.event('beforeFinish'); + if(this.finish) this.finish(); + this.event('afterFinish'); + return; + } + var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); + var frame = Math.round(pos * this.options.fps * this.options.duration); + if(frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + } + }, + render: function(pos) { + if(this.state == 'idle') { + this.state = 'running'; + this.event('beforeSetup'); + if(this.setup) this.setup(); + this.event('afterSetup'); + } + if(this.state == 'running') { + if(this.options.transition) pos = this.options.transition(pos); + pos *= (this.options.to-this.options.from); + pos += this.options.from; + this.position = pos; + this.event('beforeUpdate'); + if(this.update) this.update(pos); + this.event('afterUpdate'); + } + }, + cancel: function() { + if(!this.options.sync) + Effect.Queues.get(typeof this.options.queue == 'string' ? + 'global' : this.options.queue.scope).remove(this); + this.state = 'finished'; + }, + event: function(eventName) { + if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); + if(this.options[eventName]) this.options[eventName](this); + }, + inspect: function() { + return '#'; + } +} + +Effect.Parallel = Class.create(); +Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), { + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + this.effects.invoke('render', position); + }, + finish: function(position) { + this.effects.each( function(effect) { + effect.render(1.0); + effect.cancel(); + effect.event('beforeFinish'); + if(effect.finish) effect.finish(position); + effect.event('afterFinish'); + }); + } +}); + +Effect.Event = Class.create(); +Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), { + initialize: function() { + var options = Object.extend({ + duration: 0 + }, arguments[0] || {}); + this.start(options); + }, + update: Prototype.emptyFunction +}); + +Effect.Opacity = Class.create(); +Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + // make this work on IE on elements without 'layout' + if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + var options = Object.extend({ + from: this.element.getOpacity() || 0.0, + to: 1.0 + }, arguments[1] || {}); + this.start(options); + }, + update: function(position) { + this.element.setOpacity(position); + } +}); + +Effect.Move = Class.create(); +Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + x: 0, + y: 0, + mode: 'relative' + }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Bug in Opera: Opera returns the "real" position of a static element or + // relative element that does not have top/left explicitly set. + // ==> Always set top and left for position relative elements in your stylesheets + // (to 0 if you do not need them) + this.element.makePositioned(); + this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); + this.originalTop = parseFloat(this.element.getStyle('top') || '0'); + if(this.options.mode == 'absolute') { + // absolute movement, so we need to calc deltaX and deltaY + this.options.x = this.options.x - this.originalLeft; + this.options.y = this.options.y - this.originalTop; + } + }, + update: function(position) { + this.element.setStyle({ + left: Math.round(this.options.x * position + this.originalLeft) + 'px', + top: Math.round(this.options.y * position + this.originalTop) + 'px' + }); + } +}); + +// for backwards compatibility +Effect.MoveBy = function(element, toTop, toLeft) { + return new Effect.Move(element, + Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); +}; + +Effect.Scale = Class.create(); +Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), { + initialize: function(element, percent) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' or {} with provided values + scaleFrom: 100.0, + scaleTo: percent + }, arguments[2] || {}); + this.start(options); + }, + setup: function() { + this.restoreAfterFinish = this.options.restoreAfterFinish || false; + this.elementPositioning = this.element.getStyle('position'); + + this.originalStyle = {}; + ['top','left','width','height','fontSize'].each( function(k) { + this.originalStyle[k] = this.element.style[k]; + }.bind(this)); + + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + + var fontSize = this.element.getStyle('font-size') || '100%'; + ['em','px','%','pt'].each( function(fontSizeType) { + if(fontSize.indexOf(fontSizeType)>0) { + this.fontSize = parseFloat(fontSize); + this.fontSizeType = fontSizeType; + } + }.bind(this)); + + this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; + + this.dims = null; + if(this.options.scaleMode=='box') + this.dims = [this.element.offsetHeight, this.element.offsetWidth]; + if(/^content/.test(this.options.scaleMode)) + this.dims = [this.element.scrollHeight, this.element.scrollWidth]; + if(!this.dims) + this.dims = [this.options.scaleMode.originalHeight, + this.options.scaleMode.originalWidth]; + }, + update: function(position) { + var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if(this.options.scaleContent && this.fontSize) + this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); + this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); + }, + finish: function(position) { + if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle); + }, + setDimensions: function(height, width) { + var d = {}; + if(this.options.scaleX) d.width = Math.round(width) + 'px'; + if(this.options.scaleY) d.height = Math.round(height) + 'px'; + if(this.options.scaleFromCenter) { + var topd = (height - this.dims[0])/2; + var leftd = (width - this.dims[1])/2; + if(this.elementPositioning == 'absolute') { + if(this.options.scaleY) d.top = this.originalTop-topd + 'px'; + if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; + } else { + if(this.options.scaleY) d.top = -topd + 'px'; + if(this.options.scaleX) d.left = -leftd + 'px'; + } + } + this.element.setStyle(d); + } +}); + +Effect.Highlight = Class.create(); +Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Prevent executing on elements not in the layout flow + if(this.element.getStyle('display')=='none') { this.cancel(); return; } + // Disable background image during the effect + this.oldStyle = { + backgroundImage: this.element.getStyle('background-image') }; + this.element.setStyle({backgroundImage: 'none'}); + if(!this.options.endcolor) + this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); + if(!this.options.restorecolor) + this.options.restorecolor = this.element.getStyle('background-color'); + // init color calculations + this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); + this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); + }, + update: function(position) { + this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ + return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) }); + }, + finish: function() { + this.element.setStyle(Object.extend(this.oldStyle, { + backgroundColor: this.options.restorecolor + })); + } +}); + +Effect.ScrollTo = Class.create(); +Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + this.start(arguments[1] || {}); + }, + setup: function() { + Position.prepare(); + var offsets = Position.cumulativeOffset(this.element); + if(this.options.offset) offsets[1] += this.options.offset; + var max = window.innerHeight ? + window.height - window.innerHeight : + document.body.scrollHeight - + (document.documentElement.clientHeight ? + document.documentElement.clientHeight : document.body.clientHeight); + this.scrollStart = Position.deltaY; + this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; + }, + update: function(position) { + Position.prepare(); + window.scrollTo(Position.deltaX, + this.scrollStart + (position*this.delta)); + } +}); + +/* ------------- combination effects ------------- */ + +Effect.Fade = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + var options = Object.extend({ + from: element.getOpacity() || 1.0, + to: 0.0, + afterFinishInternal: function(effect) { + if(effect.options.to!=0) return; + effect.element.hide().setStyle({opacity: oldOpacity}); + }}, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Appear = function(element) { + element = $(element); + var options = Object.extend({ + from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), + to: 1.0, + // force Safari to render floated elements properly + afterFinishInternal: function(effect) { + effect.element.forceRerendering(); + }, + beforeSetup: function(effect) { + effect.element.setOpacity(effect.options.from).show(); + }}, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Puff = function(element) { + element = $(element); + var oldStyle = { + opacity: element.getInlineOpacity(), + position: element.getStyle('position'), + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height + }; + return new Effect.Parallel( + [ new Effect.Scale(element, 200, + { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], + Object.extend({ duration: 1.0, + beforeSetupInternal: function(effect) { + Position.absolutize(effect.effects[0].element) + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().setStyle(oldStyle); } + }, arguments[1] || {}) + ); +} + +Effect.BlindUp = function(element) { + element = $(element); + element.makeClipping(); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + restoreAfterFinish: true, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }, arguments[1] || {}) + ); +} + +Effect.BlindDown = function(element) { + element = $(element); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping(); + } + }, arguments[1] || {})); +} + +Effect.SwitchOff = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + return new Effect.Appear(element, Object.extend({ + duration: 0.4, + from: 0, + transition: Effect.Transitions.flicker, + afterFinishInternal: function(effect) { + new Effect.Scale(effect.element, 1, { + duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); + } + }) + } + }, arguments[1] || {})); +} + +Effect.DropOut = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left'), + opacity: element.getInlineOpacity() }; + return new Effect.Parallel( + [ new Effect.Move(element, {x: 0, y: 100, sync: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 }) ], + Object.extend( + { duration: 0.5, + beforeSetup: function(effect) { + effect.effects[0].element.makePositioned(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); + } + }, arguments[1] || {})); +} + +Effect.Shake = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left') }; + return new Effect.Move(element, + { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { + effect.element.undoPositioned().setStyle(oldStyle); + }}) }}) }}) }}) }}) }}); +} + +Effect.SlideDown = function(element) { + element = $(element).cleanWhitespace(); + // SlideDown need to have the content of the element wrapped in a container element with fixed height! + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: window.opera ? 0 : 1, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if(window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } + }, arguments[1] || {}) + ); +} + +Effect.SlideUp = function(element) { + element = $(element).cleanWhitespace(); + var oldInnerBottom = element.down().getStyle('bottom'); + return new Effect.Scale(element, window.opera ? 0 : 1, + Object.extend({ scaleContent: false, + scaleX: false, + scaleMode: 'box', + scaleFrom: 100, + restoreAfterFinish: true, + beforeStartInternal: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if(window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom}); + effect.element.down().undoPositioned(); + } + }, arguments[1] || {}) + ); +} + +// Bug in opera makes the TD containing this element expand for a instance after finish +Effect.Squish = function(element) { + return new Effect.Scale(element, window.opera ? 1 : 0, { + restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }); +} + +Effect.Grow = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.full + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var initialMoveX, initialMoveY; + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + initialMoveX = initialMoveY = moveX = moveY = 0; + break; + case 'top-right': + initialMoveX = dims.width; + initialMoveY = moveY = 0; + moveX = -dims.width; + break; + case 'bottom-left': + initialMoveX = moveX = 0; + initialMoveY = dims.height; + moveY = -dims.height; + break; + case 'bottom-right': + initialMoveX = dims.width; + initialMoveY = dims.height; + moveX = -dims.width; + moveY = -dims.height; + break; + case 'center': + initialMoveX = dims.width / 2; + initialMoveY = dims.height / 2; + moveX = -dims.width / 2; + moveY = -dims.height / 2; + break; + } + + return new Effect.Move(element, { + x: initialMoveX, + y: initialMoveY, + duration: 0.01, + beforeSetup: function(effect) { + effect.element.hide().makeClipping().makePositioned(); + }, + afterFinishInternal: function(effect) { + new Effect.Parallel( + [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), + new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), + new Effect.Scale(effect.element, 100, { + scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, + sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) + ], Object.extend({ + beforeSetup: function(effect) { + effect.effects[0].element.setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); + } + }, options) + ) + } + }); +} + +Effect.Shrink = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.none + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + moveX = moveY = 0; + break; + case 'top-right': + moveX = dims.width; + moveY = 0; + break; + case 'bottom-left': + moveX = 0; + moveY = dims.height; + break; + case 'bottom-right': + moveX = dims.width; + moveY = dims.height; + break; + case 'center': + moveX = dims.width / 2; + moveY = dims.height / 2; + break; + } + + return new Effect.Parallel( + [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), + new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), + new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) + ], Object.extend({ + beforeStartInternal: function(effect) { + effect.effects[0].element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } + }, options) + ); +} + +Effect.Pulsate = function(element) { + element = $(element); + var options = arguments[1] || {}; + var oldOpacity = element.getInlineOpacity(); + var transition = options.transition || Effect.Transitions.sinoidal; + var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) }; + reverser.bind(transition); + return new Effect.Opacity(element, + Object.extend(Object.extend({ duration: 2.0, from: 0, + afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } + }, options), {transition: reverser})); +} + +Effect.Fold = function(element) { + element = $(element); + var oldStyle = { + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height }; + element.makeClipping(); + return new Effect.Scale(element, 5, Object.extend({ + scaleContent: false, + scaleX: false, + afterFinishInternal: function(effect) { + new Effect.Scale(element, 1, { + scaleContent: false, + scaleY: false, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().setStyle(oldStyle); + } }); + }}, arguments[1] || {})); +}; + +Effect.Morph = Class.create(); +Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + style: '' + }, arguments[1] || {}); + this.start(options); + }, + setup: function(){ + function parseColor(color){ + if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; + color = color.parseColor(); + return $R(0,2).map(function(i){ + return parseInt( color.slice(i*2+1,i*2+3), 16 ) + }); + } + this.transforms = this.options.style.parseStyle().map(function(property){ + var originalValue = this.element.getStyle(property[0]); + return $H({ + style: property[0], + originalValue: property[1].unit=='color' ? + parseColor(originalValue) : parseFloat(originalValue || 0), + targetValue: property[1].unit=='color' ? + parseColor(property[1].value) : property[1].value, + unit: property[1].unit + }); + }.bind(this)).reject(function(transform){ + return ( + (transform.originalValue == transform.targetValue) || + ( + transform.unit != 'color' && + (isNaN(transform.originalValue) || isNaN(transform.targetValue)) + ) + ) + }); + }, + update: function(position) { + var style = $H(), value = null; + this.transforms.each(function(transform){ + value = transform.unit=='color' ? + $R(0,2).inject('#',function(m,v,i){ + return m+(Math.round(transform.originalValue[i]+ + (transform.targetValue[i] - transform.originalValue[i])*position)).toColorPart() }) : + transform.originalValue + Math.round( + ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit; + style[transform.style] = value; + }); + this.element.setStyle(style); + } +}); + +Effect.Transform = Class.create(); +Object.extend(Effect.Transform.prototype, { + initialize: function(tracks){ + this.tracks = []; + this.options = arguments[1] || {}; + this.addTracks(tracks); + }, + addTracks: function(tracks){ + tracks.each(function(track){ + var data = $H(track).values().first(); + this.tracks.push($H({ + ids: $H(track).keys().first(), + effect: Effect.Morph, + options: { style: data } + })); + }.bind(this)); + return this; + }, + play: function(){ + return new Effect.Parallel( + this.tracks.map(function(track){ + var elements = [$(track.ids) || $$(track.ids)].flatten(); + return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) }); + }).flatten(), + this.options + ); + } +}); + +Element.CSS_PROPERTIES = ['azimuth', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', + 'backgroundPosition', 'backgroundRepeat', 'borderBottomColor', 'borderBottomStyle', + 'borderBottomWidth', 'borderCollapse', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', + 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderSpacing', 'borderTopColor', + 'borderTopStyle', 'borderTopWidth', 'bottom', 'captionSide', 'clear', 'clip', 'color', 'content', + 'counterIncrement', 'counterReset', 'cssFloat', 'cueAfter', 'cueBefore', 'cursor', 'direction', + 'display', 'elevation', 'emptyCells', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', + 'fontStyle', 'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight', + 'listStyleImage', 'listStylePosition', 'listStyleType', 'marginBottom', 'marginLeft', 'marginRight', + 'marginTop', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'opacity', + 'orphans', 'outlineColor', 'outlineOffset', 'outlineStyle', 'outlineWidth', 'overflowX', 'overflowY', + 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'page', 'pageBreakAfter', 'pageBreakBefore', + 'pageBreakInside', 'pauseAfter', 'pauseBefore', 'pitch', 'pitchRange', 'position', 'quotes', + 'richness', 'right', 'size', 'speakHeader', 'speakNumeral', 'speakPunctuation', 'speechRate', 'stress', + 'tableLayout', 'textAlign', 'textDecoration', 'textIndent', 'textShadow', 'textTransform', 'top', + 'unicodeBidi', 'verticalAlign', 'visibility', 'voiceFamily', 'volume', 'whiteSpace', 'widows', + 'width', 'wordSpacing', 'zIndex']; + +Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; + +String.prototype.parseStyle = function(){ + var element = Element.extend(document.createElement('div')); + element.innerHTML = '

    '; + var style = element.down().style, styleRules = $H(); + + Element.CSS_PROPERTIES.each(function(property){ + if(style[property]) styleRules[property] = style[property]; + }); + + var result = $H(); + + styleRules.each(function(pair){ + var property = pair[0], value = pair[1], unit = null; + + if(value.parseColor('#zzzzzz') != '#zzzzzz') { + value = value.parseColor(); + unit = 'color'; + } else if(Element.CSS_LENGTH.test(value)) + var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), + value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; + + result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); + }.bind(this)); + + return result; +}; + +Element.morph = function(element, style) { + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {})); + return element; +}; + +['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom', + 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( + function(f) { Element.Methods[f] = Element[f]; } +); + +Element.Methods.visualEffect = function(element, effect, options) { + s = effect.gsub(/_/, '-').camelize(); + effect_class = s.charAt(0).toUpperCase() + s.substring(1); + new Effect[effect_class](element, options); + return $(element); +}; + +Element.addMethods(); \ No newline at end of file diff --git a/public/javascripts/prototype.js b/public/javascripts/prototype.js new file mode 100644 index 0000000..5058221 --- /dev/null +++ b/public/javascripts/prototype.js @@ -0,0 +1,2515 @@ +/* Prototype JavaScript framework, version 1.5.0 + * (c) 2005-2007 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://prototype.conio.net/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.5.0', + BrowserFeatures: { + XPath: !!document.evaluate + }, + + ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', + emptyFunction: function() {}, + K: function(x) { return x } +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (var property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.extend(Object, { + inspect: function(object) { + try { + if (object === undefined) return 'undefined'; + if (object === null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } + }, + + keys: function(object) { + var keys = []; + for (var property in object) + keys.push(property); + return keys; + }, + + values: function(object) { + var values = []; + for (var property in object) + values.push(object[property]); + return values; + }, + + clone: function(object) { + return Object.extend({}, object); + } +}); + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments))); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + } +}); + +var Try = { + these: function() { + var returnValue; + + for (var i = 0, length = arguments.length; i < length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + stop: function() { + if (!this.timer) return; + clearInterval(this.timer); + this.timer = null; + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(this); + } finally { + this.currentlyExecuting = false; + } + } + } +} +String.interpret = function(value){ + return value == null ? '' : String(value); +} + +Object.extend(String.prototype, { + gsub: function(pattern, replacement) { + var result = '', source = this, match; + replacement = arguments.callee.prepareReplacement(replacement); + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + }, + + sub: function(pattern, replacement, count) { + replacement = this.gsub.prepareReplacement(replacement); + count = count === undefined ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + }, + + scan: function(pattern, iterator) { + this.gsub(pattern, iterator); + return this; + }, + + truncate: function(length, truncation) { + length = length || 30; + truncation = truncation === undefined ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : this; + }, + + strip: function() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + }, + + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(function(script) { return eval(script) }); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? (div.childNodes.length > 1 ? + $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) : + div.childNodes[0].nodeValue) : ''; + }, + + toQueryParams: function(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return {}; + + return match[1].split(separator || '&').inject({}, function(hash, pair) { + if ((pair = pair.split('='))[0]) { + var name = decodeURIComponent(pair[0]); + var value = pair[1] ? decodeURIComponent(pair[1]) : undefined; + + if (hash[name] !== undefined) { + if (hash[name].constructor != Array) + hash[name] = [hash[name]]; + if (value) hash[name].push(value); + } + else hash[name] = value; + } + return hash; + }); + }, + + toArray: function() { + return this.split(''); + }, + + succ: function() { + return this.slice(0, this.length - 1) + + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); + }, + + camelize: function() { + var parts = this.split('-'), len = parts.length; + if (len == 1) return parts[0]; + + var camelized = this.charAt(0) == '-' + ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) + : parts[0]; + + for (var i = 1; i < len; i++) + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + + return camelized; + }, + + capitalize: function(){ + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + }, + + underscore: function() { + return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); + }, + + dasherize: function() { + return this.gsub(/_/,'-'); + }, + + inspect: function(useDoubleQuotes) { + var escapedString = this.replace(/\\/g, '\\\\'); + if (useDoubleQuotes) + return '"' + escapedString.replace(/"/g, '\\"') + '"'; + else + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + } +}); + +String.prototype.gsub.prepareReplacement = function(replacement) { + if (typeof replacement == 'function') return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match) }; +} + +String.prototype.parseQuery = String.prototype.toQueryParams; + +var Template = Class.create(); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; +Template.prototype = { + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + return this.template.gsub(this.pattern, function(match) { + var before = match[1]; + if (before == '\\') return match[2]; + return before + String.interpret(object[match[3]]); + }); + } +} + +var $break = new Object(); +var $continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != $continue) throw e; + } + }); + } catch (e) { + if (e != $break) throw e; + } + return this; + }, + + eachSlice: function(number, iterator) { + var index = -number, slices = [], array = this.toArray(); + while ((index += number) < array.length) + slices.push(array.slice(index, index+number)); + return slices.map(iterator); + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = false; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push((iterator || Prototype.K)(value, index)); + }); + return results; + }, + + detect: function(iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inGroupsOf: function(number, fillWith) { + fillWith = fillWith === undefined ? null : fillWith; + return this.eachSlice(number, function(slice) { + while(slice.length < number) slice.push(fillWith); + return slice; + }); + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value >= result) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value < result) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.map(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.map(); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + return iterator(collections.pluck(index)); + }); + }, + + size: function() { + return this.toArray().length; + }, + + inspect: function() { + return '#'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0, length = iterable.length; i < length; i++) + results.push(iterable[i]); + return results; + } +} + +Object.extend(Array.prototype, Enumerable); + +if (!Array.prototype._reverse) + Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0, length = this.length; i < length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value && value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0, length = this.length; i < length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + reduce: function() { + return this.length > 1 ? this : this[0]; + }, + + uniq: function() { + return this.inject([], function(array, value) { + return array.include(value) ? array : array.concat([value]); + }); + }, + + clone: function() { + return [].concat(this); + }, + + size: function() { + return this.length; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } +}); + +Array.prototype.toArray = Array.prototype.clone; + +function $w(string){ + string = string.strip(); + return string ? string.split(/\s+/) : []; +} + +if(window.opera){ + Array.prototype.concat = function(){ + var array = []; + for(var i = 0, length = this.length; i < length; i++) array.push(this[i]); + for(var i = 0, length = arguments.length; i < length; i++) { + if(arguments[i].constructor == Array) { + for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) + array.push(arguments[i][j]); + } else { + array.push(arguments[i]); + } + } + return array; + } +} +var Hash = function(obj) { + Object.extend(this, obj || {}); +}; + +Object.extend(Hash, { + toQueryString: function(obj) { + var parts = []; + + this.prototype._each.call(obj, function(pair) { + if (!pair.key) return; + + if (pair.value && pair.value.constructor == Array) { + var values = pair.value.compact(); + if (values.length < 2) pair.value = values.reduce(); + else { + key = encodeURIComponent(pair.key); + values.each(function(value) { + value = value != undefined ? encodeURIComponent(value) : ''; + parts.push(key + '=' + encodeURIComponent(value)); + }); + return; + } + } + if (pair.value == undefined) pair[1] = ''; + parts.push(pair.map(encodeURIComponent).join('=')); + }); + + return parts.join('&'); + } +}); + +Object.extend(Hash.prototype, Enumerable); +Object.extend(Hash.prototype, { + _each: function(iterator) { + for (var key in this) { + var value = this[key]; + if (value && value == Hash.prototype[key]) continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject(this, function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + remove: function() { + var result; + for(var i = 0, length = arguments.length; i < length; i++) { + var value = this[arguments[i]]; + if (value !== undefined){ + if (result === undefined) result = value; + else { + if (result.constructor != Array) result = [result]; + result.push(value) + } + } + delete this[arguments[i]]; + } + return result; + }, + + toQueryString: function() { + return Hash.toQueryString(this); + }, + + inspect: function() { + return '#'; + } +}); + +function $H(object) { + if (object && object.constructor == Hash) return object; + return new Hash(object); +}; +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + while (this.include(value)) { + iterator(value); + value = value.succ(); + } + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new XMLHttpRequest()}, + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')} + ) || false; + }, + + activeRequestCount: 0 +} + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responder) { + if (!this.include(responder)) + this.responders.push(responder); + }, + + unregister: function(responder) { + this.responders = this.responders.without(responder); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) {} + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { + Ajax.activeRequestCount++; + }, + onComplete: function() { + Ajax.activeRequestCount--; + } +}); + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/x-www-form-urlencoded', + encoding: 'UTF-8', + parameters: '' + } + Object.extend(this.options, options || {}); + + this.options.method = this.options.method.toLowerCase(); + if (typeof this.options.parameters == 'string') + this.options.parameters = this.options.parameters.toQueryParams(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + _complete: false, + + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = this.options.parameters; + + if (!['get', 'post'].include(this.method)) { + // simulate other verbs over post + params['_method'] = this.method; + this.method = 'post'; + } + + params = Hash.toQueryString(params); + if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_=' + + // when GET, append parameters to URL + if (this.method == 'get' && params) + this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params; + + try { + Ajax.Responders.dispatch('onCreate', this, this.transport); + + this.transport.open(this.method.toUpperCase(), this.url, + this.options.asynchronous); + + if (this.options.asynchronous) + setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10); + + this.transport.onreadystatechange = this.onStateChange.bind(this); + this.setRequestHeaders(); + + var body = this.method == 'post' ? (this.options.postBody || params) : null; + + this.transport.send(body); + + /* Force Firefox to handle ready state 4 for synchronous requests */ + if (!this.options.asynchronous && this.transport.overrideMimeType) + this.onStateChange(); + + } + catch (e) { + this.dispatchException(e); + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) + this.respondToReadyState(this.transport.readyState); + }, + + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'X-Prototype-Version': Prototype.Version, + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) + headers['Connection'] = 'close'; + } + + // user-defined headers + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (typeof extras.push == 'function') + for (var i = 0, length = extras.length; i < length; i += 2) + headers[extras[i]] = extras[i+1]; + else + $H(extras).each(function(pair) { headers[pair.key] = pair.value }); + } + + for (var name in headers) + this.transport.setRequestHeader(name, headers[name]); + }, + + success: function() { + return !this.transport.status + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + respondToReadyState: function(readyState) { + var state = Ajax.Request.Events[readyState]; + var transport = this.transport, json = this.evalJSON(); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + this.transport.status] + || this.options['on' + (this.success() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(transport, json); + } catch (e) { + this.dispatchException(e); + } + + if ((this.getHeader('Content-type') || 'text/javascript').strip(). + match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) + this.evalResponse(); + } + + try { + (this.options['on' + state] || Prototype.emptyFunction)(transport, json); + Ajax.Responders.dispatch('on' + state, this, transport, json); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + // avoid memory leak in MSIE: clean up + this.transport.onreadystatechange = Prototype.emptyFunction; + } + }, + + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) { return null } + }, + + evalJSON: function() { + try { + var json = this.getHeader('X-JSON'); + return json ? eval('(' + json + ')') : null; + } catch (e) { return null } + }, + + evalResponse: function() { + try { + return eval(this.transport.responseText); + } catch (e) { + this.dispatchException(e); + } + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Updater = Class.create(); + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.container = { + success: (container.success || container), + failure: (container.failure || (container.success ? null : container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function(transport, param) { + this.updateContent(); + onComplete(transport, param); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.container[this.success() ? 'success' : 'failure']; + var response = this.transport.responseText; + + if (!this.options.evalScripts) response = response.stripScripts(); + + if (receiver = $(receiver)) { + if (this.options.insertion) + new this.options.insertion(receiver, response); + else + receiver.update(response); + } + + if (this.success()) { + if (this.onComplete) + setTimeout(this.onComplete.bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.options.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +function $(element) { + if (arguments.length > 1) { + for (var i = 0, elements = [], length = arguments.length; i < length; i++) + elements.push($(arguments[i])); + return elements; + } + if (typeof element == 'string') + element = document.getElementById(element); + return Element.extend(element); +} + +if (Prototype.BrowserFeatures.XPath) { + document._getElementsByXPath = function(expression, parentElement) { + var results = []; + var query = document.evaluate(expression, $(parentElement) || document, + null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + for (var i = 0, length = query.snapshotLength; i < length; i++) + results.push(query.snapshotItem(i)); + return results; + }; +} + +document.getElementsByClassName = function(className, parentElement) { + if (Prototype.BrowserFeatures.XPath) { + var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]"; + return document._getElementsByXPath(q, parentElement); + } else { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + var elements = [], child; + for (var i = 0, length = children.length; i < length; i++) { + child = children[i]; + if (Element.hasClassName(child, className)) + elements.push(Element.extend(child)); + } + return elements; + } +}; + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) + var Element = new Object(); + +Element.extend = function(element) { + if (!element || _nativeExtensions || element.nodeType == 3) return element; + + if (!element._extended && element.tagName && element != window) { + var methods = Object.clone(Element.Methods), cache = Element.extend.cache; + + if (element.tagName == 'FORM') + Object.extend(methods, Form.Methods); + if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName)) + Object.extend(methods, Form.Element.Methods); + + Object.extend(methods, Element.Methods.Simulated); + + for (var property in methods) { + var value = methods[property]; + if (typeof value == 'function' && !(property in element)) + element[property] = cache.findOrStore(value); + } + } + + element._extended = true; + return element; +}; + +Element.extend.cache = { + findOrStore: function(value) { + return this[value] = this[value] || function() { + return value.apply(null, [this].concat($A(arguments))); + } + } +}; + +Element.Methods = { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function(element) { + element = $(element); + Element[Element.visible(element) ? 'hide' : 'show'](element); + return element; + }, + + hide: function(element) { + $(element).style.display = 'none'; + return element; + }, + + show: function(element) { + $(element).style.display = ''; + return element; + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + return element; + }, + + update: function(element, html) { + html = typeof html == 'undefined' ? '' : html.toString(); + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + replace: function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + if (element.outerHTML) { + element.outerHTML = html.stripScripts(); + } else { + var range = element.ownerDocument.createRange(); + range.selectNodeContents(element); + element.parentNode.replaceChild( + range.createContextualFragment(html.stripScripts()), element); + } + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + inspect: function(element) { + element = $(element); + var result = '<' + element.tagName.toLowerCase(); + $H({'id': 'id', 'className': 'class'}).each(function(pair) { + var property = pair.first(), attribute = pair.last(); + var value = (element[property] || '').toString(); + if (value) result += ' ' + attribute + '=' + value.inspect(true); + }); + return result + '>'; + }, + + recursivelyCollect: function(element, property) { + element = $(element); + var elements = []; + while (element = element[property]) + if (element.nodeType == 1) + elements.push(Element.extend(element)); + return elements; + }, + + ancestors: function(element) { + return $(element).recursivelyCollect('parentNode'); + }, + + descendants: function(element) { + return $A($(element).getElementsByTagName('*')); + }, + + immediateDescendants: function(element) { + if (!(element = $(element).firstChild)) return []; + while (element && element.nodeType != 1) element = element.nextSibling; + if (element) return [element].concat($(element).nextSiblings()); + return []; + }, + + previousSiblings: function(element) { + return $(element).recursivelyCollect('previousSibling'); + }, + + nextSiblings: function(element) { + return $(element).recursivelyCollect('nextSibling'); + }, + + siblings: function(element) { + element = $(element); + return element.previousSiblings().reverse().concat(element.nextSiblings()); + }, + + match: function(element, selector) { + if (typeof selector == 'string') + selector = new Selector(selector); + return selector.match($(element)); + }, + + up: function(element, expression, index) { + return Selector.findElement($(element).ancestors(), expression, index); + }, + + down: function(element, expression, index) { + return Selector.findElement($(element).descendants(), expression, index); + }, + + previous: function(element, expression, index) { + return Selector.findElement($(element).previousSiblings(), expression, index); + }, + + next: function(element, expression, index) { + return Selector.findElement($(element).nextSiblings(), expression, index); + }, + + getElementsBySelector: function() { + var args = $A(arguments), element = $(args.shift()); + return Selector.findChildElements(element, args); + }, + + getElementsByClassName: function(element, className) { + return document.getElementsByClassName(className, element); + }, + + readAttribute: function(element, name) { + element = $(element); + if (document.all && !window.opera) { + var t = Element._attributeTranslations; + if (t.values[name]) return t.values[name](element, name); + if (t.names[name]) name = t.names[name]; + var attribute = element.attributes[name]; + if(attribute) return attribute.nodeValue; + } + return element.getAttribute(name); + }, + + getHeight: function(element) { + return $(element).getDimensions().height; + }, + + getWidth: function(element) { + return $(element).getDimensions().width; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + var elementClassName = element.className; + if (elementClassName.length == 0) return false; + if (elementClassName == className || + elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) + return true; + return false; + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).add(className); + return element; + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).remove(className); + return element; + }, + + toggleClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className); + return element; + }, + + observe: function() { + Event.observe.apply(Event, arguments); + return $A(arguments).first(); + }, + + stopObserving: function() { + Event.stopObserving.apply(Event, arguments); + return $A(arguments).first(); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + var node = element.firstChild; + while (node) { + var nextNode = node.nextSibling; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + element.removeChild(node); + node = nextNode; + } + return element; + }, + + empty: function(element) { + return $(element).innerHTML.match(/^\s*$/); + }, + + descendantOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + while (element = element.parentNode) + if (element == ancestor) return true; + return false; + }, + + scrollTo: function(element) { + element = $(element); + var pos = Position.cumulativeOffset(element); + window.scrollTo(pos[0], pos[1]); + return element; + }, + + getStyle: function(element, style) { + element = $(element); + if (['float','cssFloat'].include(style)) + style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat'); + style = style.camelize(); + var value = element.style[style]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } else if (element.currentStyle) { + value = element.currentStyle[style]; + } + } + + if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none')) + value = element['offset'+style.capitalize()] + 'px'; + + if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) + if (Element.getStyle(element, 'position') == 'static') value = 'auto'; + if(style == 'opacity') { + if(value) return parseFloat(value); + if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if(value[1]) return parseFloat(value[1]) / 100; + return 1.0; + } + return value == 'auto' ? null : value; + }, + + setStyle: function(element, style) { + element = $(element); + for (var name in style) { + var value = style[name]; + if(name == 'opacity') { + if (value == 1) { + value = (/Gecko/.test(navigator.userAgent) && + !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0; + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); + } else if(value == '') { + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); + } else { + if(value < 0.00001) value = 0; + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + + 'alpha(opacity='+value*100+')'; + } + } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat'; + element.style[name.camelize()] = value; + } + return element; + }, + + getDimensions: function(element) { + element = $(element); + var display = $(element).getStyle('display'); + if (display != 'none' && display != null) // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + return element; + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + return element; + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return element; + element._overflow = element.style.overflow || 'auto'; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + return element; + }, + + undoClipping: function(element) { + element = $(element); + if (!element._overflow) return element; + element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; + element._overflow = null; + return element; + } +}; + +Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf}); + +Element._attributeTranslations = {}; + +Element._attributeTranslations.names = { + colspan: "colSpan", + rowspan: "rowSpan", + valign: "vAlign", + datetime: "dateTime", + accesskey: "accessKey", + tabindex: "tabIndex", + enctype: "encType", + maxlength: "maxLength", + readonly: "readOnly", + longdesc: "longDesc" +}; + +Element._attributeTranslations.values = { + _getAttr: function(element, attribute) { + return element.getAttribute(attribute, 2); + }, + + _flag: function(element, attribute) { + return $(element).hasAttribute(attribute) ? attribute : null; + }, + + style: function(element) { + return element.style.cssText.toLowerCase(); + }, + + title: function(element) { + var node = element.getAttributeNode('title'); + return node.specified ? node.nodeValue : null; + } +}; + +Object.extend(Element._attributeTranslations.values, { + href: Element._attributeTranslations.values._getAttr, + src: Element._attributeTranslations.values._getAttr, + disabled: Element._attributeTranslations.values._flag, + checked: Element._attributeTranslations.values._flag, + readonly: Element._attributeTranslations.values._flag, + multiple: Element._attributeTranslations.values._flag +}); + +Element.Methods.Simulated = { + hasAttribute: function(element, attribute) { + var t = Element._attributeTranslations; + attribute = t.names[attribute] || attribute; + return $(element).getAttributeNode(attribute).specified; + } +}; + +// IE is missing .innerHTML support for TABLE-related elements +if (document.all && !window.opera){ + Element.Methods.update = function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + var tagName = element.tagName.toUpperCase(); + if (['THEAD','TBODY','TR','TD'].include(tagName)) { + var div = document.createElement('div'); + switch (tagName) { + case 'THEAD': + case 'TBODY': + div.innerHTML = '' + html.stripScripts() + '
    '; + depth = 2; + break; + case 'TR': + div.innerHTML = '' + html.stripScripts() + '
    '; + depth = 3; + break; + case 'TD': + div.innerHTML = '
    ' + html.stripScripts() + '
    '; + depth = 4; + } + $A(element.childNodes).each(function(node){ + element.removeChild(node) + }); + depth.times(function(){ div = div.firstChild }); + + $A(div.childNodes).each( + function(node){ element.appendChild(node) }); + } else { + element.innerHTML = html.stripScripts(); + } + setTimeout(function() {html.evalScripts()}, 10); + return element; + } +}; + +Object.extend(Element, Element.Methods); + +var _nativeExtensions = false; + +if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { + var className = 'HTML' + tag + 'Element'; + if(window[className]) return; + var klass = window[className] = {}; + klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; + }); + +Element.addMethods = function(methods) { + Object.extend(Element.Methods, methods || {}); + + function copy(methods, destination, onlyIfAbsent) { + onlyIfAbsent = onlyIfAbsent || false; + var cache = Element.extend.cache; + for (var property in methods) { + var value = methods[property]; + if (!onlyIfAbsent || !(property in destination)) + destination[property] = cache.findOrStore(value); + } + } + + if (typeof HTMLElement != 'undefined') { + copy(Element.Methods, HTMLElement.prototype); + copy(Element.Methods.Simulated, HTMLElement.prototype, true); + copy(Form.Methods, HTMLFormElement.prototype); + [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { + copy(Form.Element.Methods, klass.prototype); + }); + _nativeExtensions = true; + } +} + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + var tagName = this.element.tagName.toUpperCase(); + if (['TBODY', 'TR'].include(tagName)) { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '' + this.content + '
    '; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set($A(this).concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set($A(this).without(classNameToRemove).join(' ')); + }, + + toString: function() { + return $A(this).join(' '); + } +}; + +Object.extend(Element.ClassNames.prototype, Enumerable); +var Selector = Class.create(); +Selector.prototype = { + initialize: function(expression) { + this.params = {classNames: []}; + this.expression = expression.toString().strip(); + this.parseExpression(); + this.compileMatcher(); + }, + + parseExpression: function() { + function abort(message) { throw 'Parse error in selector: ' + message; } + + if (this.expression == '') abort('empty expression'); + + var params = this.params, expr = this.expression, match, modifier, clause, rest; + while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) { + params.attributes = params.attributes || []; + params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''}); + expr = match[1]; + } + + if (expr == '*') return this.params.wildcard = true; + + while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { + modifier = match[1], clause = match[2], rest = match[3]; + switch (modifier) { + case '#': params.id = clause; break; + case '.': params.classNames.push(clause); break; + case '': + case undefined: params.tagName = clause.toUpperCase(); break; + default: abort(expr.inspect()); + } + expr = rest; + } + + if (expr.length > 0) abort(expr.inspect()); + }, + + buildMatchExpression: function() { + var params = this.params, conditions = [], clause; + + if (params.wildcard) + conditions.push('true'); + if (clause = params.id) + conditions.push('element.readAttribute("id") == ' + clause.inspect()); + if (clause = params.tagName) + conditions.push('element.tagName.toUpperCase() == ' + clause.inspect()); + if ((clause = params.classNames).length > 0) + for (var i = 0, length = clause.length; i < length; i++) + conditions.push('element.hasClassName(' + clause[i].inspect() + ')'); + if (clause = params.attributes) { + clause.each(function(attribute) { + var value = 'element.readAttribute(' + attribute.name.inspect() + ')'; + var splitValueBy = function(delimiter) { + return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; + } + + switch (attribute.operator) { + case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; + case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; + case '|=': conditions.push( + splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() + ); break; + case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; + case '': + case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break; + default: throw 'Unknown operator ' + attribute.operator + ' in selector'; + } + }); + } + + return conditions.join(' && '); + }, + + compileMatcher: function() { + this.match = new Function('element', 'if (!element.tagName) return false; \ + element = $(element); \ + return ' + this.buildMatchExpression()); + }, + + findElements: function(scope) { + var element; + + if (element = $(this.params.id)) + if (this.match(element)) + if (!scope || Element.childOf(element, scope)) + return [element]; + + scope = (scope || document).getElementsByTagName(this.params.tagName || '*'); + + var results = []; + for (var i = 0, length = scope.length; i < length; i++) + if (this.match(element = scope[i])) + results.push(Element.extend(element)); + + return results; + }, + + toString: function() { + return this.expression; + } +} + +Object.extend(Selector, { + matchElements: function(elements, expression) { + var selector = new Selector(expression); + return elements.select(selector.match.bind(selector)).map(Element.extend); + }, + + findElement: function(elements, expression, index) { + if (typeof expression == 'number') index = expression, expression = false; + return Selector.matchElements(elements, expression || '*')[index || 0]; + }, + + findChildElements: function(element, expressions) { + return expressions.map(function(expression) { + return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) { + var selector = new Selector(expr); + return results.inject([], function(elements, result) { + return elements.concat(selector.findElements(result || element)); + }); + }); + }).flatten(); + } +}); + +function $$() { + return Selector.findChildElements(document, $A(arguments)); +} +var Form = { + reset: function(form) { + $(form).reset(); + return form; + }, + + serializeElements: function(elements, getHash) { + var data = elements.inject({}, function(result, element) { + if (!element.disabled && element.name) { + var key = element.name, value = $(element).getValue(); + if (value != undefined) { + if (result[key]) { + if (result[key].constructor != Array) result[key] = [result[key]]; + result[key].push(value); + } + else result[key] = value; + } + } + return result; + }); + + return getHash ? data : Hash.toQueryString(data); + } +}; + +Form.Methods = { + serialize: function(form, getHash) { + return Form.serializeElements(Form.getElements(form), getHash); + }, + + getElements: function(form) { + return $A($(form).getElementsByTagName('*')).inject([], + function(elements, child) { + if (Form.Element.Serializers[child.tagName.toLowerCase()]) + elements.push(Element.extend(child)); + return elements; + } + ); + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) return $A(inputs).map(Element.extend); + + for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || (name && input.name != name)) + continue; + matchingInputs.push(Element.extend(input)); + } + + return matchingInputs; + }, + + disable: function(form) { + form = $(form); + form.getElements().each(function(element) { + element.blur(); + element.disabled = 'true'; + }); + return form; + }, + + enable: function(form) { + form = $(form); + form.getElements().each(function(element) { + element.disabled = ''; + }); + return form; + }, + + findFirstElement: function(form) { + return $(form).getElements().find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + form = $(form); + form.findFirstElement().activate(); + return form; + } +} + +Object.extend(Form, Form.Methods); + +/*--------------------------------------------------------------------------*/ + +Form.Element = { + focus: function(element) { + $(element).focus(); + return element; + }, + + select: function(element) { + $(element).select(); + return element; + } +} + +Form.Element.Methods = { + serialize: function(element) { + element = $(element); + if (!element.disabled && element.name) { + var value = element.getValue(); + if (value != undefined) { + var pair = {}; + pair[element.name] = value; + return Hash.toQueryString(pair); + } + } + return ''; + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + return Form.Element.Serializers[method](element); + }, + + clear: function(element) { + $(element).value = ''; + return element; + }, + + present: function(element) { + return $(element).value != ''; + }, + + activate: function(element) { + element = $(element); + element.focus(); + if (element.select && ( element.tagName.toLowerCase() != 'input' || + !['button', 'reset', 'submit'].include(element.type) ) ) + element.select(); + return element; + }, + + disable: function(element) { + element = $(element); + element.disabled = true; + return element; + }, + + enable: function(element) { + element = $(element); + element.blur(); + element.disabled = false; + return element; + } +} + +Object.extend(Form.Element, Form.Element.Methods); +var Field = Form.Element; +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + default: + return Form.Element.Serializers.textarea(element); + } + }, + + inputSelector: function(element) { + return element.checked ? element.value : null; + }, + + textarea: function(element) { + return element.value; + }, + + select: function(element) { + return this[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var index = element.selectedIndex; + return index >= 0 ? this.optionValue(element.options[index]) : null; + }, + + selectMany: function(element) { + var values, length = element.length; + if (!length) return null; + + for (var i = 0, values = []; i < length; i++) { + var opt = element.options[i]; + if (opt.selected) values.push(this.optionValue(opt)); + } + return values; + }, + + optionValue: function(opt) { + // extend element because hasAttribute may not be native + return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; + } +} + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + var changed = ('string' == typeof this.lastValue && 'string' == typeof value + ? this.lastValue != value : String(this.lastValue) != String(value)); + if (changed) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + Form.getElements(this.element).each(this.registerCallback.bind(this)); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + default: + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0, length = Event.observers.length; i < length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) + name = 'keydown'; + + Event._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + try { + element.detachEvent('on' + name, observer); + } catch (e) {} + } + } +}); + +/* prevent memory leaks in IE */ +if (navigator.appVersion.match(/\bMSIE\b/)) + Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if(element.tagName=='BODY') break; + var p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent==document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + if (!window.opera || element.tagName=='BODY') { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.width = width + 'px'; + element.style.height = height + 'px'; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } +} + +Element.addMethods(); \ No newline at end of file diff --git a/public/javascripts/store.js b/public/javascripts/store.js new file mode 100644 index 0000000..4bc724b --- /dev/null +++ b/public/javascripts/store.js @@ -0,0 +1,32 @@ +function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. +{ + var arVersion = navigator.appVersion.split("MSIE") + var version = parseFloat(arVersion[1]) + if ((version >= 5.5) && (document.body.filters)) + { + for(var i=0; i" + img.outerHTML = strNewHTML + i = i-1 + } + } + } +} + +// $Id: jquery.js,v 1.4 2006/10/23 19:51:35 unconed Exp $ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('l(1X 1P.6=="Q"){1P.Q=1P.Q;u 6=q(a,c){l(a&&1X a=="q"&&6.C.1V)v 6(17).1V(a);a=a||6.1l||17;l(a.3C)v 6(6.1T(a,[]));l(c&&c.3C)v 6(c).1U(a);l(1P==7)v 1h 6(a,c);l(a.N==1y){u m=/^[^<]*(<.+>)[^>]*$/.3b(a);l(m)a=6.3q([m[1]])}7.1m(a.N==2B||a.D&&!a.1Y&&a[0]!=Q&&a[0].1Y?6.1T(a,[]):6.1U(a,c));u C=1a[1a.D-1];l(C&&1X C=="q")7.T(C);v 7};l(1X $!="Q")6.44$=$;u $=6;6.C=6.8c={3C:"1.0.2",5I:q(){v 7.D},1m:q(29){l(29&&29.N==2B){7.D=0;[].1o.15(7,29);v 7}H v 29==Q?6.1T(7,[]):7[29]},T:q(C,1g){v 6.T(7,C,1g)},8h:q(12){u 2f=-1;7.T(q(i){l(7==12)2f=i});v 2f},1r:q(1N,Y,B){v 1N.N!=1y||Y!=Q?7.T(q(){l(Y==Q)I(u E 1s 1N)6.1r(B?7.1b:7,E,1N[E]);H 6.1r(B?7.1b:7,1N,Y)}):6[B||"1r"](7[0],1N)},1f:q(1N,Y){v 7.1r(1N,Y,"28")},2z:q(e){e=e||7;u t="";I(u j=0;j0:U},2R:q(1g,2a,2Y,C){u 4g=7.5I()>1;u a=6.3q(1g);v 7.T(q(){u 12=7;l(2a&&7.2D.2b()=="8n"&&a[0].2D.2b()!="62"){u 25=7.4Q("25");l(!25.D){12=17.5O("25");7.3L(12)}H 12=25[0]}I(u i=(2Y<0?a.D-1:0);i!=(2Y<0?2Y:a.D);i+=2Y){C.15(12,[4g?a[i].3c(R):a[i]])}})},2h:q(a,1g){u C=1g&&1g[1g.D-1];u 2g=1g&&1g[1g.D-2];l(C&&C.N!=1w)C=O;l(2g&&2g.N!=1w)2g=O;l(!C){l(!7.30)7.30=[];7.30.1o(7.1m());7.1m(a)}H{u 1W=7.1m();7.1m(a);l(2g&&a.D||!2g)7.T(2g||C).1m(1W);H 7.1m(1W).T(C)}v 7}};6.1I=6.C.1I=q(12,E){l(1a.D>1&&(E===O||E==Q))v 12;l(!E){E=12;12=7}I(u i 1s E)12[i]=E[i];v 12};6.1I({5A:q(){6.65=R;6.T(6.2c.5q,q(i,n){6.C[i]=q(a){u K=6.2w(7,n);l(a&&a.N==1y)K=6.19(a,K).r;v 7.2h(K,1a)}});6.T(6.2c.2o,q(i,n){6.C[i]=q(){u a=1a;v 7.T(q(){I(u j=0;j",""];H l(!s.1c("<6w")||!s.1c("<25"))1Q=[1,"<2a>",""];H l(!s.1c("<4t"))1Q=[2,"<2a>",""];H l(!s.1c("<6x")||!s.1c("<6z"))1Q=[3,"<2a><25><4t>",""];2d.2V=1Q[1]+s+1Q[2];20(1Q[0]--)2d=2d.23;1E=2d.2r}l(1E.D!=Q&&!1E.1Y)I(u n=0;n<1E.D;n++)r.1o(1E[n]);H r.1o(1E.1Y?1E:17.6A(1E.6C()))}v r},2t:{"":"m[2]== \'*\'||a.2D.2b()==m[2].2b()","#":"a.3a(\'3G\')&&a.3a(\'3G\')==m[2]",":":{5X:"im[3]-0",5J:"m[3]-0==i",5l:"m[3]-0==i",2m:"i==0",1O:"i==r.D-1",51:"i%2==0",52:"i%2","5J-3w":"6.1x(a,m[3]).1k","2m-3w":"6.1x(a,0).1k","1O-3w":"6.1x(a,0).1O","6D-3w":"6.1x(a).D==1",5r:"a.2r.D",5z:"!a.2r.D",5p:"6.C.2z.15([a]).1c(m[3])>=0",6E:"a.B!=\'1R\'&&6.1f(a,\'1u\')!=\'22\'&&6.1f(a,\'3U\')!=\'1R\'",1R:"a.B==\'1R\'||6.1f(a,\'1u\')==\'22\'||6.1f(a,\'3U\')==\'1R\'",6F:"!a.2E",2E:"a.2E",2I:"a.2I",3V:"a.3V || 6.1r(a, \'3V\')",2z:"a.B==\'2z\'",3W:"a.B==\'3W\'",5w:"a.B==\'5w\'",3Q:"a.B==\'3Q\'",5u:"a.B==\'5u\'",4z:"a.B==\'4z\'",5x:"a.B==\'5x\'",4y:"a.B==\'4y\'",4D:"a.B==\'4D\'",5B:"a.2D.3P().4R(/5B|3B|6L|4D/)"},".":"6.1i.3t(a,m[2])","@":{"=":"z==m[4]","!=":"z!=m[4]","^=":"z && !z.1c(m[4])","$=":"z && z.2W(z.D - m[4].D,m[4].D)==m[4]","*=":"z && z.1c(m[4])>=0","":"z"},"[":"6.1U(m[2],a).D"},3z:["\\\\.\\\\.|/\\\\.\\\\.","a.1n",">|/","6.1x(a.23)","\\\\+","6.1x(a).3y","~",q(a){u r=[];u s=6.1x(a);l(s.n>0)I(u i=s.n;i=1)t=t.2W(t.1c("/"),t.D)}u K=[1l];u 1J=[];u 1O=O;20(t.D>0&&1O!=t){u r=[];1O=t;t=6.2K(t).1A(/^\\/\\//i,"");u 34=U;I(u i=0;i<6.3z.D;i+=2){l(34)4Z;u 2s=1h 43("^("+6.3z[i]+")");u m=2s.3b(t);l(m){r=K=6.2w(K,6.3z[i+1]);t=6.2K(t.1A(2s,""));34=R}}l(!34){l(!t.1c(",")||!t.1c("|")){l(K[0]==1l)K.4l();1J=6.1T(1J,K);r=K=[1l];t=" "+t.2W(1,t.D)}H{u 3Z=/^([#.]?)([a-4W-9\\\\*44-]*)/i;u m=3Z.3b(t);l(m[1]=="#"){u 4h=17.5W(m[2]);r=K=4h?[4h]:[];t=t.1A(3Z,"")}H{l(!m[2]||m[1]==".")m[2]="*";I(u i=0;i<\\/27>");u 27=17.5W("5Y");27.2C=q(){l(7.3l!="1z")v;7.1n.3r(7);6.1V()};27=O}H l(6.18.33){6.3M=42(q(){l(17.3l=="63"||17.3l=="1z"){54(6.3M);6.3M=O;6.1V()}},10)}6.M.21(1P,"2S",6.1V)};l(6.18.1t)6(1P).4A(q(){u M=6.M,1d=M.1d;I(u B 1s 1d){u 3O=1d[B],i=3O.D;l(i>0)6a l(B!=\'4A\')M.24(3O[i-1],B);20(--i)}});6.C.1I({5U:6.C.1B,1B:q(11,G){v 11?7.1S({1D:"1B",2k:"1B",1j:"1B"},11,G):7.5U()},5V:6.C.1q,1q:q(11,G){v 11?7.1S({1D:"1q",2k:"1q",1j:"1q"},11,G):7.5V()},6n:q(11,G){v 7.1S({1D:"1B"},11,G)},6o:q(11,G){v 7.1S({1D:"1q"},11,G)},6p:q(11,G){v 7.T(q(){u 4H=6(7).4B(":1R")?"1B":"1q";6(7).1S({1D:4H},11,G)})},6r:q(11,G){v 7.1S({1j:"1B"},11,G)},6s:q(11,G){v 7.1S({1j:"1q"},11,G)},6t:q(11,2o,G){v 7.1S({1j:2o},11,G)},1S:q(E,11,G){v 7.1v(q(){7.2N=6.1I({},E);I(u p 1s E){u e=1h 6.2L(7,6.11(11,G),p);l(E[p].N==4M)e.36(e.1k(),E[p]);H e[E[p]](E)}})},1v:q(B,C){l(!C){C=B;B="2L"}v 7.T(q(){l(!7.1v)7.1v={};l(!7.1v[B])7.1v[B]=[];7.1v[B].1o(C);l(7.1v[B].D==1)C.15(7)})}});6.1I({5d:q(e,p){l(e.5D)v;l(p=="1D"&&e.4J!=3k(6.28(e,p)))v;l(p=="2k"&&e.4K!=3k(6.28(e,p)))v;u a=e.1b[p];u o=6.28(e,p,1);l(p=="1D"&&e.4J!=o||p=="2k"&&e.4K!=o)v;e.1b[p]=e.31?"":"5F";u n=6.28(e,p,1);l(o!=n&&n!="5F"){e.1b[p]=a;e.5D=R}},11:q(s,o){o=o||{};l(o.N==1w)o={1z:o};u 5K={6G:6H,6J:4I};o.2X=(s&&s.N==4M?s:5K[s])||5m;o.3o=o.1z;o.1z=q(){6.4P(7,"2L");l(o.3o&&o.3o.N==1w)o.3o.15(7)};v o},1v:{},4P:q(F,B){B=B||"2L";l(F.1v&&F.1v[B]){F.1v[B].4l();u f=F.1v[B][0];l(f)f.15(F)}},2L:q(F,2p,E){u z=7;z.o={2X:2p.2X||5m,1z:2p.1z,2u:2p.2u};z.W=F;u y=z.W.1b;z.a=q(){l(2p.2u)2p.2u.15(F,[z.2e]);l(E=="1j")6.1r(y,"1j",z.2e);H l(3k(z.2e))y[E]=3k(z.2e)+"5b";y.1u="2U"};z.55=q(){v 4d(6.1f(z.W,E))};z.1k=q(){u r=4d(6.28(z.W,E));v r&&r>-6Z?r:z.55()};z.36=q(41,2o){z.4f=(1h 50()).53();z.2e=41;z.a();z.4a=42(q(){z.2u(41,2o)},13)};z.1B=q(){l(!z.W.1K)z.W.1K={};z.W.1K[E]=7.1k();z.36(0,z.W.1K[E]);l(E!="1j")y[E]="77"};z.1q=q(){l(!z.W.1K)z.W.1K={};z.W.1K[E]=7.1k();z.o.1q=R;z.36(z.W.1K[E],0)};l(!z.W.4c)z.W.4c=6.1f(z.W,"32");y.32="1R";z.2u=q(4j,4i){u t=(1h 50()).53();l(t>z.o.2X+z.4f){54(z.4a);z.4a=O;z.2e=4i;z.a();z.W.2N[E]=R;u 1J=R;I(u i 1s z.W.2N)l(z.W.2N[i]!==R)1J=U;l(1J){y.32=z.W.4c;l(z.o.1q)y.1u=\'22\';l(z.o.1q){I(u p 1s z.W.2N){l(p=="1j")6.1r(y,p,z.W.1K[p]);H y[p]=z.W.1K[p]+"5b";l(p==\'1D\'||p==\'2k\')6.5d(z.W,p)}}}l(1J&&z.o.1z&&z.o.1z.N==1w)z.o.1z.15(z.W)}H{u p=(t-7.4f)/z.o.2X;z.2e=((-5o.7w(p*5o.7y)/2)+0.5)*(4i-4j)+4j;z.a()}}}});6.C.1I({7D:q(L,1M,G){7.2S(L,1M,G,1)},2S:q(L,1M,G,1F){l(L.N==1w)v 7.37("2S",L);G=G||q(){};u B="3T";l(1M){l(1M.N==1w){G=1M;1M=O}H{1M=6.2P(1M);B="4U"}}u 4n=7;6.3H(B,L,1M,q(3s,16){l(16=="2v"||!1F&&16=="5j"){4n.38(3s.3F).3X().T(G,[3s.3F,16])}H G.15(4n,[3s.3F,16])},1F);v 7},7K:q(){v 6.2P(7)},3X:q(){v 7.1U(\'27\').T(q(){l(7.3u)6.5Z(7.3u,q(){});H 3J.3N(1P,7.2z||7.7L||7.2V||"")}).4r()}});l(6.18.1t&&1X 3h=="Q")3h=q(){v 1h 7Q(5G.5H.1c("7W 5")>=0?"82.5Q":"84.5Q")};1h q(){u e="5M,5E,5y,5v,5s".3d(",");I(u i=0;i-1)?"&":"?")+6.2P(J);6.3H("3T",L,O,q(r,16){l(G)G(6.3p(r,B),16)},1F)},8i:q(L,J,G,B){6.1m(L,J,G,B,1)},5Z:q(L,G){l(G)6.1m(L,O,G,"27");H{6.1m(L,O,O,"27")}},64:q(L,J,G){l(G)6.1m(L,J,G,"3S");H{6.1m(L,J,"3S")}},7c:q(L,J,G,B){6.3H("4U",L,6.2P(J),q(r,16){l(G)G(6.3p(r,B),16)})},1p:0,6h:q(1p){6.1p=1p},39:{},3H:q(B,L,J,K,1F){u 1d=R;u 1p=6.1p;l(!L){K=B.1z;u 2v=B.2v;u 2i=B.2i;u 4k=B.4k;u 1d=1X B.1d=="6q"?B.1d:R;u 1p=1X B.1p=="6u"?B.1p:6.1p;1F=B.1F||U;J=B.J;L=B.L;B=B.B}l(1d&&!6.4v++)6.M.1L("5M");u 48=U;u P=1h 3h();P.6B(B||"3T",L,R);l(J)P.3i("6I-6K","6M/x-6N-6Q-6T");l(1F)P.3i("6V-3Y-6Y",6.39[L]||"71, 74 75 78 46:46:46 79");P.3i("X-7a-7g","3h");l(P.7h)P.3i("7k","7l");u 2C=q(4e){l(P&&(P.3l==4||4e=="1p")){48=R;u 16=6.4E(P)&&4e!="1p"?1F&&6.4L(P,L)?"5j":"2v":"2i";l(16!="2i"){u 3n;3v{3n=P.4w("4N-3Y")}3m(e){}l(1F&&3n)6.39[L]=3n;l(2v)2v(6.3p(P,4k),16);l(1d)6.M.1L("5s")}H{l(2i)2i(P,16);l(1d)6.M.1L("5v")}l(1d)6.M.1L("5y");l(1d&&!--6.4v)6.M.1L("5E");l(K)K(P,16);P.2C=q(){};P=O}};P.2C=2C;l(1p>0)7Y(q(){l(P){P.85();l(!48)2C("1p");P=O}},1p);P.8j(J)},4v:0,4E:q(r){3v{v!r.16&&66.6d=="3Q:"||(r.16>=4I&&r.16<6y)||r.16==59||6.18.33&&r.16==Q}3m(e){}v U},4L:q(P,L){3v{u 4T=P.4w("4N-3Y");v P.16==59||4T==6.39[L]||6.18.33&&P.16==Q}3m(e){}v U},3p:q(r,B){u 4o=r.4w("7J-B");u J=!B&&4o&&4o.1c("P")>=0;J=B=="P"||J?r.7Z:r.3F;l(B=="27")3J.3N(1P,J);l(B=="3S")3J("J = "+J);l(B=="38")$("<2d>").38(J).3X();v J},2P:q(a){u s=[];l(a.N==2B||a.3C){I(u i=0;i 1 + + assert_response :success + assert_template 'show' + + assert_not_nil assigns(:product) + assert assigns(:product).valid? + end + + def test_new + get :new + + assert_response :success + assert_template 'new' + + assert_not_nil assigns(:product) + end + + def test_create + num_products = Product.count + + post :create, :product => {} + + assert_response :redirect + assert_redirected_to :action => 'list' + + assert_equal num_products + 1, Product.count + end + + def test_edit + get :edit, :id => 1 + + assert_response :success + assert_template 'edit' + + assert_not_nil assigns(:product) + assert assigns(:product).valid? + end + + def test_update + post :update, :id => 1 + assert_response :redirect + assert_redirected_to :action => 'show', :id => 1 + end + + def test_destroy + assert_not_nil Product.find(1) + + post :destroy, :id => 1 + assert_response :redirect + assert_redirected_to :action => 'list' + + assert_raise(ActiveRecord::RecordNotFound) { + Product.find(1) + } + end +end diff --git a/test/functional/email_controller_test.rb b/test/functional/email_controller_test.rb new file mode 100644 index 0000000..943c5eb --- /dev/null +++ b/test/functional/email_controller_test.rb @@ -0,0 +1,18 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'email_controller' + +# Re-raise errors caught by the controller. +class EmailController; def rescue_action(e) raise e end; end + +class EmailControllerTest < Test::Unit::TestCase + def setup + @controller = EmailController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + end + + # Replace this with your real tests. + def test_truth + assert true + end +end diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 0000000..a299c7f --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,28 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path(File.dirname(__FILE__) + "/../config/environment") +require 'test_help' + +class Test::Unit::TestCase + # Transactional fixtures accelerate your tests by wrapping each test method + # in a transaction that's rolled back on completion. This ensures that the + # test database remains unchanged so your fixtures don't have to be reloaded + # between every test method. Fewer database queries means faster tests. + # + # Read Mike Clark's excellent walkthrough at + # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting + # + # Every Active Record database supports transactions except MyISAM tables + # in MySQL. Turn off transactional fixtures in this case; however, if you + # don't care one way or the other, switching from MyISAM to InnoDB tables + # is recommended. + self.use_transactional_fixtures = true + + # Instantiated fixtures are slow, but give you @david where otherwise you + # would need people(:david). If you don't want to migrate your existing + # test cases which use the @david style and don't mind the speed hit (each + # instantiated fixtures translates to a database query per test method), + # then set this back to true. + self.use_instantiated_fixtures = false + + # Add more helper methods to be used by all tests here... +end diff --git a/test/unit/coupon_test.rb b/test/unit/coupon_test.rb new file mode 100644 index 0000000..a3dc365 --- /dev/null +++ b/test/unit/coupon_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class CouponTest < Test::Unit::TestCase + fixtures :coupons + + # Replace this with your real tests. + def test_truth + assert true + end +end diff --git a/test/unit/line_item_test.rb b/test/unit/line_item_test.rb new file mode 100644 index 0000000..df54462 --- /dev/null +++ b/test/unit/line_item_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class LineItemTest < Test::Unit::TestCase + fixtures :line_items + + # Replace this with your real tests. + def test_truth + assert true + end +end diff --git a/test/unit/list_subscriber_test.rb b/test/unit/list_subscriber_test.rb new file mode 100644 index 0000000..b0e3f1a --- /dev/null +++ b/test/unit/list_subscriber_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class ListSubscriberTest < Test::Unit::TestCase + fixtures :list_subscribers + + # Replace this with your real tests. + def test_truth + assert true + end +end diff --git a/test/unit/order_mailer_test.rb b/test/unit/order_mailer_test.rb new file mode 100644 index 0000000..c98ad23 --- /dev/null +++ b/test/unit/order_mailer_test.rb @@ -0,0 +1,35 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'order_mailer' + +class OrderMailerTest < Test::Unit::TestCase + FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' + CHARSET = "utf-8" + + include ActionMailer::Quoting + + def setup + ActionMailer::Base.delivery_method = :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries = [] + + @expected = TMail::Mail.new + @expected.set_content_type "text", "plain", { "charset" => CHARSET } + end + + def test_thankyou + @expected.subject = 'OrderMailer#thankyou' + @expected.body = read_fixture('thankyou') + @expected.date = Time.now + + assert_equal @expected.encoded, OrderMailer.create_thankyou(@expected.date).encoded + end + + private + def read_fixture(action) + IO.readlines("#{FIXTURES_PATH}/order_mailer/#{action}") + end + + def encode(subject) + quoted_printable(subject, CHARSET) + end +end diff --git a/test/unit/order_test.rb b/test/unit/order_test.rb new file mode 100644 index 0000000..f86d29d --- /dev/null +++ b/test/unit/order_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class OrderTest < Test::Unit::TestCase + fixtures :orders + + # Replace this with your real tests. + def test_truth + assert true + end +end diff --git a/test/unit/product_test.rb b/test/unit/product_test.rb new file mode 100644 index 0000000..4d90687 --- /dev/null +++ b/test/unit/product_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class ProductTest < Test::Unit::TestCase + fixtures :products + + # Replace this with your real tests. + def test_truth + assert true + end +end diff --git a/test/unit/support_mailer_test.rb b/test/unit/support_mailer_test.rb new file mode 100644 index 0000000..d69377a --- /dev/null +++ b/test/unit/support_mailer_test.rb @@ -0,0 +1,27 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'support_mailer' + +class SupportMailerTest < Test::Unit::TestCase + FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' + CHARSET = "utf-8" + + include ActionMailer::Quoting + + def setup + ActionMailer::Base.delivery_method = :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries = [] + + @expected = TMail::Mail.new + @expected.set_content_type "text", "plain", { "charset" => CHARSET } + end + + private + def read_fixture(action) + IO.readlines("#{FIXTURES_PATH}/support_mailer/#{action}") + end + + def encode(subject) + quoted_printable(subject, CHARSET) + end +end diff --git a/vendor/plugins/activerecord_foreign_key_extensions/init.rb b/vendor/plugins/activerecord_foreign_key_extensions/init.rb new file mode 100644 index 0000000..be102aa --- /dev/null +++ b/vendor/plugins/activerecord_foreign_key_extensions/init.rb @@ -0,0 +1,2 @@ +require 'active_record/schema_dumper' +require 'active_record_extensions' diff --git a/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb b/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb new file mode 100644 index 0000000..19135e2 --- /dev/null +++ b/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb @@ -0,0 +1,192 @@ +# Postgres and MySQL by bubbleware.com +# Oracle and cleanups by atmos.org +require 'digest/sha1' + +module ActiveRecord + class SchemaDumper + private + alias old_tables tables + def tables(stream) + old_tables(stream) + @connection.tables.sort.each do |tbl| + next if tbl == "schema_info" + foreign_key_constraints(tbl, stream) + end + end + + def foreign_key_constraints(table, stream) + keys = @connection.foreign_key_constraints(table) + keys.each do |key| + stream.print " add_foreign_key_constraint #{table.inspect}, #{key.foreign_key.inspect}, #{key.reference_table.inspect}, #{key.reference_column.inspect}, :name => #{key.name.inspect}, :on_update => #{key.on_update.inspect}, :on_delete => #{key.on_delete.inspect}" + stream.puts + end + stream.puts unless keys.empty? + end + end + + module ConnectionAdapters + class ForeignKeyConstraintDefinition < Struct.new(:name, :foreign_key, :reference_table, :reference_column, :on_update, :on_delete) #:nodoc: + end + + class AbstractAdapter + protected + def symbolize_foreign_key_constraint_action(constraint_action) + constraint_action.downcase.gsub(/\s/, '_').to_sym + end + end + + class PostgreSQLAdapter < AbstractAdapter + def foreign_key_constraints(table, name = nil) + # sql = "SELECT conname, pg_catalog.pg_get_constraintdef(oid) AS consrc FROM pg_catalog.pg_constraint WHERE contype='f' " + #sql += "AND conrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='#{table}')" + + # Modified to the following 2 lines from the advice of + # http://wiki.rubyonrails.org/rails/pages/Foreign+Key+Schema+Dumper+Plugin + + sql = "SELECT f.conname, pg_get_constraintdef(f.oid) AS consrc FROM pg_class t, pg_constraint f " + sql += "WHERE f.conrelid = t.oid AND f.contype = 'f' AND t.relname = '#{table}'" + + # NOTE: There is also discussion in the mentioned link about code supporting more + # postgres foreign relationships + # -AK + + query(sql,name).collect do |row| + if row[1] =~ /FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)(?: ON UPDATE (\w+))?(?: ON DELETE (\w+))?/ + ForeignKeyConstraintDefinition.new(row[0], $1, $2, $3, + ($4 ? symbolize_foreign_key_constraint_action($4) : nil), + ($5 ? symbolize_foreign_key_constraint_action($5) : nil)) + end + end + end + + def remove_foreign_key_constraint(table_name, constraint_name) + execute "ALTER TABLE #{table_name} DROP CONSTRAINT #{constraint_name}" + end + + alias old_default_value default_value + def default_value(value) + return ":now" if value =~ /^now\(\)|^\('now'::text\)::(date|timestamp)/i + return old_default_value(value) + end + end + + class OracleAdapter < AbstractAdapter + def foreign_key_constraints(table, name = nil) + uc = 'user_constraints' + ucc = 'user_cons_columns' + + sql = %Q{SELECT + c.table_name, cc.column_name, + r.table_name as rtable_name, rc.column_name as rcolumn_name, + c.delete_rule + from + #{uc} c, #{uc} r, #{ucc} cc, #{ucc} rc + where + c.constraint_type = 'R' and + c.table_name = UPPER('#{table}') and + c.r_constraint_name = r.constraint_name and + c.constraint_name = cc.constraint_name and + r.constraint_name = rc.constraint_name and + cc.position = rc.position}.gsub(/(\n|^\W+)/, ' ') + + select(sql).collect do |row| + ForeignKeyConstraintDefinition.new('', row['column_name'].downcase, + row['rtable_name'].downcase, row['rcolumn_name'].downcase, + nil, symbolize_foreign_key_constraint_action(row['delete_rule'])) + end + end + def remove_foreign_key_constraint(table_name, constraint_name) + constraint = 'c'+Digest::SHA1.hexdigest(constraint_name)[0,29] + execute "ALTER TABLE #{table_name} DROP FOREIGN KEY #{constraint}" + end + end + + class MysqlAdapter < AbstractAdapter + def foreign_key_constraints(table, name = nil) + constraints = [] + execute("SHOW CREATE TABLE #{table}", name).each do |row| + row[1].each do |create_line| + if create_line.strip =~ /CONSTRAINT `([^`]+)` FOREIGN KEY \(`([^`]+)`\) REFERENCES `([^`]+)` \(`([^`]+)`\)([^,]*)/ + constraint = ForeignKeyConstraintDefinition.new(Regexp.last_match(1), Regexp.last_match(2), Regexp.last_match(3), Regexp.last_match(4), nil, nil) + + constraint_params = {} + + unless Regexp.last_match(5).nil? + Regexp.last_match(5).strip.split('ON ').each do |param| + constraint_params[Regexp.last_match(1).upcase] = Regexp.last_match(2).strip.upcase if param.strip =~ /([^ ]+) (.+)/ + end + end + + constraint.on_update = symbolize_foreign_key_constraint_action(constraint_params['UPDATE']) if constraint_params.include? 'UPDATE' + constraint.on_delete = symbolize_foreign_key_constraint_action(constraint_params['DELETE']) if constraint_params.include? 'DELETE' + + constraints << constraint + end + end + end + + constraints + end + + def remove_foreign_key_constraint(table_name, constraint_name) + execute "ALTER TABLE #{table_name} DROP FOREIGN KEY #{constraint_name}" + end + end + class Column + private + alias old_extract_limit extract_limit + def extract_limit(sql_type) + return 255 if sql_type =~ /enum/i + old_extract_limit(sql_type) + end + + alias old_simplified_type simplified_type + def simplified_type(field_type) + return :string if field_type =~ /enum/i + old_simplified_type(field_type) + end + end + + module SchemaStatements + # Adds a new foreign key constraint to the table. + # + # The constrinat will be named after the table and the reference table and column + # unless you pass +:name+ as an option. + # + # options: :name, :on_update, :on_delete + def foreign_key_constraint_statement(condition, fkc_sym) + action = { :restrict => 'RESTRICT', :cascade => 'CASCADE', :set_null => 'SET NULL' }[fkc_sym] + action ? ' ON ' << condition << ' ' << action : '' + end + + def add_foreign_key_constraint(table_name, foreign_key, reference_table, reference_column, options = {}) + # sqlite and fks don't mix well, http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers + return if adapter_name =~ /^sqlite/i + constraint_name = options[:name] || "#{table_name}_ibfk_#{foreign_key}" + + # oracle chokes on constraints longer than 30 chars + if adapter_name =~ /^(oci|oracle)$/i + constraint_name = 'c'+Digest::SHA1.hexdigest(constraint_name)[0,29] + end + + sql = "ALTER TABLE #{table_name} ADD CONSTRAINT #{constraint_name} FOREIGN KEY (#{foreign_key}) REFERENCES #{reference_table} (#{reference_column})" + + sql << foreign_key_constraint_statement('UPDATE', options[:on_update]) + sql << foreign_key_constraint_statement('DELETE', options[:on_delete]) + + execute sql + end + + # options: Must enter one of the two options: + # 1) :name => the name of the foreign key constraint + # 2) :foreign_key => the name of the column for which the foreign key was created + # (only if the default constraint_name was used) + def remove_foreign_key_constraint(table_name, options={}) + constraint_name = options[:name] || "#{table_name}_ibfk_#{foreign_key}" + raise ArgumentError, "You must specify the constraint name" if constraint_name.blank? + + @connection.remove_foreign_key_constraint(table_name, constraint_name) + end + end + end +end diff --git a/vendor/plugins/google4r/CHANGES b/vendor/plugins/google4r/CHANGES new file mode 100644 index 0000000..7368ed9 --- /dev/null +++ b/vendor/plugins/google4r/CHANGES @@ -0,0 +1,5 @@ += google4r Changelog + +== 0.0.1 (2007-02-17) + + * initial release, be prepared for some API changes that move the API closer to the XML API \ No newline at end of file diff --git a/vendor/plugins/google4r/LICENSE b/vendor/plugins/google4r/LICENSE new file mode 100644 index 0000000..c60ad8f --- /dev/null +++ b/vendor/plugins/google4r/LICENSE @@ -0,0 +1,22 @@ +Unless noted otherwise, the files of this projects are licensed under a MIT +style license: + +Copyright (c) 2006 Manuel Holtgrewe + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/plugins/google4r/README b/vendor/plugins/google4r/README new file mode 100644 index 0000000..d62a242 --- /dev/null +++ b/vendor/plugins/google4r/README @@ -0,0 +1,75 @@ += google4r + +google4r is a collection of libraries that allow you to access some of Google's web services using Ruby. At the moment, there are wrappers for + +* Google Maps +* Google Checkout. + +You have to 'require' each library independently: + + require 'google4r/maps' + require 'google4r/checkout' + +=== License + +google4r itself is distributed under an MIT style license. + +However, the library includes the cacert.pem:http://curl.haxx.se/ca/cacert.pem file from the Mozilla project. This file is distributed under the MPL:http://www.mozilla.org/MPL/. + +== Google Checkout + +You can find more information on the Google Checkout API here:http://code.google.com/apis/checkout/developer/index.html. Note that the API documentation assumes an understanding of the Google Checkout XML API. + +Google4R also contains a partial implementation of the level 2 of the Google Checkout API: + +* The tag and all of its subtags that are not related to the merchant calculation API can be generated. +* The tag and all of its subtags which are not related to the merchant calculation API can be parsed. +* The tag can be parsed. + +=== Google Checkout Tests + +You have to place a file called 'checkout_command_test.rb' in 'test/checkout' with the configuration for the Google4R::Checkout::Frontend class to use for running the tests. + +The file should contain content similar to: + + # The test configuration for the Google4R::Checkout::Frontend class. + FRONTEND_CONFIGURATION = + { + :merchant_id => '', + :merchant_key => '', + :use_sandbox => true + } + +=== TODO + +Notifications: + +* +* +* +* +* + +All of the Order Processing API. + +== Google Maps + +The only part of the Google Maps API that can be standalone with sense is the Geocoder. The Google4R::Maps::Geocoder class allows to geocode address strings, i.e. finds a number of known locations that match the query to a certain degree. The information about the "known locations" includes the latitude and longitude of the location. + +=== Queries To Try Out + +Querying for this string:: will yield n results +Helena:: 0 +1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA:: 1 +Janitell Rd, Colorado Springs, CO:: 2 + +=== Maps Tests + +Note that you wil have to place a file called 'key.rb' in the directory 'test/maps' to be able to run unit tests. It should have the following contents: + + GOOGLE_MAPS_KEY = '' + +== Dependencies + +The unit tests use Mocha so you have to install the gem "mocha" to run the tests. + diff --git a/vendor/plugins/google4r/init.rb b/vendor/plugins/google4r/init.rb new file mode 100644 index 0000000..95dfb53 --- /dev/null +++ b/vendor/plugins/google4r/init.rb @@ -0,0 +1,41 @@ +require 'google4r/checkout' + +$GCHECKOUT_FRONTEND = nil + +class TaxTableFactory + def effective_tax_tables_at(time) + + tax_free_table = Google4R::Checkout::TaxTable.new(false) + tax_free_table.name = "default table" + tax_free_table.create_rule do |rule| + rule.area = Google4R::Checkout::UsCountryArea.new(Google4R::Checkout::UsCountryArea::ALL) + rule.rate = 0.0 + end + return [tax_free_table] + end +end + +def _initialize_frontend + environment = ENV['RAILS_ENV'] || 'production' + live = (environment == 'production') + + app_root = File.dirname(__FILE__) + '/../../..' + config_dir = app_root + '/config' + + prefs = File.expand_path(config_dir + '/google_checkout.yml') + if File.exists?(prefs) + y = YAML.load(File.open(prefs)) + y.each {|pref, value| eval("@#{pref} =\"#{value}\"")} + y[environment].each {|pref, value| eval("@#{pref} =\"#{value}\"")} + end + + $GCHECKOUT_FRONTEND = Google4R::Checkout::Frontend.new(:merchant_id => @gcheckout_merchant_id, + :merchant_key => @gcheckout_merchant_key, + :use_sandbox => environment != 'production') + + $GCHECKOUT_FRONTEND.tax_table_factory = TaxTableFactory.new +end + + + +_initialize_frontend() diff --git a/vendor/plugins/google4r/lib/google4r/checkout.rb b/vendor/plugins/google4r/lib/google4r/checkout.rb new file mode 100644 index 0000000..d4a0ffb --- /dev/null +++ b/vendor/plugins/google4r/lib/google4r/checkout.rb @@ -0,0 +1,36 @@ +#-- +# Project: google4r +# File: lib/google4r/checkout.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ +# Require all the files that provide the code for the Google Checkout wrapper. + +# Tweak the paths so hmac works without modifications. +# $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/checkout/vendor/hmac') + +require 'google4r/checkout/shared' +require 'google4r/checkout/commands' +require 'google4r/checkout/notifications' +require 'google4r/checkout/xml_generation' +require 'google4r/checkout/frontend' diff --git a/vendor/plugins/google4r/lib/google4r/checkout/commands.rb b/vendor/plugins/google4r/lib/google4r/checkout/commands.rb new file mode 100644 index 0000000..cdcbf6e --- /dev/null +++ b/vendor/plugins/google4r/lib/google4r/checkout/commands.rb @@ -0,0 +1,296 @@ +#-- +# Project: google4r +# File: lib/google4r/checkout/commands.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ +# This file contains the classes and modules that are used by the command +# generating code. + +require 'openssl' +require 'money' +require 'base64' +require 'net/http' +require 'net/https' +require 'uri' + +module Google4R #:nodoc: + module Checkout #:nodoc: + # Abstract super class for all commands that are to be sent to Google. Provides the base + # functionality for signing and encoding the cart. + class Command + # The URL to use for requests to the sandboxed API. The merchant id is to be + # put in via String#%. + SANDBOX_URL = "https://sandbox.google.com/checkout/cws/v2/Merchant/%s/request" + + # The URL to use for real requests to the Google Checkout API. The merchant id + # is to be put in via String#%. + PRODUCTION_URL = "https://checkout.google.com/cws/v2/Merchant/%s/request" + + # The Frontent class that was used to create this CheckoutCommand and whose + # configuration will be used. + attr_reader :frontend + + # Initialize the frontend attribute with the value of the frontend parameter. + def initialize(frontend) + @frontend = frontend + end + + # Returns a hash with xml representation of this command and the signature for + # this representation. Both values are Base64 encoded. + # + # This can be used for generating the CheckoutButton when directly posted to + # Google. + # + # command.sign_and_encode + # # => { :cart => 'asdf', :signature => 'asdfasdf' } + def sign_and_encode + xml = self.to_xml + + # Create a signature of the XML using OpenSSL::HMAC. Note that we do not want a + # hexadecimal result from the hash function but a binary result. + signature = OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha1'), + frontend.configuration[:merchant_key], xml) + + # Create Base64 encoded versions of the XML and the signature. + encoded_xml = Base64.encode64(xml) + encoded_signature = Base64.encode64(signature) + + return { :cart => encoded_xml, :signature => encoded_signature } + end + + # Sends the cart's XML to GoogleCheckout via HTTPs with Basic Auth. + # + # Raises an OpenSSL::SSL::SSLError when the SSL certificate verification failed. + # + # Raises a GoogleCheckoutError when Google returns an error. + # + # Raises a RuntimeException on unknown responses. + def send_to_google_checkout + # Create HTTP(S) POST command and set up Basic Authentication. + url_str = + if frontend.configuration[:use_sandbox] then + SANDBOX_URL % frontend.configuration[:merchant_id] + else + PRODUCTION_URL % frontend.configuration[:merchant_id] + end + url = URI.parse(url_str) + + request = Net::HTTP::Post.new(url.path) + request.basic_auth(frontend.configuration[:merchant_id], frontend.configuration[:merchant_key]) + + # Set up the HTTP connection object and the SSL layer. + https = Net::HTTP.new(url.host, url.port) + https.use_ssl = true + https.cert_store = self.class.x509_store + https.verify_mode = OpenSSL::SSL::VERIFY_PEER + https.verify_depth = 5 + + # Send the request to Google. + result = https.request(request, self.to_xml) + + case result + when Net::HTTPSuccess then + xml_doc = REXML::Document.new(result.body) + + case xml_doc.root.name + when 'checkout-redirect' + serial_number = xml_doc.elements['/checkout-redirect/@serial-number'].value + redirect_url = xml_doc.elements['/checkout-redirect/redirect-url/text()'].value + return CheckoutRedirectResponse.new(serial_number, redirect_url) + else + raise "Unknown response:\n--\n#{xml_doc.to_s}\n--" + end + when Net::HTTPClientError then + xml_doc = REXML::Document.new(result.body) + + if xml_doc.elements['/error/@serial-number'].nil? or xml_doc.elements['/error/error-message/text()'].nil? then + raise "Invalid response from Google:\n---\n#{result.body}\n---" + end + + hash = + { + :serial_number => xml_doc.elements['/error/@serial-number'].value, + :message => xml_doc.elements['/error/error-message/text()'].value + } + + raise GoogleCheckoutError.new(hash) + when Net::HTTPRedirection, Net::HTTPServerError, Net::HTTPInformation then + raise "Unexpected response code (#{result.class}): #{result.code} - #{result.message}" + else + raise "Unknown response code: #{result.code} - #{result.message}" + end + end + + # Abstract method that is to contain the command's XML representation. + def to_xml + raise "Command#to_xml is abstract and must be overridden in a subclass." + end + + protected + + # Class method to return the OpenSSL::X509::Store instance for the + # CA certificates. + def self.x509_store + return @@x509_store if defined?(@@x509_store) + + cacert_path = File.expand_path(File.dirname(__FILE__) + '/../../../var/cacert.pem') + + @@x509_store = OpenSSL::X509::Store.new + @@x509_store.add_file(cacert_path) + + return @@x509_store + end + end + + # The CheckoutCommand represents a command sent + # to the server. + # + # A CheckoutCommand instance can have an arbitrary number of TaxTable + # and ShippingMethod instances. You must create these instances using the + # create_* methods which CheckoutCommand supplies. + # + # CheckoutCommand#send_to_google_checkout returns CheckoutRedirectResponse + # instances. + # + # Use the Frontend class to create new CheckoutCommand instances and do not + # instanciate the class directly. + # + # Note that you have to create/set the tax tables for CheckoutCommands before you + # can add any items to the cart that define a tax table. + # + # === Example + # + # frontend = Google4R::Checkout::Frontend.new(configuration) + # frontend.tax_table_factory = TaxTableFactory.new + # command = frontend.create_checkout_command + class CheckoutCommand < Command + # The ShoppingCart of this CheckoutCommand. + attr_reader :cart + + # An array of the TaxTable objects of this CheckoutCommand. They have been + # created with the tax table factory of the frontend which created this + # command. + attr_reader :tax_tables + + # An array of ShippingMethod objects of this CheckoutCommand. Use + # #create_shipping_method to create new shipping methods. + attr_reader :shipping_methods + + # The URL at where the cart can be edited (String, optional). + attr_accessor :edit_cart_url + + # The URL to continue shopping after completing the checkout (String, optional). + attr_accessor :continue_shopping_url + + # A boolean flag; true iff the customer HAS to provide his phone number (optional). + attr_accessor :request_buyer_phone_number + + # Generates the XML for this CheckoutCommand. + def to_xml + CheckoutCommandXmlGenerator.new(self).generate + end + + # Initialize a new CheckoutCommand with a fresh CheckoutCart and an empty + # Array of tax tables and an empty array of ShippingMethod instances. + # Do not use this method directly but use Frontent#create_checkout_command + # to create CheckoutCommand objects. + def initialize(frontend) + super(frontend) + + @cart = ShoppingCart.new(self) + @tax_tables = frontend.tax_table_factory.effective_tax_tables_at(Time.new) + @shipping_methods = Array.new + end + + # Use this method to create a new shipping method. You have to pass in one of + # { PickupShipping, FlatRateShipping } for clazz. The method will create a + # new instance of the class you passedin object and add it to the internal list + # of shipping methods. + # + # If you pass a block to this method (preferred) then the newly created + # ShippingMethod object will be passed into this block for setting its attributes. + # The newly created shipping method will be returned in all cases. + # + # The first shipping method will be used as the default. + # + # Raises a RuntimeError if the parameter clazz is invalid. + def create_shipping_method(clazz, &block) + if not [ PickupShipping, FlatRateShipping ].include?(clazz) then + raise "Unknown shipping method: #{type.inspect}." + end + + shipping_method = clazz.new + @shipping_methods << shipping_method + + yield(shipping_method) if block_given? + + return shipping_method + end + end + + # CheckoutRedirectResponse instances are returned when a CheckoutCommand is successfully + # processed by Google Checkout. + class CheckoutRedirectResponse + # The serial number of the response. + attr_reader :serial_number + + # The URL to redirect to. + attr_reader :redirect_url + + def initialize(serial_number, redirect_url) + @serial_number = serial_number + @redirect_url = redirect_url + end + end + + class DeliverOrderCommand < Command + attr_accessor :google_order_number + attr_accessor :send_email + + # Generates the XML for this CheckoutCommand. + def to_xml + return %Q(#{self.send_email}) + end + end + + class AddMerchantOrderNumberCommand < Command + attr_accessor :google_order_number + attr_accessor :merchant_order_number + + # Generates the XML for this CheckoutCommand. + def to_xml + return %Q(#{self.merchant_order_number}) + end + end + + class ArchiveOrderCommand < Command + attr_accessor :google_order_number + + def to_xml + return %Q() + end + end + + end +end diff --git a/vendor/plugins/google4r/lib/google4r/checkout/frontend.rb b/vendor/plugins/google4r/lib/google4r/checkout/frontend.rb new file mode 100644 index 0000000..4ace904 --- /dev/null +++ b/vendor/plugins/google4r/lib/google4r/checkout/frontend.rb @@ -0,0 +1,112 @@ +#-- +# Project: google4r +# File: lib/google4r/checkout/frontend.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ +# This file provides the Google4R::Checkout::Frontend class that is a factory for the commands +# to be sent to Google Checkout. + +module Google4R #:nodoc: + module Checkout #:nodoc: + # The Frontend class is the factory that is to be used to create the Command (and later + # NotificationHandler) objects. + # + # === Example + # + # configuration = { :merchant_id => '123456789', :merchant_key => '12345abcd' } + # + # frontend = Google4R::Checkout::Frontend.new(configuration) + # command = frontend.create_checkout_command + # + # == Tax Table Factory + # + # You have to set the tax_table_factory attribute of every Frontend object before you + # can call #create_checkout_command or #create_notification_handler because those + # objects require tax tables. + # + # The Tax Table Factory must provide the method "effective_tax_tables_at" accept a Time + # object and provide a method that returns an Array of TaxTable object that describe the + # effective tax rules at the given point of time. + # + # class TaxTableFactory + # def effective_tax_tables_at(time) + # if time < Time.parse("Wed Apr 09 08:56:03 CDT 2003") then + # table1, table2 = TaxTable.new, TaxTable.new + # # ... set rules + # [ table1, table 2] + # else + # table3, table4 = TaxTable.new, TaxTable.new + # # ... set rules + # [ table3, table 4] + # end + # end + # end + # + # frontend = Frontend.new + # frontend.tax_table_factory = TaxTableFactory.new + class Frontend + # The configuration for this Frontend class. It will be used by all classes created + # by this Frontend instance. + attr_reader :configuration + + # An object with a factory method that can create the effective TaxTable objects + # that were valid at a given point of time. + attr_accessor :tax_table_factory + + # Creates a new Frontend instance and sets the configuration attribute to the parameter + # configuration. + def initialize(configuration) + raise "Missing configuration setting: merchant_id" if configuration[:merchant_id].nil? + raise "Missing configuration setting: merchant_key" if configuration[:merchant_key].nil? + raise "Missing configuration setting: use_sandbox" if configuration[:use_sandbox].nil? + + @configuration = configuration.dup.freeze + end + + # Factory method that creates a new CheckoutCommand object. Use this method to create + # your CheckoutCommand instances. + def create_checkout_command + return CheckoutCommand.new(self) + end + + # Factory method that creates a new NotificationHandler object. Use this method to + # create your NotificationHandler instances. + def create_notification_handler + return NotificationHandler.new(self) + end + + def create_add_merchant_order_number_command + return AddMerchantOrderNumberCommand.new(self) + end + + def create_deliver_order_command + return DeliverOrderCommand.new(self) + end + + def create_archive_order_command + return ArchiveOrderCommand.new(self) + end + end + end +end diff --git a/vendor/plugins/google4r/lib/google4r/checkout/notifications.rb b/vendor/plugins/google4r/lib/google4r/checkout/notifications.rb new file mode 100644 index 0000000..635f603 --- /dev/null +++ b/vendor/plugins/google4r/lib/google4r/checkout/notifications.rb @@ -0,0 +1,534 @@ +#-- +# Project: google4r +# File: lib/google4r/checkout/notifications.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ +# This file contains the classes and modules that are used in the notification +# handling code. + +require 'rexml/document' + +module Google4R #:nodoc: + module Checkout #:nodoc: + # Thrown by Notification on unimplemented and unknown notification from Google. + class UnknownNotificationType < Exception + end + + # Use this objects of this class to tell Google that everything went fine. + # + # === Example + # + # render :text => NotificationAcknowledgement.to_xml + class NotificationAcknowledgement + def to_xml + %q{} + end + end + + # This class expects the message sent by Google. It parses the XMl document and returns + # the appropriate Notification. If the notification sent by Google is invalid then a + # UnknownNotificationType is raised that you should catch and then send a 404 to Google + # to indicate that the notification handler has not been implemented yet. + # + # See http://code.google.com/apis/checkout/developer/index.html#notification_api for + # details. + #-- + # TODO + # + # * Check HTTP Auth Basic - in Rails? + #++ + class NotificationHandler + # The Frontend object that created this NotificationHandler + attr_accessor :frontend + + # Create a new NotificationHandler and assign value of the parameter frontend to + # the frontend attribute. + def initialize(frontend) + @frontend = frontend + end + + # Parses the given xml_str and returns the appropriate *Notification class. At the + # moment, only NewOrderNotification and OrderStateChangeNotification objects can be + # returned. + def handle(xml_str) + root = REXML::Document.new(xml_str).root + + case root.name + when 'new-order-notification' then + NewOrderNotification.create_from_element(root, frontend) + when 'order-state-change-notification' then + OrderStateChangeNotification.create_from_element(root, frontend) + else + raise UnknownNotificationType, "Unknown notification type: #{root.name}" + end + end + end + + # Google Checkout sends messages to the web service when a new + # order has been successfully filed with Google Checkout. These messages will be parsed + # into NewOrderNotification instances. + class NewOrderNotification + # The frontend this notification belongs to. + attr_accessor :frontend + + # The serial number of the new order notification (String). + attr_accessor :serial_number + + # The Google order number the new order notification belongs to (String). + attr_accessor :google_order_number + + # The buyer's billing address (Address). + attr_accessor :buyer_billing_address + + # The buyer's shipping adress (Address). + attr_accessor :buyer_shipping_address + + # The buyer's ID from Google Checkout (String). + attr_accessor :buyer_id + + # The buyer's marketing preferences (MarketingPreferences). + attr_accessor :marketing_preferences + + # The order's financial order state (String, one of FinancialOrderState::*). + attr_accessor :financial_order_state + + # The order's fulfillment state (String, one of FulfillmentOrderState::*). + attr_accessor :fulfillment_order_state + + # The order's number at Google Checkout (String). + attr_accessor :google_order_number + + # The order's total adjustment (OrderAdjustment). + attr_accessor :order_adjustment + + # The order's total amount (Money). + attr_accessor :order_total + + # The order's shopping cart (ShoppingCart) + attr_accessor :shopping_cart + + # The order's timestamp (Time), also see #timestamp= + attr_accessor :timestamp + + # Set the order's timestamp (Time). When the timestamp is set then the tax tables valid + # at the given point of time are set into the attribute tax tables from the frontend's + # tax_table_factory. + def timestamp=(time) + @timestamp = time + @tax_tables = frontend.tax_table_factory.effective_tax_tables_at(time) + end + + # The tax tables for the items in the order notification. + attr_reader :tax_tables + + # Sets the frontend attribute to the value of the frontend parameter. + def initialize(frontend) + @frontend = frontend + end + + # Factory method to create a new CheckoutNotification object from the REXML:Element object + # + # Raises NoMethodError and RuntimeError exceptions if the given element misses required + # elements. + # + # You have to pass in the Frontend class this notification belongs to. + def self.create_from_element(element, frontend) + result = NewOrderNotification.new(frontend) + + result.timestamp = Time.parse(element.elements['timestamp'].text) + result.serial_number = element.elements['@serial-number'].value + result.google_order_number = element.elements['google-order-number'].text + result.buyer_billing_address = Address.create_from_element(element.elements['buyer-billing-address']) + result.buyer_shipping_address = Address.create_from_element(element.elements['buyer-shipping-address']) + result.buyer_id = element.elements['buyer-id'].text + result.marketing_preferences = MarketingPreferences.create_from_element(element.elements['buyer-marketing-preferences']) + result.financial_order_state = element.elements['financial-order-state'].text + result.fulfillment_order_state = element.elements['fulfillment-order-state'].text + result.order_adjustment = OrderAdjustment.create_from_element(element.elements['order-adjustment']) + result.shopping_cart = ShoppingCart.create_from_element(element.elements['shopping-cart'], result) + + amount = (element.elements['order-total'].text.to_f * 100).to_i rescue nil # TODO: this will break for currencies where 100c != 1d + currency = element.elements['order-total/@currency'].value rescue nil + result.order_total = Money.new(amount, currency) + + return result + end + end + + # GoogleCheckout sends messages to the web service when the + # order's state changes. They will get parsed into OrderStateChangeNotification objects. + class OrderStateChangeNotification + # The frontend this notification belongs to. + attr_accessor :frontend + + # The serial number of the notification (String). + attr_accessor :serial_number + + # The order number in Google's database (String). + attr_accessor :google_order_number + + # The previous financial state of the order (String, one of FinancialOrderState::*). + attr_accessor :previous_financial_order_state + + # The new financial state of the order (String, one of FinancialOrderState::*). + attr_accessor :new_financial_order_state + + # The previous fulfillment state of the order (String, one of FulfillmentOrderState::*). + attr_accessor :previous_fulfillment_order_state + + # The new fulfillment state of the order (String, one of FulfillmentOrderState::*). + attr_accessor :new_fulfillment_order_state + + # The reason for the change (String, can be nil). + attr_accessor :reason + + # The timestamp of the notification. Also see #timestamp= + attr_accessor :timestamp + + # Set the order's timestamp (Time). When the timestamp is set then the tax tables valid + # at the given point of time are set into the attribute tax tables from the frontend's + # tax_table_factory. + def timestamp=(time) + @timestamp = time + @tax_tables = frontend.tax_table_factory.effective_tax_tables_at(time) + end + + # The tax tables for the items in the order notification. + attr_reader :tax_tables + + # Sets the frontend attribute to the value of the frontend parameter. + def initialize(frontend) + @frontend = frontend + end + + # Factory methdo that creates a new OrderStateChangeNotification from an REXML::Element instance. + # Use this to create instances of OrderStateChangeNotification. + # + # Raises NoMethodError and RuntimeError exceptions if the given element misses required + # elements. + def self.create_from_element(element, frontend) + result = OrderStateChangeNotification.new(frontend) + + result.timestamp = Time.parse(element.elements['timestamp'].text) + + result.serial_number = element.elements['@serial-number'].value + result.google_order_number = element.elements['google-order-number'].text + result.new_financial_order_state = element.elements['new-financial-order-state'].text + result.previous_financial_order_state = element.elements['previous-financial-order-state'].text + result.new_fulfillment_order_state = element.elements['new-fulfillment-order-state'].text + result.previous_fulfillment_order_state = element.elements['previous-fulfillment-order-state'].text + result.reason = element.elements['reason'].text rescue nil + + return result + end + end + + # Container for the valid financial order states as defined in the + # Google Checkout API. + module FinancialOrderState + REVIEWING = "REVIEWING".freeze + CHARGEABLE = "CHARGEABLE".freeze + CHARGING = "CHARGING".freeze + CHARGED = "CHARGED".freeze + PAYMENT_DECLINED = "PAYMENT_DECLINED".freeze + CANCELLED = "CANCELLED".freeze + CANCELLED_BY_GOOGLE = "CANCELLED_BY_GOOGLE".freeze + end + + # Container for the valid fulfillment order states as defined in the + # Google Checkout API. + module FulfillmentOrderState + NEW = "NEW".freeze + PROCESSING = "PROCESSING".freeze + DELIVERED = "DELIVERED".freeze + WILL_NOT_DELIVER = "WILL_NOT_DELIVER".freeze + end + + # Address instances are used in NewOrderNotification objects for the buyer's billing + # and buyer's shipping address. + class Address + # Contact name (String, optional). + attr_accessor :contact_name + + # Second Address line (String). + attr_accessor :address1 + + # Second Address line (String optional). + attr_accessor :address2 + + # The buyer's city name (String). + attr_accessor :city + + # The buyer's company name (String; optional). + attr_accessor :company_name + + # The buyer's country code (String, 2 chars, ISO 3166). + attr_accessor :country_code + + # The buyer's email address (String; optional). + attr_accessor :email + + # The buyer's phone number (String; optional). + attr_accessor :fax + + # The buyer's phone number (String; Optional, can be enforced in CheckoutCommand).) + attr_accessor :phone + + # The buyers postal/zip code (String). + attr_accessor :postal_code + + # The buyer's geographical region (String). + attr_accessor :region + + # Creates a new Address from the given REXML::Element instance. + def self.create_from_element(element) + result = Address.new + + result.address1 = element.elements['address1'].text + result.address2 = element.elements['address2'].text rescue nil + result.city = element.elements['city'].text + result.company_name = element.elements['company-name'].text rescue nil + result.contact_name = element.elements['contact-name'].text rescue nil + result.country_code = element.elements['country-code'].text + result.email = element.elements['email'].text rescue nil + result.fax = element.elements['fax'].text rescue nil + result.phone = element.elements['phone'].text rescue nil + result.postal_code = element.elements['postal-code'].text + result.region = element.elements['region'].text + + return result + end + end + + # The marketing preferences of a customer. + class MarketingPreferences + # Boolean, true iff the customer wants to receive emails. + attr_accessor :email_allowed + + # Creates a new MarketingPreferences object from a given REXML::Element instance. + def self.create_from_element(element) + result = MarketingPreferences.new + + result.email_allowed = (element.elements['email-allowed'].text.downcase == 'true') + + return result + end + end + + # MerchantCodes represent gift certificates or coupons that have been used in an order. + # + # Only used with Merchant Calculations. + class MerchantCode + GIFT_CERTIFICATE = "GIFT_CERTIFICATE".freeze + COUPON = "COUPON".freeze + + # The type of the adjustment. Can be one of GIFT_CERTIFICATE and COUPON. + attr_accessor :type + + # The adjustment's code (String). + attr_accessor :code + + # The amount of money that has been calculated as the adjustment's worth (Money, optional). + attr_accessor :calculated_amount + + # The amount of the adjustment that has been applied to the cart's total (Money). + attr_accessor :applied_amount + + # The message associated with the direct adjustment (String, optional). + attr_accessor :message + + # Creates the MerchantCode from the given REXML::Element instance. The Element's + # name must be "gift-certificate-adjustment" or "coupon-adjustment". + def self.create_from_element(element) + result = MerchantCode.new + + hash = Hash.new + hash[:type] = + case element.name + when 'gift-certificate-adjustment' then + GIFT_CERTIFICATE + when 'coupon-adjustment' then + COUPON + else + raise "Invalid tag name: #{element.name} in \n—-\n#{element.to_s}\n—-." + end + hash[:code] = element.elements['code'].text + hash[:calculated_amount] = (element.elements['calculated-amount'].text.to_f * 100).to_i rescue nil # TODO: this will break for currencies where 100c != 1d + hash[:calculated_amount_currency] = element.elements['calculated-amount/@currency'].value rescue nil + hash[:applied_amount] = (element.elements['applied-amount'].text.to_f * 100).to_i # TODO: this will break for currencies where 100c != 1d + hash[:applied_amount_currency] = element.elements['applied-amount/@currency'].value + hash[:message] = element.elements['message'].text rescue nil + + result.type = hash[:type] + result.code = hash[:code] + if not hash[:calculated_amount].nil? then + result.calculated_amount = Money.new(hash[:calculated_amount], hash[:calculated_amount_currency]) + end + result.applied_amount = Money.new(hash[:applied_amount], hash[:applied_amount_currency]) + result.message = hash[:message] unless hash[:message].nil? + + return result + end + end + + # ShippingAdjustments represent the chosen shipping method. + class ShippingAdjustment + MERCHANT_CALCULATED = "MERCHANT_CALCULATED".freeze + FLAT_RATE = "FLAT_RATE".freeze + PICKUP = "PICKUP".freeze + + # The type of the shipping adjustment, one of MERCHANT_CALCULATED, FLAT_RATE + # PICKUP. + attr_accessor :type + + # The name of the shipping adjustment. + attr_accessor :name + + # The cost of the selected shipping (Money). + attr_accessor :cost + + # Creates a new ShippingAdjustment object from a REXML::Element object. + # + # Can raise a RuntimeException if the given Element is invalid. + def self.create_from_element(element) + result = ShippingAdjustment.new + + hash = Hash.new + hash[:type] = + case element.name + when 'flat-rate-shipping-adjustment' then + FLAT_RATE + when 'pickup-shipping-adjustment' then + PICKUP + when 'merchant-calculated-shipping-adjustment' then + MERCHANT_CALCULATED + else + raise "Unexpected shipping adjustment '#{element.name}'" + end + hash[:name] = element.elements['shipping-name'].text + hash[:cost] = (element.elements['shipping-cost'].text.to_f * 100).to_i # TODO: this will break for currencies where 100c != 1d + hash[:cost_currency] = element.elements['shipping-cost/@currency'].value + + result.type = hash[:type] + result.name = hash[:name] + result.cost = Money.new(hash[:cost], hash[:cost_currency]) + + return result + end + end + + # OrderAdjustment objects contain the adjustments (i.e. the entities in the cart that + # represent positive and negative amounts (at the moment Google Checkout support coupons, + # gift certificates and shipping)). + class OrderAdjustment + # The tag contains the total adjustment to an order total based + # on tax, shipping, gift certificates and coupon codes (optional). + attr_accessor :adjustment_total + + # Boolean, true iff the merchant calculations have been successful (optional). + attr_accessor :merchant_calculation_successful + + # Array of MerchantCode objects. + attr_accessor :merchant_codes + + # The chosen ShippingAdjustment object for this order. + attr_accessor :shipping + + # The total amount of tax that has been paid for this order (Money, optional). + attr_accessor :total_tax + + # Creates a new OrderAdjustment from a given REXML::Element object. + def self.create_from_element(element) + result = OrderAdjustment.new + + hash = Hash.new + hash[:total_tax] = (element.elements['total-tax'].text.to_f * 100).to_i rescue nil # TODO: this will break for currencies where 100c != 1d + hash[:total_tax_currency] = element.elements['total-tax/@currency'].value rescue nil + + shipping_element = element.elements["shipping/*"] + # the if shipping_element check has been added to avoid an exception -AK + hash[:shipping] = ShippingAdjustment.create_from_element(shipping_element) if shipping_element + + hash[:merchant_codes] = Array.new + element.elements.each(%q{merchant-codes/*}) do |code_elem| + hash[:merchant_codes] << MerchantCode.create_from_element(code_elem) + end + + hash[:merchant_calculation_successful] = (element.elements['merchant-calculation-successful'].text.downcase == 'true') rescue nil + + hash[:adjustment_total] = (element.elements['adjustment-total'].text.to_f * 100).to_i rescue nil # TODO: this will break for currencies where 100c != 1d + hash[:adjustment_total_currency] = element.elements['adjustment-total/@currency'].value rescue nil + + result.total_tax = Money.new(hash[:total_tax], hash[:total_tax_currency]) unless hash[:total_tax].nil? + result.adjustment_total = Money.new(hash[:adjustment_total], hash[:adjustment_total_currency]) unless hash[:adjustment_total].nil? + result.merchant_codes = hash[:merchant_codes] # no unless since the Array is initialized + result.merchant_calculation_successful = hash[:merchant_calculation_successful] + result.shipping = hash[:shipping] + + return result + end + end + + # Class with static methods to parse the tags. + class PrivateDataParser + # Returns a Hash with the representation of the structure in + # item/merchant-private-item-data. + def self.element_to_value(element) + # The return value; We will iterate over all children below. When we see a REXML::Element + # child then we set result to a Hash if it is nil. After the result is a Hash, we will + # ignore all REXML::Text children. + # Otherwise, result will be set to the REXML::Text node's value if it is not whitespace + # only. + result = nil + + element.each_child do |child| + case child + when REXML::Element + result ||= Hash.new + child_value = self.element_to_value(child) + + # bar becomes 'foo' => 'bar + # foobar becomes 'foo' => [ 'foo', 'bar' ] + if result[child.name].nil? then + result[child.name] = child_value + elsif result[child.name].kind_of?(Array) then + result[child.name] << child_value + else + tmp = result[child.name] + result[child.name] = [ tmp, child_value ] + end + when REXML::Text + next if result.kind_of?(Hash) # ignore text if we already found a tag + str = child.value.strip + result = str if str.length > 0 + else + # ignore + end + end + + return result + end + end + end +end diff --git a/vendor/plugins/google4r/lib/google4r/checkout/shared.rb b/vendor/plugins/google4r/lib/google4r/checkout/shared.rb new file mode 100644 index 0000000..dcb2fc4 --- /dev/null +++ b/vendor/plugins/google4r/lib/google4r/checkout/shared.rb @@ -0,0 +1,501 @@ +#-- +# Project: google4r +# File: lib/google4r/checkout/shared.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ +# This file contains the classes and modules that are shared by the notification +# handling and parsing as well as the command generating code. + +#-- +# TODO +# +# * Make the optional attributes return defaults that make sense, i.e. Money.new(0) +# * Make the "main" API really pretty Ruby code and provide aliases so people can +# also just use the Google Docs. +#++ +module Google4R #:nodoc: + module Checkout #:nodoc: + # This exception is thrown by Command#send_to_google_checkout when an error occured. + class GoogleCheckoutError < Exception + # The serial number of the error returned by Google. + attr_reader :serial_number + + # The HTTP response code of Google's response. + attr_reader :response_code + + # The parameter is a hash with the entries :serial_number, :message and :response_code. + # The attributes serial_number, message and response_code are set to the values in the + # Hash. + def initialize(hash) + @response_code = hash[:response_code] + @message = hash[:message] + @serial_number = hash[:serial_number] + end + end + + # ShoppingCart instances are containers for Item instances. You can add + # Items to the class using #create_item (see the documentation of this + # method for an example). + class ShoppingCart + # The onwer of this cart. At the moment, this always is the CheckoutCartCommand. + attr_reader :owner + + # The items in the cart. Do not modify this array directly but use + # #create_item to add items. + attr_reader :items + + # You can set the time with this property. If left + # unset then the tag will not be generated and the cart will never + # expire. + attr_accessor :expires_at + + # You can set almost arbitrary data into the cart using this method. + # + # The data will be converted to XML in the following way: The keys are converted + # to tag names (whitespace becomes "-", all chars not matching /[a-zA-Z0-9\-_])/ + # will be removed. + # + # If a value is an array then the key for this value will be used as the tag + # name for each of the arrays's entries. + # + # Arrays will be flattened before it is processed. + # + # === Example + # + # cart.private_data = { 'foo' => { 'bar' => 'baz' } }) + # + # # will produce the following XML + # + # + # baz + # + # + # + # cart.private_data = { 'foo' => [ { 'bar' => 'baz' }, "d'oh", 2 ] } + # + # # will produce the following XML + # + # + # baz + # + # d& + # 2 + attr_reader :private_data + + # Sets the value of the private_data attribute. + def private_data=(value) + raise "The given value #{value.inspect} is not a Hash!" unless value.kind_of?(Hash) + @private_data = value + end + + # Initialize a new ShoppingCart with an empty Array for the items. + def initialize(owner) + @owner = owner + @items = Array.new + end + + # Use this method to add a new item to the cart. If you use a block with + # this method then the block will be given the new item. The new item + # will be returned in any case. + # + # Passing a block is the preferred way of using this method. + # + # === Example + # + # # Using a block (preferred). + # cart = ShoppingCart.new + # + # cart.create_item do |item| + # item.name = "Dry Food Pack" + # item.description = "A pack of highly nutritious..." + # item.unit_price = Money.new(3500, "USD") # $35.00 + # item.quantity = 1 + # end + # + # # Not using a block. + # cart = ShoppingCart.new + # + # item = cart.create_item + # item.name = "Dry Food Pack" + # item.description = "A pack of highly nutritious..." + # item.unit_price = Money.new(3500, "USD") # $35.00 + # item.quantity = 1 + def create_item(&block) + item = Item.new(self) + @items << item + + # Pass the newly generated item to the given block to set its attributes. + yield(item) if block_given? + + return item + end + + # Creates a new ShoppingCart object from a REXML::Element object. + def self.create_from_element(element, owner) + result = ShoppingCart.new(owner) + + text = element.elements['cart-expiration/good-until-date'].text rescue nil + result.expires_at = Time.parse(text) unless text.nil? + + data_element = element.elements['merchant-private-data'] + value = PrivateDataParser.element_to_value(data_element) unless data_element.nil? + + result.private_data = value unless value.nil? + + element.elements.each('items/item') do |item_element| + result.items << Item.create_from_element(item_element, result) + end + + return result + end + end + + # An Item object represents a line of goods in the shopping cart/reciep. + # + # You should never initialize them directly but use ShoppingCart#create_item instead. + # + # Note that you have to create/set the tax tables for the owner of the cart in which + # the item is before you can set the tax_table attribute. + class Item + # The cart that this item belongs to. + attr_reader :cart + + # The name of the cart item (string, required). + attr_accessor :name + + # The description of the cart item (string, required). + attr_accessor :description + + # The price for one unit of the given good (Money instance, required). + attr_reader :unit_price + + # Sets the price for one unit of goods described by this item. money must respond to + # :cents and :currency as the Money class does. + def unit_price=(money) + if not (money.respond_to?(:cents) and money.respond_to?(:currency)) then + raise "Invalid price - does not respond to :cents and :currency - #{money.inspect}." + end + + @unit_price = money + end + + # Number of units that this item represents (integer, required). + attr_accessor :quantity + + # Optional string value that is used to store the item's id (defined by the merchant) + # in the cart. Serialized to in XML. Displayed by Google Checkout. + attr_accessor :id + + # Optional hash value that is used to store the item's id (defined by the merchant) + # in the cart. Serialized to in XML. Not displayed by + # Google Checkout. + # + # Must be a Hash. See ShoppingCart#private_data on how the serialization to XML is + # done. + attr_reader :private_data + + # Sets the private data for this item. + def private_data=(value) + raise "The given value #{value.inspect} is not a Hash!" unless value.kind_of?(Hash) + @private_data = value + end + + # The tax table to use for this item. Optional. + attr_reader :tax_table + + # Sets the tax table to use for this item. When you set this attribute using this + # method then the used table must already be added to the cart. Otherwise, a + # RuntimeError will be raised. + def tax_table=(table) + raise "The table #{table.inspect} is not in the item's cart yet!" unless cart.owner.tax_tables.include?(table) + + @tax_table = table + end + + # Create a new Item in the given Cart. You should not instantize this class directly + # but use Cart#create_item instead. + def initialize(cart) + @cart = cart + end + + # Creates a new Item object from a REXML::Element object. + def self.create_from_element(element, cart) + result = Item.new(cart) + + result.name = element.elements['item-name'].text + result.description = element.elements['item-description'].text + result.quantity = element.elements['quantity'].text.to_i + result.id = element.elements['merchant-item-id'].text rescue nil + + data_element = element.elements['merchant-private-item-data'] + if not data_element.nil? then + value = PrivateDataParser.element_to_value(data_element) + result.private_data = value unless value.nil? + end + + table_selector = element.elements['tax-table-selector'].text rescue nil + if not table_selector.nil? then + result.tax_table = cart.owner.tax_tables.find {|table| table.name == table_selector } + end + + unit_price = (element.elements['unit-price'].text.to_f * 100).to_i + unit_price_currency = element.elements['unit-price/@currency'].value + result.unit_price = Money.new(unit_price, unit_price_currency) + + return result + end + end + + # A TaxTable is an ordered array of TaxRule objects. You should create the TaxRule + # instances using #create_rule + # + # You must set up a tax table factory and should only create tax tables from within + # its temporal factory method as described in the class documentation of Frontend. + # + # Each tax table must have one or more tax rules. + # + # === Example + # + # include Google4R::Checkout + # + # tax_free_table = TaxTable.new(false) + # tax_free_table.name = "default table" + # tax_free_table.create_rule do |rule| + # rule.area = UsCountryArea.new(UsCountryArea::ALL) + # rule.rate = 0.0 + # end + class TaxTable + # The name of this tax table (string, required). + attr_accessor :name + + # An Array of the TaxRule objects that this TaxTable contains. Use #create_rule do + # add to this Array but do not change it directly. + attr_reader :rules + + # Boolean, true iff the table's standalone attribute is to be set to "true". + attr_reader :standalone + + def initialize(standalone) + @rules = Array.new + + @standalone = standalone + end + + # Use this method to add a new TaxRule to the table. If you use a block with + # this method then the block will called with the newly created rule for the + # parameter. The method will return the new rule in any case. + def create_rule(&block) + rule = TaxRule.new(self) + @rules << rule + + # Pass the newly generated rule to the given block to set its attributes. + yield(rule) if block_given? + + return rule + end + end + + # A TaxRule specifies which taxes to apply in which area. Have a look at the "Google + # Checkout documentation" [http://code.google.com/apis/checkout/developer/index.html#specifying_tax_info] + # for more information. + class TaxRule + # The table this rule belongs to. + attr_reader :table + + # The tax rate for this rule (double, required). + attr_accessor :rate + + # The area where this tax rule applies (Area subclass instance, required). Serialized + # to in XML. + attr_accessor :area + + # Creates a new TaxRule in the given TaxTable. Do no call this method yourself + # but use TaxTable#create_rule instead! + def initialize(table) + @table = table + end + end + + # Abstract class for areas that are used to specify a tax area. Do not use this class + # but only its subclasses. + class Area + # Mark this class as abstract by throwing a RuntimeError on initialization. + def initialize #:nodoc: + raise "Do not use the abstract class Google::Checkout::Area!" + end + end + + # Instances of UsZipArea represent areas specified by US ZIPs and ZIP patterns. + class UsZipArea < Area + # The pattern for this ZIP area. + attr_accessor :pattern + + # You can optionally initialize the Area with its value. + def initialize(pattern=nil) + self.pattern = pattern unless pattern.nil? + end + end + + # Instances of UsStateArea represent states in the US. + class UsStateArea < Area + # The two-letter code of the US state. + attr_reader :state + + # You can optionally initialize the Area with its value. + def initialize(state=nil) + self.state = state unless state.nil? + end + + # Writer for the state attribute. value must match /^[A-Z]{2,2}$/. + def state=(value) + raise "Invalid US state: #{value}" unless value =~ /^[A-Z]{2,2}$/ + @state = value + end + end + + # Instances of UsCountryArea identify a region within the US. + class UsCountryArea < Area + CONTINENTAL_48 = "CONTINENTAL_48".freeze + FULL_50_STATES = "FULL_50_STATES".freeze + ALL = "ALL".freeze + + # The area that is specified with this UsCountryArea (required). Can be + # one of UsCountryArea::CONTINENTAL_48, UsCountryArea::FULL_50_STATES + # and UsCountryArea::ALL. + # See the Google Checkout API for information on these values. + attr_reader :area + + # You can optionally initialize the Area with its value. + def initialize(area=nil) + self.area = area unless area.nil? + end + + # Writer for the area attribute. value must be one of CONTINENTAL_48, + # FULL_50_STATES and ALL + def area=(value) + raise "Invalid area :#{value}!" unless [ CONTINENTAL_48, FULL_50_STATES, ALL ].include?(value) + @area = value + end + end + + # Abstract class for shipping methods. Do not use this class directly but only + # one of its subclasses. + class ShippingMethod + # The name of the shipping method (string, required). + attr_accessor :name + + # The price of the shipping method (Money instance, required). + attr_reader :price + + # Sets the cost for this shipping method. money must respond to :cents and :currency + # as Money objects would. + def price=(money) + if not (money.respond_to?(:cents) and money.respond_to?(:currency)) then + raise "Invalid cost - does not respond to :cents and :currency - #{money.inspect}." + end + + @price = money + end + + # Mark this class as abstract by throwing a RuntimeError on initialization. + def initialize + raise "Do not use the abstract class Google::Checkout::ShippingMethod!" + end + end + + # A class that represents the "pickup" shipping method. + class PickupShipping < ShippingMethod + def initialize + end + end + + # A class that represents the "flat_rate" shipping method. + class FlatRateShipping < ShippingMethod + # An Array of allowed areas for this flat_rate shipping instance. Use + # #create_allowed_area to add to this area but do not change it directly. + attr_reader :allowed_areas + + # An Array of excluded areas for this flat_rate shipping instance. Use + # #create_excluded_area to add to this area but do not change it directly. + attr_reader :excluded_areas + + def initialize + @allowed_areas = Array.new + @excluded_areas = Array.new + end + + # Creates a new Area, adds it to the internal list of allowed areas for this + # shipping types. If you passed a block (preferred) then the block is called + # with the Area as the only parameter.c + # + # The area to be created depends on the given parameter clazz. It can be one + # of { UsCountryArea, UsStateArea, UsZipArea }. + # + # Raises a RuntimeError if the parameter clazz is invalid. + # + # === Example + # + # method = FlatRateShipping.new + # method.create_allowed_area(UsCountryArea) do |area| + # area.area = UsCountryArea::ALL + # end + def create_allowed_area(clazz, &block) + raise "Invalid Area class: #{clazz}!" unless [ UsCountryArea, UsStateArea, UsZipArea ].include?(clazz) + + area = clazz.new + @allowed_areas << area + + yield(area) if block_given? + + return area + end + + # Creates a new Area, adds it to the internal list of excluded areas for this + # shipping types. If you passed a block (preferred) then the block is called + # with the Area as the only parameter. The created area is returned in any case. + # + # The area to be created depends on the given parameter clazz. It can be one + # of { UsCountryArea, UsStateArea, UsZipArea }. + # + # Raises a RuntimeError if the parameter clazz is invalid. + # + # === Example + # + # method = FlatRateShipping.new + # method.create_excluded_area(UsCountryArea) do |area| + # area.area = UsCountryArea::ALL + # end + def create_excluded_area(clazz, &block) + raise "Invalid Area class: #{clazz}!" unless [ UsCountryArea, UsStateArea, UsZipArea ].include?(clazz) + + area = clazz.new + @excluded_areas << area + + yield(area) if block_given? + + return area + end + end + end +end diff --git a/vendor/plugins/google4r/lib/google4r/checkout/xml_generation.rb b/vendor/plugins/google4r/lib/google4r/checkout/xml_generation.rb new file mode 100644 index 0000000..f2544fb --- /dev/null +++ b/vendor/plugins/google4r/lib/google4r/checkout/xml_generation.rb @@ -0,0 +1,271 @@ +#-- +# Project: google4r +# File: lib/google4r/checkout/xml_generation.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ +# This file contains the classes that allow to persist the object hierarchies +# that are created with the Google Checkout API to XML. + +require 'stringio' +require 'rexml/document' + +module Google4R #:nodoc: + module Checkout #:nodoc: + # Use the CheckoutXmlGenerator to create an XML document from a CheckoutCommand + # object. + # + # Usage: + # + # checkout = CheckoutCommand.new + # # set up the CheckoutCommand + # + # generator = CheckoutCommandXmlGenerator.new(checkout) + # puts generator.generate # => " 'http://checkout.google.com/schema/2' }) + + self.process_shopping_cart(root, command.cart) + + # + flow_element = root.add_element('checkout-flow-support').add_element('merchant-checkout-flow-support') + + # + if not command.continue_shopping_url.nil? then + flow_element.add_element('continue-shopping-url').text = command.continue_shopping_url + end + + # + if not command.edit_cart_url.nil? then + flow_element.add_element('edit-cart-url').text = command.edit_cart_url + end + + # + if not command.request_buyer_phone_number.nil? then + flow_element.add_element('request-buyer-phone-number').text = + if command.request_buyer_phone_number then + "true" + else + "false" + end + end + + # + command.tax_tables.each do |tax_table| + end + + # + shippings_element = flow_element.add_element('shipping-methods') + command.shipping_methods.each do |shipping_method| + self.process_shipping_method(shippings_element, shipping_method) + end + end + + def process_shopping_cart(parent, cart) + cart_element = parent.add_element('shopping-cart') + + # add tag to the cart if a time has been added to the cart + if not cart.expires_at.nil? then + cart_element.add_element('cart-expiration').add_element('good-until-date').text = + cart.expires_at.iso8601 + end + + # add to the cart if any has been set + if not cart.private_data.nil? then + self.process_hash(cart_element.add_element('merchant-private-data'), cart.private_data) + end + + # process the items in the cart + items_element = cart_element.add_element('items') + cart.items.each do |item| + self.process_item(items_element, item) + end + end + + # Adds an tag to the tag parent with the appropriate values. + def process_item(parent, item) + item_element = parent.add_element('item') + + item_element.add_element('item-name').text = item.name + item_element.add_element('item-description').text = item.description + + item_element.add_element('unit-price', { 'currency' => item.unit_price.currency }).text = item.unit_price.to_s + item_element.add_element('quantity').text = item.quantity.to_i + + if not item.id.nil? then + item_element.add_element('merchant-item-id').text = item.id + end + + if not item.private_data.nil? then + self.process_hash(item_element.add_element('merchant-private-item-data'), item.private_data) + end + + # The above was easy; now we need to get the appropriate tax table for this + # item. The Item class makes sure that the table exists. + if not item.tax_table.nil? then + item_element.add_element('tax-table-selector').text = item.tax_table.name + end + end + + # Adds an item for the given shipping method. + def process_shipping_method(parent, shipping_method) + if shipping_method.kind_of? PickupShipping then + process_pickup_shipping(parent, shipping_method) + elsif shipping_method.kind_of? FlatRateShipping then + process_flat_rate_shipping(parent, shipping_method) + else + raise "Unknown ShippingMethod type of #{shipping_method.inspect}!" + end + end + + def process_flat_rate_shipping(parent, shipping) + element = parent.add_element('flat-rate-shipping') + element.add_attribute('name', shipping.name) + element.add_element('price', { 'currency' => shipping.price.currency }).text = shipping.price.to_s + + if shipping.excluded_areas.length + shipping.allowed_areas.length > 0 then + restrictions_tag = element.add_element('shipping-restrictions') + + if shipping.allowed_areas.length > 0 then + allowed_tag = restrictions_tag.add_element('allowed-areas') + + shipping.allowed_areas.each do |area| + self.process_area(allowed_tag, area) + end + end + + if shipping.excluded_areas.length > 0 then + excluded_tag = restrictions_tag.add_element('excluded-areas') + + shipping.excluded_areas.each do |area| + self.process_area(excluded_tag, area) + end + end + end + end + + def process_pickup_shipping(parent, shipping) + element = parent.add_element('pickup') + element.add_attribute('name', shipping.name) + element.add_element('price', { 'currency' => shipping.price.currency }).text = shipping.price.to_s + end + + # Adds an appropriate tag for the given Area subclass instance to the parent Element. + def process_area(parent, area) + if area.kind_of? UsZipArea then + parent.add_element('us-zip-area').add_element('zip-pattern').text = area.pattern + elsif area.kind_of? UsCountryArea then + parent.add_element('us-country-area', { 'country-area' => area.area }) + elsif area.kind_of? UsStateArea then + parent.add_element('us-state-area').add_element('state').text = area.state + else + raise "Area of unknown type: #{area.inspect}." + end + end + + # Converts a Hash into an XML structure. The keys are converted to tag names. If + # the values are Hashs themselves then process_hash is called upon them. If the + # values are Arrays then a new element with the key's name will be created. + # + # If a value is an Array then this array will be flattened before it is processed. + # Thus, nested arrays are not allowed. + # + # === Example + # + # process_hash(parent, { 'foo' => { 'bar' => 'baz' } }) + # + # # will produce a structure that is equivalent to. + # + # + # baz + # + # + # + # process_hash(parent, { 'foo' => [ { 'bar' => 'baz' }, "d'oh", 2 ] }) + # + # # will produce a structure that is equivalent to. + # + # + # baz + # + # d& + # 2 + def process_hash(parent, hash) + hash.each do |key, value| + if value.kind_of? Array then + value.flatten.each do |arr_entry| + if arr_entry.kind_of? Hash then + self.process_hash(parent.add_element(self.str2tag_name(key.to_s)), arr_entry) + else + parent.add_element(self.str2tag_name(key.to_s)).text = arr_entry.to_s + end + end + elsif value.kind_of? Hash then + process_hash(parent.add_element(self.str2tag_name(key.to_s)), value) + else + parent.add_element(self.str2tag_name(key.to_s)) + end + end + end + + # Converts a string to a valid XML tag name. Whitespace will be converted into a dash/minus + # sign, non alphanumeric characters that are neither "-" nor "_" nor ":" will be stripped. + def str2tag_name(str) + str.gsub(%r{\s}, '-').gsub(%r{[^a-zA-Z0-9\-\_:]}, '') + end + end + end +end diff --git a/vendor/plugins/google4r/test/checkout/integration/checkout_command_test.rb b/vendor/plugins/google4r/test/checkout/integration/checkout_command_test.rb new file mode 100644 index 0000000..c0e7cbe --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/integration/checkout_command_test.rb @@ -0,0 +1,103 @@ +#-- +# Project: google_checkout4r +# File: test/checkout/integration/checkout_command.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Integration tests for the CheckoutCommand class. +# +# Tests the CheckoutCommand class against the Google Checkout Web Service. +class Google4R::Checkout::CheckoutCommandIntegrationTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = @frontend.create_checkout_command + end + + def test_sending_to_google_works_with_valid_request + setup_command(@command) + result = @command.send_to_google_checkout + assert_kind_of CheckoutRedirectResponse, result + end + + def test_using_invalid_credentials_raise_google_checkout_error + invalid_patches = [ [ :merchant_id, 'invalid' ], [ :merchant_key, 'invalid' ] ] + + invalid_patches.each do |patch| + config = FRONTEND_CONFIGURATION.dup + config[patch[0]] = patch[1] + @frontend = Frontend.new(config) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = @frontend.create_checkout_command + + setup_command(@command) + assert_raises(GoogleCheckoutError) { @command.send_to_google_checkout } + end + end + + def test_invalid_xml_raises_google_checkout_error + class << @command + def to_xml + '' + end + end + + setup_command(@command) + assert_raises(GoogleCheckoutError) { @command.send_to_google_checkout } + end + + protected + + # Sets up the given CheckoutCommand so it contains some + # shipping methods and its cart contains some items. + def setup_command(command) + # Add shipping methods. + command.create_shipping_method(FlatRateShipping) do |shipping| + shipping.name = 'UPS Ground Shipping' + shipping.price = Money.new(2000) # USD 20 + shipping.create_allowed_area(UsCountryArea) do |area| + area.area = UsCountryArea::ALL + end + end + + # Add items to the cart. + 1.upto(5) do |i| + command.cart.create_item do |item| + item.name = "Test Item #{i}" + item.description = "This is a test item (#{i})" + item.unit_price = Money.new(350) + item.quantity = i * 3 + item.id = "test-#{i}-123456789" + end + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/address_test.rb b/vendor/plugins/google4r/test/checkout/unit/address_test.rb new file mode 100644 index 0000000..cb53810 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/address_test.rb @@ -0,0 +1,131 @@ +#-- +# Project: google_checkout4r +# File: test/unit/address_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class Address. +class Google4R::Checkout::AddressTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @data = + { + :contact_name => 'John Smith', + :email => 'johnsmith@example.com', + :fax => '+01123456789', + :phone => '+01123456789', + :address1 => '10 Example Road', + :address2 => 'Bar', + :city => 'Sampleville', + :company_name => 'Company Name', + :region => 'CA', + :postal_code => '94141', + :country_code => 'US', + } + + @optional_fields = [ :fax, :phone, :address2, :company_name, :contact_name ] + + @xml_str = %q{ + + + %s + %s + %s + %s + %s + %s + %s + %s + %s + %s + %s + + } + end + + def test_responds_correctly + @address = Address.new + + @data.each do |key, value| + assert_respond_to @address, key, "key == #{key}" + assert_respond_to @address, "#{key}=".to_sym, "key == #{key}" + end + end + + def test_creating_address_with_full_fields_works + xml_str = @xml_str % + [ + @data[:contact_name], @data[:email], @data[:fax], @data[:phone], @data[:address1], + @data[:address2], @data[:city], @data[:company_name], @data[:region], + @data[:postal_code], @data[:country_code] + ] + + document = REXML::Document.new(xml_str) + + the_element = document.elements['/root/some-address'] + + address = Address.create_from_element(the_element) + + @data.each do |key, value| + assert_equal value, address.send(key) + end + end + + def test_creating_address_works_when_removing_optional_fields + @optional_fields.power.each do |optional_symbols| + xml_str = @xml_str % + [ + @data[:contact_name], @data[:email], @data[:fax], @data[:phone], @data[:address1], + @data[:address2], @data[:city], @data[:company_name], @data[:region], + @data[:postal_code], @data[:country_code] + ] + + # Remove all optional symbols in this run. + optional_symbols.each do |symbol| + xml_str = xml_str.gsub(%r{<#{symbol.to_s.gsub('_', '-')}>.*?}, '') + end + + document = REXML::Document.new(xml_str) + + the_element = document.elements['/root/some-address'] + + address = Address.create_from_element(the_element) + + @data.each do |key, value| + if optional_symbols.include?(key) then + assert_nil address.send(key) + else + assert_equal value, address.send(key) + end + end + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/area_test.rb b/vendor/plugins/google4r/test/checkout/unit/area_test.rb new file mode 100644 index 0000000..09eb276 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/area_test.rb @@ -0,0 +1,41 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class Area. +class Google4R::Checkout::AreaTest < Test::Unit::TestCase + include Google4R::Checkout + + def test_instanciating_area_raises_runtime_error + assert_raises(RuntimeError) { Area.new } + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/checkout_command_test.rb b/vendor/plugins/google4r/test/checkout/unit/checkout_command_test.rb new file mode 100644 index 0000000..f612d5a --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/checkout_command_test.rb @@ -0,0 +1,112 @@ +#-- +# Project: google_checkout4r +# File: test/unit/checkout_command_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Tests for the CheckoutCommand class. +class Google4R::Checkout::CheckoutCommandTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = @frontend.create_checkout_command + end + + def test_tax_table_factory_works_correctly + TestTaxTableFactory.any_instance.stubs(:effective_tax_tables_at).returns([:tax_table]) + + frontend = Frontend.new(FRONTEND_CONFIGURATION) + frontend.tax_table_factory = TestTaxTableFactory.new + command = frontend.create_checkout_command + + assert_equal [:tax_table], command.tax_tables + end + + def test_initialized_correctly + assert_equal @frontend, @command.frontend + assert_kind_of ShoppingCart, @command.cart + assert_equal [], @command.shipping_methods + assert_nil @command.edit_cart_url + assert_nil @command.continue_shopping_url + assert_nil @command.request_buyer_phone_number + end + + def test_command_behaves_correctly + [ :frontend, :cart, :tax_tables, :shipping_methods, :create_shipping_method, + :edit_cart_url, :edit_cart_url=, :continue_shopping_url, :continue_shopping_url=, + :request_buyer_phone_number, :request_buyer_phone_number= + ].each do |symbol| + assert_respond_to @command, symbol + end + end + + def test_accessors_work_correctly + @command.edit_cart_url = "edit cart url" + assert_equal "edit cart url", @command.edit_cart_url + + @command.continue_shopping_url = "continue shopping url" + assert_equal "continue shopping url", @command.continue_shopping_url + + @command.request_buyer_phone_number = true + assert_equal true, @command.request_buyer_phone_number + end + + def test_create_shipping_method_works_correctly_with_block + [ PickupShipping, FlatRateShipping ].each do |clazz| + + shipping = nil + + res = + @command.create_shipping_method(clazz) do |obj| + shipping = obj + assert_kind_of clazz, obj + end + + assert_equal res, shipping + assert @command.shipping_methods.include?(shipping) + end + end + + def test_create_shipping_method_works_correctly_without_block + [ PickupShipping, FlatRateShipping ].each do |clazz| + obj = @command.create_shipping_method(clazz) + + assert_kind_of clazz, obj + + assert @command.shipping_methods.include?(obj) + end + end + + def test_to_xml_does_not_raise_exception + assert_nothing_raised { @command.to_xml } + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/checkout_command_xml_generator_test.rb b/vendor/plugins/google4r/test/checkout/unit/checkout_command_xml_generator_test.rb new file mode 100644 index 0000000..e0ad31d --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/checkout_command_xml_generator_test.rb @@ -0,0 +1,187 @@ +#-- +# Project: google_checkout4r +# File: test/unit/checkout_command_xml_generator_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +require 'tempfile' +require 'open3' +require 'rexml/document' + +# Test for the class UsZipArea. +# +# TODO: +# +# * Make the tests querying Google Checkout's diagnose service and the +# XSD validation optional. +class Google4R::Checkout::CheckoutCommandXmlGeneratorTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @schema_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'xml', 'apiv2.xsd')) + @expected_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'xml', 'test_check_persisting_works_expected.xml')) + + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = @frontend.create_checkout_command + @generator = CheckoutCommandXmlGenerator.new(@command) + end + + # Note that this is not really a good test. We do not actually compare anything. + # Instead, we simply generate some XML, validate it using XSD via xmllint and then + # compare it to the output that we validated by reading it earlier. + def test_check_persisting_works + tax_tables = Array.new + table = TaxTable.new(false) + table.name = 'Default Table' + table.create_rule do |rule| + rule.rate = 0.04 + rule.area = UsCountryArea.new + rule.area.area = UsCountryArea::ALL + end + tax_tables << table + nondefault_table = TaxTable.new(false) + nondefault_table.name = 'Special Table' + nondefault_table.create_rule do |rule| + rule.rate = 0.02 + rule.area = UsCountryArea.new + rule.area.area = UsCountryArea::ALL + end + tax_tables << nondefault_table + + TestTaxTableFactory.any_instance.stubs(:effective_tax_tables_at).returns(tax_tables) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = @frontend.create_checkout_command + + @command.continue_shopping_url = 'http://wwww.example.com/continue_shopping' + @command.edit_cart_url = 'http://wwww.example.com/edit_cart' + @command.request_buyer_phone_number = false + @generator = CheckoutCommandXmlGenerator.new(@command) + + @command.cart.expires_at = Time.parse('2007-11-29T15:33:20+01:00') + + @command.create_shipping_method(PickupShipping) do |shipping| + shipping.name = 'Pickup Test Shipping' + shipping.price = Money.new(100, 'USD') + end + + @command.create_shipping_method(FlatRateShipping) do |shipping| + shipping.name = 'State Test Shipping' + shipping.price = Money.new(100, 'USD') + + shipping.create_allowed_area(UsStateArea) { |area| area.state = 'CA' } + shipping.create_excluded_area(UsStateArea) { |area| area.state = 'TX' } + end + + @command.create_shipping_method(FlatRateShipping) do |shipping| + shipping.name = 'Country Area Test Shipping' + shipping.price = Money.new(100, 'USD') + + shipping.create_allowed_area(UsCountryArea) { |area| area.area = UsCountryArea::FULL_50_STATES } + shipping.create_excluded_area(UsCountryArea) { |area| area.area = UsCountryArea::CONTINENTAL_48 } + end + + @command.create_shipping_method(FlatRateShipping) do |shipping| + shipping.name = 'Zip Test Shipping' + shipping.price = Money.new(100, 'USD') + + shipping.create_allowed_area(UsZipArea) { |area| area.pattern = '1*' } + shipping.create_excluded_area(UsZipArea) { |area| area.pattern = '12*' } + end + + @command.cart.private_data = { 'we' => 'can pass in some data here'.split } + + 1.upto(10) do |i| + @command.cart.create_item do |item| + item.name = "Item Name #{i}" + item.description = "Description #{i}" + item.unit_price = Money.new(i * 1000, 'USD') + item.quantity = i * 2 + item.id = "Merchant ID #{i}" + if i == 1 then + item.private_data = { 'some' => { 'data' => 'Yeah, Yeah!' }, 'bars' => { 'bar' => [ 1, 2 ] } } + end + + item.tax_table = nondefault_table if i % 2 == 1 + end + end + + xml_str = @generator.generate + assert_xml_validates_against_xml_schema(@schema_path, xml_str) + assert_string_equals_file_contents(@expected_path, xml_str) + assert_google_checkout_diagnose_returns_no_warnings(xml_str) + end + + protected + + def assert_google_checkout_diagnose_returns_no_warnings(xml_str) + tmpfile = Tempfile.new('xml_output') + tmpfile << xml_str + tmpfile.flush + + url = "https://%s:%s@sandbox.google.com/checkout/cws/v2/Merchant/%s/request/diagnose" % + [ FRONTEND_CONFIGURATION[:merchant_id], FRONTEND_CONFIGURATION[:merchant_key], + FRONTEND_CONFIGURATION[:merchant_id] ] + + stdin, stdout, stderr = Open3.popen3("curl", "-d", "@#{tmpfile.path}", url) + outstr = stdout.read + errstr = stderr.read + + # Check that there is no tag in the XML. + xml_document = REXML::Document.new(outstr) + assert 0, xml_document.root.elements.to_a('//warnings').size + + tmpfile.close! + end + + def assert_xml_validates_against_xml_schema(schema_path, xml_str) + tmpfile = Tempfile.new('xml_output') + tmpfile << xml_str + tmpfile.flush + + #puts "---\n#{xml_str}\n---" + + stdin, stdout, stderr = Open3.popen3("xmllint", "--schema", schema_path, tmpfile.path) + outstr = stdout.read + errstr = stderr.read + if errstr !~ /validates$/ then + assert false, "The document did not validate: ---\nOUT:#{outstr}\nERR:#{errstr}\n---" + else + assert true + end + + tmpfile.close! + end + + def assert_string_equals_file_contents(expected_path, xml_str) + file_contents = File.open(expected_path, 'r') { |f| f.read } + assert_equal file_contents, xml_str + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/command_test.rb b/vendor/plugins/google4r/test/checkout/unit/command_test.rb new file mode 100644 index 0000000..d08697f --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/command_test.rb @@ -0,0 +1,126 @@ +#-- +# Project: google_checkout4r +# File: test/unit/command_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +require 'net/http' + +require 'base64' + +class TestCommand < Google4R::Checkout::Command + XML_REPRESENTATION = "" + + def to_xml + XML_REPRESENTATION + end +end + +# Test for the class Command. +class Google4R::Checkout::CommandTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = TestCommand.new(@frontend) + end + + def test_sign_and_encode_works_properly + hash = @command.sign_and_encode + + assert_equal 2, hash.length + assert_equal TestCommand::XML_REPRESENTATION, Base64.decode64(hash[:cart]) + assert_equal OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha1'), + FRONTEND_CONFIGURATION[:merchant_key], TestCommand::XML_REPRESENTATION), + Base64.decode64(hash[:signature]) + end + + def test_sending_fails_if_certificate_validation_fails + OpenSSL::SSL::SSLSocket.any_instance.stubs(:connect).raises(OpenSSL::SSL::SSLError, 'certificate verify failed') + + assert_raises(OpenSSL::SSL::SSLError) { @command.send_to_google_checkout } + end + + def test_to_xml_raises_runtime_error + assert_raises(RuntimeError) { Command.new(Frontend.new(FRONTEND_CONFIGURATION)).to_xml } + end + + def test_unknown_xml_response_in_body_raises_runtime_error + mock_body = '' + + success_response = Net::HTTPSuccess.new(Net::HTTP.version_1_2, 200, "OK") + success_response.expects(:body).returns(mock_body) + + Net::HTTP.any_instance.stubs(:request).returns(success_response) + + assert_raises(RuntimeError) { @command.send_to_google_checkout } + end + + def test_invalid_response_code_raises_runtime_error + unknown_response = mock() + unknown_response.expects(:code) + unknown_response.expects(:message) + + Net::HTTP.any_instance.stubs(:request).returns(unknown_response) + + assert_raises(RuntimeError) { @command.send_to_google_checkout } + end + + def test_error_tag_in_response_code_raises_google_checkout_error + mock_body = 'Malformed URL component: expected id: (\d{10})|(\d{15}), but got something-different' + + error_response = Net::HTTPClientError.new(Net::HTTP.version_1_2, 400, "Bad Request") + error_response.expects(:body).returns(mock_body) + + Net::HTTP.any_instance.stubs(:request).returns(error_response) + + assert_raises(GoogleCheckoutError) { @command.send_to_google_checkout } + end + + def test_send_to_google_checkout_works_correctly_if_200_is_returned + mock_body = 'https://sandbox.google.com/checkout/view/buy?o=shoppingcart&shoppingcart=foo-bar' + + success_response = Net::HTTPSuccess.new(Net::HTTP.version_1_2, 200, "OK") + success_response.expects(:body).returns(mock_body) + + Net::HTTP.any_instance.stubs(:request).returns(success_response) + Net::HTTP.any_instance.stubs(:set_form_data).with(@command.sign_and_encode).returns(success_response) + + Net::HTTP::Post.any_instance.expects(:basic_auth).with(FRONTEND_CONFIGURATION[:merchant_id], + FRONTEND_CONFIGURATION[:merchant_key]) + + result = @command.send_to_google_checkout + + assert_kind_of CheckoutRedirectResponse, result + assert_equal 'foo-bar', result.serial_number + assert_equal 'https://sandbox.google.com/checkout/view/buy?o=shoppingcart&shoppingcart=foo-bar', result.redirect_url + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/flat_rate_shipping_test.rb b/vendor/plugins/google4r/test/checkout/unit/flat_rate_shipping_test.rb new file mode 100644 index 0000000..3b4a661 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/flat_rate_shipping_test.rb @@ -0,0 +1,114 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the FlatRateShipping class. +class Google4R::Checkout::FlatRateShippingMethodTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @shipping = FlatRateShipping.new + end + + def test_flat_rate_shipping_method_behaves_correctly + [ :name, :name=, :price, :price=, + :allowed_areas, :create_allowed_area, :excluded_areas, :create_excluded_area + ].each do |symbol| + assert_respond_to @shipping, symbol + end + end + + def test_initialization + assert_nil @shipping.name + assert_nil @shipping.price + assert_equal [], @shipping.allowed_areas + assert_equal [], @shipping.excluded_areas + end + + def test_flat_rate_shipping_method_setting_attributes_works_correctly + @shipping.name = "Shipping Method Name" + assert_equal "Shipping Method Name", @shipping.name + + @shipping.price = Money.new(100, "EUR") + assert_kind_of Money, @shipping.price + assert_equal 100, @shipping.price.cents + assert_equal "EUR", @shipping.price.currency + end + + def test_flat_rate_shipping_method_price_is_validated + # Test that FlatRateShippingMethod checks for its price attribute responding + # to cents and currency. + assert_raises(RuntimeError) { @shipping.price = nil } + assert_raises(RuntimeError) { @shipping.price = 10 } + assert_raises(RuntimeError) { @shipping.price = "str" } + end + + def test_create_create_allowed_excluded_areas_works_with_block + [ [ :allowed_areas, :create_allowed_area], [ :excluded_areas, :create_excluded_area ] ].each do |pair| + read_sym, create_sym = pair + + [ UsZipArea, UsStateArea, UsCountryArea ].each do |clazz| + + the_area = nil + + res = + @shipping.send(create_sym, clazz) do |area| + the_area = area + assert_kind_of clazz, area + end + + assert_equal res, the_area + assert @shipping.send(read_sym).include?(the_area) + end + end + end + + def test_create_create_allowed_excluded_areas_works_without_block + [ [ :allowed_areas, :create_allowed_area], [ :excluded_areas, :create_excluded_area ] ].each do |pair| + read_sym, create_sym = pair + + [ UsZipArea, UsStateArea, UsCountryArea ].each do |clazz| + area = @shipping.send(create_sym, clazz) + + assert_kind_of clazz, area + + assert @shipping.send(read_sym).include?(area) + end + end + end + + def test_create_create_allowed_excluded_areas_validates_parameter + [ :create_allowed_area, :create_excluded_area ].each do |sym| + assert_raises(RuntimeError) { @shipping.send(sym, String) } + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/frontend_test.rb b/vendor/plugins/google4r/test/checkout/unit/frontend_test.rb new file mode 100644 index 0000000..28ca206 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/frontend_test.rb @@ -0,0 +1,63 @@ +#-- +# Project: google_checkout4r +# File: test/unit/frontend_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class Area and all of its subclasses. +class Google4R::Checkout::FrontendTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + end + + def test_initialized_correctly + assert_equal FRONTEND_CONFIGURATION.dup, @frontend.configuration + assert @frontend.configuration.frozen? + end + + def test_frontend_behaves_correctly + [ :create_checkout_command, :configuration, :tax_table_factory, + :tax_table_factory= + ].each do |symbol| + assert_respond_to @frontend, symbol + end + end + + def test_create_checkout_command_works_correctly + assert_kind_of CheckoutCommand, @frontend.create_checkout_command + end + + def test_create_notification_handler_works_correctly + assert_kind_of NotificationHandler, @frontend.create_notification_handler + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/item_test.rb b/vendor/plugins/google4r/test/checkout/unit/item_test.rb new file mode 100644 index 0000000..875ba8e --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/item_test.rb @@ -0,0 +1,159 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the Item class. +class Google4R::Checkout::ItemTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + + @xml_str = %q{ + + MegaSound 2GB MP3 Player + Portable MP3 player - stores 500 songs + 178.00 + 1 + MGS2GBMP3 + + Text 1 + Text 2 + + value + + + Some Table + } + + @optional_tags = [ 'merchant-item-id', 'merchant-private-item-data', 'tax-table-selector' ] + + @command = @frontend.create_checkout_command + @cart = @command.cart + @item = @cart.create_item + end + + def test_item_behaves_correctly + [ :cart, :name, :name=, :description, :description=, :unit_price, :unit_price=, + :quantity, :quantity=, :id, :id=, :private_data, :private_data=, + :tax_table, :tax_table= + ].each do |symbol| + assert_respond_to @item, symbol + end + end + + def test_item_gets_initialized_correctly + assert_equal @cart, @item.cart + assert_nil @item.name + assert_nil @item.description + assert_nil @item.unit_price + assert_nil @item.quantity + assert_nil @item.private_data + assert_nil @item.id + assert_nil @item.tax_table + end + + def test_item_setters_work + @item.name = "name" + assert_equal "name", @item.name + + @item.description = "description" + assert_equal "description", @item.description + + @item.unit_price = Money.new(100, "EUR") + assert_equal Money.new(100, "EUR"), @item.unit_price + + @item.quantity = 10 + assert_equal 10, @item.quantity + + @item.id = "id" + assert_equal "id", @item.id + + @item.private_data = Hash.new + assert_equal Hash.new, @item.private_data + end + + def test_set_tax_table_works + table = @command.tax_tables.first + @item.tax_table = table + assert_equal table, @item.tax_table + end + + def test_set_tax_table_raises_if_table_is_unknown_in_command + assert_raises(RuntimeError) { @item.tax_table = TaxTable.new(false) } + end + + def test_set_private_data_only_works_with_hashes + assert_raises(RuntimeError) { @cart.private_data = 1 } + assert_raises(RuntimeError) { @cart.private_data = nil } + assert_raises(RuntimeError) { @cart.private_data = 'Foobar' } + assert_raises(RuntimeError) { @cart.private_data = [] } + end + + def test_item_price_must_be_money_instance + assert_raises(RuntimeError) { @item.unit_price = nil } + assert_raises(RuntimeError) { @item.unit_price = "String" } + assert_raises(RuntimeError) { @item.unit_price = 10 } + end + + def test_create_from_element_works + @optional_tags.power.each do |optional_tag_names| + xml_str = @xml_str + + optional_tag_names.each { |name| xml_str = xml_str.gsub(%r{<#{name}.*?}, '') } + + command = @frontend.create_checkout_command + tax_table = TaxTable.new(false) + tax_table.name = 'Some Table' + command.tax_tables << tax_table + item = Item.create_from_element(REXML::Document.new(xml_str).root, command.cart) + + assert_equal command.cart, item.cart + + assert_equal 'MegaSound 2GB MP3 Player', item.name + assert_equal 'Portable MP3 player - stores 500 songs', item.description + assert_equal Money.new(17800, 'USD'), item.unit_price + assert_equal 1, item.quantity + assert_equal 'MGS2GBMP3', item.id unless item.id.nil? + + hash = + { + 'item-note' => [ 'Text 1', 'Text 2' ], + 'nested' => { 'tags' => 'value' } + } + assert_equal hash, item.private_data unless optional_tag_names.include?('merchant-private-item-data') + + assert_equal 'Some Table', item.tax_table.name unless optional_tag_names.include?('tax-table-selector') + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/marketing_preferences_test.rb b/vendor/plugins/google4r/test/checkout/unit/marketing_preferences_test.rb new file mode 100644 index 0000000..1702fc5 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/marketing_preferences_test.rb @@ -0,0 +1,65 @@ +#-- +# Project: google_checkout4r +# File: test/unit/marketing_preferences_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class MarketingPreferences. +class Google4R::Checkout::MarketingPreferencesTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @xml_str = %q{ + + %s + + } + end + + def test_responds_correctly + @preferences = MarketingPreferences.new + + [ :email_allowed, :email_allowed= ].each do |symbol| + assert_respond_to @preferences, symbol + end + end + + def test_create_from_element_works_correctly + { 'true' => true, 'True' => true, 'TRUE' => true, 'false' => false, 'Frue' => false, + 'FALSE' => false }.each do |str, bool| + xml_str = @xml_str % str + + element = REXML::Document.new(xml_str).root + pref = MarketingPreferences.create_from_element(element) + + assert_equal bool, pref.email_allowed + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/merchant_code_test.rb b/vendor/plugins/google4r/test/checkout/unit/merchant_code_test.rb new file mode 100644 index 0000000..a798e32 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/merchant_code_test.rb @@ -0,0 +1,122 @@ +#-- +# Project: google_checkout4r +# File: test/unit/merchant_code_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class MerchantCode. +class Google4R::Checkout::MerchantCodeTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @valid_adjustment_types = + [ + [ "GIFT_CERTIFICATE", 'gift-certificate-adjustment' ], + [ "COUPON", 'coupon-adjustment' ], + ] + + @optional_tag_names = [ 'calculated-amount', 'message' ] + + @invalid_adjustment_types = [ 'invalid-adjustment' ] + + @xml_str = %q{ + <%s> + %s + %s + %s + %s + } + end + + def test_constants_are_defined + assert defined?(MerchantCode::GIFT_CERTIFICATE) + assert defined?(MerchantCode::COUPON) + end + + def test_responds_correctly + adjustment = MerchantCode.new + + [ :applied_amount, :applied_amount=, :code, :code=, :calculated_amount, + :calculated_amount=, :message, :message=, + ].each do |sym| + assert_respond_to adjustment, sym + end + end + + def test_create_from_element_works_with_valid_adjustment_types + @valid_adjustment_types.each do |pair| + type, tag_name = pair + + @optional_tag_names.power.each do |optional_tag_names| + xml_str = @xml_str % + [ + tag_name, 'USD', '10.00', 'some-code', 'USD', '20.00', 'Message!', tag_name + ] + + optional_tag_names.each { |name| xml_str = xml_str.gsub(%r{<#{name}.*?}, '') } + + xml_doc = REXML::Document.new(xml_str) + xml_element = xml_doc.root.elements["/#{tag_name}"] + + adjustment = MerchantCode.create_from_element(xml_element) + + assert_equal Money.new(1000, 'USD'), adjustment.applied_amount + assert_equal type, adjustment.type + assert_equal 'some-code', adjustment.code + + if not optional_tag_names.include?('calculated-amount') then + assert_equal Money.new(2000, 'USD'), adjustment.calculated_amount + else + assert_nil adjustment.calculated_amount + end + if not optional_tag_names.include?('message') then + assert_equal 'Message!', adjustment.message + else + assert_nil adjustment.message + end + end + end + end + + def test_create_from_element_raises_exception_with_invalid_shipping_adjustment_types + @invalid_adjustment_types.each do |tag_name| + xml_str = @xml_str % + [ + tag_name, 'USD', '10.00', 'some-code', 'USD', '20.00', 'Message!', tag_name + ] + + xml_element = REXML::Document.new(xml_str).root + + assert_raises(RuntimeError) do + adjustment = MerchantCode.create_from_element(xml_element) + end + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/new_order_notification_test.rb b/vendor/plugins/google4r/test/checkout/unit/new_order_notification_test.rb new file mode 100644 index 0000000..7b3e0ad --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/new_order_notification_test.rb @@ -0,0 +1,115 @@ +#-- +# Project: google_checkout4r +# File: test/unit/new_order_confirmation_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class NewOrderConfirmation. +class Google4R::Checkout::NewOrderNotificationTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @xml_str = %q{ + + 6014423719 + + 294873009217523 + + + REVIEWING + NEW + 6014423719 + + 321.98 + + 2006-03-18T17:32:11 + } + + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + end + + def test_responds_correctly + assert_respond_to NewOrderNotification, :create_from_element + + notification = NewOrderNotification.new(@frontend) + + [ :serial_number, :google_order_number, :buyer_billing_address, :buyer_shipping_address, + :buyer_id, :marketing_preferences, :financial_order_state, :fulfillment_order_state, + :google_order_number, :order_adjustment, :order_total, :shopping_cart, :timestamp, + :serial_number=, :google_order_number=, :buyer_billing_address=, :buyer_shipping_address=, + :buyer_id=, :marketing_preferences=, :financial_order_state=, :fulfillment_order_state=, + :google_order_number=, :order_adjustment=, :order_total=, :shopping_cart=, :timestamp=, + ].each do |symbol| + assert_respond_to notification, symbol + end + end + + def test_create_from_element_works_correctly + # Build up some Mocha expectations. + expect = Address.stubs(:create_from_element) + expect.times(1).returns(:buyer_billing_address) + expect.with{ |element| element.name == 'buyer-billing-address' } + + expect = Address.stubs(:create_from_element) + expect.times(1).returns(:buyer_shipping_address) + expect.with{ |element| element.name == 'buyer-shipping-address' } + + expect = MarketingPreferences.stubs(:create_from_element) + expect.times(1).returns(:marketing_preferences) + expect.with{ |element| element.name == 'buyer-marketing-preferences' } + + expect = OrderAdjustment.stubs(:create_from_element) + expect.times(1).returns(:order_adjustment) + expect.with{ |element| element.name == 'order-adjustment' } + + expect = ShoppingCart.stubs(:create_from_element) + expect.times(1).returns(:shopping_cart) + expect.with { |element, owner| element.name == 'shopping-cart' and owner.kind_of?(NewOrderNotification) } + + # Create the new notification. + notification = NewOrderNotification.create_from_element(REXML::Document.new(@xml_str).root, @frontend) + + # perform the assertions + assert_equal "8571632143", notification.serial_number + assert_equal "6014423719", notification.google_order_number + assert_equal :buyer_billing_address, notification.buyer_billing_address + assert_equal :buyer_shipping_address, notification.buyer_shipping_address + assert_equal "294873009217523", notification.buyer_id + assert_equal :marketing_preferences, notification.marketing_preferences + assert_equal "REVIEWING", notification.financial_order_state + assert_equal "NEW", notification.fulfillment_order_state + assert_equal "6014423719", notification.google_order_number + assert_equal :order_adjustment, notification.order_adjustment + assert_equal Money.new(32198, "USD"), notification.order_total + assert_equal :shopping_cart, notification.shopping_cart + assert_equal Time.parse("2006-03-18T17:32:11"), notification.timestamp + end + end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/notification_acknowledgement_test.rb b/vendor/plugins/google4r/test/checkout/unit/notification_acknowledgement_test.rb new file mode 100644 index 0000000..12d7782 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/notification_acknowledgement_test.rb @@ -0,0 +1,43 @@ +#-- +# Project: google_checkout4r +# File: test/unit/notification_acknowledgement_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class NotificationAcknowledgement. +class Google4R::Checkout::NotificationAcknowledgementTest < Test::Unit::TestCase + include Google4R::Checkout + + def test_to_xml_works_as_expected + ack = NotificationAcknowledgement.new + str = %q{} + assert_equal str, ack.to_xml + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/notification_handler_test.rb b/vendor/plugins/google4r/test/checkout/unit/notification_handler_test.rb new file mode 100644 index 0000000..1e5ae07 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/notification_handler_test.rb @@ -0,0 +1,93 @@ +#-- +# Project: google_checkout4r +# File: test/unit/notification_handler_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class NotificationHandler. +class Google4R::Checkout::NotificationHandlerTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + @notification_handler = @frontend.create_notification_handler + + @xmls_with_known_tags = + [ + [ + '', + 'new-order-notification', + NewOrderNotification + ], + [ + '', + 'order-state-change-notification', + OrderStateChangeNotification + ] + ] + + @xmls_with_unknown_tags = + [ + '', + %q{}, + %q{}, + %q{}, + %q{}, + %q{} + ] + end + + def test_handler_gets_initialized_correctly + assert_equal @frontend, @notification_handler.frontend + end + + def test_returns_correct_notification_class_for_known_notifications + @xmls_with_known_tags.each do |triple| + xml_str, tag_name, klass = triple + + expect = klass.stubs(:create_from_element) + expect.times(1).returns(:foo) + expect.with { |element, frontend| element.name == tag_name and frontend == @frontend } + + result = nil + assert_nothing_raised { + result = @notification_handler.handle(xml_str) + } + assert_equal :foo, result + end + end + + def test_raises_exception_on_unknown_notifications + @xmls_with_unknown_tags.each do |xml_str| + assert_raises(UnknownNotificationType) { @notification_handler.handle(xml_str) } + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/order_adjustment_test.rb b/vendor/plugins/google4r/test/checkout/unit/order_adjustment_test.rb new file mode 100644 index 0000000..3ca8769 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/order_adjustment_test.rb @@ -0,0 +1,95 @@ +#-- +# Project: google_checkout4r +# File: test/unit/order_adjustment_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class OrderAdjustment. +class Google4R::Checkout::OrderAdjustmentTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @xml_str = %q{ + + true + + + + + 11.05 + 12.05 + + <%s /> + + } + @shipping_adjustments = [ 'flat-rate-shipping-adjustment', 'pickup-shipping-adjustment' ] + end + + def test_reponds_correctly + assert_respond_to OrderAdjustment, :create_from_element + + adjustment = OrderAdjustment.new + + [ :adjustment_total, :adjustment_total=, :merchant_calculation_successful, + :merchant_calculation_successful, :merchant_codes, :merchant_codes=, + :shipping, :shipping=, :total_tax, :total_tax= + ].each do |symbol| + assert_respond_to adjustment, symbol + end + end + + def test_create_from_xml_works_correctly + @shipping_adjustments.each do |adjustment_name| + # Build Mocha Expectations + expect = MerchantCode.stubs(:create_from_element) + expect.with { |element| element.name == 'dummy-adjustment-one' } + expect.times(1).returns(:dummy_adjustment1) + + expect = MerchantCode.stubs(:create_from_element) + expect.with { |element| element.name == 'dummy-adjustment-two' } + expect.times(1).returns(:dummy_adjustment2) + + expect = ShippingAdjustment.stubs(:create_from_element) + expect.with { |element| element.name == adjustment_name } + expect.times(1).returns(adjustment_name.to_sym) + + # Create the adjustment + element = REXML::Document.new(@xml_str % [ adjustment_name ]).root + adjustment = OrderAdjustment.create_from_element(element) + + # Assert! + assert_equal Money.new(1205, 'USD'), adjustment.adjustment_total + assert_equal true, adjustment.merchant_calculation_successful + assert_equal [ :dummy_adjustment1, :dummy_adjustment2 ], adjustment.merchant_codes + assert_equal adjustment_name.to_sym, adjustment.shipping + assert_equal Money.new(1105, 'USD'), adjustment.total_tax + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/order_state_change_notification_test.rb b/vendor/plugins/google4r/test/checkout/unit/order_state_change_notification_test.rb new file mode 100644 index 0000000..216aef6 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/order_state_change_notification_test.rb @@ -0,0 +1,159 @@ +#-- +# Project: google_checkout4r +# File: test/unit/order_state_change_notification_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class Area. +class Google4R::Checkout::OrderStateChangeNotificationTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @data = Hash.new + @data[:serial_number] = "c821426e-7caa-4d51-9b2e-48ef7ecd6423" + @data[:google_order_number] = "841171949013218" + @data[:new_financial_order_state] = "CHARGING" + @data[:previous_fulfillment_order_state] = "NEW" + @data[:new_financial_order_state] = "CHARGEABLE" + @data[:previous_fulfillment_order_state] = "NEW" + @data[:reason] = "charge_customer" + @data[:timestamp] = Time.new + + @xml_template = %q{ + + %s + %s + %s + %s + %s + %s + %s + + } + + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + end + + def test_order_state_change_notification_responds_correctly + assert_respond_to OrderStateChangeNotification, :create_from_element + + notification = OrderStateChangeNotification.new(@frontend) + + [ :serial_number, :google_order_number, :new_financial_order_state, :previous_fulfillment_order_state, + :new_financial_order_state, :previous_fulfillment_order_state, :reason, :timestamp, + :serial_number=, :google_order_number=, :new_financial_order_state=, :previous_fulfillment_order_state=, + :new_financial_order_state=, :previous_fulfillment_order_state=, :reason=, :timestamp + ].each do |sym| + assert_respond_to notification, sym + end + end + + def test_financial_order_state_defines_correct_constants + assert defined?(FinancialOrderState::REVIEWING) + assert defined?(FinancialOrderState::CHARGEABLE) + assert defined?(FinancialOrderState::CHARGING) + assert defined?(FinancialOrderState::CHARGED) + assert defined?(FinancialOrderState::PAYMENT_DECLINED) + assert defined?(FinancialOrderState::CANCELLED) + assert defined?(FinancialOrderState::CANCELLED_BY_GOOGLE) + + assert_equal "REVIEWING", FinancialOrderState::REVIEWING + assert_equal "CHARGEABLE", FinancialOrderState::CHARGEABLE + assert_equal "CHARGING", FinancialOrderState::CHARGING + assert_equal "CHARGED", FinancialOrderState::CHARGED + assert_equal "PAYMENT_DECLINED", FinancialOrderState::PAYMENT_DECLINED + assert_equal "CANCELLED", FinancialOrderState::CANCELLED + assert_equal "CANCELLED_BY_GOOGLE", FinancialOrderState::CANCELLED_BY_GOOGLE + end + + def test_fulfillment_order_state_defines_correct_constants + assert defined?(FulfillmentOrderState::NEW) + assert defined?(FulfillmentOrderState::PROCESSING) + assert defined?(FulfillmentOrderState::DELIVERED) + assert defined?(FulfillmentOrderState::WILL_NOT_DELIVER) + + assert_equal "NEW", FulfillmentOrderState::NEW + assert_equal "PROCESSING", FulfillmentOrderState::PROCESSING + assert_equal "DELIVERED", FulfillmentOrderState::DELIVERED + assert_equal "WILL_NOT_DELIVER", FulfillmentOrderState::WILL_NOT_DELIVER + end + + # in notification + def test_create_from_xml_should_correctly_create_order_state_change_notification_with_reason + [ true, false ].each do |skip_reason| + xml_str = @xml_template % + [ + @data[:serial_number], @data[:google_order_number], @data[:new_financial_order_state], + @data[:new_fulfillment_order_state], @data[:previous_financial_order_state], + @data[:previous_fulfillment_order_state], @data[:reason], @data[:timestamp].iso8601 + ] + + xml_str = xml_str.gsub(/.*?<\/reason>/, '') if skip_reason + + notification = OrderStateChangeNotification.create_from_element(REXML::Document.new(xml_str).root, @frontend) + + @data.each do |key, value| + next if skip_reason and key == :reason + + if key == :timestamp then + assert_in_delta @data[:timestamp].to_f, notification.timestamp.to_f, 1 + else + assert_equal @data[key], notification.send(key), "#{key}" + end + end + + assert_nil notification.reason if skip_reason + end + end + + def test_create_from_xml_should_raise_exception_with_missing_tags + # Remove all required tags from the XML and expect the XPath query in + # OrderStateChangeNotification#create_from_xml to evaluate to nil and thus + # raise a NoMethodError. + [ 'google-order-number', 'new-financial-order-state', 'new-fulfillment-order-state', + 'previous-financial-order-state', 'previous-fulfillment-order-state', 'timestamp' ].each do |tag_name| + xml_str = @xml_template % + [ + @data[:serial_number], @data[:google_order_number], @data[:new_financial_order_state], + @data[:new_fulfillment_order_state], @data[:previous_financial_order_state], + @data[:previous_fulfillment_order_state], @data[:reason], @data[:timestamp].iso8601 + ] + + xml_str = xml_str.gsub(%r{<#{tag_name}>.*?}, '') + doc = REXML::Document.new(xml_str) + + assert_raises(NoMethodError, "Removed tag: #{tag_name} - #{xml_str}") { + notification = OrderStateChangeNotification.create_from_element(doc.root, @frontend) + } + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/pickup_shipping_test.rb b/vendor/plugins/google4r/test/checkout/unit/pickup_shipping_test.rb new file mode 100644 index 0000000..2df9244 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/pickup_shipping_test.rb @@ -0,0 +1,70 @@ +#-- +# Project: google_checkout4r +# File: test/unit/pickup_shipping_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the PickupShipping class. +class Google4R::Checkout::PickupShippingMethodTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @shipping = PickupShipping.new + end + + def test_initialization + assert_nil @shipping.name + assert_nil @shipping.price + end + + def test_pickup_shipping_method_behaves_correctly + [ :name, :name=, :price, :price= ].each do |sym| + assert_respond_to @shipping, sym + end + end + + def test_pickup_shipping_method_setting_attributes_works_correctly + @shipping.name = "Shipping Method Name" + assert_equal "Shipping Method Name", @shipping.name + + @shipping.price = Money.new(100, "EUR") + assert_kind_of Money, @shipping.price + assert_equal 100, @shipping.price.cents + assert_equal "EUR", @shipping.price.currency + end + + def test_pickup_shipping_method_price_is_validated + # Test that PickupShippingMethod checks for its price attribute responding + # to cents and currency. + assert_raises(RuntimeError) { @shipping.price = nil } + assert_raises(RuntimeError) { @shipping.price = 10 } + assert_raises(RuntimeError) { @shipping.price = "str" } + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/private_data_parser_test.rb b/vendor/plugins/google4r/test/checkout/unit/private_data_parser_test.rb new file mode 100644 index 0000000..8f2f2c0 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/private_data_parser_test.rb @@ -0,0 +1,68 @@ +#-- +# Project: google_checkout4r +# File: test/unit/private_data_parser_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class PrivateDataParser. +class Google4R::Checkout::PrivateDataParserTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @xml_str = %q{ + Text 1 + Text 2 + + value + + } + end + + def test_responds_correctly + assert_respond_to PrivateDataParser, :element_to_value + end + + def test_parser_works_in_simple_example + element = REXML::Document.new(@xml_str).root.elements['//tags'] + + assert_equal 'value', PrivateDataParser.element_to_value(element) + end + + def test_parser_works_in_complex_example + doc = REXML::Document.new(@xml_str) + + hash = + { + 'item-note' => [ 'Text 1', 'Text 2' ], + 'nested' => { 'tags' => 'value' } + } + assert_equal hash, PrivateDataParser.element_to_value(doc.root) + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/shipping_adjustment_test.rb b/vendor/plugins/google4r/test/checkout/unit/shipping_adjustment_test.rb new file mode 100644 index 0000000..5d6a19d --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/shipping_adjustment_test.rb @@ -0,0 +1,100 @@ +#-- +# Project: google_checkout4r +# File: test/unit/shipping_adjustment_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class ShippingAdjustmentTest. +class Google4R::Checkout::ShippingAdjustmentTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @xml_str = %q{ + <%s> + %s + %s + } + + @valid_adjustment_types = + [ + [ "FLAT_RATE", 'flat-rate-shipping-adjustment' ], + [ "PICKUP", 'pickup-shipping-adjustment' ], + ] + + @invalid_adjustment_types = [ 'merchant-calculated-shipping', 'invalid-shipping' ] + end + + def test_responds_correctly + adjustment = ShippingAdjustment.new + + [ :type, :type=, :name, :name=, :cost, :cost= ].each do |symbol| + assert_respond_to adjustment, symbol + end + end + + def test_constants_are_defined + assert defined?(ShippingAdjustment::FLAT_RATE) + assert defined?(ShippingAdjustment::PICKUP) + end + + def test_create_from_element_works_with_valid_shipping_adjustment_types + @valid_adjustment_types.each do |pair| + type, tag_name = pair + + xml_str = @xml_str % + [ + tag_name, 'Some Name', 'USD', '10.00', tag_name + ] + + element = REXML::Document.new(xml_str).root + + adjustment = ShippingAdjustment.create_from_element(element) + + assert_equal Money.new(1000, 'USD'), adjustment.cost + assert_equal type, adjustment.type + assert_equal 'Some Name', adjustment.name + end + end + + def test_create_from_element_raises_exception_with_invalid_shipping_adjustment_types + @invalid_adjustment_types.each do |tag_name| + xml_str = @xml_str % + [ + tag_name, 'Some Name', 'USD', '10.00', tag_name + ] + + element = REXML::Document.new(xml_str).root + + assert_raises(RuntimeError) do + adjustment = ShippingAdjustment.create_from_element(element) + end + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/shipping_method_test.rb b/vendor/plugins/google4r/test/checkout/unit/shipping_method_test.rb new file mode 100644 index 0000000..ccf0034 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/shipping_method_test.rb @@ -0,0 +1,41 @@ +#-- +# Project: google_checkout4r +# File: test/unit/shipping_method_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the ShippingMethod class. +class Google4R::Checkout::ShippingMethodTest < Test::Unit::TestCase + include Google4R::Checkout + + def test_shipping_method_raises_runtime_error_on_initialisation + assert_raises(RuntimeError) { ShippingMethod.new } + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/shopping_cart_test.rb b/vendor/plugins/google4r/test/checkout/unit/shopping_cart_test.rb new file mode 100644 index 0000000..f27c6e5 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/shopping_cart_test.rb @@ -0,0 +1,146 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Tests for the ShoppingCart class and all subclasses. +class Google4R::Checkout::ShoppingCartTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = @frontend.create_checkout_command + @cart = @command.cart + + @xml_str = %q{ + + + 01234 + + + 2007-12-31T23:59:59-05:00 + + + + AA Rechargeable Battery Pack + Battery pack containing four AA rechargeable batteries + 12.00 + 1 + + + MegaSound 2GB MP3 Player + Portable MP3 player - stores 500 songs + 1 + 178.00 + + + } + + @optional_tags = [ 'cart-expiration', 'merchant-private-data' ] + end + + def test_behaves_correctly + [ :owner, :expires_at, :items, :owner, :private_data, :private_data= ].each do |sym| + assert_respond_to @cart, sym + end + end + + def test_initialized_correctly + assert_equal @command, @cart.owner + assert_equal nil, @cart.expires_at + assert_equal [], @cart.items + assert_equal @command, @cart.owner + end + + def test_accessors_work_correctly + hash = { 'foo' => [ { 'bar' => 'baz' }, "d'oh", 2 ] } + @cart.private_data = hash.dup + assert_equal hash, @cart.private_data + end + + def test_setting_private_data_only_works_with_a_hash + assert_raises(RuntimeError) { @cart.private_data = 1 } + assert_raises(RuntimeError) { @cart.private_data = nil } + assert_raises(RuntimeError) { @cart.private_data = 'Foobar' } + assert_raises(RuntimeError) { @cart.private_data = [] } + end + + def test_create_item_works_correctly_with_block + the_item = nil + + res = + @cart.create_item do |item| + the_item = item + + assert_kind_of Item, item + end + + assert_equal res, the_item + assert @cart.items.include?(the_item) + end + + def test_create_item_works_correctly_without_block + item = @cart.create_item + + assert @cart.items.include?(item) + end + + def test_create_from_element_works + @optional_tags.power.each do |optional_tag_names| + xml_str = @xml_str + + optional_tag_names.each { |name| xml_str = xml_str.gsub(%r{<#{name}.*?}, '') } + + element = REXML::Document.new(xml_str).root + + expect = Item.stubs(:create_from_element) + expect.with do |element, cart| + element.name == 'item' and + element.elements['item-name'].text == 'AA Rechargeable Battery Pack' + end + expect.times(1).returns(:item1) + + expect = Item.stubs(:create_from_element) + expect.with do |element, cart| + element.name == 'item' and + element.elements['item-name'].text == 'MegaSound 2GB MP3 Player' + end + expect.times(1).returns(:item2) + + cart = ShoppingCart.create_from_element(element, nil) + + assert_equal Time.parse("2007-12-31T23:59:59-05:00"), cart.expires_at unless optional_tag_names.include?('cart-expiration') + assert_equal [ :item1, :item2 ], cart.items + assert_equal({ 'affiliate-code' => '01234' }, cart.private_data) unless optional_tag_names.include?('merchant-private-data') + end + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/tax_rule_test.rb b/vendor/plugins/google4r/test/checkout/unit/tax_rule_test.rb new file mode 100644 index 0000000..4d7f538 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/tax_rule_test.rb @@ -0,0 +1,65 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Tests for the TaxRule class. +class Google4R::Checkout::TaxRuleTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @frontend = Frontend.new(FRONTEND_CONFIGURATION) + @frontend.tax_table_factory = TestTaxTableFactory.new + @command = @frontend.create_checkout_command + @table = TaxTable.new(false) + @rule = @table.create_rule + end + + def test_tax_rule_gets_initialized_correctly + assert_equal @table, @rule.table + assert_nil @rule.area + assert_nil @rule.rate + end + + def test_tax_rule_behaves_correctly + assert_respond_to @rule, :table + assert_respond_to @rule, :area + assert_respond_to @rule, :rate + end + + def test_tax_rule_accessors_work + @rule.area = :area + assert_equal :area, @rule.area + + @rule.rate = 0.5 + assert_equal 0.5, @rule.rate + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/tax_table_test.rb b/vendor/plugins/google4r/test/checkout/unit/tax_table_test.rb new file mode 100644 index 0000000..353d959 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/tax_table_test.rb @@ -0,0 +1,82 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the TaxTable class. +class Google4R::Checkout::TaxTableTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @table = TaxTable.new(false) + end + + def test_table_behaves_correctly + assert_respond_to @table, :rules + assert_respond_to @table, :name + assert_respond_to @table, :name= + assert_respond_to @table, :standalone + end + + def test_initialized_correctly + assert_nil @table.name + assert_equal [], @table.rules + assert_equal false, @table.standalone + end + + def test_accessors_work_correctly + @table.name = "name" + assert_equal "name", @table.name + end + + def test_create_rule_works_correctly_with_block + the_rule = nil + + res = + @table.create_rule do |rule| + the_rule = rule + assert_kind_of TaxRule, rule + end + + assert_equal res, the_rule + assert @table.rules.include?(the_rule) + end + + def test_create_rule_works_correctly_without_block + res = nil + + res = @table.create_rule + + assert_kind_of TaxRule, res + + assert @table.rules.include?(res) + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/us_country_area_test.rb b/vendor/plugins/google4r/test/checkout/unit/us_country_area_test.rb new file mode 100644 index 0000000..cefb476 --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/us_country_area_test.rb @@ -0,0 +1,76 @@ +#-- +# Project: google_checkout4r +# File: test/unit/us_country_area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class UsCountryArea. +class Google4R::Checkout::UsCountryAreaTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @area = UsCountryArea.new + end + + def test_constants_are_defined + assert defined?(UsCountryArea::CONTINENTAL_48) + assert defined?(UsCountryArea::FULL_50_STATES) + assert defined?(UsCountryArea::ALL) + end + + def test_initialization + assert_nil @area.area + end + + def test_creator_sets_area + area = UsCountryArea.new(UsCountryArea::ALL) + assert_equal UsCountryArea::ALL, area.area + end + + + def test_us_country_area_behaves_correctly + assert_respond_to @area, :area + assert_respond_to @area, :area= + end + + def test_us_country_area_area_accessor_works + assert_nil @area.area + + [ UsCountryArea::CONTINENTAL_48, UsCountryArea::FULL_50_STATES, UsCountryArea::ALL ].each do |str| + @area.area = str + assert_equal str, @area.area + end + end + + def test_us_country_area_area_validation_works + assert_raises(RuntimeError) { @area.area = 'invalid value' } + assert_nil @area.area + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/us_state_area_test.rb b/vendor/plugins/google4r/test/checkout/unit/us_state_area_test.rb new file mode 100644 index 0000000..b31440b --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/us_state_area_test.rb @@ -0,0 +1,70 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class UsStateArea. +class Google4R::Checkout::UsStateAreaTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @area = UsStateArea.new + end + + def test_initialization + assert_nil @area.state + end + + def test_creator_sets_state + area = UsStateArea.new('CA') + assert_equal 'CA', area.state + end + + def test_us_state_area_behaves_correctly + assert_respond_to @area, :state + assert_respond_to @area, :state= + end + + def test_us_country_area_area_accessor_works + assert_nil @area.state + + @area.state = 'CA' + assert_equal 'CA', @area.state + end + + def test_us_country_area_area_must_have_the_correct_format + assert_raises(RuntimeError) { @area.state = 'ca' } + assert_nil @area.state + + assert_raises(RuntimeError) { @area.state = 'CAL' } + assert_nil @area.state + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/test/checkout/unit/us_zip_area_test.rb b/vendor/plugins/google4r/test/checkout/unit/us_zip_area_test.rb new file mode 100644 index 0000000..ddf619b --- /dev/null +++ b/vendor/plugins/google4r/test/checkout/unit/us_zip_area_test.rb @@ -0,0 +1,66 @@ +#-- +# Project: google_checkout4r +# File: test/unit/area_test.rb +# Author: Manuel Holtgrewe +# Copyright: (c) 2007 by Manuel Holtgrewe +# License: MIT License as follows: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to permit +# persons to whom the Software is furnished to do so, subject to the +# following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#++ + +require File.expand_path(File.dirname(__FILE__)) + '/../../test_helper' + +require 'test/checkout/frontend_configuration' + +require 'google4r/checkout' + +# Test for the class UsZipArea. +class Google4R::Checkout::UsZipAreaTest < Test::Unit::TestCase + include Google4R::Checkout + + def setup + @area = UsZipArea.new + end + + def test_initialization + assert_nil @area.pattern + end + + def test_creator_sets_area + area = UsZipArea.new('123*') + assert_equal '123*', area.pattern + end + + def test_us_zip_area_behaves_correctly + # test that the methods and constants are defined correctly + assert_respond_to @area, :pattern + assert_respond_to @area, :pattern= + end + + def test_us_zip_area_pattern_accessor_works + assert_nil @area.pattern + + @area.pattern = '12345678' + assert_equal '12345678', @area.pattern + + @area.pattern = '12*' + assert_equal '12*', @area.pattern + end +end \ No newline at end of file diff --git a/vendor/plugins/google4r/var/cacert.pem b/vendor/plugins/google4r/var/cacert.pem new file mode 100644 index 0000000..357aabf --- /dev/null +++ b/vendor/plugins/google4r/var/cacert.pem @@ -0,0 +1,7815 @@ +## +## ca-bundle.crt -- Bundle of CA Root Certificates +## Converted by the service run by Daniel Stenberg +## URL: http://curl.haxx.se/docs/caextract.html +## Converted at: Wed Jan 31 04:14:42 UTC 2007 +CVS_ID "@(#) $RCSfile: certdata.txt,v $ $Revision: 1.37 $ $Date: 2005/04/18 16:08:07 $" +## +## This is a bundle of X.509 certificates of public Certificate Authorities +## (CA). These were automatically extracted from Mozilla's root certificates +## file (certdata.txt). This file can be found in the mozilla source tree: +## '/mozilla/security/nss/lib/ckfw/builtins/certdata.txt' +## +## This file was automatically converted and downloaded through the services +## provided by http://curl.haxx.se/docs/caextract.html +## +## +## The contents of this file are subject to the Mozilla Public License Version +## 1.1 (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## http://www.mozilla.org/MPL/ +## +## Software distributed under the License is distributed on an "AS IS" basis, +## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +## for the specific language governing rights and limitations under the +## License. +## +## The Original Code is the Netscape security libraries. +## +## The Initial Developer of the Original Code is Netscape Communications +## Corporation. Portions created by Netscape are Copyright (C) 1994-2000 +## Netscape Communications Corporation. All Rights Reserved. +## +## Contributor(s): +## +## Alternatively, the contents of this file may be used under the terms of the +## GNU General Public License Version 2 or later (the "GPL"), in which case +## the provisions of the GPL are applicable instead of those above. If you +## wish to allow use of your version of this file only under the terms of the +## GPL and not to allow others to use your version of this file under the MPL, +## indicate your decision by deleting the provisions above and replace them +## with the notice and other provisions required by the GPL. If you do not +## delete the provisions above, a recipient may use your version of this file +## under either the MPL or the GPL. +## + +Verisign/RSA Secure Server CA +============================= + +MD5 Fingerprint=74:7B:82:03:43:F0:00:9E:6B:B3:EC:47:BF:85:A5:93 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 02:ad:66:7e:4e:45:fe:5e:57:6f:3c:98:19:5e:dd:c0 + Signature Algorithm: md2WithRSAEncryption + Issuer: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority + Validity + Not Before: Nov 9 00:00:00 1994 GMT + Not After : Jan 7 23:59:59 2010 GMT + Subject: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1000 bit) + Modulus (1000 bit): + 00:92:ce:7a:c1:ae:83:3e:5a:aa:89:83:57:ac:25: + 01:76:0c:ad:ae:8e:2c:37:ce:eb:35:78:64:54:03: + e5:84:40:51:c9:bf:8f:08:e2:8a:82:08:d2:16:86: + 37:55:e9:b1:21:02:ad:76:68:81:9a:05:a2:4b:c9: + 4b:25:66:22:56:6c:88:07:8f:f7:81:59:6d:84:07: + 65:70:13:71:76:3e:9b:77:4c:e3:50:89:56:98:48: + b9:1d:a7:29:1a:13:2e:4a:11:59:9c:1e:15:d5:49: + 54:2c:73:3a:69:82:b1:97:39:9c:6d:70:67:48:e5: + dd:2d:d6:c8:1e:7b + Exponent: 65537 (0x10001) + Signature Algorithm: md2WithRSAEncryption + 65:dd:7e:e1:b2:ec:b0:e2:3a:e0:ec:71:46:9a:19:11:b8:d3: + c7:a0:b4:03:40:26:02:3e:09:9c:e1:12:b3:d1:5a:f6:37:a5: + b7:61:03:b6:5b:16:69:3b:c6:44:08:0c:88:53:0c:6b:97:49: + c7:3e:35:dc:6c:b9:bb:aa:df:5c:bb:3a:2f:93:60:b6:a9:4b: + 4d:f2:20:f7:cd:5f:7f:64:7b:8e:dc:00:5c:d7:fa:77:ca:39: + 16:59:6f:0e:ea:d3:b5:83:7f:4d:4d:42:56:76:b4:c9:5f:04: + f8:38:f8:eb:d2:5f:75:5f:cd:7b:fc:e5:8e:80:7c:fc:50 +-----BEGIN CERTIFICATE----- +MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG +A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD +VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0 +MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV +BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy +dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ +ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII +0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI +uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI +hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3 +YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc +1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA== +-----END CERTIFICATE----- + +ABAecom (sub., Am. Bankers Assn.) Root CA +========================================= + +MD5 Fingerprint=41:B8:07:F7:A8:D1:09:EE:B4:9A:8E:70:4D:FC:1B:78 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + d0:1e:40:90:00:00:46:52:00:00:00:01:00:00:00:04 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=DC, L=Washington, O=ABA.ECOM, INC., CN=ABA.ECOM Root CA/emailAddress=admin@digsigtrust.com + Validity + Not Before: Jul 12 17:33:53 1999 GMT + Not After : Jul 9 17:33:53 2009 GMT + Subject: C=US, ST=DC, L=Washington, O=ABA.ECOM, INC., CN=ABA.ECOM Root CA/emailAddress=admin@digsigtrust.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b1:d3:11:e0:79:55:43:07:08:4c:cb:05:42:00: + e2:0d:83:46:3d:e4:93:ba:b6:06:d3:0d:59:bd:3e: + c1:ce:43:67:01:8a:21:a8:ef:bc:cc:d0:a2:cc:b0: + 55:96:53:84:66:05:00:da:44:49:80:d8:54:0a:a5: + 25:86:94:ed:63:56:ff:70:6c:a3:a1:19:d2:78:be: + 68:2a:44:5e:2f:cf:cc:18:5e:47:bc:3a:b1:46:3d: + 1e:f0:b9:2c:34:5f:8c:7c:4c:08:29:9d:40:55:eb: + 3c:7d:83:de:b5:f0:f7:8a:83:0e:a1:4c:b4:3a:a5: + b3:5f:5a:22:97:ec:19:9b:c1:05:68:fd:e6:b7:a9: + 91:94:2c:e4:78:48:24:1a:25:19:3a:eb:95:9c:39: + 0a:8a:cf:42:b2:f0:1c:d5:5f:fb:6b:ed:68:56:7b: + 39:2c:72:38:b0:ee:93:a9:d3:7b:77:3c:eb:71:03: + a9:38:4a:16:6c:89:2a:ca:da:33:13:79:c2:55:8c: + ed:9c:bb:f2:cb:5b:10:f8:2e:61:35:c6:29:4c:2a: + d0:2a:63:d1:65:59:b4:f8:cd:f9:f4:00:84:b6:57: + 42:85:9d:32:a8:f9:2a:54:fb:ff:78:41:bc:bd:71: + 28:f4:bb:90:bc:ff:96:34:04:e3:45:9e:a1:46:28: + 40:81 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:8 + Signature Algorithm: sha1WithRSAEncryption + 04:6f:25:86:e4:e6:96:27:b4:d9:42:c0:d0:c9:00:b1:7f:54: + 3e:87:b2:6d:24:a9:2f:0a:7e:fd:a4:44:b0:f8:54:07:bd:1b: + 9d:9d:ca:7b:50:24:7b:11:5b:49:a3:a6:bf:12:74:d5:89:b7: + b7:2f:98:64:25:14:b7:61:e9:7f:60:80:6b:d3:64:e8:ab:bd: + 1a:d6:51:fa:c0:b4:5d:77:1a:7f:64:08:5e:79:c6:05:4c:f1: + 7a:dd:4d:7d:ce:e6:48:7b:54:d2:61:92:81:d6:1b:d6:00:f0: + 0e:9e:28:77:a0:4d:88:c7:22:76:19:c3:c7:9e:1b:a6:77:78: + f8:5f:9b:56:d1:f0:f2:17:ac:8e:9d:59:e6:1f:fe:57:b6:d9: + 5e:e1:5d:9f:45:ec:61:68:19:41:e1:b2:20:26:fe:5a:30:76: + 24:ff:40:72:3c:79:9f:7c:22:48:ab:46:cd:db:b3:86:2c:8f: + bf:05:41:d3:c1:e3:14:e3:41:17:26:d0:7c:a7:71:4c:19:e8: + 4a:0f:72:58:31:7d:ec:60:7a:a3:22:28:bd:19:24:60:3f:3b: + 87:73:c0:6b:e4:cb:ae:b7:ab:25:43:b2:55:2d:7b:ab:06:0e: + 75:5d:34:e5:5d:73:6d:9e:b2:75:40:a5:59:c9:4f:31:71:88: + d9:88:7f:54 +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIRANAeQJAAAEZSAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw +gYkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJEQzETMBEGA1UEBxMKV2FzaGluZ3Rv +bjEXMBUGA1UEChMOQUJBLkVDT00sIElOQy4xGTAXBgNVBAMTEEFCQS5FQ09NIFJv +b3QgQ0ExJDAiBgkqhkiG9w0BCQEWFWFkbWluQGRpZ3NpZ3RydXN0LmNvbTAeFw05 +OTA3MTIxNzMzNTNaFw0wOTA3MDkxNzMzNTNaMIGJMQswCQYDVQQGEwJVUzELMAkG +A1UECBMCREMxEzARBgNVBAcTCldhc2hpbmd0b24xFzAVBgNVBAoTDkFCQS5FQ09N +LCBJTkMuMRkwFwYDVQQDExBBQkEuRUNPTSBSb290IENBMSQwIgYJKoZIhvcNAQkB +FhVhZG1pbkBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQCx0xHgeVVDBwhMywVCAOINg0Y95JO6tgbTDVm9PsHOQ2cBiiGo77zM +0KLMsFWWU4RmBQDaREmA2FQKpSWGlO1jVv9wbKOhGdJ4vmgqRF4vz8wYXke8OrFG +PR7wuSw0X4x8TAgpnUBV6zx9g9618PeKgw6hTLQ6pbNfWiKX7BmbwQVo/ea3qZGU +LOR4SCQaJRk665WcOQqKz0Ky8BzVX/tr7WhWezkscjiw7pOp03t3POtxA6k4ShZs +iSrK2jMTecJVjO2cu/LLWxD4LmE1xilMKtAqY9FlWbT4zfn0AIS2V0KFnTKo+SpU ++/94Qby9cSj0u5C8/5Y0BONFnqFGKECBAgMBAAGjFjAUMBIGA1UdEwEB/wQIMAYB +Af8CAQgwDQYJKoZIhvcNAQEFBQADggEBAARvJYbk5pYntNlCwNDJALF/VD6Hsm0k +qS8Kfv2kRLD4VAe9G52dyntQJHsRW0mjpr8SdNWJt7cvmGQlFLdh6X9ggGvTZOir +vRrWUfrAtF13Gn9kCF55xgVM8XrdTX3O5kh7VNJhkoHWG9YA8A6eKHegTYjHInYZ +w8eeG6Z3ePhfm1bR8PIXrI6dWeYf/le22V7hXZ9F7GFoGUHhsiAm/lowdiT/QHI8 +eZ98IkirRs3bs4Ysj78FQdPB4xTjQRcm0HyncUwZ6EoPclgxfexgeqMiKL0ZJGA/ +O4dzwGvky663qyVDslUte6sGDnVdNOVdc22esnVApVnJTzFxiNmIf1Q= +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 1 +======================================= + +MD5 Fingerprint=25:7A:BA:83:2E:B6:A2:0B:DA:FE:F5:02:0F:08:D7:AD +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 913315222 (0x36701596) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E1 + Validity + Not Before: Dec 10 18:10:23 1998 GMT + Not After : Dec 10 18:40:23 2018 GMT + Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:a0:6c:81:a9:cf:34:1e:24:dd:fe:86:28:cc:de: + 83:2f:f9:5e:d4:42:d2:e8:74:60:66:13:98:06:1c: + a9:51:12:69:6f:31:55:b9:49:72:00:08:7e:d3:a5: + 62:44:37:24:99:8f:d9:83:48:8f:99:6d:95:13:bb: + 43:3b:2e:49:4e:88:37:c1:bb:58:7f:fe:e1:bd:f8: + bb:61:cd:f3:47:c0:99:a6:f1:f3:91:e8:78:7c:00: + cb:61:c9:44:27:71:69:55:4a:7e:49:4d:ed:a2:a3: + be:02:4c:00:ca:02:a8:ee:01:02:31:64:0f:52:2d: + 13:74:76:36:b5:7a:b4:2d:71 + Exponent: 3 (0x3) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E1/CN=CRL1 + + X509v3 Private Key Usage Period: + Not Before: Dec 10 18:10:23 1998 GMT, Not After: Dec 10 18:10:23 2018 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8 + + X509v3 Subject Key Identifier: + 6A:79:7E:91:69:46:18:13:0A:02:77:A5:59:5B:60:98:25:0E:A2:F8 + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0 +..V4.0.... + Signature Algorithm: sha1WithRSAEncryption + 22:12:d8:7a:1d:dc:81:06:b6:09:65:b2:87:c8:1f:5e:b4:2f: + e9:c4:1e:f2:3c:c1:bb:04:90:11:4a:83:4e:7e:93:b9:4d:42: + c7:92:26:a0:5c:34:9a:38:72:f8:fd:6b:16:3e:20:ee:82:8b: + 31:2a:93:36:85:23:88:8a:3c:03:68:d3:c9:09:0f:4d:fc:6c: + a4:da:28:72:93:0e:89:80:b0:7d:fe:80:6f:65:6d:18:33:97: + 8b:c2:6b:89:ee:60:3d:c8:9b:ef:7f:2b:32:62:73:93:cb:3c: + e3:7b:e2:76:78:45:bc:a1:93:04:bb:86:9f:3a:5b:43:7a:c3: + 8a:65 +-----BEGIN CERTIFICATE----- +MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV +UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL +EwhEU1RDQSBFMTAeFw05ODEyMTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJ +BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x +ETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCg +bIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJENySZ +j9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlV +Sn5JTe2io74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCG +SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx +JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI +RFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMTAxODEw +MjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFGp5 +fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i ++DAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG +SIb3DQEBBQUAA4GBACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lN +QseSJqBcNJo4cvj9axY+IO6CizEqkzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+ +gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4RbyhkwS7hp86W0N6w4pl +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 3 +======================================= + +MD5 Fingerprint=93:C2:8E:11:7B:D4:F3:03:19:BD:28:75:13:4A:45:4A +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 913232846 (0x366ed3ce) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=Digital Signature Trust Co., OU=DSTCA E2 + Validity + Not Before: Dec 9 19:17:26 1998 GMT + Not After : Dec 9 19:47:26 2018 GMT + Subject: C=US, O=Digital Signature Trust Co., OU=DSTCA E2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:bf:93:8f:17:92:ef:33:13:18:eb:10:7f:4e:16: + bf:ff:06:8f:2a:85:bc:5e:f9:24:a6:24:88:b6:03: + b7:c1:c3:5f:03:5b:d1:6f:ae:7e:42:ea:66:23:b8: + 63:83:56:fb:28:2d:e1:38:8b:b4:ee:a8:01:e1:ce: + 1c:b6:88:2a:22:46:85:fb:9f:a7:70:a9:47:14:3f: + ce:de:65:f0:a8:71:f7:4f:26:6c:8c:bc:c6:b5:ef: + de:49:27:ff:48:2a:7d:e8:4d:03:cc:c7:b2:52:c6: + 17:31:13:3b:b5:4d:db:c8:c4:f6:c3:0f:24:2a:da: + 0c:9d:e7:91:5b:80:cd:94:9d + Exponent: 3 (0x3) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/C=US/O=Digital Signature Trust Co./OU=DSTCA E2/CN=CRL1 + + X509v3 Private Key Usage Period: + Not Before: Dec 9 19:17:26 1998 GMT, Not After: Dec 9 19:17:26 2018 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B + + X509v3 Subject Key Identifier: + 1E:82:4D:28:65:80:3C:C9:41:6E:AC:35:2E:5A:CB:DE:EE:F8:39:5B + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0 +..V4.0.... + Signature Algorithm: sha1WithRSAEncryption + 47:8d:83:ad:62:f2:db:b0:9e:45:22:05:b9:a2:d6:03:0e:38: + 72:e7:9e:fc:7b:e6:93:b6:9a:a5:a2:94:c8:34:1d:91:d1:c5: + d7:f4:0a:25:0f:3d:78:81:9e:0f:b1:67:c4:90:4c:63:dd:5e: + a7:e2:ba:9f:f5:f7:4d:a5:31:7b:9c:29:2d:4c:fe:64:3e:ec: + b6:53:fe:ea:9b:ed:82:db:74:75:4b:07:79:6e:1e:d8:19:83: + 73:de:f5:3e:d0:b5:de:e7:4b:68:7d:43:2e:2a:20:e1:7e:a0: + 78:44:9e:08:f5:98:f9:c7:7f:1b:1b:d6:06:20:02:58:a1:c3: + a2:03 +-----BEGIN CERTIFICATE----- +MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV +UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL +EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ +BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x +ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/ +k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso +LeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3o +TQPMx7JSxhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCG +SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx +JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI +RFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxOTE3 +MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFB6C +TShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5 +WzAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG +SIb3DQEBBQUAA4GBAEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHR +xdf0CiUPPXiBng+xZ8SQTGPdXqfiup/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVL +B3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1mPnHfxsb1gYgAlihw6ID +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 2 +======================================= + +MD5 Fingerprint=6C:C9:A7:6E:47:F1:0C:E3:53:3B:78:4C:4D:C2:6A:C5 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + d0:1e:40:8b:00:00:02:7c:00:00:00:02:00:00:00:01 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/emailAddress=ca@digsigtrust.com + Validity + Not Before: Dec 1 18:18:55 1998 GMT + Not After : Nov 28 18:18:55 2008 GMT + Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X1, CN=DST RootCA X1/emailAddress=ca@digsigtrust.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:d2:c6:26:b6:e7:a5:3d:c1:c4:68:d5:50:6f:53: + c5:6f:49:13:09:b8:af:2c:48:8d:14:6a:a3:17:5f: + 5a:f9:d3:2e:75:2f:d8:28:62:d1:93:2f:fc:4d:d4: + ab:87:e5:08:c7:99:e7:92:3f:75:bd:eb:25:b4:15: + c1:9b:19:3d:d2:44:8d:d7:74:20:6d:37:02:8f:69: + 93:5b:8a:c4:19:9d:f4:b2:0e:fc:16:6c:b9:b1:05: + 92:83:d1:85:2c:60:94:3e:45:55:a0:d9:ab:08:21: + e6:60:e8:3b:74:f2:99:50:51:68:d0:03:2d:b1:80: + be:a3:d8:52:b0:44:cd:43:4a:70:8e:58:85:95:e1: + 4e:2c:d6:2d:41:6f:d6:84:e7:c8:98:44:ca:47:db: + 2c:24:a5:69:26:cf:6b:b8:27:62:c3:f4:c9:7a:92: + 23:ed:13:67:82:ae:45:2e:45:e5:7e:72:3f:85:9d: + 94:62:10:e6:3c:91:a1:ad:77:00:e0:15:ec:f3:84: + 80:72:7a:8e:6e:60:97:c7:24:59:10:34:83:5b:e1: + a5:a4:69:b6:57:35:1c:78:59:c6:d3:2f:3a:73:67: + ee:94:ca:04:13:05:62:06:70:23:b3:f4:7c:ee:45: + d9:64:0b:5b:49:aa:a4:43:ce:26:c4:44:12:6c:b8: + dd:79 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + a2:37:b2:3f:69:fb:d7:86:79:54:49:31:95:33:2b:f3:d1:09: + 14:49:62:60:86:a5:b0:11:e2:50:c2:1d:06:57:3e:2d:e8:33: + 64:be:9b:aa:ad:5f:1b:4d:d4:99:95:a2:8b:9a:c9:62:72:b5: + 69:ea:d9:58:ab:35:ed:15:a2:43:d6:b6:bc:07:79:65:64:73: + 7d:d7:79:ca:7b:d5:5a:51:c6:e1:53:04:96:8d:38:cf:a3:17: + ac:39:71:6b:01:c3:8b:53:3c:63:e9:ee:79:c0:e4:be:92:32: + 64:7a:b3:1f:97:94:62:bd:ea:b2:20:15:95:fb:97:f2:78:2f: + 63:36:40:38:e3:46:0f:1d:dd:ac:95:ca:e7:4b:90:7b:b1:4b: + a9:d4:c5:eb:9a:da:aa:d5:a3:94:14:46:8d:2d:1f:f3:3a:d6: + 93:3a:f6:3e:79:fc:e8:e6:b0:75:ed:ee:3d:c9:70:c7:5d:aa: + 81:4b:46:25:1c:c7:6c:15:e3:95:4e:0f:aa:32:37:94:0a:17: + 24:92:13:84:58:d2:63:6f:2b:f7:e6:5b:62:0b:13:17:b0:0d: + 52:4c:fe:fe:6f:5c:e2:91:6e:1d:fd:a4:62:d7:68:fa:8e:7a: + 4f:d2:08:da:93:dc:f0:92:11:7a:d0:dc:72:93:0c:73:93:62: + 85:68:d0:f4 +-----BEGIN CERTIFICATE----- +MIID2DCCAsACEQDQHkCLAAACfAAAAAIAAAABMA0GCSqGSIb3DQEBBQUAMIGpMQsw +CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp +dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE +CxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDExITAfBgkqhkiG9w0B +CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODEyMDExODE4NTVaFw0wODExMjgx +ODE4NTVaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO +U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0 +IENvLjERMA8GA1UECxMIRFNUQ0EgWDExFjAUBgNVBAMTDURTVCBSb290Q0EgWDEx +ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBANLGJrbnpT3BxGjVUG9TxW9JEwm4ryxIjRRqoxdf +WvnTLnUv2Chi0ZMv/E3Uq4flCMeZ55I/db3rJbQVwZsZPdJEjdd0IG03Ao9pk1uK +xBmd9LIO/BZsubEFkoPRhSxglD5FVaDZqwgh5mDoO3TymVBRaNADLbGAvqPYUrBE +zUNKcI5YhZXhTizWLUFv1oTnyJhEykfbLCSlaSbPa7gnYsP0yXqSI+0TZ4KuRS5F +5X5yP4WdlGIQ5jyRoa13AOAV7POEgHJ6jm5gl8ckWRA0g1vhpaRptlc1HHhZxtMv +OnNn7pTKBBMFYgZwI7P0fO5F2WQLW0mqpEPOJsREEmy43XkCAwEAATANBgkqhkiG +9w0BAQUFAAOCAQEAojeyP2n714Z5VEkxlTMr89EJFEliYIalsBHiUMIdBlc+Legz +ZL6bqq1fG03UmZWii5rJYnK1aerZWKs17RWiQ9a2vAd5ZWRzfdd5ynvVWlHG4VME +lo04z6MXrDlxawHDi1M8Y+nuecDkvpIyZHqzH5eUYr3qsiAVlfuX8ngvYzZAOONG +Dx3drJXK50uQe7FLqdTF65raqtWjlBRGjS0f8zrWkzr2Pnn86Oawde3uPclwx12q +gUtGJRzHbBXjlU4PqjI3lAoXJJIThFjSY28r9+ZbYgsTF7ANUkz+/m9c4pFuHf2k +Ytdo+o56T9II2pPc8JIRetDccpMMc5NihWjQ9A== +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 4 +======================================= + +MD5 Fingerprint=CD:3B:3D:62:5B:09:B8:09:36:87:9E:12:2F:71:64:BA +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + d0:1e:40:8b:00:00:77:6d:00:00:00:01:00:00:00:04 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/emailAddress=ca@digsigtrust.com + Validity + Not Before: Nov 30 22:46:16 1998 GMT + Not After : Nov 27 22:46:16 2008 GMT + Subject: C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA X2, CN=DST RootCA X2/emailAddress=ca@digsigtrust.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dc:75:f0:8c:c0:75:96:9a:c0:62:1f:26:f7:c4: + e1:9a:ea:e0:56:73:5b:99:cd:01:44:a8:08:b6:d5: + a7:da:1a:04:18:39:92:4a:78:a3:81:c2:f5:77:7a: + 50:b4:70:ff:9a:ab:c6:c7:ca:6e:83:4f:42:98:fb: + 26:0b:da:dc:6d:d6:a9:99:55:52:67:e9:28:03:92: + dc:e5:b0:05:9a:0f:15:f9:6b:59:72:56:f2:fa:39: + fc:aa:68:ee:0f:1f:10:83:2f:fc:9d:fa:17:96:dd: + 82:e3:e6:45:7d:c0:4b:80:44:1f:ed:2c:e0:84:fd: + 91:5c:92:54:69:25:e5:62:69:dc:e5:ee:00:52:bd: + 33:0b:ad:75:02:85:a7:64:50:2d:c5:19:19:30:c0: + 26:db:c9:d3:fd:2e:99:ad:59:b5:0b:4d:d4:41:ae: + 85:48:43:59:dc:b7:a8:e2:a2:de:c3:8f:d7:b8:a1: + 62:a6:68:50:52:e4:cf:31:a7:94:85:da:9f:46:32: + 17:56:e5:f2:eb:66:3d:12:ff:43:db:98:ef:77:cf: + cb:81:8d:34:b1:c6:50:4a:26:d1:e4:3e:41:50:af: + 6c:ae:22:34:2e:d5:6b:6e:83:ba:79:b8:76:65:48: + da:09:29:64:63:22:b9:fb:47:76:85:8c:86:44:cb: + 09:db + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + b5:36:0e:5d:e1:61:28:5a:11:65:c0:3f:83:03:79:4d:be:28: + a6:0b:07:02:52:85:cd:f8:91:d0:10:6c:b5:6a:20:5b:1c:90: + d9:30:3c:c6:48:9e:8a:5e:64:f9:a1:71:77:ef:04:27:1f:07: + eb:e4:26:f7:73:74:c9:44:18:1a:66:d3:e0:43:af:91:3b:d1: + cb:2c:d8:74:54:3a:1c:4d:ca:d4:68:cd:23:7c:1d:10:9e:45: + e9:f6:00:6e:a6:cd:19:ff:4f:2c:29:8f:57:4d:c4:77:92:be: + e0:4c:09:fb:5d:44:86:66:21:a8:b9:32:a2:56:d5:e9:8c:83: + 7c:59:3f:c4:f1:0b:e7:9d:ec:9e:bd:9c:18:0e:3e:c2:39:79: + 28:b7:03:0d:08:cb:c6:e7:d9:01:37:50:10:ec:cc:61:16:40: + d4:af:31:74:7b:fc:3f:31:a7:d0:47:73:33:39:1b:cc:4e:6a: + d7:49:83:11:06:fe:eb:82:58:33:32:4c:f0:56:ac:1e:9c:2f: + 56:9a:7b:c1:4a:1c:a5:fd:55:36:ce:fc:96:4d:f4:b0:f0:ec: + b7:6c:82:ed:2f:31:99:42:4c:a9:b2:0d:b8:15:5d:f1:df:ba: + c9:b5:4a:d4:64:98:b3:26:a9:30:c8:fd:a6:ec:ab:96:21:ad: + 7f:c2:78:b6 +-----BEGIN CERTIFICATE----- +MIID2DCCAsACEQDQHkCLAAB3bQAAAAEAAAAEMA0GCSqGSIb3DQEBBQUAMIGpMQsw +CQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENp +dHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UE +CxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIxITAfBgkqhkiG9w0B +CQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAeFw05ODExMzAyMjQ2MTZaFw0wODExMjcy +MjQ2MTZaMIGpMQswCQYDVQQGEwJ1czENMAsGA1UECBMEVXRhaDEXMBUGA1UEBxMO +U2FsdCBMYWtlIENpdHkxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0 +IENvLjERMA8GA1UECxMIRFNUQ0EgWDIxFjAUBgNVBAMTDURTVCBSb290Q0EgWDIx +ITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBANx18IzAdZaawGIfJvfE4Zrq4FZzW5nNAUSoCLbV +p9oaBBg5kkp4o4HC9Xd6ULRw/5qrxsfKboNPQpj7Jgva3G3WqZlVUmfpKAOS3OWw +BZoPFflrWXJW8vo5/Kpo7g8fEIMv/J36F5bdguPmRX3AS4BEH+0s4IT9kVySVGkl +5WJp3OXuAFK9MwutdQKFp2RQLcUZGTDAJtvJ0/0uma1ZtQtN1EGuhUhDWdy3qOKi +3sOP17ihYqZoUFLkzzGnlIXan0YyF1bl8utmPRL/Q9uY73fPy4GNNLHGUEom0eQ+ +QVCvbK4iNC7Va26Dunm4dmVI2gkpZGMiuftHdoWMhkTLCdsCAwEAATANBgkqhkiG +9w0BAQUFAAOCAQEAtTYOXeFhKFoRZcA/gwN5Tb4opgsHAlKFzfiR0BBstWogWxyQ +2TA8xkieil5k+aFxd+8EJx8H6+Qm93N0yUQYGmbT4EOvkTvRyyzYdFQ6HE3K1GjN +I3wdEJ5F6fYAbqbNGf9PLCmPV03Ed5K+4EwJ+11EhmYhqLkyolbV6YyDfFk/xPEL +553snr2cGA4+wjl5KLcDDQjLxufZATdQEOzMYRZA1K8xdHv8PzGn0EdzMzkbzE5q +10mDEQb+64JYMzJM8FasHpwvVpp7wUocpf1VNs78lk30sPDst2yC7S8xmUJMqbIN +uBVd8d+6ybVK1GSYsyapMMj9puyrliGtf8J4tg== +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary Certification Authority +======================================================= + +MD5 Fingerprint=97:60:E8:57:5F:D3:50:47:E5:43:0C:94:36:8A:B0:62 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + cd:ba:7f:56:f0:df:e4:bc:54:fe:22:ac:b3:72:aa:55 + Signature Algorithm: md2WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority + Validity + Not Before: Jan 29 00:00:00 1996 GMT + Not After : Aug 1 23:59:59 2028 GMT + Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:e5:19:bf:6d:a3:56:61:2d:99:48:71:f6:67:de: + b9:8d:eb:b7:9e:86:80:0a:91:0e:fa:38:25:af:46: + 88:82:e5:73:a8:a0:9b:24:5d:0d:1f:cc:65:6e:0c: + b0:d0:56:84:18:87:9a:06:9b:10:a1:73:df:b4:58: + 39:6b:6e:c1:f6:15:d5:a8:a8:3f:aa:12:06:8d:31: + ac:7f:b0:34:d7:8f:34:67:88:09:cd:14:11:e2:4e: + 45:56:69:1f:78:02:80:da:dc:47:91:29:bb:36:c9: + 63:5c:c5:e0:d7:2d:87:7b:a1:b7:32:b0:7b:30:ba: + 2a:2f:31:aa:ee:a3:67:da:db + Exponent: 65537 (0x10001) + Signature Algorithm: md2WithRSAEncryption + 4c:3f:b8:8b:c6:68:df:ee:43:33:0e:5d:e9:a6:cb:07:84:4d: + 7a:33:ff:92:1b:f4:36:ad:d8:95:22:36:68:11:6c:7c:42:cc: + f3:9c:2e:c4:07:3f:14:b0:0f:4f:ff:90:92:76:f9:e2:bc:4a: + e9:8f:cd:a0:80:0a:f7:c5:29:f1:82:22:5d:b8:b1:dd:81:23: + a3:7b:25:15:46:30:79:16:f8:ea:05:4b:94:7f:1d:c2:1c:c8: + e3:b7:f4:10:40:3c:13:c3:5f:1f:53:e8:48:e4:86:b4:7b:a1: + 35:b0:7b:25:ba:b8:d3:8e:ab:3f:38:9d:00:34:00:98:f3:d1: + 71:94 +-----BEGIN CERTIFICATE----- +MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJ +BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh +c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05 +NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD +VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJp +bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0N +H8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR +4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATAN +BgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZo +EWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5 +FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89Fx +lA== +-----END CERTIFICATE----- + +Verisign Class 2 Public Primary Certification Authority +======================================================= + +MD5 Fingerprint=B3:9C:25:B1:C3:2E:32:53:80:15:30:9D:4D:02:77:3E +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 2d:1b:fc:4a:17:8d:a3:91:eb:e7:ff:f5:8b:45:be:0b + Signature Algorithm: md2WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority + Validity + Not Before: Jan 29 00:00:00 1996 GMT + Not After : Aug 1 23:59:59 2028 GMT + Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:b6:5a:8b:a3:0d:6a:23:83:80:6b:cf:39:87:f4: + 21:13:33:06:4c:25:a2:ed:55:12:97:c5:a7:80:b9: + fa:83:c1:20:a0:fa:2f:15:0d:7c:a1:60:6b:7e:79: + 2c:fa:06:0f:3a:ae:f6:1b:6f:b1:d2:ff:2f:28:52: + 5f:83:7d:4b:c4:7a:b7:f8:66:1f:80:54:fc:b7:c2: + 8e:59:4a:14:57:46:d1:9a:93:be:41:91:03:bb:15: + 80:93:5c:eb:e7:cc:08:6c:3f:3e:b3:4a:fc:ff:4b: + 6c:23:d5:50:82:26:44:19:8e:23:c3:71:ea:19:24: + 47:04:9e:75:bf:c8:a6:00:1f + Exponent: 65537 (0x10001) + Signature Algorithm: md2WithRSAEncryption + 8a:1b:2b:fa:39:c1:74:d7:5e:d8:19:64:a2:58:4a:2d:37:e0: + 33:47:0f:ac:ed:f7:aa:db:1e:e4:8b:06:5c:60:27:ca:45:52: + ce:16:ef:3f:06:64:e7:94:68:7c:60:33:15:11:69:af:9d:62: + 8d:a3:03:54:6b:a6:be:e5:ee:05:18:60:04:bf:42:80:fd:d0: + a8:a8:1e:01:3b:f7:a3:5c:af:a3:dc:e6:26:80:23:3c:b8:44: + 74:f7:0a:ae:49:8b:61:78:cc:24:bf:88:8a:a7:0e:ea:73:19: + 41:fd:4d:03:f0:88:d1:e5:78:8d:a5:2a:4f:f6:97:0d:17:77: + ca:d8 +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkG +A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz +cyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 +MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV +BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmlt +YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN +ADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyh +YGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7 +FYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0G +CSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg +J8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc +r6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority +======================================================= + +MD5 Fingerprint=10:FC:63:5D:F6:26:3E:0D:F3:25:BE:5F:79:CD:67:67 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 70:ba:e4:1d:10:d9:29:34:b6:38:ca:7b:03:cc:ba:bf + Signature Algorithm: md2WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority + Validity + Not Before: Jan 29 00:00:00 1996 GMT + Not After : Aug 1 23:59:59 2028 GMT + Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:c9:5c:59:9e:f2:1b:8a:01:14:b4:10:df:04:40: + db:e3:57:af:6a:45:40:8f:84:0c:0b:d1:33:d9:d9: + 11:cf:ee:02:58:1f:25:f7:2a:a8:44:05:aa:ec:03: + 1f:78:7f:9e:93:b9:9a:00:aa:23:7d:d6:ac:85:a2: + 63:45:c7:72:27:cc:f4:4c:c6:75:71:d2:39:ef:4f: + 42:f0:75:df:0a:90:c6:8e:20:6f:98:0f:f8:ac:23: + 5f:70:29:36:a4:c9:86:e7:b1:9a:20:cb:53:a5:85: + e7:3d:be:7d:9a:fe:24:45:33:dc:76:15:ed:0f:a2: + 71:64:4c:65:2e:81:68:45:a7 + Exponent: 65537 (0x10001) + Signature Algorithm: md2WithRSAEncryption + bb:4c:12:2b:cf:2c:26:00:4f:14:13:dd:a6:fb:fc:0a:11:84: + 8c:f3:28:1c:67:92:2f:7c:b6:c5:fa:df:f0:e8:95:bc:1d:8f: + 6c:2c:a8:51:cc:73:d8:a4:c0:53:f0:4e:d6:26:c0:76:01:57: + 81:92:5e:21:f1:d1:b1:ff:e7:d0:21:58:cd:69:17:e3:44:1c: + 9c:19:44:39:89:5c:dc:9c:00:0f:56:8d:02:99:ed:a2:90:45: + 4c:e4:bb:10:a4:3d:f0:32:03:0e:f1:ce:f8:e8:c9:51:8c:e6: + 62:9f:e6:9f:c0:7d:b7:72:9c:c9:36:3a:6b:9f:4e:a8:ff:64: + 0d:64 +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG +A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz +cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 +MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV +BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt +YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN +ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE +BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is +I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G +CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do +lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc +AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary Certification Authority - G2 +============================================================ + +MD5 Fingerprint=DB:23:3D:F9:69:FA:4B:B9:95:80:44:73:5E:7D:41:83 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 4c:c7:ea:aa:98:3e:71:d3:93:10:f8:3d:3a:89:91:92 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Validity + Not Before: May 18 00:00:00 1998 GMT + Not After : Aug 1 23:59:59 2028 GMT + Subject: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:aa:d0:ba:be:16:2d:b8:83:d4:ca:d2:0f:bc:76: + 31:ca:94:d8:1d:93:8c:56:02:bc:d9:6f:1a:6f:52: + 36:6e:75:56:0a:55:d3:df:43:87:21:11:65:8a:7e: + 8f:bd:21:de:6b:32:3f:1b:84:34:95:05:9d:41:35: + eb:92:eb:96:dd:aa:59:3f:01:53:6d:99:4f:ed:e5: + e2:2a:5a:90:c1:b9:c4:a6:15:cf:c8:45:eb:a6:5d: + 8e:9c:3e:f0:64:24:76:a5:cd:ab:1a:6f:b6:d8:7b: + 51:61:6e:a6:7f:87:c8:e2:b7:e5:34:dc:41:88:ea: + 09:40:be:73:92:3d:6b:e7:75 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + a9:4f:c3:0d:c7:67:be:2c:cb:d9:a8:cd:2d:75:e7:7e:15:9e: + 3b:72:eb:7e:eb:5c:2d:09:87:d6:6b:6d:60:7c:e5:ae:c5:90: + 23:0c:5c:4a:d0:af:b1:5d:f3:c7:b6:0a:db:e0:15:93:0d:dd: + 03:bc:c7:76:8a:b5:dd:4f:c3:9b:13:75:b8:01:c0:e6:c9:5b: + 6b:a5:b8:89:dc:ac:a4:dd:72:ed:4e:a1:f7:4f:bc:06:d3:ea: + c8:64:74:7b:c2:95:41:9c:65:73:58:f1:90:9a:3c:6a:b1:98: + c9:c4:87:bc:cf:45:6d:45:e2:6e:22:3f:fe:bc:0f:31:5c:e8: + f2:d9 +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJ +BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh +c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy +MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp +emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X +DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw +FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg +UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo +YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 +MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB +AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK +VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm +Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID +AQABMA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0J +h9ZrbWB85a7FkCMMXErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2ul +uIncrKTdcu1OofdPvAbT6shkdHvClUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68 +DzFc6PLZ +-----END CERTIFICATE----- + +Verisign Class 2 Public Primary Certification Authority - G2 +============================================================ + +MD5 Fingerprint=2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + b9:2f:60:cc:88:9f:a1:7a:46:09:b8:5b:70:6c:8a:af + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Validity + Not Before: May 18 00:00:00 1998 GMT + Not After : Aug 1 23:59:59 2028 GMT + Subject: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:a7:88:01:21:74:2c:e7:1a:03:f0:98:e1:97:3c: + 0f:21:08:f1:9c:db:97:e9:9a:fc:c2:04:06:13:be: + 5f:52:c8:cc:1e:2c:12:56:2c:b8:01:69:2c:cc:99: + 1f:ad:b0:96:ae:79:04:f2:13:39:c1:7b:98:ba:08: + 2c:e8:c2:84:13:2c:aa:69:e9:09:f4:c7:a9:02:a4: + 42:c2:23:4f:4a:d8:f0:0e:a2:fb:31:6c:c9:e6:6f: + 99:27:07:f5:e6:f4:4c:78:9e:6d:eb:46:86:fa:b9: + 86:c9:54:f2:b2:c4:af:d4:46:1c:5a:c9:15:30:ff: + 0d:6c:f5:2d:0e:6d:ce:7f:77 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 72:2e:f9:7f:d1:f1:71:fb:c4:9e:f6:c5:5e:51:8a:40:98:b8: + 68:f8:9b:1c:83:d8:e2:9d:bd:ff:ed:a1:e6:66:ea:2f:09:f4: + ca:d7:ea:a5:2b:95:f6:24:60:86:4d:44:2e:83:a5:c4:2d:a0: + d3:ae:78:69:6f:72:da:6c:ae:08:f0:63:92:37:e6:bb:c4:30: + 17:ad:77:cc:49:35:aa:cf:d8:8f:d1:be:b7:18:96:47:73:6a: + 54:22:34:64:2d:b6:16:9b:59:5b:b4:51:59:3a:b3:0b:14:f4: + 12:df:67:a0:f4:ad:32:64:5e:b1:46:72:27:8c:12:7b:c5:44: + b4:ae +-----BEGIN CERTIFICATE----- +MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns +YXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH +MjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y +aXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe +Fw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX +MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj +IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx +KGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s +eTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B +AQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM +HiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw +DqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC +AwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji +nb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX +rXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn +jBJ7xUS0rg== +-----END CERTIFICATE----- + +GTE CyberTrust Root CA +====================== + +MD5 Fingerprint=C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 419 (0x1a3) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=US, O=GTE Corporation, CN=GTE CyberTrust Root + Validity + Not Before: Feb 23 23:01:00 1996 GMT + Not After : Feb 23 23:59:00 2006 GMT + Subject: C=US, O=GTE Corporation, CN=GTE CyberTrust Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:b8:e6:4f:ba:db:98:7c:71:7c:af:44:b7:d3:0f: + 46:d9:64:e5:93:c1:42:8e:c7:ba:49:8d:35:2d:7a: + e7:8b:bd:e5:05:31:59:c6:b1:2f:0a:0c:fb:9f:a7: + 3f:a2:09:66:84:56:1e:37:29:1b:87:e9:7e:0c:ca: + 9a:9f:a5:7f:f5:15:94:a3:d5:a2:46:82:d8:68:4c: + d1:37:15:06:68:af:bd:f8:b0:b3:f0:29:f5:95:5a: + 09:16:61:77:0a:22:25:d4:4f:45:aa:c7:bd:e5:96: + df:f9:d4:a8:8e:42:cc:24:c0:1e:91:27:4a:b5:6d: + 06:80:63:39:c4:a2:5e:38:03 + Exponent: 65537 (0x10001) + Signature Algorithm: md5WithRSAEncryption + 12:b3:75:c6:5f:1d:e1:61:55:80:00:d4:81:4b:7b:31:0f:23: + 63:e7:3d:f3:03:f9:f4:36:a8:bb:d9:e3:a5:97:4d:ea:2b:29: + e0:d6:6a:73:81:e6:c0:89:a3:d3:f1:e0:a5:a5:22:37:9a:63: + c2:48:20:b4:db:72:e3:c8:f6:d9:7c:be:b1:af:53:da:14:b4: + 21:b8:d6:d5:96:e3:fe:4e:0c:59:62:b6:9a:4a:f9:42:dd:8c: + 6f:81:a9:71:ff:f4:0a:72:6d:6d:44:0e:9d:f3:74:74:a8:d5: + 34:49:e9:5e:9e:e9:b4:7a:e1:e5:5a:1f:84:30:9c:d3:9f:a5: + 25:d8 +-----BEGIN CERTIFICATE----- +MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv +b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU +cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv +RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M +ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5 +1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz +dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl +IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy +bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G2 +============================================================ + +MD5 Fingerprint=A2:33:9B:4C:74:78:73:D4:6C:E7:C1:F3:8D:CB:5C:E9 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Validity + Not Before: May 18 00:00:00 1998 GMT + Not After : Aug 1 23:59:59 2028 GMT + Subject: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:cc:5e:d1:11:5d:5c:69:d0:ab:d3:b9:6a:4c:99: + 1f:59:98:30:8e:16:85:20:46:6d:47:3f:d4:85:20: + 84:e1:6d:b3:f8:a4:ed:0c:f1:17:0f:3b:f9:a7:f9: + 25:d7:c1:cf:84:63:f2:7c:63:cf:a2:47:f2:c6:5b: + 33:8e:64:40:04:68:c1:80:b9:64:1c:45:77:c7:d8: + 6e:f5:95:29:3c:50:e8:34:d7:78:1f:a8:ba:6d:43: + 91:95:8f:45:57:5e:7e:c5:fb:ca:a4:04:eb:ea:97: + 37:54:30:6f:bb:01:47:32:33:cd:dc:57:9b:64:69: + 61:f8:9b:1d:1c:89:4f:5c:67 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 51:4d:cd:be:5c:cb:98:19:9c:15:b2:01:39:78:2e:4d:0f:67: + 70:70:99:c6:10:5a:94:a4:53:4d:54:6d:2b:af:0d:5d:40:8b: + 64:d3:d7:ee:de:56:61:92:5f:a6:c4:1d:10:61:36:d3:2c:27: + 3c:e8:29:09:b9:11:64:74:cc:b5:73:9f:1c:48:a9:bc:61:01: + ee:e2:17:a6:0c:e3:40:08:3b:0e:e7:eb:44:73:2a:9a:f1:69: + 92:ef:71:14:c3:39:ac:71:a7:91:09:6f:e4:71:06:b3:ba:59: + 57:26:79:00:f6:f8:0d:a2:33:30:28:d4:aa:58:a0:9d:9d:69: + 91:fd +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ +BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh +c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy +MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp +emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X +DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw +FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg +UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo +YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 +MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB +AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4 +pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0 +13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID +AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk +U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i +F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY +oJ2daZH9 +-----END CERTIFICATE----- + +Verisign Class 4 Public Primary Certification Authority - G2 +============================================================ + +MD5 Fingerprint=26:6D:2C:19:98:B6:70:68:38:50:54:19:EC:90:34:60 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 32:88:8e:9a:d2:f5:eb:13:47:f8:7f:c4:20:37:25:f8 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Validity + Not Before: May 18 00:00:00 1998 GMT + Not After : Aug 1 23:59:59 2028 GMT + Subject: C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:ba:f0:e4:cf:f9:c4:ae:85:54:b9:07:57:f9:8f: + c5:7f:68:11:f8:c4:17:b0:44:dc:e3:30:73:d5:2a: + 62:2a:b8:d0:cc:1c:ed:28:5b:7e:bd:6a:dc:b3:91: + 24:ca:41:62:3c:fc:02:01:bf:1c:16:31:94:05:97: + 76:6e:a2:ad:bd:61:17:6c:4e:30:86:f0:51:37:2a: + 50:c7:a8:62:81:dc:5b:4a:aa:c1:a0:b4:6e:eb:2f: + e5:57:c5:b1:2b:40:70:db:5a:4d:a1:8e:1f:bd:03: + 1f:d8:03:d4:8f:4c:99:71:bc:e2:82:cc:58:e8:98: + 3a:86:d3:86:38:f3:00:29:1f + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 85:8c:12:c1:a7:b9:50:15:7a:cb:3e:ac:b8:43:8a:dc:aa:dd: + 14:ba:89:81:7e:01:3c:23:71:21:88:2f:82:dc:63:fa:02:45: + ac:45:59:d7:2a:58:44:5b:b7:9f:81:3b:92:68:3d:e2:37:24: + f5:7b:6c:8f:76:35:96:09:a8:59:9d:b9:ce:23:ab:74:d6:83: + fd:32:73:27:d8:69:3e:43:74:f6:ae:c5:89:9a:e7:53:7c:e9: + 7b:f6:4b:f3:c1:65:83:de:8d:8a:9c:3c:88:8d:39:59:fc:aa: + 3f:22:8d:a1:c1:66:50:81:72:4c:ed:22:64:4f:4f:ca:80:91: + b6:29 +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJ +BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh +c3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy +MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp +emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X +DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw +FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMg +UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo +YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 +MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB +AQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDM +HO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtK +qsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwID +AQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwj +cSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0y +cyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRP +T8qAkbYp +-----END CERTIFICATE----- + +GlobalSign Root CA +================== + +MD5 Fingerprint=AB:BF:EA:E3:6B:29:A6:CC:A6:78:35:99:EF:AD:2B:80 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 02:00:00:00:00:00:d6:78:b7:94:05 + Signature Algorithm: md5WithRSAEncryption + Issuer: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA + Validity + Not Before: Sep 1 12:00:00 1998 GMT + Not After : Jan 28 12:00:00 2014 GMT + Subject: C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:da:0e:e6:99:8d:ce:a3:e3:4f:8a:7e:fb:f1:8b: + 83:25:6b:ea:48:1f:f1:2a:b0:b9:95:11:04:bd:f0: + 63:d1:e2:67:66:cf:1c:dd:cf:1b:48:2b:ee:8d:89: + 8e:9a:af:29:80:65:ab:e9:c7:2d:12:cb:ab:1c:4c: + 70:07:a1:3d:0a:30:cd:15:8d:4f:f8:dd:d4:8c:50: + 15:1c:ef:50:ee:c4:2e:f7:fc:e9:52:f2:91:7d:e0: + 6d:d5:35:30:8e:5e:43:73:f2:41:e9:d5:6a:e3:b2: + 89:3a:56:39:38:6f:06:3c:88:69:5b:2a:4d:c5:a7: + 54:b8:6c:89:cc:9b:f9:3c:ca:e5:fd:89:f5:12:3c: + 92:78:96:d6:dc:74:6e:93:44:61:d1:8d:c7:46:b2: + 75:0e:86:e8:19:8a:d5:6d:6c:d5:78:16:95:a2:e9: + c8:0a:38:eb:f2:24:13:4f:73:54:93:13:85:3a:1b: + bc:1e:34:b5:8b:05:8c:b9:77:8b:b1:db:1f:20:91: + ab:09:53:6e:90:ce:7b:37:74:b9:70:47:91:22:51: + 63:16:79:ae:b1:ae:41:26:08:c8:19:2b:d1:46:aa: + 48:d6:64:2a:d7:83:34:ff:2c:2a:c1:6c:19:43:4a: + 07:85:e7:d3:7c:f6:21:68:ef:ea:f2:52:9f:7f:93: + 90:cf + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 60:7B:66:1A:45:0D:97:CA:89:50:2F:7D:04:CD:34:A8:FF:FC:FD:4B + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + ae:aa:9f:fc:b7:d2:cb:1f:5f:39:29:28:18:9e:34:c9:6c:4f: + 6f:1a:f0:64:a2:70:4a:4f:13:86:9b:60:28:9e:e8:81:49:98: + 7d:0a:bb:e5:b0:9d:3d:36:db:8f:05:51:ff:09:31:2a:1f:dd: + 89:77:9e:0f:2e:6c:95:04:ed:86:cb:b4:00:3f:84:02:4d:80: + 6a:2a:2d:78:0b:ae:6f:2b:a2:83:44:83:1f:cd:50:82:4c:24: + af:bd:f7:a5:b4:c8:5a:0f:f4:e7:47:5e:49:8e:37:96:fe:9a: + 88:05:3a:d9:c0:db:29:87:e6:19:96:47:a7:3a:a6:8c:8b:3c: + 77:fe:46:63:a7:53:da:21:d1:ac:7e:49:a2:4b:e6:c3:67:59: + 2f:b3:8a:0e:bb:2c:bd:a9:aa:42:7c:35:c1:d8:7f:d5:a7:31: + 3a:4e:63:43:39:af:08:b0:61:34:8c:d3:98:a9:43:34:f6:0f: + 87:29:3b:9d:c2:56:58:98:77:c3:f7:1b:ac:f6:9d:f8:3e:aa: + a7:54:45:f0:f5:f9:d5:31:65:fe:6b:58:9c:71:b3:1e:d7:52: + ea:32:17:fc:40:60:1d:c9:79:24:b2:f6:6c:fd:a8:66:0e:82: + dd:98:cb:da:c2:44:4f:2e:a0:7b:f2:f7:6b:2c:76:11:84:46: + 8a:78:a3:e3 +-----BEGIN CERTIFICATE----- +MIIDdTCCAl2gAwIBAgILAgAAAAAA1ni3lAUwDQYJKoZIhvcNAQEEBQAwVzELMAkG +A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv +b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw +MDBaFw0xNDAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i +YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT +aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ +jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp +xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp +1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG +snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ +U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8 +9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIABjAdBgNVHQ4EFgQU +YHtmGkUNl8qJUC99BM00qP/8/UswDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B +AQQFAAOCAQEArqqf/LfSyx9fOSkoGJ40yWxPbxrwZKJwSk8ThptgKJ7ogUmYfQq7 +5bCdPTbbjwVR/wkxKh/diXeeDy5slQTthsu0AD+EAk2AaioteAuubyuig0SDH81Q +gkwkr733pbTIWg/050deSY43lv6aiAU62cDbKYfmGZZHpzqmjIs8d/5GY6dT2iHR +rH5Jokvmw2dZL7OKDrssvamqQnw1wdh/1acxOk5jQzmvCLBhNIzTmKlDNPYPhyk7 +ncJWWJh3w/cbrPad+D6qp1RF8PX51TFl/mtYnHGzHtdS6jIX/EBgHcl5JLL2bP2o +Zg6C3ZjL2sJETy6ge/L3ayx2EYRGinij4w== +-----END CERTIFICATE----- + +ValiCert Class 1 VA +=================== + +MD5 Fingerprint=65:58:AB:15:AD:57:6C:1E:A8:A7:B5:69:AC:BF:FF:EB +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//emailAddress=info@valicert.com + Validity + Not Before: Jun 25 22:23:48 1999 GMT + Not After : Jun 25 22:23:48 2019 GMT + Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1 Policy Validation Authority, CN=http://www.valicert.com//emailAddress=info@valicert.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d8:59:82:7a:89:b8:96:ba:a6:2f:68:6f:58:2e: + a7:54:1c:06:6e:f4:ea:8d:48:bc:31:94:17:f0:f3: + 4e:bc:b2:b8:35:92:76:b0:d0:a5:a5:01:d7:00:03: + 12:22:19:08:f8:ff:11:23:9b:ce:07:f5:bf:69:1a: + 26:fe:4e:e9:d1:7f:9d:2c:40:1d:59:68:6e:a6:f8: + 58:b0:9d:1a:8f:d3:3f:f1:dc:19:06:81:a8:0e:e0: + 3a:dd:c8:53:45:09:06:e6:0f:70:c3:fa:40:a6:0e: + e2:56:05:0f:18:4d:fc:20:82:d1:73:55:74:8d:76: + 72:a0:1d:9d:1d:c0:dd:3f:71 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 50:68:3d:49:f4:2c:1c:06:94:df:95:60:7f:96:7b:17:fe:4f: + 71:ad:64:c8:dd:77:d2:ef:59:55:e8:3f:e8:8e:05:2a:21:f2: + 07:d2:b5:a7:52:fe:9c:b1:b6:e2:5b:77:17:40:ea:72:d6:23: + cb:28:81:32:c3:00:79:18:ec:59:17:89:c9:c6:6a:1e:71:c9: + fd:b7:74:a5:25:45:69:c5:48:ab:19:e1:45:8a:25:6b:19:ee: + e5:bb:12:f5:7f:f7:a6:8d:51:c3:f0:9d:74:b7:a9:3e:a0:a5: + ff:b6:49:03:13:da:22:cc:ed:71:82:2b:99:cf:3a:b7:f5:2d: + 72:c8 +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0 +IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz +BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y +aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG +9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy +NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y +azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw +Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl +cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y +LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+ +TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y +TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0 +LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW +I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw +nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI +-----END CERTIFICATE----- + +ValiCert Class 2 VA +=================== + +MD5 Fingerprint=A9:23:75:9B:BA:49:36:6E:31:C2:DB:F2:E7:66:BA:87 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//emailAddress=info@valicert.com + Validity + Not Before: Jun 26 00:19:54 1999 GMT + Not After : Jun 26 00:19:54 2019 GMT + Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2 Policy Validation Authority, CN=http://www.valicert.com//emailAddress=info@valicert.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:ce:3a:71:ca:e5:ab:c8:59:92:55:d7:ab:d8:74: + 0e:f9:ee:d9:f6:55:47:59:65:47:0e:05:55:dc:eb: + 98:36:3c:5c:53:5d:d3:30:cf:38:ec:bd:41:89:ed: + 25:42:09:24:6b:0a:5e:b3:7c:dd:52:2d:4c:e6:d4: + d6:7d:5a:59:a9:65:d4:49:13:2d:24:4d:1c:50:6f: + b5:c1:85:54:3b:fe:71:e4:d3:5c:42:f9:80:e0:91: + 1a:0a:5b:39:36:67:f3:3f:55:7c:1b:3f:b4:5f:64: + 73:34:e3:b4:12:bf:87:64:f8:da:12:ff:37:27:c1: + b3:43:bb:ef:7b:6e:2e:69:f7 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 3b:7f:50:6f:6f:50:94:99:49:62:38:38:1f:4b:f8:a5:c8:3e: + a7:82:81:f6:2b:c7:e8:c5:ce:e8:3a:10:82:cb:18:00:8e:4d: + bd:a8:58:7f:a1:79:00:b5:bb:e9:8d:af:41:d9:0f:34:ee:21: + 81:19:a0:32:49:28:f4:c4:8e:56:d5:52:33:fd:50:d5:7e:99: + 6c:03:e4:c9:4c:fc:cb:6c:ab:66:b3:4a:21:8c:e5:b5:0c:32: + 3e:10:b2:cc:6c:a1:dc:9a:98:4c:02:5b:f3:ce:b9:9e:a5:72: + 0e:4a:b7:3f:3c:e6:16:68:f8:be:ed:74:4c:bc:5b:d5:62:1f: + 43:dd +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0 +IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz +BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y +aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG +9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy +NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y +azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw +Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl +cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY +dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9 +WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS +v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v +UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu +IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC +W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd +-----END CERTIFICATE----- + +RSA Root Certificate 1 +====================== + +MD5 Fingerprint=A2:6F:53:B7:EE:40:DB:4A:68:E7:FA:18:D9:10:4B:72 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//emailAddress=info@valicert.com + Validity + Not Before: Jun 26 00:22:33 1999 GMT + Not After : Jun 26 00:22:33 2019 GMT + Subject: L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3 Policy Validation Authority, CN=http://www.valicert.com//emailAddress=info@valicert.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:e3:98:51:96:1c:e8:d5:b1:06:81:6a:57:c3:72: + 75:93:ab:cf:9e:a6:fc:f3:16:52:d6:2d:4d:9f:35: + 44:a8:2e:04:4d:07:49:8a:38:29:f5:77:37:e7:b7: + ab:5d:df:36:71:14:99:8f:dc:c2:92:f1:e7:60:92: + 97:ec:d8:48:dc:bf:c1:02:20:c6:24:a4:28:4c:30: + 5a:76:6d:b1:5c:f3:dd:de:9e:10:71:a1:88:c7:5b: + 9b:41:6d:ca:b0:b8:8e:15:ee:ad:33:2b:cf:47:04: + 5c:75:71:0a:98:24:98:29:a7:49:59:a5:dd:f8:b7: + 43:62:61:f3:d3:e2:d0:55:3f + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 56:bb:02:58:84:67:08:2c:df:1f:db:7b:49:33:f5:d3:67:9d: + f4:b4:0a:10:b3:c9:c5:2c:e2:92:6a:71:78:27:f2:70:83:42: + d3:3e:cf:a9:54:f4:f1:d8:92:16:8c:d1:04:cb:4b:ab:c9:9f: + 45:ae:3c:8a:a9:b0:71:33:5d:c8:c5:57:df:af:a8:35:b3:7f: + 89:87:e9:e8:25:92:b8:7f:85:7a:ae:d6:bc:1e:37:58:2a:67: + c9:91:cf:2a:81:3e:ed:c6:39:df:c0:3e:19:9c:19:cc:13:4d: + 82:41:b5:8c:de:e0:3d:60:08:20:0f:45:7e:6b:a2:7f:a3:8c: + 15:ee +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0 +IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz +BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y +aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG +9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy +NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y +azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw +Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl +cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD +cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs +2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY +JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE +Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ +n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A +PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary Certification Authority - G3 +============================================================ + +MD5 Fingerprint=B1:47:BC:18:57:D1:18:A0:78:2D:EC:71:E8:2A:95:73 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3 + Validity + Not Before: Oct 1 00:00:00 1999 GMT + Not After : Jul 16 23:59:59 2036 GMT + Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 1 Public Primary Certification Authority - G3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:dd:84:d4:b9:b4:f9:a7:d8:f3:04:78:9c:de:3d: + dc:6c:13:16:d9:7a:dd:24:51:66:c0:c7:26:59:0d: + ac:06:08:c2:94:d1:33:1f:f0:83:35:1f:6e:1b:c8: + de:aa:6e:15:4e:54:27:ef:c4:6d:1a:ec:0b:e3:0e: + f0:44:a5:57:c7:40:58:1e:a3:47:1f:71:ec:60:f6: + 6d:94:c8:18:39:ed:fe:42:18:56:df:e4:4c:49:10: + 78:4e:01:76:35:63:12:36:dd:66:bc:01:04:36:a3: + 55:68:d5:a2:36:09:ac:ab:21:26:54:06:ad:3f:ca: + 14:e0:ac:ca:ad:06:1d:95:e2:f8:9d:f1:e0:60:ff: + c2:7f:75:2b:4c:cc:da:fe:87:99:21:ea:ba:fe:3e: + 54:d7:d2:59:78:db:3c:6e:cf:a0:13:00:1a:b8:27: + a1:e4:be:67:96:ca:a0:c5:b3:9c:dd:c9:75:9e:eb: + 30:9a:5f:a3:cd:d9:ae:78:19:3f:23:e9:5c:db:29: + bd:ad:55:c8:1b:54:8c:63:f6:e8:a6:ea:c7:37:12: + 5c:a3:29:1e:02:d9:db:1f:3b:b4:d7:0f:56:47:81: + 15:04:4a:af:83:27:d1:c5:58:88:c1:dd:f6:aa:a7: + a3:18:da:68:aa:6d:11:51:e1:bf:65:6b:9f:96:76: + d1:3d + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + ab:66:8d:d7:b3:ba:c7:9a:b6:e6:55:d0:05:f1:9f:31:8d:5a: + aa:d9:aa:46:26:0f:71:ed:a5:ad:53:56:62:01:47:2a:44:e9: + fe:3f:74:0b:13:9b:b9:f4:4d:1b:b2:d1:5f:b2:b6:d2:88:5c: + b3:9f:cd:cb:d4:a7:d9:60:95:84:3a:f8:c1:37:1d:61:ca:e7: + b0:c5:e5:91:da:54:a6:ac:31:81:ae:97:de:cd:08:ac:b8:c0: + 97:80:7f:6e:72:a4:e7:69:13:95:65:1f:c4:93:3c:fd:79:8f: + 04:d4:3e:4f:ea:f7:9e:ce:cd:67:7c:4f:65:02:ff:91:85:54: + 73:c7:ff:36:f7:86:2d:ec:d0:5e:4f:ff:11:9f:72:06:d6:b8: + 1a:f1:4c:0d:26:65:e2:44:80:1e:c7:9f:e3:dd:e8:0a:da:ec: + a5:20:80:69:68:a1:4f:7e:e1:6b:cf:07:41:fa:83:8e:bc:38: + dd:b0:2e:11:b1:6b:b2:42:cc:9a:bc:f9:48:22:79:4a:19:0f: + b2:1c:3e:20:74:d9:6a:c3:be:f2:28:78:13:56:79:4f:6d:50: + ea:1b:b0:b5:57:b1:37:66:58:23:f3:dc:0f:df:0a:87:c4:ef: + 86:05:d5:38:14:60:99:a3:4b:de:06:96:71:2c:f2:db:b6:1f: + a4:ef:3f:ee +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl +cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu +LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT +aWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD +VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT +aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ +bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu +IENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg +LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4 +nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO +8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV +ojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb +PG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2 +6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr +n5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a +qtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4 +wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3 +ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs +pSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4 +E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g== +-----END CERTIFICATE----- + +Verisign Class 2 Public Primary Certification Authority - G3 +============================================================ + +MD5 Fingerprint=F8:BE:C4:63:22:C9:A8:46:74:8B:B8:1D:1E:4A:2B:F6 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 61:70:cb:49:8c:5f:98:45:29:e7:b0:a6:d9:50:5b:7a + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3 + Validity + Not Before: Oct 1 00:00:00 1999 GMT + Not After : Jul 16 23:59:59 2036 GMT + Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 2 Public Primary Certification Authority - G3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:af:0a:0d:c2:d5:2c:db:67:b9:2d:e5:94:27:dd: + a5:be:e0:b0:4d:8f:b3:61:56:3c:d6:7c:c3:f4:cd: + 3e:86:cb:a2:88:e2:e1:d8:a4:69:c5:b5:e2:bf:c1: + a6:47:50:5e:46:39:8b:d5:96:ba:b5:6f:14:bf:10: + ce:27:13:9e:05:47:9b:31:7a:13:d8:1f:d9:d3:02: + 37:8b:ad:2c:47:f0:8e:81:06:a7:0d:30:0c:eb:f7: + 3c:0f:20:1d:dc:72:46:ee:a5:02:c8:5b:c3:c9:56: + 69:4c:c5:18:c1:91:7b:0b:d5:13:00:9b:bc:ef:c3: + 48:3e:46:60:20:85:2a:d5:90:b6:cd:8b:a0:cc:32: + dd:b7:fd:40:55:b2:50:1c:56:ae:cc:8d:77:4d:c7: + 20:4d:a7:31:76:ef:68:92:8a:90:1e:08:81:56:b2: + ad:69:a3:52:d0:cb:1c:c4:23:3d:1f:99:fe:4c:e8: + 16:63:8e:c6:08:8e:f6:31:f6:d2:fa:e5:76:dd:b5: + 1c:92:a3:49:cd:cd:01:cd:68:cd:a9:69:ba:a3:eb: + 1d:0d:9c:a4:20:a6:c1:a0:c5:d1:46:4c:17:6d:d2: + ac:66:3f:96:8c:e0:84:d4:36:ff:22:59:c5:f9:11: + 60:a8:5f:04:7d:f2:1a:f6:25:42:61:0f:c4:4a:b8: + 3e:89 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 34:26:15:3c:c0:8d:4d:43:49:1d:bd:e9:21:92:d7:66:9c:b7: + de:c5:b8:d0:e4:5d:5f:76:22:c0:26:f9:84:3a:3a:f9:8c:b5: + fb:ec:60:f1:e8:ce:04:b0:c8:dd:a7:03:8f:30:f3:98:df:a4: + e6:a4:31:df:d3:1c:0b:46:dc:72:20:3f:ae:ee:05:3c:a4:33: + 3f:0b:39:ac:70:78:73:4b:99:2b:df:30:c2:54:b0:a8:3b:55: + a1:fe:16:28:cd:42:bd:74:6e:80:db:27:44:a7:ce:44:5d:d4: + 1b:90:98:0d:1e:42:94:b1:00:2c:04:d0:74:a3:02:05:22:63: + 63:cd:83:b5:fb:c1:6d:62:6b:69:75:fd:5d:70:41:b9:f5:bf: + 7c:df:be:c1:32:73:22:21:8b:58:81:7b:15:91:7a:ba:e3:64: + 48:b0:7f:fb:36:25:da:95:d0:f1:24:14:17:dd:18:80:6b:46: + 23:39:54:f5:8e:62:09:04:1d:94:90:a6:9b:e6:25:e2:42:45: + aa:b8:90:ad:be:08:8f:a9:0b:42:18:94:cf:72:39:e1:b1:43: + e0:28:cf:b7:e7:5a:6c:13:6b:49:b3:ff:e3:18:7c:89:8b:33: + 5d:ac:33:d7:a7:f9:da:3a:55:c9:58:10:f9:aa:ef:5a:b6:cf: + 4b:4b:df:2a +-----BEGIN CERTIFICATE----- +MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ +BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy +aVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s +IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp +Z24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 +eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV +BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp +Z24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu +Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g +Q2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt +IEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU +J92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO +JxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY +wZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o +koqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN +qWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E +Srg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe +xbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u +7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU +sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI +sH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP +cjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G3 +============================================================ + +MD5 Fingerprint=CD:68:B6:A7:C7:C4:CE:75:E0:1D:4F:57:44:61:92:09 +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + 9b:7e:06:49:a3:3e:62:b9:d5:ee:90:48:71:29:ef:57 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3 + Validity + Not Before: Oct 1 00:00:00 1999 GMT + Not After : Jul 16 23:59:59 2036 GMT + Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:cb:ba:9c:52:fc:78:1f:1a:1e:6f:1b:37:73:bd: + f8:c9:6b:94:12:30:4f:f0:36:47:f5:d0:91:0a:f5: + 17:c8:a5:61:c1:16:40:4d:fb:8a:61:90:e5:76:20: + c1:11:06:7d:ab:2c:6e:a6:f5:11:41:8e:fa:2d:ad: + 2a:61:59:a4:67:26:4c:d0:e8:bc:52:5b:70:20:04: + 58:d1:7a:c9:a4:69:bc:83:17:64:ad:05:8b:bc:d0: + 58:ce:8d:8c:f5:eb:f0:42:49:0b:9d:97:27:67:32: + 6e:e1:ae:93:15:1c:70:bc:20:4d:2f:18:de:92:88: + e8:6c:85:57:11:1a:e9:7e:e3:26:11:54:a2:45:96: + 55:83:ca:30:89:e8:dc:d8:a3:ed:2a:80:3f:7f:79: + 65:57:3e:15:20:66:08:2f:95:93:bf:aa:47:2f:a8: + 46:97:f0:12:e2:fe:c2:0a:2b:51:e6:76:e6:b7:46: + b7:e2:0d:a6:cc:a8:c3:4c:59:55:89:e6:e8:53:5c: + 1c:ea:9d:f0:62:16:0b:a7:c9:5f:0c:f0:de:c2:76: + ce:af:f7:6a:f2:fa:41:a6:a2:33:14:c9:e5:7a:63: + d3:9e:62:37:d5:85:65:9e:0e:e6:53:24:74:1b:5e: + 1d:12:53:5b:c7:2c:e7:83:49:3b:15:ae:8a:68:b9: + 57:97 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 11:14:96:c1:ab:92:08:f7:3f:2f:c9:b2:fe:e4:5a:9f:64:de: + db:21:4f:86:99:34:76:36:57:dd:d0:15:2f:c5:ad:7f:15:1f: + 37:62:73:3e:d4:e7:5f:ce:17:03:db:35:fa:2b:db:ae:60:09: + 5f:1e:5f:8f:6e:bb:0b:3d:ea:5a:13:1e:0c:60:6f:b5:c0:b5: + 23:22:2e:07:0b:cb:a9:74:cb:47:bb:1d:c1:d7:a5:6b:cc:2f: + d2:42:fd:49:dd:a7:89:cf:53:ba:da:00:5a:28:bf:82:df:f8: + ba:13:1d:50:86:82:fd:8e:30:8f:29:46:b0:1e:3d:35:da:38: + 62:16:18:4a:ad:e6:b6:51:6c:de:af:62:eb:01:d0:1e:24:fe: + 7a:8f:12:1a:12:68:b8:fb:66:99:14:14:45:5c:ae:e7:ae:69: + 17:81:2b:5a:37:c9:5e:2a:f4:c6:e2:a1:5c:54:9b:a6:54:00: + cf:f0:f1:c1:c7:98:30:1a:3b:36:16:db:a3:6e:ea:fd:ad:b2: + c2:da:ef:02:47:13:8a:c0:f1:b3:31:ad:4f:1c:e1:4f:9c:af: + 0f:0c:9d:f7:78:0d:d8:f4:35:56:80:da:b7:6d:17:8f:9d:1e: + 81:64:e1:fe:c5:45:ba:ad:6b:b9:0a:7a:4e:4f:4b:84:ee:4b: + f1:7d:dd:11 +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl +cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu +LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT +aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD +VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT +aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ +bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu +IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg +LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b +N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t +KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu +kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm +CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ +Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu +imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te +2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe +DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC +/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p +F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt +TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== +-----END CERTIFICATE----- + +Verisign Class 4 Public Primary Certification Authority - G3 +============================================================ + +MD5 Fingerprint=DB:C8:F2:27:2E:B1:EA:6A:29:23:5D:FE:56:3E:33:DF +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + ec:a0:a7:8b:6e:75:6a:01:cf:c4:7c:cc:2f:94:5e:d7 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3 + Validity + Not Before: Oct 1 00:00:00 1999 GMT + Not After : Jul 16 23:59:59 2036 GMT + Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary Certification Authority - G3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:ad:cb:a5:11:69:c6:59:ab:f1:8f:b5:19:0f:56: + ce:cc:b5:1f:20:e4:9e:26:25:4b:e0:73:65:89:59: + de:d0:83:e4:f5:0f:b5:bb:ad:f1:7c:e8:21:fc:e4: + e8:0c:ee:7c:45:22:19:76:92:b4:13:b7:20:5b:09: + fa:61:ae:a8:f2:a5:8d:85:c2:2a:d6:de:66:36:d2: + 9b:02:f4:a8:92:60:7c:9c:69:b4:8f:24:1e:d0:86: + 52:f6:32:9c:41:58:1e:22:bd:cd:45:62:95:08:6e: + d0:66:dd:53:a2:cc:f0:10:dc:54:73:8b:04:a1:46: + 33:33:5c:17:40:b9:9e:4d:d3:f3:be:55:83:e8:b1: + 89:8e:5a:7c:9a:96:22:90:3b:88:25:f2:d2:53:88: + 02:0c:0b:78:f2:e6:37:17:4b:30:46:07:e4:80:6d: + a6:d8:96:2e:e8:2c:f8:11:b3:38:0d:66:a6:9b:ea: + c9:23:5b:db:8e:e2:f3:13:8e:1a:59:2d:aa:02:f0: + ec:a4:87:66:dc:c1:3f:f5:d8:b9:f4:ec:82:c6:d2: + 3d:95:1d:e5:c0:4f:84:c9:d9:a3:44:28:06:6a:d7: + 45:ac:f0:6b:6a:ef:4e:5f:f8:11:82:1e:38:63:34: + 66:50:d4:3e:93:73:fa:30:c3:66:ad:ff:93:2d:97: + ef:03 + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + 8f:fa:25:6b:4f:5b:e4:a4:4e:27:55:ab:22:15:59:3c:ca:b5: + 0a:d4:4a:db:ab:dd:a1:5f:53:c5:a0:57:39:c2:ce:47:2b:be: + 3a:c8:56:bf:c2:d9:27:10:3a:b1:05:3c:c0:77:31:bb:3a:d3: + 05:7b:6d:9a:1c:30:8c:80:cb:93:93:2a:83:ab:05:51:82:02: + 00:11:67:6b:f3:88:61:47:5f:03:93:d5:5b:0d:e0:f1:d4:a1: + 32:35:85:b2:3a:db:b0:82:ab:d1:cb:0a:bc:4f:8c:5b:c5:4b: + 00:3b:1f:2a:82:a6:7e:36:85:dc:7e:3c:67:00:b5:e4:3b:52: + e0:a8:eb:5d:15:f9:c6:6d:f0:ad:1d:0e:85:b7:a9:9a:73:14: + 5a:5b:8f:41:28:c0:d5:e8:2d:4d:a4:5e:cd:aa:d9:ed:ce:dc: + d8:d5:3c:42:1d:17:c1:12:5d:45:38:c3:38:f3:fc:85:2e:83: + 46:48:b2:d7:20:5f:92:36:8f:e7:79:0f:98:5e:99:e8:f0:d0: + a4:bb:f5:53:bd:2a:ce:59:b0:af:6e:7f:6c:bb:d2:1e:00:b0: + 21:ed:f8:41:62:82:b9:d8:b2:c4:bb:46:50:f3:31:c5:8f:01: + a8:74:eb:f5:78:27:da:e7:f7:66:43:f3:9e:83:3e:20:aa:c3: + 35:60:91:ce +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl +cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu +LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT +aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD +VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT +aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ +bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu +IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg +LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1 +GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ ++mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd +U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm +NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY +ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ +ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1 +CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq +g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm +fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c +2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/ +bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== +-----END CERTIFICATE----- + +GTE CyberTrust Global Root +========================== + +MD5 Fingerprint=CA:3D:D3:68:F1:03:5C:D0:32:FA:B8:2B:59:E8:5A:DB +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 421 (0x1a5) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root + Validity + Not Before: Aug 13 00:29:00 1998 GMT + Not After : Aug 13 23:59:00 2018 GMT + Subject: C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE CyberTrust Global Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:95:0f:a0:b6:f0:50:9c:e8:7a:c7:88:cd:dd:17: + 0e:2e:b0:94:d0:1b:3d:0e:f6:94:c0:8a:94:c7:06: + c8:90:97:c8:b8:64:1a:7a:7e:6c:3c:53:e1:37:28: + 73:60:7f:b2:97:53:07:9f:53:f9:6d:58:94:d2:af: + 8d:6d:88:67:80:e6:ed:b2:95:cf:72:31:ca:a5:1c: + 72:ba:5c:02:e7:64:42:e7:f9:a9:2c:d6:3a:0d:ac: + 8d:42:aa:24:01:39:e6:9c:3f:01:85:57:0d:58:87: + 45:f8:d3:85:aa:93:69:26:85:70:48:80:3f:12:15: + c7:79:b4:1f:05:2f:3b:62:99 + Exponent: 65537 (0x10001) + Signature Algorithm: md5WithRSAEncryption + 6d:eb:1b:09:e9:5e:d9:51:db:67:22:61:a4:2a:3c:48:77:e3: + a0:7c:a6:de:73:a2:14:03:85:3d:fb:ab:0e:30:c5:83:16:33: + 81:13:08:9e:7b:34:4e:df:40:c8:74:d7:b9:7d:dc:f4:76:55: + 7d:9b:63:54:18:e9:f0:ea:f3:5c:b1:d9:8b:42:1e:b9:c0:95: + 4e:ba:fa:d5:e2:7c:f5:68:61:bf:8e:ec:05:97:5f:5b:b0:d7: + a3:85:34:c4:24:a7:0d:0f:95:93:ef:cb:94:d8:9e:1f:9d:5c: + 85:6d:c7:aa:ae:4f:1f:22:b5:cd:95:ad:ba:a7:cc:f9:ab:0b: + 7a:7f +-----BEGIN CERTIFICATE----- +MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD +VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv +bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv +b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV +UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU +cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds +b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH +iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS +r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4 +04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r +GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9 +3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P +lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ +-----END CERTIFICATE----- + +Entrust.net Secure Server CA +============================ + +MD5 Fingerprint=DF:F2:80:73:CC:F1:E6:61:73:FC:F5:42:E9:C5:7C:EE +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 927650371 (0x374ad243) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority + Validity + Not Before: May 25 16:09:40 1999 GMT + Not After : May 25 16:39:40 2019 GMT + Subject: C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:cd:28:83:34:54:1b:89:f3:0f:af:37:91:31:ff: + af:31:60:c9:a8:e8:b2:10:68:ed:9f:e7:93:36:f1: + 0a:64:bb:47:f5:04:17:3f:23:47:4d:c5:27:19:81: + 26:0c:54:72:0d:88:2d:d9:1f:9a:12:9f:bc:b3:71: + d3:80:19:3f:47:66:7b:8c:35:28:d2:b9:0a:df:24: + da:9c:d6:50:79:81:7a:5a:d3:37:f7:c2:4a:d8:29: + 92:26:64:d1:e4:98:6c:3a:00:8a:f5:34:9b:65:f8: + ed:e3:10:ff:fd:b8:49:58:dc:a0:de:82:39:6b:81: + b1:16:19:61:b9:54:b6:e6:43 + Exponent: 3 (0x3) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority/CN=CRL1 + URI:http://www.entrust.net/CRL/net1.crl + + X509v3 Private Key Usage Period: + Not Before: May 25 16:09:40 1999 GMT, Not After: May 25 16:09:40 2019 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A + + X509v3 Subject Key Identifier: + F0:17:62:13:55:3D:B3:FF:0A:00:6B:FB:50:84:97:F3:ED:62:D0:1A + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0 +..V4.0.... + Signature Algorithm: sha1WithRSAEncryption + 90:dc:30:02:fa:64:74:c2:a7:0a:a5:7c:21:8d:34:17:a8:fb: + 47:0e:ff:25:7c:8d:13:0a:fb:e4:98:b5:ef:8c:f8:c5:10:0d: + f7:92:be:f1:c3:d5:d5:95:6a:04:bb:2c:ce:26:36:65:c8:31: + c6:e7:ee:3f:e3:57:75:84:7a:11:ef:46:4f:18:f4:d3:98:bb: + a8:87:32:ba:72:f6:3c:e2:3d:9f:d7:1d:d9:c3:60:43:8c:58: + 0e:22:96:2f:62:a3:2c:1f:ba:ad:05:ef:ab:32:78:87:a0:54: + 73:19:b5:5c:05:f9:52:3e:6d:2d:45:0b:f7:0a:93:ea:ed:06: + f9:b2 +-----BEGIN CERTIFICATE----- +MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC +VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u +ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc +KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u +ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1 +MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE +ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j +b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF +bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg +U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA +A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/ +I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3 +wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC +AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb +oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5 +BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p +dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk +MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp +b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu +dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0 +MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi +E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa +MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI +hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN +95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd +2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= +-----END CERTIFICATE----- + +Entrust.net Secure Personal CA +============================== + +MD5 Fingerprint=0C:41:2F:13:5B:A0:54:F5:96:66:2D:7E:CD:0E:03:F4 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 939758062 (0x380391ee) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority + Validity + Not Before: Oct 12 19:24:30 1999 GMT + Not After : Oct 12 19:54:30 2019 GMT + Subject: C=US, O=Entrust.net, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Client Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:c8:3a:99:5e:31:17:df:ac:27:6f:90:7b:e4:19: + ff:45:a3:34:c2:db:c1:a8:4f:f0:68:ea:84:fd:9f: + 75:79:cf:c1:8a:51:94:af:c7:57:03:47:64:9e:ad: + 82:1b:5a:da:7f:37:78:47:bb:37:98:12:96:ce:c6: + 13:7d:ef:d2:0c:30:51:a9:39:9e:55:f8:fb:b1:e7: + 30:de:83:b2:ba:3e:f1:d5:89:3b:3b:85:ba:aa:74: + 2c:fe:3f:31:6e:af:91:95:6e:06:d4:07:4d:4b:2c: + 56:47:18:04:52:da:0e:10:93:bf:63:90:9b:e1:df: + 8c:e6:02:a4:e6:4f:5e:f7:8b + Exponent: 3 (0x3) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/C=US/O=Entrust.net/OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab./OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Client Certification Authority/CN=CRL1 + URI:http://www.entrust.net/CRL/Client1.crl + + X509v3 Private Key Usage Period: + Not Before: Oct 12 19:24:30 1999 GMT, Not After: Oct 12 19:24:30 2019 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C + + X509v3 Subject Key Identifier: + C4:FB:9C:29:7B:97:CD:4C:96:FC:EE:5B:B3:CA:99:74:8B:95:EA:4C + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0 +..V4.0.... + Signature Algorithm: md5WithRSAEncryption + 3f:ae:8a:f1:d7:66:03:05:9e:3e:fa:ea:1c:46:bb:a4:5b:8f: + 78:9a:12:48:99:f9:f4:35:de:0c:36:07:02:6b:10:3a:89:14: + 81:9c:31:a6:7c:b2:41:b2:6a:e7:07:01:a1:4b:f9:9f:25:3b: + 96:ca:99:c3:3e:a1:51:1c:f3:c3:2e:44:f7:b0:67:46:aa:92: + e5:3b:da:1c:19:14:38:30:d5:e2:a2:31:25:2e:f1:ec:45:38: + ed:f8:06:58:03:73:62:b0:10:31:8f:40:bf:64:e0:5c:3e:c5: + 4f:1f:da:12:43:ff:4c:e6:06:26:a8:9b:19:aa:44:3c:76:b2: + 5c:ec +-----BEGIN CERTIFICATE----- +MIIE7TCCBFagAwIBAgIEOAOR7jANBgkqhkiG9w0BAQQFADCByTELMAkGA1UEBhMC +VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MUgwRgYDVQQLFD93d3cuZW50cnVzdC5u +ZXQvQ2xpZW50X0NBX0luZm8vQ1BTIGluY29ycC4gYnkgcmVmLiBsaW1pdHMgbGlh +Yi4xJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV +BAMTKkVudHJ1c3QubmV0IENsaWVudCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe +Fw05OTEwMTIxOTI0MzBaFw0xOTEwMTIxOTU0MzBaMIHJMQswCQYDVQQGEwJVUzEU +MBIGA1UEChMLRW50cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9D +bGllbnRfQ0FfSW5mby9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjEl +MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMq +RW50cnVzdC5uZXQgQ2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0G +CSqGSIb3DQEBAQUAA4GLADCBhwKBgQDIOpleMRffrCdvkHvkGf9FozTC28GoT/Bo +6oT9n3V5z8GKUZSvx1cDR2SerYIbWtp/N3hHuzeYEpbOxhN979IMMFGpOZ5V+Pux +5zDeg7K6PvHViTs7hbqqdCz+PzFur5GVbgbUB01LLFZHGARS2g4Qk79jkJvh34zm +AqTmT173iwIBA6OCAeAwggHcMBEGCWCGSAGG+EIBAQQEAwIABzCCASIGA1UdHwSC +ARkwggEVMIHkoIHhoIHepIHbMIHYMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50 +cnVzdC5uZXQxSDBGBgNVBAsUP3d3dy5lbnRydXN0Lm5ldC9DbGllbnRfQ0FfSW5m +by9DUFMgaW5jb3JwLiBieSByZWYuIGxpbWl0cyBsaWFiLjElMCMGA1UECxMcKGMp +IDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5uZXQg +Q2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCyg +KqAohiZodHRwOi8vd3d3LmVudHJ1c3QubmV0L0NSTC9DbGllbnQxLmNybDArBgNV +HRAEJDAigA8xOTk5MTAxMjE5MjQzMFqBDzIwMTkxMDEyMTkyNDMwWjALBgNVHQ8E +BAMCAQYwHwYDVR0jBBgwFoAUxPucKXuXzUyW/O5bs8qZdIuV6kwwHQYDVR0OBBYE +FMT7nCl7l81MlvzuW7PKmXSLlepMMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA +BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEEBQADgYEAP66K8ddmAwWePvrqHEa7 +pFuPeJoSSJn59DXeDDYHAmsQOokUgZwxpnyyQbJq5wcBoUv5nyU7lsqZwz6hURzz +wy5E97BnRqqS5TvaHBkUODDV4qIxJS7x7EU47fgGWANzYrAQMY9Av2TgXD7FTx/a +EkP/TOYGJqibGapEPHayXOw= +-----END CERTIFICATE----- + +Entrust.net Premium 2048 Secure Server CA +========================================= + +MD5 Fingerprint=BA:21:EA:20:D6:DD:DB:8F:C1:57:8B:40:AD:A1:FC:FC +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 946059622 (0x3863b966) + Signature Algorithm: sha1WithRSAEncryption + Issuer: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048) + Validity + Not Before: Dec 24 17:50:51 1999 GMT + Not After : Dec 24 18:20:51 2019 GMT + Subject: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048) + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:ad:4d:4b:a9:12:86:b2:ea:a3:20:07:15:16:64: + 2a:2b:4b:d1:bf:0b:4a:4d:8e:ed:80:76:a5:67:b7: + 78:40:c0:73:42:c8:68:c0:db:53:2b:dd:5e:b8:76: + 98:35:93:8b:1a:9d:7c:13:3a:0e:1f:5b:b7:1e:cf: + e5:24:14:1e:b1:81:a9:8d:7d:b8:cc:6b:4b:03:f1: + 02:0c:dc:ab:a5:40:24:00:7f:74:94:a1:9d:08:29: + b3:88:0b:f5:87:77:9d:55:cd:e4:c3:7e:d7:6a:64: + ab:85:14:86:95:5b:97:32:50:6f:3d:c8:ba:66:0c: + e3:fc:bd:b8:49:c1:76:89:49:19:fd:c0:a8:bd:89: + a3:67:2f:c6:9f:bc:71:19:60:b8:2d:e9:2c:c9:90: + 76:66:7b:94:e2:af:78:d6:65:53:5d:3c:d6:9c:b2: + cf:29:03:f9:2f:a4:50:b2:d4:48:ce:05:32:55:8a: + fd:b2:64:4c:0e:e4:98:07:75:db:7f:df:b9:08:55: + 60:85:30:29:f9:7b:48:a4:69:86:e3:35:3f:1e:86: + 5d:7a:7a:15:bd:ef:00:8e:15:22:54:17:00:90:26: + 93:bc:0e:49:68:91:bf:f8:47:d3:9d:95:42:c1:0e: + 4d:df:6f:26:cf:c3:18:21:62:66:43:70:d6:d5:c0: + 07:e1 + Exponent: 65537 (0x10001) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Authority Key Identifier: + keyid:55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70 + + X509v3 Subject Key Identifier: + 55:E4:81:D1:11:80:BE:D8:89:B9:08:A3:31:F9:A1:24:09:16:B9:70 + 1.2.840.113533.7.65.0: + 0...V5.0:4.0.... + Signature Algorithm: sha1WithRSAEncryption + 59:47:ac:21:84:8a:17:c9:9c:89:53:1e:ba:80:85:1a:c6:3c: + 4e:3e:b1:9c:b6:7c:c6:92:5d:18:64:02:e3:d3:06:08:11:61: + 7c:63:e3:2b:9d:31:03:70:76:d2:a3:28:a0:f4:bb:9a:63:73: + ed:6d:e5:2a:db:ed:14:a9:2b:c6:36:11:d0:2b:eb:07:8b:a5: + da:9e:5c:19:9d:56:12:f5:54:29:c8:05:ed:b2:12:2a:8d:f4: + 03:1b:ff:e7:92:10:87:b0:3a:b5:c3:9d:05:37:12:a3:c7:f4: + 15:b9:d5:a4:39:16:9b:53:3a:23:91:f1:a8:82:a2:6a:88:68: + c1:79:02:22:bc:aa:a6:d6:ae:df:b0:14:5f:b8:87:d0:dd:7c: + 7f:7b:ff:af:1c:cf:e6:db:07:ad:5e:db:85:9d:d0:2b:0d:33: + db:04:d1:e6:49:40:13:2b:76:fb:3e:e9:9c:89:0f:15:ce:18: + b0:85:78:21:4f:6b:4f:0e:fa:36:67:cd:07:f2:ff:08:d0:e2: + de:d9:bf:2a:af:b8:87:86:21:3c:04:ca:b7:94:68:7f:cf:3c: + e9:98:d7:38:ff:ec:c0:d9:50:f0:2e:4b:58:ae:46:6f:d0:2e: + c3:60:da:72:55:72:bd:4c:45:9e:61:ba:bf:84:81:92:03:d1: + d2:69:7c:c5 +-----BEGIN CERTIFICATE----- +MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML +RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp +bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5 +IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy +MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3 +LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp +YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG +A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq +K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe +sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX +MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT +XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/ +HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH +4QIDAQABo3QwcjARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGA +vtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdERgL7YibkIozH5oSQJFrlwMB0G +CSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEA +WUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo +oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ +h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18 +f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN +B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy +vUxFnmG6v4SBkgPR0ml8xQ== +-----END CERTIFICATE----- + +Baltimore CyberTrust Root +========================= + +MD5 Fingerprint=AC:B6:94:A5:9C:17:E0:D7:91:52:9B:B1:97:06:A6:E4 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 33554617 (0x20000b9) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root + Validity + Not Before: May 12 18:46:00 2000 GMT + Not After : May 12 23:59:00 2025 GMT + Subject: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:a3:04:bb:22:ab:98:3d:57:e8:26:72:9a:b5:79: + d4:29:e2:e1:e8:95:80:b1:b0:e3:5b:8e:2b:29:9a: + 64:df:a1:5d:ed:b0:09:05:6d:db:28:2e:ce:62:a2: + 62:fe:b4:88:da:12:eb:38:eb:21:9d:c0:41:2b:01: + 52:7b:88:77:d3:1c:8f:c7:ba:b9:88:b5:6a:09:e7: + 73:e8:11:40:a7:d1:cc:ca:62:8d:2d:e5:8f:0b:a6: + 50:d2:a8:50:c3:28:ea:f5:ab:25:87:8a:9a:96:1c: + a9:67:b8:3f:0c:d5:f7:f9:52:13:2f:c2:1b:d5:70: + 70:f0:8f:c0:12:ca:06:cb:9a:e1:d9:ca:33:7a:77: + d6:f8:ec:b9:f1:68:44:42:48:13:d2:c0:c2:a4:ae: + 5e:60:fe:b6:a6:05:fc:b4:dd:07:59:02:d4:59:18: + 98:63:f5:a5:63:e0:90:0c:7d:5d:b2:06:7a:f3:85: + ea:eb:d4:03:ae:5e:84:3e:5f:ff:15:ed:69:bc:f9: + 39:36:72:75:cf:77:52:4d:f3:c9:90:2c:b9:3d:e5: + c9:23:53:3f:1f:24:98:21:5c:07:99:29:bd:c6:3a: + ec:e7:6e:86:3a:6b:97:74:63:33:bd:68:18:31:f0: + 78:8d:76:bf:fc:9e:8e:5d:2a:86:a7:4d:90:dc:27: + 1a:39 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + E5:9D:59:30:82:47:58:CC:AC:FA:08:54:36:86:7B:3A:B5:04:4D:F0 + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:3 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 85:0c:5d:8e:e4:6f:51:68:42:05:a0:dd:bb:4f:27:25:84:03: + bd:f7:64:fd:2d:d7:30:e3:a4:10:17:eb:da:29:29:b6:79:3f: + 76:f6:19:13:23:b8:10:0a:f9:58:a4:d4:61:70:bd:04:61:6a: + 12:8a:17:d5:0a:bd:c5:bc:30:7c:d6:e9:0c:25:8d:86:40:4f: + ec:cc:a3:7e:38:c6:37:11:4f:ed:dd:68:31:8e:4c:d2:b3:01: + 74:ee:be:75:5e:07:48:1a:7f:70:ff:16:5c:84:c0:79:85:b8: + 05:fd:7f:be:65:11:a3:0f:c0:02:b4:f8:52:37:39:04:d5:a9: + 31:7a:18:bf:a0:2a:f4:12:99:f7:a3:45:82:e3:3c:5e:f5:9d: + 9e:b5:c8:9e:7c:2e:c8:a4:9e:4e:08:14:4b:6d:fd:70:6d:6b: + 1a:63:bd:64:e6:1f:b7:ce:f0:f2:9f:2e:bb:1b:b7:f2:50:88: + 73:92:c2:e2:e3:16:8d:9a:32:02:ab:8e:18:dd:e9:10:11:ee: + 7e:35:ab:90:af:3e:30:94:7a:d0:33:3d:a7:65:0f:f5:fc:8e: + 9e:62:cf:47:44:2c:01:5d:bb:1d:b5:32:d2:47:d2:38:2e:d0: + fe:81:dc:32:6a:1e:b5:ee:3c:d5:fc:e7:81:1d:19:c3:24:42: + ea:63:39:a9 +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ +RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD +VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX +DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y +ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy +VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr +mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr +IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK +mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu +XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy +dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye +jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1 +BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3 +DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92 +9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx +jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0 +Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz +ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS +R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +Equifax Secure Global eBusiness CA +================================== + +MD5 Fingerprint=8F:5D:77:06:27:C4:98:3C:5B:93:78:E7:D7:7D:9B:CC +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=US, O=Equifax Secure Inc., CN=Equifax Secure Global eBusiness CA-1 + Validity + Not Before: Jun 21 04:00:00 1999 GMT + Not After : Jun 21 04:00:00 2020 GMT + Subject: C=US, O=Equifax Secure Inc., CN=Equifax Secure Global eBusiness CA-1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:ba:e7:17:90:02:65:b1:34:55:3c:49:c2:51:d5: + df:a7:d1:37:8f:d1:e7:81:73:41:52:60:9b:9d:a1: + 17:26:78:ad:c7:b1:e8:26:94:32:b5:de:33:8d:3a: + 2f:db:f2:9a:7a:5a:73:98:a3:5c:e9:fb:8a:73:1b: + 5c:e7:c3:bf:80:6c:cd:a9:f4:d6:2b:c0:f7:f9:99: + aa:63:a2:b1:47:02:0f:d4:e4:51:3a:12:3c:6c:8a: + 5a:54:84:70:db:c1:c5:90:cf:72:45:cb:a8:59:c0: + cd:33:9d:3f:a3:96:eb:85:33:21:1c:3e:1e:3e:60: + 6e:76:9c:67:85:c5:c8:c3:61 + Exponent: 65537 (0x10001) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + keyid:BE:A8:A0:74:72:50:6B:44:B7:C9:23:D8:FB:A8:FF:B3:57:6B:68:6C + + X509v3 Subject Key Identifier: + BE:A8:A0:74:72:50:6B:44:B7:C9:23:D8:FB:A8:FF:B3:57:6B:68:6C + Signature Algorithm: md5WithRSAEncryption + 30:e2:01:51:aa:c7:ea:5f:da:b9:d0:65:0f:30:d6:3e:da:0d: + 14:49:6e:91:93:27:14:31:ef:c4:f7:2d:45:f8:ec:c7:bf:a2: + 41:0d:23:b4:92:f9:19:00:67:bd:01:af:cd:e0:71:fc:5a:cf: + 64:c4:e0:96:98:d0:a3:40:e2:01:8a:ef:27:07:f1:65:01:8a: + 44:2d:06:65:75:52:c0:86:10:20:21:5f:6c:6b:0f:6c:ae:09: + 1c:af:f2:a2:18:34:c4:75:a4:73:1c:f1:8d:dc:ef:ad:f9:b3: + 76:b4:92:bf:dc:95:10:1e:be:cb:c8:3b:5a:84:60:19:56:94: + a9:55 +-----BEGIN CERTIFICATE----- +MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc +MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT +ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw +MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj +dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l +c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC +UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc +58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/ +o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH +MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr +aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA +A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA +Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv +8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV +-----END CERTIFICATE----- + +Equifax Secure eBusiness CA 1 +============================= + +MD5 Fingerprint=64:9C:EF:2E:44:FC:C6:8F:52:07:D0:51:73:8F:CB:3D +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 4 (0x4) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=US, O=Equifax Secure Inc., CN=Equifax Secure eBusiness CA-1 + Validity + Not Before: Jun 21 04:00:00 1999 GMT + Not After : Jun 21 04:00:00 2020 GMT + Subject: C=US, O=Equifax Secure Inc., CN=Equifax Secure eBusiness CA-1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:ce:2f:19:bc:17:b7:77:de:93:a9:5f:5a:0d:17: + 4f:34:1a:0c:98:f4:22:d9:59:d4:c4:68:46:f0:b4: + 35:c5:85:03:20:c6:af:45:a5:21:51:45:41:eb:16: + 58:36:32:6f:e2:50:62:64:f9:fd:51:9c:aa:24:d9: + f4:9d:83:2a:87:0a:21:d3:12:38:34:6c:8d:00:6e: + 5a:a0:d9:42:ee:1a:21:95:f9:52:4c:55:5a:c5:0f: + 38:4f:46:fa:6d:f8:2e:35:d6:1d:7c:eb:e2:f0:b0: + 75:80:c8:a9:13:ac:be:88:ef:3a:6e:ab:5f:2a:38: + 62:02:b0:12:7b:fe:8f:a6:03 + Exponent: 65537 (0x10001) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + keyid:4A:78:32:52:11:DB:59:16:36:5E:DF:C1:14:36:40:6A:47:7C:4C:A1 + + X509v3 Subject Key Identifier: + 4A:78:32:52:11:DB:59:16:36:5E:DF:C1:14:36:40:6A:47:7C:4C:A1 + Signature Algorithm: md5WithRSAEncryption + 75:5b:a8:9b:03:11:e6:e9:56:4c:cd:f9:a9:4c:c0:0d:9a:f3: + cc:65:69:e6:25:76:cc:59:b7:d6:54:c3:1d:cd:99:ac:19:dd: + b4:85:d5:e0:3d:fc:62:20:a7:84:4b:58:65:f1:e2:f9:95:21: + 3f:f5:d4:7e:58:1e:47:87:54:3e:58:a1:b5:b5:f8:2a:ef:71: + e7:bc:c3:f6:b1:49:46:e2:d7:a0:6b:e5:56:7a:9a:27:98:7c: + 46:62:14:e7:c9:fc:6e:03:12:79:80:38:1d:48:82:8d:fc:17: + fe:2a:96:2b:b5:62:a6:a6:3d:bd:7f:92:59:cd:5a:2a:82:b2: + 37:79 +-----BEGIN CERTIFICATE----- +MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc +MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT +ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw +MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j +LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ +KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo +RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu +WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw +Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD +AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK +eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM +zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+ +WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN +/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ== +-----END CERTIFICATE----- + +Equifax Secure eBusiness CA 2 +============================= + +MD5 Fingerprint=AA:BF:BF:64:97:DA:98:1D:6F:C6:08:3A:95:70:33:CA +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 930140085 (0x3770cfb5) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=Equifax Secure, OU=Equifax Secure eBusiness CA-2 + Validity + Not Before: Jun 23 12:14:45 1999 GMT + Not After : Jun 23 12:14:45 2019 GMT + Subject: C=US, O=Equifax Secure, OU=Equifax Secure eBusiness CA-2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:e4:39:39:93:1e:52:06:1b:28:36:f8:b2:a3:29: + c5:ed:8e:b2:11:bd:fe:eb:e7:b4:74:c2:8f:ff:05: + e7:d9:9d:06:bf:12:c8:3f:0e:f2:d6:d1:24:b2:11: + de:d1:73:09:8a:d4:b1:2c:98:09:0d:1e:50:46:b2: + 83:a6:45:8d:62:68:bb:85:1b:20:70:32:aa:40:cd: + a6:96:5f:c4:71:37:3f:04:f3:b7:41:24:39:07:1a: + 1e:2e:61:58:a0:12:0b:e5:a5:df:c5:ab:ea:37:71: + cc:1c:c8:37:3a:b9:97:52:a7:ac:c5:6a:24:94:4e: + 9c:7b:cf:c0:6a:d6:df:21:bd + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 CRL Distribution Points: + DirName:/C=US/O=Equifax Secure/OU=Equifax Secure eBusiness CA-2/CN=CRL1 + + X509v3 Private Key Usage Period: + Not After: Jun 23 12:14:45 2019 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:50:9E:0B:EA:AF:5E:B9:20:48:A6:50:6A:CB:FD:D8:20:7A:A7:82:76 + + X509v3 Subject Key Identifier: + 50:9E:0B:EA:AF:5E:B9:20:48:A6:50:6A:CB:FD:D8:20:7A:A7:82:76 + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0...V3.0c.... + Signature Algorithm: sha1WithRSAEncryption + 0c:86:82:ad:e8:4e:1a:f5:8e:89:27:e2:35:58:3d:29:b4:07: + 8f:36:50:95:bf:6e:c1:9e:eb:c4:90:b2:85:a8:bb:b7:42:e0: + 0f:07:39:df:fb:9e:90:b2:d1:c1:3e:53:9f:03:44:b0:7e:4b: + f4:6f:e4:7c:1f:e7:e2:b1:e4:b8:9a:ef:c3:bd:ce:de:0b:32: + 34:d9:de:28:ed:33:6b:c4:d4:d7:3d:12:58:ab:7d:09:2d:cb: + 70:f5:13:8a:94:a1:27:a4:d6:70:c5:6d:94:b5:c9:7d:9d:a0: + d2:c6:08:49:d9:66:9b:a6:d3:f4:0b:dc:c5:26:57:e1:91:30: + ea:cd +-----BEGIN CERTIFICATE----- +MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj +dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0 +NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD +VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B +AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G +vxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/ +BPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0C +AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEX +MBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJl +IGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkw +NjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBq +y/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQF +MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA +A4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy +0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1 +E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN +-----END CERTIFICATE----- + +Visa International Global Root 2 +================================ + +MD5 Fingerprint=35:48:95:36:4A:54:5A:72:96:8E:E0:64:CC:EF:2C:8C +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 798 (0x31e) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VISA, OU=Visa International Service Association, CN=GP Root 2 + Validity + Not Before: Aug 16 22:51:00 2000 GMT + Not After : Aug 15 23:59:00 2020 GMT + Subject: C=US, O=VISA, OU=Visa International Service Association, CN=GP Root 2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:a9:01:70:b5:aa:c4:40:f0:ab:6a:26:61:79:19: + 00:fc:bf:9b:37:59:0c:af:6f:64:1b:f8:da:95:94: + 24:69:33:11:70:ca:e3:56:74:a2:17:57:64:5c:20: + 06:e1:d6:ef:71:b7:3b:f7:ab:c1:69:d0:49:a4:b1: + 04:d7:f4:57:62:89:5c:b0:75:2d:17:24:69:e3:42: + 60:e4:ee:74:d6:ab:80:56:d8:88:28:e1:fb:6d:22: + fd:23:7c:46:73:4f:7e:54:73:1e:a8:2c:55:58:75: + b7:4c:f3:5a:45:a5:02:1a:fa:da:9d:c3:45:c3:22: + 5e:f3:8b:f1:60:29:d2:c7:5f:b4:0c:3a:51:83:ef: + 30:f8:d4:e7:c7:f2:fa:99:a3:22:50:be:f9:05:37: + a3:ad:ed:9a:c3:e6:ec:88:1b:b6:19:27:1b:38:8b: + 80:4d:ec:b9:c7:c5:89:cb:fc:1a:32:ed:23:f0:b5: + 01:58:f9:f6:8f:e0:85:a9:4c:09:72:39:12:db:b3: + f5:cf:4e:62:64:da:c6:19:15:3a:63:1d:e9:17:55: + a1:4c:22:3c:34:32:46:f8:65:57:ba:2b:ef:36:8c: + 6a:fa:d9:d9:44:f4:aa:dd:84:d7:0d:1c:b2:54:ac: + 32:85:b4:64:0d:de:41:bb:b1:34:c6:01:86:32:64: + d5:9f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 9E:7D:4B:34:BF:71:AD:C2:05:F6:03:75:80:CE:A9:4F:1A:C4:24:4C + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 21:a5:76:14:55:f9:ad:27:70:8f:3c:f4:d5:6c:c8:cc:0a:ab: + a3:98:0b:8a:06:23:c5:c9:61:db:99:07:69:35:26:31:fe:c7: + 2e:84:c2:99:61:d4:0d:e9:7d:2e:13:2b:7c:8e:85:b6:85:c7: + 4b:cf:35:b6:2c:47:3d:ce:29:2f:d8:6f:9f:89:1c:64:93:bf: + 08:bd:76:d0:90:8a:94:b3:7f:28:5b:6e:ac:4d:33:2c:ed:65: + dc:16:cc:e2:cd:ae:a4:3d:62:92:06:95:26:bf:df:b9:e4:20: + a6:73:6a:c1:be:f7:94:44:d6:4d:6f:2a:0b:6b:18:4d:74:10: + 36:68:6a:5a:c1:6a:a7:dd:36:29:8c:b8:30:8b:4f:21:3f:00: + 2e:54:30:07:3a:ba:8a:e4:c3:9e:ca:d8:b5:d8:7b:ce:75:45: + 66:07:f4:6d:2d:d8:7a:ca:e9:89:8a:f2:23:d8:2f:cb:6e:00: + 36:4f:fb:f0:2f:01:cc:0f:c0:22:65:f4:ab:e2:4e:61:2d:03: + 82:7d:91:16:b5:30:d5:14:de:5e:c7:90:fc:a1:fc:ab:10:af: + 5c:6b:70:a7:07:ef:29:86:e8:b2:25:c7:20:ff:26:dd:77:ef: + 79:44:14:c4:bd:dd:3b:c5:03:9b:77:23:ec:a0:ec:bb:5a:39: + b5:cc:ad:06 +-----BEGIN CERTIFICATE----- +MIIDgDCCAmigAwIBAgICAx4wDQYJKoZIhvcNAQEFBQAwYTELMAkGA1UEBhMCVVMx +DTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgSW50ZXJuYXRpb25hbCBTZXJ2 +aWNlIEFzc29jaWF0aW9uMRIwEAYDVQQDEwlHUCBSb290IDIwHhcNMDAwODE2MjI1 +MTAwWhcNMjAwODE1MjM1OTAwWjBhMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklT +QTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRp +b24xEjAQBgNVBAMTCUdQIFJvb3QgMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAKkBcLWqxEDwq2omYXkZAPy/mzdZDK9vZBv42pWUJGkzEXDK41Z0ohdX +ZFwgBuHW73G3O/erwWnQSaSxBNf0V2KJXLB1LRckaeNCYOTudNargFbYiCjh+20i +/SN8RnNPflRzHqgsVVh1t0zzWkWlAhr62p3DRcMiXvOL8WAp0sdftAw6UYPvMPjU +58fy+pmjIlC++QU3o63tmsPm7IgbthknGziLgE3sucfFicv8GjLtI/C1AVj59o/g +halMCXI5Etuz9c9OYmTaxhkVOmMd6RdVoUwiPDQyRvhlV7or7zaMavrZ2UT0qt2E +1w0cslSsMoW0ZA3eQbuxNMYBhjJk1Z8CAwEAAaNCMEAwHQYDVR0OBBYEFJ59SzS/ +ca3CBfYDdYDOqU8axCRMMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG +MA0GCSqGSIb3DQEBBQUAA4IBAQAhpXYUVfmtJ3CPPPTVbMjMCqujmAuKBiPFyWHb +mQdpNSYx/scuhMKZYdQN6X0uEyt8joW2hcdLzzW2LEc9zikv2G+fiRxkk78IvXbQ +kIqUs38oW26sTTMs7WXcFsziza6kPWKSBpUmv9+55CCmc2rBvveURNZNbyoLaxhN +dBA2aGpawWqn3TYpjLgwi08hPwAuVDAHOrqK5MOeyti12HvOdUVmB/RtLdh6yumJ +ivIj2C/LbgA2T/vwLwHMD8AiZfSr4k5hLQOCfZEWtTDVFN5ex5D8ofyrEK9ca3Cn +B+8phuiyJccg/ybdd+95RBTEvd07xQObdyPsoOy7Wjm1zK0G +-----END CERTIFICATE----- + +beTRUSTed Root CA +================= + +MD5 Fingerprint=85:CA:76:5A:1B:D1:68:22:DC:A2:23:12:CA:C6:80:34 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 961510791 (0x394f7d87) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=WW, O=beTRUSTed, CN=beTRUSTed Root CAs, CN=beTRUSTed Root CA + Validity + Not Before: Jun 20 14:21:04 2000 GMT + Not After : Jun 20 13:21:04 2010 GMT + Subject: C=WW, O=beTRUSTed, CN=beTRUSTed Root CAs, CN=beTRUSTed Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:d4:b4:73:7a:13:0a:38:55:01:be:89:56:e1:94: + 9e:d4:be:5a:eb:4a:34:75:1b:61:29:c4:e1:ad:08: + 60:21:78:48:ff:b4:d0:fa:5e:41:8d:61:44:87:e8: + ed:c9:58:fa:fc:93:9a:df:4f:ea:3e:35:7d:f8:33: + 7a:e6:f1:d7:cd:6f:49:4b:3d:4f:2d:6e:0e:83:3a: + 18:78:77:a3:cf:e7:f4:4d:73:d8:9a:3b:1a:1d:be: + 95:53:cf:20:97:c2:cf:3e:24:52:6c:0c:8e:65:59: + c5:71:ff:62:09:8f:aa:c5:8f:cc:60:a0:73:4a:d7: + 38:3f:15:72:bf:a2:97:b7:70:e8:af:e2:7e:16:06: + 4c:f5:aa:64:26:72:07:25:ad:35:fc:18:b1:26:d7: + d8:ff:19:0e:83:1b:8c:dc:78:45:67:34:3d:f4:af: + 1c:8d:e4:6d:6b:ed:20:b3:67:9a:b4:61:cb:17:6f: + 89:35:ff:e7:4e:c0:32:12:e7:ee:ec:df:ff:97:30: + 74:ed:8d:47:8e:eb:b4:c3:44:e6:a7:4c:7f:56:43: + e8:b8:bc:b6:be:fa:83:97:e6:bb:fb:c4:b6:93:be: + 19:18:3e:8c:81:b9:73:88:16:f4:96:43:9c:67:73: + 17:90:d8:09:6e:63:ac:4a:b6:23:c4:01:a1:ad:a4: + e4:c5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.6334.1.0.0 + User Notice: + Explicit Text: Reliance on this certificate by any party assumes acceptance of the then applicable standard terms and conditions of use, and certification practice statement, which can be found at beTRUSTed's web site, https://www.beTRUSTed.com/vault/terms + CPS: https://www.beTRUSTed.com/vault/terms + + X509v3 CRL Distribution Points: + DirName:/O=beTRUSTed/C=WW + + X509v3 Subject Key Identifier: + 2A:B9:9B:69:2E:3B:9B:D8:CD:DE:2A:31:04:34:6B:CA:07:18:AB:67 + X509v3 Authority Key Identifier: + keyid:2A:B9:9B:69:2E:3B:9B:D8:CD:DE:2A:31:04:34:6B:CA:07:18:AB:67 + + X509v3 Key Usage: critical + Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement, Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 79:61:db:a3:5e:6e:16:b1:ea:76:51:f9:cb:15:9b:cb:69:be: + e6:81:6b:9f:28:1f:65:3e:dd:11:85:92:d4:e8:41:bf:7e:33: + bd:23:e7:f1:20:bf:a4:b4:a6:19:01:c6:8c:8d:35:7c:65:a4: + 4f:09:a4:d6:d8:23:15:05:13:a7:43:79:af:db:a3:0e:9b:7b: + 78:1a:f3:04:86:5a:c6:f6:8c:20:47:38:49:50:06:9d:72:67: + 3a:f0:98:03:ad:96:67:44:fc:3f:10:0d:86:4d:e4:00:3b:29: + 7b:ce:3b:3b:99:86:61:25:40:84:dc:13:62:b7:fa:ca:59:d6: + 03:1e:d6:53:01:cd:6d:4c:68:55:40:e1:ee:6b:c7:2a:00:00: + 48:82:b3:0a:01:c3:60:2a:0c:f7:82:35:ee:48:86:96:e4:74: + d4:3d:ea:01:71:ba:04:75:40:a7:a9:7f:39:39:9a:55:97:29: + 65:ae:19:55:25:05:72:47:d3:e8:18:dc:b8:e9:af:43:73:01: + 12:74:a3:e1:5c:5f:15:5d:24:f3:f9:e4:f4:b6:67:67:12:e7: + 64:22:8a:f6:a5:41:a6:1c:b6:60:63:45:8a:10:b4:ba:46:10: + ae:41:57:65:6c:3f:23:10:3f:21:10:59:b7:e4:40:dd:26:0c: + 23:f6:aa:ae +-----BEGIN CERTIFICATE----- +MIIFLDCCBBSgAwIBAgIEOU99hzANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJX +VzESMBAGA1UEChMJYmVUUlVTVGVkMRswGQYDVQQDExJiZVRSVVNUZWQgUm9vdCBD +QXMxGjAYBgNVBAMTEWJlVFJVU1RlZCBSb290IENBMB4XDTAwMDYyMDE0MjEwNFoX +DTEwMDYyMDEzMjEwNFowWjELMAkGA1UEBhMCV1cxEjAQBgNVBAoTCWJlVFJVU1Rl +ZDEbMBkGA1UEAxMSYmVUUlVTVGVkIFJvb3QgQ0FzMRowGAYDVQQDExFiZVRSVVNU +ZWQgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANS0c3oT +CjhVAb6JVuGUntS+WutKNHUbYSnE4a0IYCF4SP+00PpeQY1hRIfo7clY+vyTmt9P +6j41ffgzeubx181vSUs9Ty1uDoM6GHh3o8/n9E1z2Jo7Gh2+lVPPIJfCzz4kUmwM +jmVZxXH/YgmPqsWPzGCgc0rXOD8Vcr+il7dw6K/ifhYGTPWqZCZyByWtNfwYsSbX +2P8ZDoMbjNx4RWc0PfSvHI3kbWvtILNnmrRhyxdviTX/507AMhLn7uzf/5cwdO2N +R47rtMNE5qdMf1ZD6Li8tr76g5fmu/vEtpO+GRg+jIG5c4gW9JZDnGdzF5DYCW5j +rEq2I8QBoa2k5MUCAwEAAaOCAfgwggH0MA8GA1UdEwEB/wQFMAMBAf8wggFZBgNV +HSAEggFQMIIBTDCCAUgGCisGAQQBsT4BAAAwggE4MIIBAQYIKwYBBQUHAgIwgfQa +gfFSZWxpYW5jZSBvbiB0aGlzIGNlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBhc3N1 +bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0 +ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGFuZCBjZXJ0aWZpY2F0aW9uIHBy +YWN0aWNlIHN0YXRlbWVudCwgd2hpY2ggY2FuIGJlIGZvdW5kIGF0IGJlVFJVU1Rl +ZCdzIHdlYiBzaXRlLCBodHRwczovL3d3dy5iZVRSVVNUZWQuY29tL3ZhdWx0L3Rl +cm1zMDEGCCsGAQUFBwIBFiVodHRwczovL3d3dy5iZVRSVVNUZWQuY29tL3ZhdWx0 +L3Rlcm1zMDQGA1UdHwQtMCswKaAnoCWkIzAhMRIwEAYDVQQKEwliZVRSVVNUZWQx +CzAJBgNVBAYTAldXMB0GA1UdDgQWBBQquZtpLjub2M3eKjEENGvKBxirZzAfBgNV +HSMEGDAWgBQquZtpLjub2M3eKjEENGvKBxirZzAOBgNVHQ8BAf8EBAMCAf4wDQYJ +KoZIhvcNAQEFBQADggEBAHlh26Nebhax6nZR+csVm8tpvuaBa58oH2U+3RGFktTo +Qb9+M70j5/Egv6S0phkBxoyNNXxlpE8JpNbYIxUFE6dDea/bow6be3ga8wSGWsb2 +jCBHOElQBp1yZzrwmAOtlmdE/D8QDYZN5AA7KXvOOzuZhmElQITcE2K3+spZ1gMe +1lMBzW1MaFVA4e5rxyoAAEiCswoBw2AqDPeCNe5IhpbkdNQ96gFxugR1QKepfzk5 +mlWXKWWuGVUlBXJH0+gY3Ljpr0NzARJ0o+FcXxVdJPP55PS2Z2cS52QiivalQaYc +tmBjRYoQtLpGEK5BV2VsPyMQPyEQWbfkQN0mDCP2qq4= +-----END CERTIFICATE----- + +AddTrust Low-Value Services Root +================================ + +MD5 Fingerprint=1E:42:95:02:33:92:6B:B9:5F:C0:7F:DA:D6:B2:4B:FC +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Class 1 CA Root + Validity + Not Before: May 30 10:38:31 2000 GMT + Not After : May 30 10:38:31 2020 GMT + Subject: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Class 1 CA Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:96:96:d4:21:49:60:e2:6b:e8:41:07:0c:de:c4: + e0:dc:13:23:cd:c1:35:c7:fb:d6:4e:11:0a:67:5e: + f5:06:5b:6b:a5:08:3b:5b:29:16:3a:e7:87:b2:34: + 06:c5:bc:05:a5:03:7c:82:cb:29:10:ae:e1:88:81: + bd:d6:9e:d3:fe:2d:56:c1:15:ce:e3:26:9d:15:2e: + 10:fb:06:8f:30:04:de:a7:b4:63:b4:ff:b1:9c:ae: + 3c:af:77:b6:56:c5:b5:ab:a2:e9:69:3a:3d:0e:33: + 79:32:3f:70:82:92:99:61:6d:8d:30:08:8f:71:3f: + a6:48:57:19:f8:25:dc:4b:66:5c:a5:74:8f:98:ae: + c8:f9:c0:06:22:e7:ac:73:df:a5:2e:fb:52:dc:b1: + 15:65:20:fa:35:66:69:de:df:2c:f1:6e:bc:30:db: + 2c:24:12:db:eb:35:35:68:90:cb:00:b0:97:21:3d: + 74:21:23:65:34:2b:bb:78:59:a3:d6:e1:76:39:9a: + a4:49:8e:8c:74:af:6e:a4:9a:a3:d9:9b:d2:38:5c: + 9b:a2:18:cc:75:23:84:be:eb:e2:4d:33:71:8e:1a: + f0:c2:f8:c7:1d:a2:ad:03:97:2c:f8:cf:25:c6:f6: + b8:24:31:b1:63:5d:92:7f:63:f0:25:c9:53:2e:1f: + bf:4d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 95:B1:B4:F0:94:B6:BD:C7:DA:D1:11:09:21:BE:C1:AF:49:FD:10:7B + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + keyid:95:B1:B4:F0:94:B6:BD:C7:DA:D1:11:09:21:BE:C1:AF:49:FD:10:7B + DirName:/C=SE/O=AddTrust AB/OU=AddTrust TTP Network/CN=AddTrust Class 1 CA Root + serial:01 + + Signature Algorithm: sha1WithRSAEncryption + 2c:6d:64:1b:1f:cd:0d:dd:b9:01:fa:96:63:34:32:48:47:99: + ae:97:ed:fd:72:16:a6:73:47:5a:f4:eb:dd:e9:f5:d6:fb:45: + cc:29:89:44:5d:bf:46:39:3d:e8:ee:bc:4d:54:86:1e:1d:6c: + e3:17:27:43:e1:89:56:2b:a9:6f:72:4e:49:33:e3:72:7c:2a: + 23:9a:bc:3e:ff:28:2a:ed:a3:ff:1c:23:ba:43:57:09:67:4d: + 4b:62:06:2d:f8:ff:6c:9d:60:1e:d8:1c:4b:7d:b5:31:2f:d9: + d0:7c:5d:f8:de:6b:83:18:78:37:57:2f:e8:33:07:67:df:1e: + c7:6b:2a:95:76:ae:8f:57:a3:f0:f4:52:b4:a9:53:08:cf:e0: + 4f:d3:7a:53:8b:fd:bb:1c:56:36:f2:fe:b2:b6:e5:76:bb:d5: + 22:65:a7:3f:fe:d1:66:ad:0b:bc:6b:99:86:ef:3f:7d:f3:18: + 32:ca:7b:c6:e3:ab:64:46:95:f8:26:69:d9:55:83:7b:2c:96: + 07:ff:59:2c:44:a3:c6:e5:e9:a9:dc:a1:63:80:5a:21:5e:21: + cf:53:54:f0:ba:6f:89:db:a8:aa:95:cf:8b:e3:71:cc:1e:1b: + 20:44:08:c0:7a:b6:40:fd:c4:e4:35:e1:1d:16:1c:d0:bc:2b: + 8e:d6:71:d9 +-----BEGIN CERTIFICATE----- +MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU +MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3 +b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMw +MTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYD +VQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ul +CDtbKRY654eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6n +tGO0/7Gcrjyvd7ZWxbWroulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyl +dI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1Zmne3yzxbrww2ywkEtvrNTVokMsAsJch +PXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJuiGMx1I4S+6+JNM3GOGvDC ++Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8wHQYDVR0O +BBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8E +BTADAQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBl +MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk +ZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENB +IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X +7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz +43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY +eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl +pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA +WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk= +-----END CERTIFICATE----- + +Thawte Personal Basic CA +======================== + +MD5 Fingerprint=E6:0B:D2:C9:CA:2D:88:DB:1A:71:0E:4B:78:EB:02:41 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/emailAddress=personal-basic@thawte.com + Validity + Not Before: Jan 1 00:00:00 1996 GMT + Not After : Dec 31 23:59:59 2020 GMT + Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA/emailAddress=personal-basic@thawte.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:bc:bc:93:53:6d:c0:50:4f:82:15:e6:48:94:35: + a6:5a:be:6f:42:fa:0f:47:ee:77:75:72:dd:8d:49: + 9b:96:57:a0:78:d4:ca:3f:51:b3:69:0b:91:76:17: + 22:07:97:6a:c4:51:93:4b:e0:8d:ef:37:95:a1:0c: + 4d:da:34:90:1d:17:89:97:e0:35:38:57:4a:c0:f4: + 08:70:e9:3c:44:7b:50:7e:61:9a:90:e3:23:d3:88: + 11:46:27:f5:0b:07:0e:bb:dd:d1:7f:20:0a:88:b9: + 56:0b:2e:1c:80:da:f1:e3:9e:29:ef:14:bd:0a:44: + fb:1b:5b:18:d1:bf:23:93:21 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + 2d:e2:99:6b:b0:3d:7a:89:d7:59:a2:94:01:1f:2b:dd:12:4b: + 53:c2:ad:7f:aa:a7:00:5c:91:40:57:25:4a:38:aa:84:70:b9: + d9:80:0f:a5:7b:5c:fb:73:c6:bd:d7:8a:61:5c:03:e3:2d:27: + a8:17:e0:84:85:42:dc:5e:9b:c6:b7:b2:6d:bb:74:af:e4:3f: + cb:a7:b7:b0:e0:5d:be:78:83:25:94:d2:db:81:0f:79:07:6d: + 4f:f4:39:15:5a:52:01:7b:de:32:d6:4d:38:f6:12:5c:06:50: + df:05:5b:bd:14:4b:a1:df:29:ba:3b:41:8d:f7:63:56:a1:df: + 22:b1 +-----BEGIN CERTIFICATE----- +MIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkEx +FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD +VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT +ZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2lj +IENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4X +DTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUw +EwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UE +ChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy +dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBD +QTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzAN +BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53 +dXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdK +wPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7 +G1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQF +AAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7 +c8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P +9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ== +-----END CERTIFICATE----- + +AddTrust External Root +====================== + +MD5 Fingerprint=1D:35:54:04:85:78:B0:3F:42:42:4D:BF:20:73:0A:3F +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, O=AddTrust AB, OU=AddTrust External TTP Network, CN=AddTrust External CA Root + Validity + Not Before: May 30 10:48:38 2000 GMT + Not After : May 30 10:48:38 2020 GMT + Subject: C=SE, O=AddTrust AB, OU=AddTrust External TTP Network, CN=AddTrust External CA Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b7:f7:1a:33:e6:f2:00:04:2d:39:e0:4e:5b:ed: + 1f:bc:6c:0f:cd:b5:fa:23:b6:ce:de:9b:11:33:97: + a4:29:4c:7d:93:9f:bd:4a:bc:93:ed:03:1a:e3:8f: + cf:e5:6d:50:5a:d6:97:29:94:5a:80:b0:49:7a:db: + 2e:95:fd:b8:ca:bf:37:38:2d:1e:3e:91:41:ad:70: + 56:c7:f0:4f:3f:e8:32:9e:74:ca:c8:90:54:e9:c6: + 5f:0f:78:9d:9a:40:3c:0e:ac:61:aa:5e:14:8f:9e: + 87:a1:6a:50:dc:d7:9a:4e:af:05:b3:a6:71:94:9c: + 71:b3:50:60:0a:c7:13:9d:38:07:86:02:a8:e9:a8: + 69:26:18:90:ab:4c:b0:4f:23:ab:3a:4f:84:d8:df: + ce:9f:e1:69:6f:bb:d7:42:d7:6b:44:e4:c7:ad:ee: + 6d:41:5f:72:5a:71:08:37:b3:79:65:a4:59:a0:94: + 37:f7:00:2f:0d:c2:92:72:da:d0:38:72:db:14:a8: + 45:c4:5d:2a:7d:b7:b4:d6:c4:ee:ac:cd:13:44:b7: + c9:2b:dd:43:00:25:fa:61:b9:69:6a:58:23:11:b7: + a7:33:8f:56:75:59:f5:cd:29:d7:46:b7:0a:2b:65: + b6:d3:42:6f:15:b2:b8:7b:fb:ef:e9:5d:53:d5:34: + 5a:27 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + AD:BD:98:7A:34:B4:26:F7:FA:C4:26:54:EF:03:BD:E0:24:CB:54:1A + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + keyid:AD:BD:98:7A:34:B4:26:F7:FA:C4:26:54:EF:03:BD:E0:24:CB:54:1A + DirName:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root + serial:01 + + Signature Algorithm: sha1WithRSAEncryption + b0:9b:e0:85:25:c2:d6:23:e2:0f:96:06:92:9d:41:98:9c:d9: + 84:79:81:d9:1e:5b:14:07:23:36:65:8f:b0:d8:77:bb:ac:41: + 6c:47:60:83:51:b0:f9:32:3d:e7:fc:f6:26:13:c7:80:16:a5: + bf:5a:fc:87:cf:78:79:89:21:9a:e2:4c:07:0a:86:35:bc:f2: + de:51:c4:d2:96:b7:dc:7e:4e:ee:70:fd:1c:39:eb:0c:02:51: + 14:2d:8e:bd:16:e0:c1:df:46:75:e7:24:ad:ec:f4:42:b4:85: + 93:70:10:67:ba:9d:06:35:4a:18:d3:2b:7a:cc:51:42:a1:7a: + 63:d1:e6:bb:a1:c5:2b:c2:36:be:13:0d:e6:bd:63:7e:79:7b: + a7:09:0d:40:ab:6a:dd:8f:8a:c3:f6:f6:8c:1a:42:05:51:d4: + 45:f5:9f:a7:62:21:68:15:20:43:3c:99:e7:7c:bd:24:d8:a9: + 91:17:73:88:3f:56:1b:31:38:18:b4:71:0f:9a:cd:c8:0e:9e: + 8e:2e:1b:e1:8c:98:83:cb:1f:31:f1:44:4c:c6:04:73:49:76: + 60:0f:c7:f8:bd:17:80:6b:2e:e9:cc:4c:0e:5a:9a:79:0f:20: + 0a:2e:d5:9e:63:26:1e:55:92:94:d8:82:17:5a:7b:d0:bc:c7: + 8f:4e:86:04 +-----BEGIN CERTIFICATE----- +MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU +MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs +IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290 +MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux +FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h +bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v +dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt +H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9 +uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX +mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX +a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN +E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0 +WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD +VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0 +Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU +cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx +IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN +AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH +YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 +6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC +Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX +c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a +mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= +-----END CERTIFICATE----- + +AddTrust Public Services Root +============================= + +MD5 Fingerprint=C1:62:3E:23:C5:82:73:9C:03:59:4B:2B:E9:77:49:7F +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Public CA Root + Validity + Not Before: May 30 10:41:50 2000 GMT + Not After : May 30 10:41:50 2020 GMT + Subject: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Public CA Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:e9:1a:30:8f:83:88:14:c1:20:d8:3c:9b:8f:1b: + 7e:03:74:bb:da:69:d3:46:a5:f8:8e:c2:0c:11:90: + 51:a5:2f:66:54:40:55:ea:db:1f:4a:56:ee:9f:23: + 6e:f4:39:cb:a1:b9:6f:f2:7e:f9:5d:87:26:61:9e: + 1c:f8:e2:ec:a6:81:f8:21:c5:24:cc:11:0c:3f:db: + 26:72:7a:c7:01:97:07:17:f9:d7:18:2c:30:7d:0e: + 7a:1e:62:1e:c6:4b:c0:fd:7d:62:77:d3:44:1e:27: + f6:3f:4b:44:b3:b7:38:d9:39:1f:60:d5:51:92:73: + 03:b4:00:69:e3:f3:14:4e:ee:d1:dc:09:cf:77:34: + 46:50:b0:f8:11:f2:fe:38:79:f7:07:39:fe:51:92: + 97:0b:5b:08:5f:34:86:01:ad:88:97:eb:66:cd:5e: + d1:ff:dc:7d:f2:84:da:ba:77:ad:dc:80:08:c7:a7: + 87:d6:55:9f:97:6a:e8:c8:11:64:ba:e7:19:29:3f: + 11:b3:78:90:84:20:52:5b:11:ef:78:d0:83:f6:d5: + 48:90:d0:30:1c:cf:80:f9:60:fe:79:e4:88:f2:dd: + 00:eb:94:45:eb:65:94:69:40:ba:c0:d5:b4:b8:ba: + 7d:04:11:a8:eb:31:05:96:94:4e:58:21:8e:9f:d0: + 60:fd + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 81:3E:37:D8:92:B0:1F:77:9F:5C:B4:AB:73:AA:E7:F6:34:60:2F:FA + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + keyid:81:3E:37:D8:92:B0:1F:77:9F:5C:B4:AB:73:AA:E7:F6:34:60:2F:FA + DirName:/C=SE/O=AddTrust AB/OU=AddTrust TTP Network/CN=AddTrust Public CA Root + serial:01 + + Signature Algorithm: sha1WithRSAEncryption + 03:f7:15:4a:f8:24:da:23:56:16:93:76:dd:36:28:b9:ae:1b: + b8:c3:f1:64:ba:20:18:78:95:29:27:57:05:bc:7c:2a:f4:b9: + 51:55:da:87:02:de:0f:16:17:31:f8:aa:79:2e:09:13:bb:af: + b2:20:19:12:e5:93:f9:4b:f9:83:e8:44:d5:b2:41:25:bf:88: + 75:6f:ff:10:fc:4a:54:d0:5f:f0:fa:ef:36:73:7d:1b:36:45: + c6:21:6d:b4:15:b8:4e:cf:9c:5c:a5:3d:5a:00:8e:06:e3:3c: + 6b:32:7b:f2:9f:f0:b6:fd:df:f0:28:18:48:f0:c6:bc:d0:bf: + 34:80:96:c2:4a:b1:6d:8e:c7:90:45:de:2f:67:ac:45:04:a3: + 7a:dc:55:92:c9:47:66:d8:1a:8c:c7:ed:9c:4e:9a:e0:12:bb: + b5:6a:4c:84:e1:e1:22:0d:87:00:64:fe:8c:7d:62:39:65:a6: + ef:42:b6:80:25:12:61:01:a8:24:13:70:00:11:26:5f:fa:35: + 50:c5:48:cc:06:47:e8:27:d8:70:8d:5f:64:e6:a1:44:26:5e: + 22:ec:92:cd:ff:42:9a:44:21:6d:5c:c5:e3:22:1d:5f:47:12: + e7:ce:5f:5d:fa:d8:aa:b1:33:2d:d9:76:f2:4e:3a:33:0c:2b: + b3:2d:90:06 +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU +MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3 +b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAx +MDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtB +ZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIDAeBgNV +BAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV +6tsfSlbunyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nX +GCwwfQ56HmIexkvA/X1id9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnP +dzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSGAa2Il+tmzV7R/9x98oTaunet3IAIx6eH +1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAwHM+A+WD+eeSI8t0A65RF +62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0GA1UdDgQW +BBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUw +AwEB/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDEL +MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU +cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv +b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6 +IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/ +iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao +GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh +4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm +XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY= +-----END CERTIFICATE----- + +AddTrust Qualified Certificates Root +==================================== + +MD5 Fingerprint=27:EC:39:47:CD:DA:5A:AF:E2:9A:01:65:21:A9:4C:BB +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Qualified CA Root + Validity + Not Before: May 30 10:44:50 2000 GMT + Not After : May 30 10:44:50 2020 GMT + Subject: C=SE, O=AddTrust AB, OU=AddTrust TTP Network, CN=AddTrust Qualified CA Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:e4:1e:9a:fe:dc:09:5a:87:a4:9f:47:be:11:5f: + af:84:34:db:62:3c:79:78:b7:e9:30:b5:ec:0c:1c: + 2a:c4:16:ff:e0:ec:71:eb:8a:f5:11:6e:ed:4f:0d: + 91:d2:12:18:2d:49:15:01:c2:a4:22:13:c7:11:64: + ff:22:12:9a:b9:8e:5c:2f:08:cf:71:6a:b3:67:01: + 59:f1:5d:46:f3:b0:78:a5:f6:0e:42:7a:e3:7f:1b: + cc:d0:f0:b7:28:fd:2a:ea:9e:b3:b0:b9:04:aa:fd: + f6:c7:b4:b1:b8:2a:a0:fb:58:f1:19:a0:6f:70:25: + 7e:3e:69:4a:7f:0f:22:d8:ef:ad:08:11:9a:29:99: + e1:aa:44:45:9a:12:5e:3e:9d:6d:52:fc:e7:a0:3d: + 68:2f:f0:4b:70:7c:13:38:ad:bc:15:25:f1:d6:ce: + ab:a2:c0:31:d6:2f:9f:e0:ff:14:59:fc:84:93:d9: + 87:7c:4c:54:13:eb:9f:d1:2d:11:f8:18:3a:3a:de: + 25:d9:f7:d3:40:ed:a4:06:12:c4:3b:e1:91:c1:56: + 35:f0:14:dc:65:36:09:6e:ab:a4:07:c7:35:d1:c2: + 03:33:36:5b:75:26:6d:42:f1:12:6b:43:6f:4b:71: + 94:fa:34:1d:ed:13:6e:ca:80:7f:98:2f:6c:b9:65: + d8:e9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 39:95:8B:62:8B:5C:C9:D4:80:BA:58:0F:97:3F:15:08:43:CC:98:A7 + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + keyid:39:95:8B:62:8B:5C:C9:D4:80:BA:58:0F:97:3F:15:08:43:CC:98:A7 + DirName:/C=SE/O=AddTrust AB/OU=AddTrust TTP Network/CN=AddTrust Qualified CA Root + serial:01 + + Signature Algorithm: sha1WithRSAEncryption + 19:ab:75:ea:f8:8b:65:61:95:13:ba:69:04:ef:86:ca:13:a0: + c7:aa:4f:64:1b:3f:18:f6:a8:2d:2c:55:8f:05:b7:30:ea:42: + 6a:1d:c0:25:51:2d:a7:bf:0c:b3:ed:ef:08:7f:6c:3c:46:1a: + ea:18:43:df:76:cc:f9:66:86:9c:2c:68:f5:e9:17:f8:31:b3: + 18:c4:d6:48:7d:23:4c:68:c1:7e:bb:01:14:6f:c5:d9:6e:de: + bb:04:42:6a:f8:f6:5c:7d:e5:da:fa:87:eb:0d:35:52:67:d0: + 9e:97:76:05:93:3f:95:c7:01:e6:69:55:38:7f:10:61:99:c9: + e3:5f:a6:ca:3e:82:63:48:aa:e2:08:48:3e:aa:f2:b2:85:62: + a6:b4:a7:d9:bd:37:9c:68:b5:2d:56:7d:b0:b7:3f:a0:b1:07: + d6:e9:4f:dc:de:45:71:30:32:7f:1b:2e:09:f9:bf:52:a1:ee: + c2:80:3e:06:5c:2e:55:40:c1:1b:f5:70:45:b0:dc:5d:fa:f6: + 72:5a:77:d2:63:cd:cf:58:89:00:42:63:3f:79:39:d0:44:b0: + 82:6e:41:19:e8:dd:e0:c1:88:5a:d1:1e:71:93:1f:24:30:74: + e5:1e:a8:de:3c:27:37:7f:83:ae:9e:77:cf:f0:30:b1:ff:4b: + 99:e8:c6:a1 +-----BEGIN CERTIFICATE----- +MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU +MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3 +b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1 +MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK +EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh +BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq +xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G +87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i +2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U +WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1 +0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G +A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T +AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr +pGkwZzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQL +ExRBZGRUcnVzdCBUVFAgTmV0d29yazEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlm +aWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBABmrder4i2VhlRO6aQTv +hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm +hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X +dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3 +P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y +iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no +xqE= +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary OCSP Responder +============================================== + +MD5 Fingerprint=7E:6F:3A:53:1B:7C:BE:B0:30:DB:43:1E:1E:94:89:B2 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 2b:68:d4:a3:46:9e:c5:3b:28:09:ab:38:5d:7f:27:20 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 1 Public Primary Certification Authority + Validity + Not Before: Aug 4 00:00:00 2000 GMT + Not After : Aug 3 23:59:59 2004 GMT + Subject: O=VeriSign, Inc., OU=VeriSign Trust Network, OU=Terms of use at https://www.verisign.com/RPA (c)00, CN=Class 1 Public Primary OCSP Responder + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:b9:ed:5e:7a:3a:77:5f:ce:5f:3a:52:fc:cd:64: + f7:71:b5:6f:6a:96:c6:59:92:55:94:5d:2f:5b:2e: + c1:11:ea:26:8a:cb:a7:81:3c:f6:5a:44:de:7a:13: + 2f:fd:5a:51:d9:7b:37:26:4a:c0:27:3f:04:03:6a: + 56:c1:83:2c:e1:6f:5b:a9:54:50:24:4a:c6:2e:7a: + 4c:a1:5b:37:54:24:21:31:1f:a1:78:18:76:a7:b1: + 70:da:22:d0:6a:fe:07:62:40:c6:f7:f6:9b:7d:0c: + 06:b8:4b:c7:28:e4:66:23:84:51:ef:46:b7:93:d8: + 81:33:cb:e5:36:ac:c6:e8:05 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Alternative Name: + DirName:/CN=OCSP 1-1 + X509v3 CRL Distribution Points: + URI:http://crl.verisign.com/pca1.crl + + X509v3 Extended Key Usage: + OCSP Signing + Authority Information Access: + OCSP - URI:http://ocsp.verisign.com/ocsp/status + + X509v3 Certificate Policies: + Policy: 2.16.840.1.113733.1.7.1.1 + CPS: https://www.verisign.com/RPA + + X509v3 Basic Constraints: + CA:FALSE + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha1WithRSAEncryption + 70:90:dd:b8:e4:be:53:17:7c:7f:02:e9:d5:f7:8b:99:93:31: + 60:8d:7e:e6:60:6b:24:ef:60:ac:d2:ce:91:de:80:6d:09:a4: + d3:b8:38:e5:44:ca:72:5e:0d:2d:c1:77:9c:bd:2c:03:78:29: + 8d:a4:a5:77:87:f5:f1:2b:26:ad:cc:07:6c:3a:54:5a:28:e0: + 09:f3:4d:0a:04:ca:d4:58:69:0b:a7:b3:f5:dd:01:a5:e7:dc: + f0:1f:ba:c1:5d:90:8d:b3:ea:4f:c1:11:59:97:6a:b2:2b:13: + b1:da:ad:97:a1:b3:b1:a0:20:5b:ca:32:ab:8d:cf:13:f0:1f: + 29:c3 +-----BEGIN CERTIFICATE----- +MIIDnjCCAwegAwIBAgIQK2jUo0aexTsoCas4XX8nIDANBgkqhkiG9w0BAQUFADBf +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT +LkNsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw +HhcNMDAwODA0MDAwMDAwWhcNMDQwODAzMjM1OTU5WjCBpzEXMBUGA1UEChMOVmVy +aVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5 +BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20v +UlBBIChjKTAwMS4wLAYDVQQDEyVDbGFzcyAxIFB1YmxpYyBQcmltYXJ5IE9DU1Ag +UmVzcG9uZGVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC57V56Ondfzl86 +UvzNZPdxtW9qlsZZklWUXS9bLsER6iaKy6eBPPZaRN56Ey/9WlHZezcmSsAnPwQD +albBgyzhb1upVFAkSsYuekyhWzdUJCExH6F4GHansXDaItBq/gdiQMb39pt9DAa4 +S8co5GYjhFHvRreT2IEzy+U2rMboBQIDAQABo4IBEDCCAQwwIAYDVR0RBBkwF6QV +MBMxETAPBgNVBAMTCE9DU1AgMS0xMDEGA1UdHwQqMCgwJqAkoCKGIGh0dHA6Ly9j +cmwudmVyaXNpZ24uY29tL3BjYTEuY3JsMBMGA1UdJQQMMAoGCCsGAQUFBwMJMEIG +CCsGAQUFBwEBBDYwNDAyBggrBgEFBQcwAaYmFiRodHRwOi8vb2NzcC52ZXJpc2ln +bi5jb20vb2NzcC9zdGF0dXMwRAYDVR0gBD0wOzA5BgtghkgBhvhFAQcBATAqMCgG +CCsGAQUFBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vUlBBMAkGA1UdEwQC +MAAwCwYDVR0PBAQDAgeAMA0GCSqGSIb3DQEBBQUAA4GBAHCQ3bjkvlMXfH8C6dX3 +i5mTMWCNfuZgayTvYKzSzpHegG0JpNO4OOVEynJeDS3Bd5y9LAN4KY2kpXeH9fEr +Jq3MB2w6VFoo4AnzTQoEytRYaQuns/XdAaXn3PAfusFdkI2z6k/BEVmXarIrE7Ha +rZehs7GgIFvKMquNzxPwHynD +-----END CERTIFICATE----- + +Verisign Class 2 Public Primary OCSP Responder +============================================== + +MD5 Fingerprint=F3:45:BD:10:96:0D:85:4B:EF:9F:11:62:34:A7:5E:B5 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 09:46:17:e6:1d:d8:d4:1c:a0:0c:a0:62:e8:79:8a:a7 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority + Validity + Not Before: Aug 1 00:00:00 2000 GMT + Not After : Jul 31 23:59:59 2004 GMT + Subject: O=VeriSign, Inc., OU=VeriSign Trust Network, OU=Terms of use at https://www.verisign.com/RPA (c)00, CN=Class 2 Public Primary OCSP Responder + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d0:ca:63:31:61:7f:44:34:7c:05:7d:0b:3d:6a: + 90:cb:79:4b:77:0a:3f:4b:c7:23:e5:c0:62:2d:7e: + 9c:7e:3e:88:87:91:d0:ac:e8:4d:49:87:a2:96:90: + 8a:dd:04:a5:02:3f:8c:9b:e9:89:fe:62:a0:e2:5a: + bd:c8:dd:b4:78:e6:a5:42:93:08:67:01:c0:20:4d: + d7:5c:f4:5d:da:b3:e3:37:a6:52:1a:2c:4c:65:4d: + 8a:87:d9:a8:a3:f1:49:54:bb:3c:5c:80:51:68:c6: + fb:49:ff:0b:55:ab:15:dd:fb:9a:c1:b9:1d:74:0d: + b2:8c:44:5d:89:fc:9f:f9:83 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Alternative Name: + DirName:/CN=OCSP 1-2 + X509v3 CRL Distribution Points: + URI:http://crl.verisign.com/pca2.crl + + X509v3 Extended Key Usage: + OCSP Signing + Authority Information Access: + OCSP - URI:http://ocsp.verisign.com/ocsp/status + + X509v3 Certificate Policies: + Policy: 2.16.840.1.113733.1.7.1.1 + CPS: https://www.verisign.com/RPA + + X509v3 Basic Constraints: + CA:FALSE + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha1WithRSAEncryption + 1f:7d:09:6e:24:46:75:04:9c:f3:26:9b:e3:39:6e:17:ef:bc: + bd:a2:1b:d2:02:84:86:ab:d0:40:97:2c:c4:43:88:37:19:6b: + 22:a8:03:71:50:9d:20:dc:36:60:20:9a:73:2d:73:55:6c:58: + 9b:2c:c2:b4:34:2c:7a:33:42:ca:91:d9:e9:43:af:cf:1e:e0: + f5:c4:7a:ab:3f:72:63:1e:a9:37:e1:5b:3b:88:b3:13:86:82: + 90:57:cb:57:ff:f4:56:be:22:dd:e3:97:a8:e1:bc:22:43:c2: + dd:4d:db:f6:81:9e:92:14:9e:39:0f:13:54:de:82:d8:c0:5e: + 34:8d +-----BEGIN CERTIFICATE----- +MIIDnjCCAwegAwIBAgIQCUYX5h3Y1BygDKBi6HmKpzANBgkqhkiG9w0BAQUFADBf +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT +LkNsYXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw +HhcNMDAwODAxMDAwMDAwWhcNMDQwNzMxMjM1OTU5WjCBpzEXMBUGA1UEChMOVmVy +aVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5 +BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20v +UlBBIChjKTAwMS4wLAYDVQQDEyVDbGFzcyAyIFB1YmxpYyBQcmltYXJ5IE9DU1Ag +UmVzcG9uZGVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQymMxYX9ENHwF +fQs9apDLeUt3Cj9LxyPlwGItfpx+PoiHkdCs6E1Jh6KWkIrdBKUCP4yb6Yn+YqDi +Wr3I3bR45qVCkwhnAcAgTddc9F3as+M3plIaLExlTYqH2aij8UlUuzxcgFFoxvtJ +/wtVqxXd+5rBuR10DbKMRF2J/J/5gwIDAQABo4IBEDCCAQwwIAYDVR0RBBkwF6QV +MBMxETAPBgNVBAMTCE9DU1AgMS0yMDEGA1UdHwQqMCgwJqAkoCKGIGh0dHA6Ly9j +cmwudmVyaXNpZ24uY29tL3BjYTIuY3JsMBMGA1UdJQQMMAoGCCsGAQUFBwMJMEIG +CCsGAQUFBwEBBDYwNDAyBggrBgEFBQcwAaYmFiRodHRwOi8vb2NzcC52ZXJpc2ln +bi5jb20vb2NzcC9zdGF0dXMwRAYDVR0gBD0wOzA5BgtghkgBhvhFAQcBATAqMCgG +CCsGAQUFBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vUlBBMAkGA1UdEwQC +MAAwCwYDVR0PBAQDAgeAMA0GCSqGSIb3DQEBBQUAA4GBAB99CW4kRnUEnPMmm+M5 +bhfvvL2iG9IChIar0ECXLMRDiDcZayKoA3FQnSDcNmAgmnMtc1VsWJsswrQ0LHoz +QsqR2elDr88e4PXEeqs/cmMeqTfhWzuIsxOGgpBXy1f/9Fa+It3jl6jhvCJDwt1N +2/aBnpIUnjkPE1TegtjAXjSN +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary OCSP Responder +============================================== + +MD5 Fingerprint=7D:51:92:C9:76:83:98:16:DE:8C:B3:86:C4:7D:66:FB +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 2e:96:9e:bf:b6:62:6c:ec:7b:e9:73:cc:e3:6c:c1:84 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority + Validity + Not Before: Aug 4 00:00:00 2000 GMT + Not After : Aug 3 23:59:59 2004 GMT + Subject: O=VeriSign, Inc., OU=VeriSign Trust Network, OU=Terms of use at https://www.verisign.com/RPA (c)00, CN=Class 3 Public Primary OCSP Responder + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:f1:e4:08:0e:83:bb:75:e3:48:e5:b8:db:a6:f0: + b9:ab:e9:3c:62:c7:5e:35:5b:d0:02:54:11:d8:c9: + d1:56:b9:76:4b:b9:ab:7a:e6:cd:ba:f6:0c:04:d6: + 7e:d6:b0:0a:65:ac:4e:39:e3:f1:f7:2d:a3:25:39: + ef:b0:8b:cf:be:db:0c:5d:6e:70:f4:07:cd:70:f7: + 3a:c0:3e:35:16:ed:78:8c:43:cf:c2:26:2e:47:d6: + 86:7d:9c:f1:be:d6:67:0c:22:25:a4:ca:65:e6:1f: + 7a:78:28:2f:3f:05:db:04:21:bf:e1:45:66:fe:3c: + b7:82:ed:5a:b8:16:15:b9:55 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Alternative Name: + DirName:/CN=OCSP 1-3 + X509v3 CRL Distribution Points: + URI:http://crl.verisign.com/pca3.1.1.crl + + X509v3 Extended Key Usage: + OCSP Signing + Authority Information Access: + OCSP - URI:http://ocsp.verisign.com/ocsp/status + + X509v3 Certificate Policies: + Policy: 2.16.840.1.113733.1.7.1.1 + CPS: https://www.verisign.com/RPA + + X509v3 Basic Constraints: + CA:FALSE + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha1WithRSAEncryption + 02:f6:53:63:c0:a9:1e:f2:d0:8b:33:30:8f:48:9b:4c:b0:56: + b4:83:71:4a:be:dc:50:d8:f5:b6:e0:0b:db:bd:78:4f:e9:cf: + 09:34:da:29:49:9d:01:73:5a:91:91:82:54:2c:13:0a:d3:77: + 23:cf:37:fc:63:de:a7:e3:f6:b7:b5:69:45:28:49:c3:91:dc: + aa:47:1c:a9:88:99:2c:05:2a:8d:8d:8a:fa:62:e2:5a:b7:00: + 20:5d:39:c4:28:c2:cb:fc:9e:a8:89:ae:5b:3d:8e:12:ea:32: + b2:fc:eb:14:d7:09:15:1a:c0:cd:1b:d5:b5:15:4e:41:d5:96: + e3:4e +-----BEGIN CERTIFICATE----- +MIIDojCCAwugAwIBAgIQLpaev7ZibOx76XPM42zBhDANBgkqhkiG9w0BAQUFADBf +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsT +LkNsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw +HhcNMDAwODA0MDAwMDAwWhcNMDQwODAzMjM1OTU5WjCBpzEXMBUGA1UEChMOVmVy +aVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOzA5 +BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20v +UlBBIChjKTAwMS4wLAYDVQQDEyVDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IE9DU1Ag +UmVzcG9uZGVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDx5AgOg7t140jl +uNum8Lmr6Txix141W9ACVBHYydFWuXZLuat65s269gwE1n7WsAplrE454/H3LaMl +Oe+wi8++2wxdbnD0B81w9zrAPjUW7XiMQ8/CJi5H1oZ9nPG+1mcMIiWkymXmH3p4 +KC8/BdsEIb/hRWb+PLeC7Vq4FhW5VQIDAQABo4IBFDCCARAwIAYDVR0RBBkwF6QV +MBMxETAPBgNVBAMTCE9DU1AgMS0zMDUGA1UdHwQuMCwwKqAooCaGJGh0dHA6Ly9j +cmwudmVyaXNpZ24uY29tL3BjYTMuMS4xLmNybDATBgNVHSUEDDAKBggrBgEFBQcD +CTBCBggrBgEFBQcBAQQ2MDQwMgYIKwYBBQUHMAGmJhYkaHR0cDovL29jc3AudmVy +aXNpZ24uY29tL29jc3Avc3RhdHVzMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHAQEw +KjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL1JQQTAJBgNV +HRMEAjAAMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0BAQUFAAOBgQAC9lNjwKke8tCL +MzCPSJtMsFa0g3FKvtxQ2PW24AvbvXhP6c8JNNopSZ0Bc1qRkYJULBMK03cjzzf8 +Y96n4/a3tWlFKEnDkdyqRxypiJksBSqNjYr6YuJatwAgXTnEKMLL/J6oia5bPY4S +6jKy/OsU1wkVGsDNG9W1FU5B1ZbjTg== +-----END CERTIFICATE----- + +Verisign Secure Server OCSP Responder +===================================== + +MD5 Fingerprint=2C:62:C3:D8:80:01:16:09:EA:59:EA:78:AB:10:43:F6 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + ff:45:d5:27:5d:24:fb:b3:c2:39:24:53:57:e1:4f:de + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority + Validity + Not Before: Aug 4 00:00:00 2000 GMT + Not After : Aug 3 23:59:59 2004 GMT + Subject: O=VeriSign, Inc., OU=VeriSign Trust Network, OU=Terms of use at https://www.verisign.com/RPA (c)00, CN=Secure Server OCSP Responder + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:b8:51:99:64:85:0e:ee:b3:0a:68:f0:bf:63:76: + 1d:53:f5:fc:a1:78:8c:33:ee:9f:f4:be:39:da:9b: + 0f:4d:47:a9:8f:20:e8:4b:44:bd:ce:cd:7b:90:d1: + 30:e8:90:c4:25:7b:89:28:de:bd:f6:93:1d:ff:b9: + ff:92:b5:a9:8d:e4:ae:cc:e2:c3:07:83:6a:a3:72: + 10:01:27:62:22:a6:35:26:39:2d:9e:cf:60:0c:fc: + 47:a4:d7:d0:42:78:a7:1d:6c:d0:cb:4f:15:a7:29: + 0a:b4:95:45:c4:b1:e7:5a:09:d7:39:95:d8:1d:35: + 9e:c2:bd:b3:5d:c1:0c:4b:1f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Alternative Name: + DirName:/CN=OCSP 1-4 + X509v3 CRL Distribution Points: + URI:http://crl.verisign.com/RSASecureServer-p.crl + + X509v3 Extended Key Usage: + OCSP Signing + Authority Information Access: + OCSP - URI:http://ocsp.verisign.com/ocsp/status + + X509v3 Certificate Policies: + Policy: 2.16.840.1.113733.1.7.1.1 + CPS: https://www.verisign.com/RPA + + X509v3 Basic Constraints: + CA:FALSE + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha1WithRSAEncryption + 00:b3:10:53:66:9c:49:93:2e:31:a0:02:42:d2:58:57:7e:66: + a1:fe:1b:8a:61:18:50:40:2c:1e:2b:41:a5:d6:db:ff:ac:08: + 1c:5a:05:6d:02:5c:2a:b6:96:4f:47:db:be:4e:db:ce:cc:ba: + 86:b8:18:ce:b1:12:91:5f:63:f7:f3:48:3e:cc:f1:4d:13:e4: + 6d:09:94:78:00:92:cb:a3:20:9d:06:0b:6a:a0:43:07:ce:d1: + 19:6c:8f:18:75:9a:9f:17:33:fd:a9:26:b8:e3:e2:de:c2:a8: + c4:5a:8a:7f:98:d6:07:06:6b:cc:56:9e:86:70:ce:d4:ef +-----BEGIN CERTIFICATE----- +MIIDnzCCAwygAwIBAgIRAP9F1SddJPuzwjkkU1fhT94wDQYJKoZIhvcNAQEFBQAw +XzELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMu +MS4wLAYDVQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MB4XDTAwMDgwNDAwMDAwMFoXDTA0MDgwMzIzNTk1OVowgZ4xFzAVBgNVBAoTDlZl +cmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTsw +OQYDVQQLEzJUZXJtcyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29t +L1JQQSAoYykwMDElMCMGA1UEAxMcU2VjdXJlIFNlcnZlciBPQ1NQIFJlc3BvbmRl +cjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuFGZZIUO7rMKaPC/Y3YdU/X8 +oXiMM+6f9L452psPTUepjyDoS0S9zs17kNEw6JDEJXuJKN699pMd/7n/krWpjeSu +zOLDB4Nqo3IQASdiIqY1Jjktns9gDPxHpNfQQninHWzQy08VpykKtJVFxLHnWgnX +OZXYHTWewr2zXcEMSx8CAwEAAaOCAR0wggEZMCAGA1UdEQQZMBekFTATMREwDwYD +VQQDEwhPQ1NQIDEtNDA+BgNVHR8ENzA1MDOgMaAvhi1odHRwOi8vY3JsLnZlcmlz +aWduLmNvbS9SU0FTZWN1cmVTZXJ2ZXItcC5jcmwwEwYDVR0lBAwwCgYIKwYBBQUH +AwkwQgYIKwYBBQUHAQEENjA0MDIGCCsGAQUFBzABpiYWJGh0dHA6Ly9vY3NwLnZl +cmlzaWduLmNvbS9vY3NwL3N0YXR1czBEBgNVHSAEPTA7MDkGC2CGSAGG+EUBBwEB +MCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9SUEEwCQYD +VR0TBAIwADALBgNVHQ8EBAMCB4AwDQYJKoZIhvcNAQEFBQADfgAAsxBTZpxJky4x +oAJC0lhXfmah/huKYRhQQCweK0Gl1tv/rAgcWgVtAlwqtpZPR9u+TtvOzLqGuBjO +sRKRX2P380g+zPFNE+RtCZR4AJLLoyCdBgtqoEMHztEZbI8YdZqfFzP9qSa44+Le +wqjEWop/mNYHBmvMVp6GcM7U7w== +-----END CERTIFICATE----- + +Verisign Time Stamping Authority CA +=================================== + +MD5 Fingerprint=89:49:54:8C:C8:68:9A:83:29:EC:DC:06:73:21:AB:97 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 53:61:b2:60:ae:db:71:8e:a7:94:b3:13:33:f4:07:09 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network + Validity + Not Before: Sep 26 00:00:00 2000 GMT + Not After : Sep 25 23:59:59 2010 GMT + Subject: O=VeriSign, Inc., OU=VeriSign Trust Network, OU=Terms of use at https://www.verisign.com/rpa (c)00, CN=VeriSign Time Stamping Authority CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d2:19:9d:67:c2:00:21:59:62:ce:b4:09:22:44: + 69:8a:f8:25:5a:db:ed:0d:b7:36:7e:4e:e0:bb:94: + 3e:90:25:87:c2:61:47:29:d9:bd:54:b8:63:cc:2c: + 7d:69:b4:33:36:f4:37:07:9a:c1:dd:40:54:fc:e0: + 78:9d:a0:93:b9:09:3d:23:51:7f:44:c2:14:74:db: + 0a:be:cb:c9:30:34:40:98:3e:d0:d7:25:10:81:94: + bd:07:4f:9c:d6:54:27:df:2e:a8:bf:cb:90:8c:8d: + 75:4b:bc:e2:e8:44:87:cd:e6:41:0a:25:6e:e8:f4: + 24:02:c5:52:0f:6e:ec:98:75 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:TRUE, pathlen:0 + X509v3 Certificate Policies: + Policy: 2.16.840.1.113733.1.7.23.1.3 + CPS: https://www.verisign.com/rpa + + X509v3 CRL Distribution Points: + URI:http://crl.verisign.com/pca3.crl + + X509v3 Key Usage: + Certificate Sign, CRL Sign + Authority Information Access: + OCSP - URI:http://ocsp.verisign.com/ocsp/status + + Signature Algorithm: sha1WithRSAEncryption + 82:70:68:95:df:b6:0d:c2:01:70:19:4a:d2:54:56:1e:ac:f2: + 45:4c:87:b8:f5:35:eb:78:4b:05:a9:c8:9d:3b:19:21:2e:70: + 34:4a:a2:f5:89:e0:15:75:45:e7:28:37:00:34:27:29:e8:37: + 4b:f2:ef:44:97:6b:17:51:1a:c3:56:9d:3c:1a:8a:f6:4a:46: + 46:37:8c:fa:cb:f5:64:5a:38:68:2e:1c:c3:ef:70:ce:b8:46: + 06:16:bf:f7:7e:e7:b5:a8:3e:45:ac:a9:25:75:22:7b:6f:3f: + b0:9c:94:e7:c7:73:ab:ac:1f:ee:25:9b:c0:16:ed:b7:ca:5b: + f0:14 +-----BEGIN CERTIFICATE----- +MIIDzTCCAzagAwIBAgIQU2GyYK7bcY6nlLMTM/QHCTANBgkqhkiG9w0BAQUFADCB +wTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTwwOgYDVQQL +EzNDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gRzIxOjA4BgNVBAsTMShjKSAxOTk4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1 +dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmswHhcNMDAwOTI2MDAwMDAwWhcNMTAwOTI1MjM1OTU5WjCBpTEXMBUGA1UEChMO +VmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsx +OzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5j +b20vcnBhIChjKTAwMSwwKgYDVQQDEyNWZXJpU2lnbiBUaW1lIFN0YW1waW5nIEF1 +dGhvcml0eSBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0hmdZ8IAIVli +zrQJIkRpivglWtvtDbc2fk7gu5Q+kCWHwmFHKdm9VLhjzCx9abQzNvQ3B5rB3UBU +/OB4naCTuQk9I1F/RMIUdNsKvsvJMDRAmD7Q1yUQgZS9B0+c1lQn3y6ov8uQjI11 +S7zi6ESHzeZBCiVu6PQkAsVSD27smHUCAwEAAaOB3zCB3DAPBgNVHRMECDAGAQH/ +AgEAMEUGA1UdIAQ+MDwwOgYMYIZIAYb4RQEHFwEDMCowKAYIKwYBBQUHAgEWHGh0 +dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEwMQYDVR0fBCowKDAmoCSgIoYgaHR0 +cDovL2NybC52ZXJpc2lnbi5jb20vcGNhMy5jcmwwCwYDVR0PBAQDAgEGMEIGCCsG +AQUFBwEBBDYwNDAyBggrBgEFBQcwAaYmFiRodHRwOi8vb2NzcC52ZXJpc2lnbi5j +b20vb2NzcC9zdGF0dXMwDQYJKoZIhvcNAQEFBQADgYEAgnBold+2DcIBcBlK0lRW +HqzyRUyHuPU163hLBanInTsZIS5wNEqi9YngFXVF5yg3ADQnKeg3S/LvRJdrF1Ea +w1adPBqK9kpGRjeM+sv1ZFo4aC4cw+9wzrhGBha/937ntag+RaypJXUie28/sJyU +58dzq6wf7iWbwBbtt8pb8BQ= +-----END CERTIFICATE----- + +Thawte Time Stamping CA +======================= + +MD5 Fingerprint=7F:66:7A:71:D3:EB:69:78:20:9A:51:14:9D:83:DA:20 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=ZA, ST=Western Cape, L=Durbanville, O=Thawte, OU=Thawte Certification, CN=Thawte Timestamping CA + Validity + Not Before: Jan 1 00:00:00 1997 GMT + Not After : Dec 31 23:59:59 2020 GMT + Subject: C=ZA, ST=Western Cape, L=Durbanville, O=Thawte, OU=Thawte Certification, CN=Thawte Timestamping CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d6:2b:58:78:61:45:86:53:ea:34:7b:51:9c:ed: + b0:e6:2e:18:0e:fe:e0:5f:a8:27:d3:b4:c9:e0:7c: + 59:4e:16:0e:73:54:60:c1:7f:f6:9f:2e:e9:3a:85: + 24:15:3c:db:47:04:63:c3:9e:c4:94:1a:5a:df:4c: + 7a:f3:d9:43:1d:3c:10:7a:79:25:db:90:fe:f0:51: + e7:30:d6:41:00:fd:9f:28:df:79:be:94:bb:9d:b6: + 14:e3:23:85:d7:a9:41:e0:4c:a4:79:b0:2b:1a:8b: + f2:f8:3b:8a:3e:45:ac:71:92:00:b4:90:41:98:fb: + 5f:ed:fa:b7:2e:8a:f8:88:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + 67:db:e2:c2:e6:87:3d:40:83:86:37:35:7d:1f:ce:9a:c3:0c: + 66:20:a8:ba:aa:04:89:86:c2:f5:10:08:0d:bf:cb:a2:05:8a: + d0:4d:36:3e:f4:d7:ef:69:c6:5e:e4:b0:94:6f:4a:b9:e7:de: + 5b:88:b6:7b:db:e3:27:e5:76:c3:f0:35:c1:cb:b5:27:9b:33: + 79:dc:90:a6:00:9e:77:fa:fc:cd:27:94:42:16:9c:d3:1c:68: + ec:bf:5c:dd:e5:a9:7b:10:0a:32:74:54:13:31:8b:85:03:84: + 91:b7:58:01:30:14:38:af:28:ca:fc:b1:50:19:19:09:ac:89: + 49:d3 +-----BEGIN CERTIFICATE----- +MIICoTCCAgqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBizELMAkGA1UEBhMCWkEx +FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzAN +BgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAd +BgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcgQ0EwHhcNOTcwMTAxMDAwMDAwWhcN +MjAxMjMxMjM1OTU5WjCBizELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4g +Q2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsG +A1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1l +c3RhbXBpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANYrWHhhRYZT +6jR7UZztsOYuGA7+4F+oJ9O0yeB8WU4WDnNUYMF/9p8u6TqFJBU820cEY8OexJQa +Wt9MevPZQx08EHp5JduQ/vBR5zDWQQD9nyjfeb6Uu522FOMjhdepQeBMpHmwKxqL +8vg7ij5FrHGSALSQQZj7X+36ty6K+Ig3AgMBAAGjEzARMA8GA1UdEwEB/wQFMAMB +Af8wDQYJKoZIhvcNAQEEBQADgYEAZ9viwuaHPUCDhjc1fR/OmsMMZiCouqoEiYbC +9RAIDb/LogWK0E02PvTX72nGXuSwlG9KuefeW4i2e9vjJ+V2w/A1wcu1J5szedyQ +pgCed/r8zSeUQhac0xxo7L9c3eWpexAKMnRUEzGLhQOEkbdYATAUOK8oyvyxUBkZ +CayJSdM= +-----END CERTIFICATE----- + +Entrust.net Global Secure Server CA +=================================== + +MD5 Fingerprint=9D:66:6A:CC:FF:D5:F5:43:B4:BF:8C:16:D1:2B:A8:99 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 949686588 (0x389b113c) + Signature Algorithm: md5WithRSAEncryption + Issuer: O=Entrust.net, OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), OU=(c) 2000 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority + Validity + Not Before: Feb 4 17:20:00 2000 GMT + Not After : Feb 4 17:50:00 2020 GMT + Subject: O=Entrust.net, OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), OU=(c) 2000 Entrust.net Limited, CN=Entrust.net Secure Server Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:c7:c1:5f:4e:71:f1:ce:f0:60:86:0f:d2:58:7f: + d3:33:97:2d:17:a2:75:30:b5:96:64:26:2f:68:c3: + 44:ab:a8:75:e6:00:67:34:57:9e:65:c7:22:9b:73: + e6:d3:dd:08:0e:37:55:aa:25:46:81:6c:bd:fe:a8: + f6:75:57:57:8c:90:6c:4a:c3:3e:8b:4b:43:0a:c9: + 11:56:9a:9a:27:22:99:cf:55:9e:61:d9:02:e2:7c: + b6:7c:38:07:dc:e3:7f:4f:9a:b9:03:41:80:b6:75: + 67:13:0b:9f:e8:57:36:c8:5d:00:36:de:66:14:da: + 6e:76:1f:4f:37:8c:82:13:89 + Exponent: 65537 (0x10001) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/O=Entrust.net/OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.)/OU=(c) 2000 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority/CN=CRL1 + + X509v3 Private Key Usage Period: + Not Before: Feb 4 17:20:00 2000 GMT, Not After: Feb 4 17:50:00 2020 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:CB:6C:C0:6B:E3:BB:3E:CB:FC:22:9C:FE:FB:8B:92:9C:B0:F2:6E:22 + + X509v3 Subject Key Identifier: + CB:6C:C0:6B:E3:BB:3E:CB:FC:22:9C:FE:FB:8B:92:9C:B0:F2:6E:22 + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0...V5.0:4.0.... + Signature Algorithm: md5WithRSAEncryption + 62:db:81:91:ce:c8:9a:77:42:2f:ec:bd:27:a3:53:0f:50:1b: + ea:4e:92:f0:a9:af:a9:a0:ba:48:61:cb:ef:c9:06:ef:1f:d5: + f4:ee:df:56:2d:e6:ca:6a:19:73:aa:53:be:92:b3:50:02:b6: + 85:26:72:63:d8:75:50:62:75:14:b7:b3:50:1a:3f:ca:11:00: + 0b:85:45:69:6d:b6:a5:ae:51:e1:4a:dc:82:3f:6c:8c:34:b2: + 77:6b:d9:02:f6:7f:0e:ea:65:04:f1:cd:54:ca:ba:c9:cc:e0: + 84:f7:c8:3e:11:97:d3:60:09:18:bc:05:ff:6c:89:33:f0:ec: + 15:0f +-----BEGIN CERTIFICATE----- +MIIElTCCA/6gAwIBAgIEOJsRPDANBgkqhkiG9w0BAQQFADCBujEUMBIGA1UEChML +RW50cnVzdC5uZXQxPzA9BgNVBAsUNnd3dy5lbnRydXN0Lm5ldC9TU0xfQ1BTIGlu +Y29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDIwMDAg +RW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJl +IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMDAyMDQxNzIwMDBa +Fw0yMDAyMDQxNzUwMDBaMIG6MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDE/MD0GA1UE +CxQ2d3d3LmVudHJ1c3QubmV0L1NTTF9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p +dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMjAwMCBFbnRydXN0Lm5ldCBMaW1pdGVk +MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp +b24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHwV9OcfHO +8GCGD9JYf9Mzly0XonUwtZZkJi9ow0SrqHXmAGc0V55lxyKbc+bT3QgON1WqJUaB +bL3+qPZ1V1eMkGxKwz6LS0MKyRFWmponIpnPVZ5h2QLifLZ8OAfc439PmrkDQYC2 +dWcTC5/oVzbIXQA23mYU2m52H083jIITiQIDAQABo4IBpDCCAaAwEQYJYIZIAYb4 +QgEBBAQDAgAHMIHjBgNVHR8EgdswgdgwgdWggdKggc+kgcwwgckxFDASBgNVBAoT +C0VudHJ1c3QubmV0MT8wPQYDVQQLFDZ3d3cuZW50cnVzdC5uZXQvU1NMX0NQUyBp +bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAyMDAw +IEVudHJ1c3QubmV0IExpbWl0ZWQxOjA4BgNVBAMTMUVudHJ1c3QubmV0IFNlY3Vy +ZSBTZXJ2ZXIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxDTALBgNVBAMTBENSTDEw +KwYDVR0QBCQwIoAPMjAwMDAyMDQxNzIwMDBagQ8yMDIwMDIwNDE3NTAwMFowCwYD +VR0PBAQDAgEGMB8GA1UdIwQYMBaAFMtswGvjuz7L/CKc/vuLkpyw8m4iMB0GA1Ud +DgQWBBTLbMBr47s+y/winP77i5KcsPJuIjAMBgNVHRMEBTADAQH/MB0GCSqGSIb2 +fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQQFAAOBgQBi24GRzsia +d0Iv7L0no1MPUBvqTpLwqa+poLpIYcvvyQbvH9X07t9WLebKahlzqlO+krNQAraF +JnJj2HVQYnUUt7NQGj/KEQALhUVpbbalrlHhStyCP2yMNLJ3a9kC9n8O6mUE8c1U +yrrJzOCE98g+EZfTYAkYvAX/bIkz8OwVDw== +-----END CERTIFICATE----- + +Thawte Personal Premium CA +========================== + +MD5 Fingerprint=3A:B2:DE:22:9A:20:93:49:F9:ED:C8:D2:8A:E7:68:0D +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/emailAddress=personal-premium@thawte.com + Validity + Not Before: Jan 1 00:00:00 1996 GMT + Not After : Dec 31 23:59:59 2020 GMT + Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Premium CA/emailAddress=personal-premium@thawte.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:c9:66:d9:f8:07:44:cf:b9:8c:2e:f0:a1:ef:13: + 45:6c:05:df:de:27:16:51:36:41:11:6c:6c:3b:ed: + fe:10:7d:12:9e:e5:9b:42:9a:fe:60:31:c3:66:b7: + 73:3a:48:ae:4e:d0:32:37:94:88:b5:0d:b6:d9:f3: + f2:44:d9:d5:88:12:dd:76:4d:f2:1a:fc:6f:23:1e: + 7a:f1:d8:98:45:4e:07:10:ef:16:42:d0:43:75:6d: + 4a:de:e2:aa:c9:31:ff:1f:00:70:7c:66:cf:10:25: + 08:ba:fa:ee:00:e9:46:03:66:27:11:15:3b:aa:5b: + f2:98:dd:36:42:b2:da:88:75 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + 69:36:89:f7:34:2a:33:72:2f:6d:3b:d4:22:b2:b8:6f:9a:c5: + 36:66:0e:1b:3c:a1:b1:75:5a:e6:fd:35:d3:f8:a8:f2:07:6f: + 85:67:8e:de:2b:b9:e2:17:b0:3a:a0:f0:0e:a2:00:9a:df:f3: + 14:15:6e:bb:c8:85:5a:98:80:f9:ff:be:74:1d:3d:f3:fe:30: + 25:d1:37:34:67:fa:a5:71:79:30:61:29:72:c0:e0:2c:4c:fb: + 56:e4:3a:a8:6f:e5:32:59:52:db:75:28:50:59:0c:f8:0b:19: + e4:ac:d9:af:96:8d:2f:50:db:07:c3:ea:1f:ab:33:e0:f5:2b: + 31:89 +-----BEGIN CERTIFICATE----- +MIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkEx +FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD +VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT +ZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1p +dW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNv +bTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJa +QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAY +BgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9u +IFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJl +bWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUu +Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0Vs +Bd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWI +Et12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYD +ZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG +SIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIH +b4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBh +KXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ +-----END CERTIFICATE----- + +Entrust.net Global Secure Personal CA +===================================== + +MD5 Fingerprint=9A:77:19:18:ED:96:CF:DF:1B:B7:0E:F5:8D:B9:88:2E +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 949941988 (0x389ef6e4) + Signature Algorithm: md5WithRSAEncryption + Issuer: O=Entrust.net, OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), OU=(c) 2000 Entrust.net Limited, CN=Entrust.net Client Certification Authority + Validity + Not Before: Feb 7 16:16:40 2000 GMT + Not After : Feb 7 16:46:40 2020 GMT + Subject: O=Entrust.net, OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), OU=(c) 2000 Entrust.net Limited, CN=Entrust.net Client Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:93:74:b4:b6:e4:c5:4b:d6:a1:68:7f:62:d5:ec: + f7:51:57:b3:72:4a:98:f5:d0:89:c9:ad:63:cd:4d: + 35:51:6a:84:d4:ad:c9:68:79:6f:b8:eb:11:db:87: + ae:5c:24:51:13:f1:54:25:84:af:29:2b:9f:e3:80: + e2:d9:cb:dd:c6:45:49:34:88:90:5e:01:97:ef:ea: + 53:a6:dd:fc:c1:de:4b:2a:25:e4:e9:35:fa:55:05: + 06:e5:89:7a:ea:a4:11:57:3b:fc:7c:3d:36:cd:67: + 35:6d:a4:a9:25:59:bd:66:f5:f9:27:e4:95:67:d6: + 3f:92:80:5e:f2:34:7d:2b:85 + Exponent: 65537 (0x10001) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/O=Entrust.net/OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.)/OU=(c) 2000 Entrust.net Limited/CN=Entrust.net Client Certification Authority/CN=CRL1 + + X509v3 Private Key Usage Period: + Not Before: Feb 7 16:16:40 2000 GMT, Not After: Feb 7 16:46:40 2020 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:84:8B:74:FD:C5:8D:C0:FF:27:6D:20:37:45:7C:FE:2D:CE:BA:D3:7D + + X509v3 Subject Key Identifier: + 84:8B:74:FD:C5:8D:C0:FF:27:6D:20:37:45:7C:FE:2D:CE:BA:D3:7D + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0...V5.0:4.0.... + Signature Algorithm: md5WithRSAEncryption + 4e:6f:35:80:3b:d1:8a:f5:0e:a7:20:cb:2d:65:55:d0:92:f4: + e7:84:b5:06:26:83:12:84:0b:ac:3b:b2:44:ee:bd:cf:40:db: + 20:0e:ba:6e:14:ea:30:e0:3b:62:7c:7f:8b:6b:7c:4a:a7:d5: + 35:3c:be:a8:5c:ea:4b:bb:93:8e:80:66:ab:0f:29:fd:4d:2d: + bf:1a:9b:0a:90:c5:ab:da:d1:b3:86:d4:2f:24:52:5c:7a:6d: + c6:f2:fe:e5:4d:1a:30:8c:90:f2:ba:d7:4a:3e:43:7e:d4:c8: + 50:1a:87:f8:4f:81:c7:76:0b:84:3a:72:9d:ce:65:66:97:ae: + 26:5e +-----BEGIN CERTIFICATE----- +MIIEgzCCA+ygAwIBAgIEOJ725DANBgkqhkiG9w0BAQQFADCBtDEUMBIGA1UEChML +RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9HQ0NBX0NQUyBp +bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAyMDAw +IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENsaWVu +dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMDAyMDcxNjE2NDBaFw0yMDAy +MDcxNjQ2NDBaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3 +LmVudHJ1c3QubmV0L0dDQ0FfQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp +YWIuKTElMCMGA1UECxMcKGMpIDIwMDAgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG +A1UEAxMqRW50cnVzdC5uZXQgQ2xpZW50IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCTdLS25MVL1qFof2LV7PdRV7Ny +Spj10InJrWPNTTVRaoTUrcloeW+46xHbh65cJFET8VQlhK8pK5/jgOLZy93GRUk0 +iJBeAZfv6lOm3fzB3ksqJeTpNfpVBQbliXrqpBFXO/x8PTbNZzVtpKklWb1m9fkn +5JVn1j+SgF7yNH0rhQIDAQABo4IBnjCCAZowEQYJYIZIAYb4QgEBBAQDAgAHMIHd +BgNVHR8EgdUwgdIwgc+ggcyggcmkgcYwgcMxFDASBgNVBAoTC0VudHJ1c3QubmV0 +MUAwPgYDVQQLFDd3d3cuZW50cnVzdC5uZXQvR0NDQV9DUFMgaW5jb3JwLiBieSBy +ZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMjAwMCBFbnRydXN0Lm5l +dCBMaW1pdGVkMTMwMQYDVQQDEypFbnRydXN0Lm5ldCBDbGllbnQgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMjAwMDAy +MDcxNjE2NDBagQ8yMDIwMDIwNzE2NDY0MFowCwYDVR0PBAQDAgEGMB8GA1UdIwQY +MBaAFISLdP3FjcD/J20gN0V8/i3OutN9MB0GA1UdDgQWBBSEi3T9xY3A/ydtIDdF +fP4tzrrTfTAMBgNVHRMEBTADAQH/MB0GCSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4w +AwIEkDANBgkqhkiG9w0BAQQFAAOBgQBObzWAO9GK9Q6nIMstZVXQkvTnhLUGJoMS +hAusO7JE7r3PQNsgDrpuFOow4DtifH+La3xKp9U1PL6oXOpLu5OOgGarDyn9TS2/ +GpsKkMWr2tGzhtQvJFJcem3G8v7lTRowjJDyutdKPkN+1MhQGof4T4HHdguEOnKd +zmVml64mXg== +-----END CERTIFICATE----- + +AOL Time Warner Root Certification Authority 1 +============================================== + +MD5 Fingerprint=E7:7A:DC:B1:1F:6E:06:1F:74:6C:59:16:27:C3:4B:C0 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=AOL Time Warner Inc., OU=America Online Inc., CN=AOL Time Warner Root Certification Authority 1 + Validity + Not Before: May 29 06:00:00 2002 GMT + Not After : Nov 20 15:03:00 2037 GMT + Subject: C=US, O=AOL Time Warner Inc., OU=America Online Inc., CN=AOL Time Warner Root Certification Authority 1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:99:de:8f:c3:25:a3:69:34:e8:05:f7:74:b9:bf: + 5a:97:19:b9:2f:94:d2:93:e5:2d:89:ca:84:7c:3f: + 10:43:1b:8c:8b:7c:84:58:f8:24:7c:48:cf:2a:fd: + c0:15:d9:18:7e:84:1a:17:d3:db:9e:d7:ca:e4:d9: + d7:aa:58:51:87:f0:f0:8b:48:4e:e2:c2:c4:59:69: + 30:62:b6:30:a2:8c:0b:11:99:61:35:6d:7e:ef:c5: + b1:19:06:20:12:8e:42:e1:df:0f:96:10:52:a8:cf: + 9c:5f:95:14:d8:af:3b:75:0b:31:20:1f:44:2f:a2: + 62:41:b3:bb:18:21:db:ca:71:3c:8c:ec:b6:b9:0d: + 9f:ef:51:ef:4d:7b:12:f2:0b:0c:e1:ac:40:8f:77: + 7f:b0:ca:78:71:0c:5d:16:71:70:a2:d7:c2:3a:85: + cd:0e:9a:c4:e0:00:b0:d5:25:ea:dc:2b:e4:94:2d: + 38:9c:89:41:57:64:28:65:19:1c:b6:44:b4:c8:31: + 6b:8e:01:7b:76:59:25:7f:15:1c:84:08:7c:73:65: + 20:0a:a1:04:2e:1a:32:a8:9a:20:b1:9c:2c:21:59: + e7:fb:cf:ee:70:2d:08:ca:63:3e:2c:9b:93:19:6a: + a4:c2:97:ff:b7:86:57:88:85:6c:9e:15:16:2b:4d: + 2c:b3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + A1:36:30:16:CB:86:90:00:45:80:53:B1:8F:C8:D8:3D:7C:BE:5F:12 + X509v3 Authority Key Identifier: + keyid:A1:36:30:16:CB:86:90:00:45:80:53:B1:8F:C8:D8:3D:7C:BE:5F:12 + + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 8a:20:18:a5:be:b3:2f:b4:a6:84:00:40:30:29:fa:b4:14:73: + 4c:79:45:a7:f6:70:e0:e8:7e:64:1e:0a:95:7c:6a:61:c2:ef: + 4e:1f:be:ff:c9:99:1f:07:61:4a:e1:5d:4c:cd:ad:ee:d0:52: + 32:d9:59:32:bc:da:79:72:d6:7b:09:e8:02:81:35:d3:0a:df: + 11:1d:c9:79:a0:80:4d:fe:5a:d7:56:d6:ed:0f:2a:af:a7:18: + 75:33:0c:ea:c1:61:05:4f:6a:9a:89:f2:8d:b9:9f:2e:ef:b0: + 5f:5a:00:eb:be:ad:a0:f8:44:05:67:bc:cb:04:ef:9e:64:c5: + e9:c8:3f:05:bf:c6:2f:07:1c:c3:36:71:86:ca:38:66:4a:cd: + d6:b8:4b:c6:6c:a7:97:3b:fa:13:2d:6e:23:61:87:a1:63:42: + ac:c2:cb:97:9f:61:68:cf:2d:4c:04:9d:d7:25:4f:0a:0e:4d: + 90:8b:18:56:a8:93:48:57:dc:6f:ae:bd:9e:67:57:77:89:50: + b3:be:11:9b:45:67:83:86:19:87:d3:98:bd:08:1a:16:1f:58: + 82:0b:e1:96:69:05:4b:8e:ec:83:51:31:07:d5:d4:9f:ff:59: + 7b:a8:6e:85:cf:d3:4b:a9:49:b0:5f:b0:39:28:68:0e:73:dd: + 25:9a:de:12 +-----BEGIN CERTIFICATE----- +MIID5jCCAs6gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBgzELMAkGA1UEBhMCVVMx +HTAbBgNVBAoTFEFPTCBUaW1lIFdhcm5lciBJbmMuMRwwGgYDVQQLExNBbWVyaWNh +IE9ubGluZSBJbmMuMTcwNQYDVQQDEy5BT0wgVGltZSBXYXJuZXIgUm9vdCBDZXJ0 +aWZpY2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyOTA2MDAwMFoXDTM3MTEyMDE1 +MDMwMFowgYMxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRBT0wgVGltZSBXYXJuZXIg +SW5jLjEcMBoGA1UECxMTQW1lcmljYSBPbmxpbmUgSW5jLjE3MDUGA1UEAxMuQU9M +IFRpbWUgV2FybmVyIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnej8Mlo2k06AX3dLm/WpcZuS+U +0pPlLYnKhHw/EEMbjIt8hFj4JHxIzyr9wBXZGH6EGhfT257XyuTZ16pYUYfw8ItI +TuLCxFlpMGK2MKKMCxGZYTVtfu/FsRkGIBKOQuHfD5YQUqjPnF+VFNivO3ULMSAf +RC+iYkGzuxgh28pxPIzstrkNn+9R7017EvILDOGsQI93f7DKeHEMXRZxcKLXwjqF +zQ6axOAAsNUl6twr5JQtOJyJQVdkKGUZHLZEtMgxa44Be3ZZJX8VHIQIfHNlIAqh +BC4aMqiaILGcLCFZ5/vP7nAtCMpjPiybkxlqpMKX/7eGV4iFbJ4VFitNLLMCAwEA +AaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUoTYwFsuGkABFgFOxj8jY +PXy+XxIwHwYDVR0jBBgwFoAUoTYwFsuGkABFgFOxj8jYPXy+XxIwDgYDVR0PAQH/ +BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQCKIBilvrMvtKaEAEAwKfq0FHNMeUWn +9nDg6H5kHgqVfGphwu9OH77/yZkfB2FK4V1Mza3u0FIy2VkyvNp5ctZ7CegCgTXT +Ct8RHcl5oIBN/lrXVtbtDyqvpxh1MwzqwWEFT2qaifKNuZ8u77BfWgDrvq2g+EQF +Z7zLBO+eZMXpyD8Fv8YvBxzDNnGGyjhmSs3WuEvGbKeXO/oTLW4jYYehY0KswsuX +n2Fozy1MBJ3XJU8KDk2QixhWqJNIV9xvrr2eZ1d3iVCzvhGbRWeDhhmH05i9CBoW +H1iCC+GWaQVLjuyDUTEH1dSf/1l7qG6Fz9NLqUmwX7A5KGgOc90lmt4S +-----END CERTIFICATE----- + +AOL Time Warner Root Certification Authority 2 +============================================== + +MD5 Fingerprint=01:5A:99:C3:D6:4F:A9:4B:3C:3B:B1:A3:AB:27:4C:BF +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=AOL Time Warner Inc., OU=America Online Inc., CN=AOL Time Warner Root Certification Authority 2 + Validity + Not Before: May 29 06:00:00 2002 GMT + Not After : Sep 28 23:43:00 2037 GMT + Subject: C=US, O=AOL Time Warner Inc., OU=America Online Inc., CN=AOL Time Warner Root Certification Authority 2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (4096 bit) + Modulus (4096 bit): + 00:b4:37:5a:08:16:99:14:e8:55:b1:1b:24:6b:fc: + c7:8b:e6:87:a9:89:ee:8b:99:cd:4f:40:86:a4:b6: + 4d:c9:d9:b1:dc:3c:4d:0d:85:4c:15:6c:46:8b:52: + 78:9f:f8:23:fd:67:f5:24:3a:68:5d:d0:f7:64:61: + 41:54:a3:8b:a5:08:d2:29:5b:9b:60:4f:26:83:d1: + 63:12:56:49:76:a4:16:c2:a5:9d:45:ac:8b:84:95: + a8:16:b1:ec:9f:ea:24:1a:ef:b9:57:5c:9a:24:21: + 2c:4d:0e:71:1f:a6:ac:5d:45:74:03:98:c4:54:8c: + 16:4a:41:77:86:95:75:0c:47:01:66:60:fc:15:f1: + 0f:ea:f5:14:78:c7:0e:d7:6e:81:1c:5e:bf:5e:e7: + 3a:2a:d8:97:17:30:7c:00:ad:08:9d:33:af:b8:99: + 61:80:8b:a8:95:7e:14:dc:12:6c:a4:d0:d8:ef:40: + 49:02:36:f9:6e:a9:d6:1d:96:56:04:b2:b3:2d:16: + 56:86:8f:d9:20:57:80:cd:67:10:6d:b0:4c:f0:da: + 46:b6:ea:25:2e:46:af:8d:b0:85:38:34:8b:14:26: + 82:2b:ac:ae:99:0b:8e:14:d7:52:bd:9e:69:c3:86: + 02:0b:ea:76:75:31:09:ce:33:19:21:85:43:e6:89: + 2d:9f:25:37:67:f1:23:6a:d2:00:6d:97:f9:9f:e7: + 29:ca:dd:1f:d7:06:ea:b8:c9:b9:09:21:9f:c8:3f: + 06:c5:d2:e9:12:46:00:4e:7b:08:eb:42:3d:2b:48: + 6e:9d:67:dd:4b:02:e4:44:f3:93:19:a5:27:ce:69: + 7a:be:67:d3:fc:50:a4:2c:ab:c3:6b:b9:e3:80:4c: + cf:05:61:4b:2b:dc:1b:b9:a6:d2:d0:aa:f5:2b:73: + fb:ce:90:35:9f:0c:52:1c:bf:5c:21:61:11:5b:15: + 4b:a9:24:51:fc:a4:5c:f7:17:9d:b0:d2:fa:07:e9: + 8f:56:e4:1a:8c:68:8a:04:d3:7c:5a:e3:9e:a2:a1: + ca:71:5b:a2:d4:a0:e7:29:85:5d:03:68:2a:4f:d2: + 06:d7:3d:f9:c3:03:2f:3f:65:f9:67:1e:47:40:d3: + 63:0f:e3:d5:8e:f9:85:ab:97:4c:b3:d7:26:eb:96: + 0a:94:de:85:36:9c:c8:7f:81:09:02:49:2a:0e:f5: + 64:32:0c:82:d1:ba:6a:82:1b:b3:4b:74:11:f3:8c: + 77:d6:9f:bf:dc:37:a4:a7:55:04:2f:d4:31:e8:d3: + 46:b9:03:7c:da:12:4e:59:64:b7:51:31:31:50:a0: + ca:1c:27:d9:10:2e:ad:d6:bd:10:66:2b:c3:b0:22: + 4a:12:5b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 4F:69:6D:03:7E:9D:9F:07:18:43:BC:B7:10:4E:D5:BF:A9:C4:20:28 + X509v3 Authority Key Identifier: + keyid:4F:69:6D:03:7E:9D:9F:07:18:43:BC:B7:10:4E:D5:BF:A9:C4:20:28 + + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 3b:f3:ae:ca:e8:2e:87:85:fb:65:59:e7:ad:11:14:a5:57:bc: + 58:9f:24:12:57:bb:fb:3f:34:da:ee:ad:7a:2a:34:72:70:31: + 6b:c7:19:98:80:c9:82:de:37:77:5e:54:8b:8e:f2:ea:67:4f: + c9:74:84:91:56:09:d5:e5:7a:9a:81:b6:81:c2:ad:36:e4:f1: + 54:11:53:f3:34:45:01:26:c8:e5:1a:bc:34:44:21:de:ad:25: + fc:76:16:77:21:90:80:98:57:9d:4e:ea:ec:2f:aa:3c:14:7b: + 57:c1:7e:18:14:67:ee:24:c6:bd:ba:15:b0:d2:18:bd:b7:55: + 81:ac:53:c0:e8:dd:69:12:13:42:b7:02:b5:05:41:ca:79:50: + 6e:82:0e:71:72:93:46:e8:9d:0d:5d:bd:ae:ce:29:ad:63:d5: + 55:16:80:30:27:ff:76:ba:f7:b8:d6:4a:e3:d9:b5:f9:52:d0: + 4e:40:a9:c7:e5:c2:32:c7:aa:76:24:e1:6b:05:50:eb:c5:bf: + 0a:54:e5:b9:42:3c:24:fb:b7:07:9c:30:9f:79:5a:e6:e0:40: + 52:15:f4:fc:aa:f4:56:f9:44:97:87:ed:0e:65:72:5e:be:26: + fb:4d:a4:2d:08:07:de:d8:5c:a0:dc:81:33:99:18:25:11:77: + a7:eb:fd:58:09:2c:99:6b:1b:8a:f3:52:3f:1a:4d:48:60:f1: + a0:f6:33:02:53:8b:ed:25:09:b8:0d:2d:ed:97:73:ec:d7:96: + 1f:8e:60:0e:da:10:9b:2f:18:24:f6:a6:4d:0a:f9:3b:cb:75: + c2:cc:2f:ce:24:69:c9:0a:22:8e:59:a7:f7:82:0c:d7:d7:6b: + 35:9c:43:00:6a:c4:95:67:ba:9c:45:cb:b8:0e:37:f7:dc:4e: + 01:4f:be:0a:b6:03:d3:ad:8a:45:f7:da:27:4d:29:b1:48:df: + e4:11:e4:96:46:bd:6c:02:3e:d6:51:c8:95:17:01:15:a9:f2: + aa:aa:f2:bf:2f:65:1b:6f:d0:b9:1a:93:f5:8e:35:c4:80:87: + 3e:94:2f:66:e4:e9:a8:ff:41:9c:70:2a:4f:2a:39:18:95:1e: + 7e:fb:61:01:3c:51:08:2e:28:18:a4:16:0f:31:fd:3a:6c:23: + 93:20:76:e1:fd:07:85:d1:5b:3f:d2:1c:73:32:dd:fa:b9:f8: + 8c:cf:02:87:7a:9a:96:e4:ed:4f:89:8d:53:43:ab:0e:13:c0: + 01:15:b4:79:38:db:fc:6e:3d:9e:51:b6:b8:13:8b:67:cf:f9: + 7c:d9:22:1d:f6:5d:c5:1c:01:2f:98:e8:7a:24:18:bc:84:d7: + fa:dc:72:5b:f7:c1:3a:68 +-----BEGIN CERTIFICATE----- +MIIF5jCCA86gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBgzELMAkGA1UEBhMCVVMx +HTAbBgNVBAoTFEFPTCBUaW1lIFdhcm5lciBJbmMuMRwwGgYDVQQLExNBbWVyaWNh +IE9ubGluZSBJbmMuMTcwNQYDVQQDEy5BT0wgVGltZSBXYXJuZXIgUm9vdCBDZXJ0 +aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyOTA2MDAwMFoXDTM3MDkyODIz +NDMwMFowgYMxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRBT0wgVGltZSBXYXJuZXIg +SW5jLjEcMBoGA1UECxMTQW1lcmljYSBPbmxpbmUgSW5jLjE3MDUGA1UEAxMuQU9M +IFRpbWUgV2FybmVyIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALQ3WggWmRToVbEbJGv8x4vmh6mJ +7ouZzU9AhqS2TcnZsdw8TQ2FTBVsRotSeJ/4I/1n9SQ6aF3Q92RhQVSji6UI0ilb +m2BPJoPRYxJWSXakFsKlnUWsi4SVqBax7J/qJBrvuVdcmiQhLE0OcR+mrF1FdAOY +xFSMFkpBd4aVdQxHAWZg/BXxD+r1FHjHDtdugRxev17nOirYlxcwfACtCJ0zr7iZ +YYCLqJV+FNwSbKTQ2O9ASQI2+W6p1h2WVgSysy0WVoaP2SBXgM1nEG2wTPDaRrbq +JS5Gr42whTg0ixQmgiusrpkLjhTXUr2eacOGAgvqdnUxCc4zGSGFQ+aJLZ8lN2fx +I2rSAG2X+Z/nKcrdH9cG6rjJuQkhn8g/BsXS6RJGAE57COtCPStIbp1n3UsC5ETz +kxmlJ85per5n0/xQpCyrw2u544BMzwVhSyvcG7mm0tCq9Stz+86QNZ8MUhy/XCFh +EVsVS6kkUfykXPcXnbDS+gfpj1bkGoxoigTTfFrjnqKhynFbotSg5ymFXQNoKk/S +Btc9+cMDLz9l+WceR0DTYw/j1Y75hauXTLPXJuuWCpTehTacyH+BCQJJKg71ZDIM +gtG6aoIbs0t0EfOMd9afv9w3pKdVBC/UMejTRrkDfNoSTllkt1ExMVCgyhwn2RAu +rda9EGYrw7AiShJbAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FE9pbQN+nZ8HGEO8txBO1b+pxCAoMB8GA1UdIwQYMBaAFE9pbQN+nZ8HGEO8txBO +1b+pxCAoMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAO/Ouyugu +h4X7ZVnnrREUpVe8WJ8kEle7+z802u6teio0cnAxa8cZmIDJgt43d15Ui47y6mdP +yXSEkVYJ1eV6moG2gcKtNuTxVBFT8zRFASbI5Rq8NEQh3q0l/HYWdyGQgJhXnU7q +7C+qPBR7V8F+GBRn7iTGvboVsNIYvbdVgaxTwOjdaRITQrcCtQVBynlQboIOcXKT +RuidDV29rs4prWPVVRaAMCf/drr3uNZK49m1+VLQTkCpx+XCMseqdiThawVQ68W/ +ClTluUI8JPu3B5wwn3la5uBAUhX0/Kr0VvlEl4ftDmVyXr4m+02kLQgH3thcoNyB +M5kYJRF3p+v9WAksmWsbivNSPxpNSGDxoPYzAlOL7SUJuA0t7Zdz7NeWH45gDtoQ +my8YJPamTQr5O8t1wswvziRpyQoijlmn94IM19drNZxDAGrElWe6nEXLuA4399xO +AU++CrYD062KRffaJ00psUjf5BHklka9bAI+1lHIlRcBFanyqqryvy9lG2/QuRqT +9Y41xICHPpQvZuTpqP9BnHAqTyo5GJUefvthATxRCC4oGKQWDzH9OmwjkyB24f0H +hdFbP9IcczLd+rn4jM8Ch3qaluTtT4mNU0OrDhPAARW0eTjb/G49nlG2uBOLZ8/5 +fNkiHfZdxRwBL5joeiQYvITX+txyW/fBOmg= +-----END CERTIFICATE----- + +beTRUSTed Root CA-Baltimore Implementation +========================================== + +MD5 Fingerprint=81:35:B9:FB:FB:12:CA:18:69:36:EB:AE:69:78:A1:F1 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1018510662 (0x3cb53d46) + Signature Algorithm: sha1WithRSAEncryption + Issuer: O=beTRUSTed, OU=beTRUSTed Root CAs, CN=beTRUSTed Root CA-Baltimore Implementation + Validity + Not Before: Apr 11 07:38:51 2002 GMT + Not After : Apr 11 07:38:51 2022 GMT + Subject: O=beTRUSTed, OU=beTRUSTed Root CAs, CN=beTRUSTed Root CA-Baltimore Implementation + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:bc:7e:c4:39:9c:8c:e3:d6:1c:86:ff:ca:62:ad: + e0:7f:30:45:7a:8e:1a:b3:b8:c7:f9:d1:36:ff:22: + f3:4e:6a:5f:84:10:fb:66:81:c3:94:79:31:d2:91: + e1:77:8e:18:2a:c3:14:de:51:f5:4f:a3:2b:bc:18: + 16:e2:b5:dd:79:de:22:f8:82:7e:cb:81:1f:fd:27: + 2c:8f:fa:97:64:22:8e:f8:ff:61:a3:9c:1b:1e:92: + 8f:c0:a8:09:df:09:11:ec:b7:7d:31:9a:1a:ea:83: + 21:06:3c:9f:ba:5c:ff:94:ea:6a:b8:c3:6b:55:34: + 4f:3d:32:1f:dd:81:14:e0:c4:3c:cd:9d:30:f8:30: + a9:97:d3:ee:cc:a3:d0:1f:5f:1c:13:81:d4:18:ab: + 94:d1:63:c3:9e:7f:35:92:9e:5f:44:ea:ec:f4:22: + 5c:b7:e8:3d:7d:a4:f9:89:a9:91:b2:2a:d9:eb:33: + 87:ee:a5:fd:e3:da:cc:88:e6:89:26:6e:c7:2b:82: + d0:5e:9d:59:db:14:ec:91:83:05:c3:5e:0e:c6:2a: + d0:04:dd:71:3d:20:4e:58:27:fc:53:fb:78:78:19: + 14:b2:fc:90:52:89:38:62:60:07:b4:a0:ec:ac:6b: + 50:d6:fd:b9:28:6b:ef:52:2d:3a:b2:ff:f1:01:40: + ac:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.6334.0.0.1.9.40.51377 + User Notice: + Explicit Text: Reliance on or use of this Certificate creates an acknowledgment and acceptance of the then applicable standard terms and conditions of use, the Certification Practice Statement and the Relying Party Agreement, which can be found at the beTRUSTed web site, http://www.betrusted.com/products_services/index.html + CPS: http://www.betrusted.com/products_services/index.html + + X509v3 Subject Key Identifier: + 45:3D:C3:A9:D1:DC:3F:24:56:98:1C:73:18:88:6A:FF:83:47:ED:B6 + X509v3 Authority Key Identifier: + keyid:45:3D:C3:A9:D1:DC:3F:24:56:98:1C:73:18:88:6A:FF:83:47:ED:B6 + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 49:92:bc:a3:ee:ac:bd:fa:0d:c9:8b:79:86:1c:23:76:b0:80: + 59:77:fc:da:7f:b4:4b:df:c3:64:4b:6a:4e:0e:ad:f2:7d:59: + 77:05:ad:0a:89:73:b0:fa:bc:cb:dc:8d:00:88:8f:a6:a0:b2: + ea:ac:52:27:bf:a1:48:7c:97:10:7b:ba:ed:13:1d:9a:07:6e: + cb:31:62:12:e8:63:03:aa:7d:6d:e3:f8:1b:76:21:78:1b:9f: + 4b:43:8c:d3:49:86:f6:1b:5c:f6:2e:60:15:d3:e9:e3:7b:75: + 3f:d0:02:83:d0:18:82:41:cd:65:37:ea:8e:32:7e:bd:6b:99: + 5d:30:11:c8:db:48:54:1c:3b:e1:a7:13:d3:6a:48:93:f7:3d: + 8c:7f:05:e8:ce:f3:88:2a:63:04:b8:ea:7e:58:7c:01:7b:5b: + e1:c5:7d:ef:21:e0:8d:0e:5d:51:7d:b1:67:fd:a3:bd:38:36: + c6:f2:38:86:87:1a:96:68:60:46:fb:28:14:47:55:e1:a7:80: + 0c:6b:e2:ea:df:4d:7c:90:48:a0:36:bd:09:17:89:7f:c3:f2: + d3:9c:9c:e3:dd:c4:1b:dd:f5:b7:71:b3:53:05:89:06:d0:cb: + 4a:80:c1:c8:53:90:b5:3c:31:88:17:50:9f:c9:c4:0e:8b:d8: + a8:02:63:0d +-----BEGIN CERTIFICATE----- +MIIFajCCBFKgAwIBAgIEPLU9RjANBgkqhkiG9w0BAQUFADBmMRIwEAYDVQQKEwli +ZVRSVVNUZWQxGzAZBgNVBAsTEmJlVFJVU1RlZCBSb290IENBczEzMDEGA1UEAxMq +YmVUUlVTVGVkIFJvb3QgQ0EtQmFsdGltb3JlIEltcGxlbWVudGF0aW9uMB4XDTAy +MDQxMTA3Mzg1MVoXDTIyMDQxMTA3Mzg1MVowZjESMBAGA1UEChMJYmVUUlVTVGVk +MRswGQYDVQQLExJiZVRSVVNUZWQgUm9vdCBDQXMxMzAxBgNVBAMTKmJlVFJVU1Rl +ZCBSb290IENBLUJhbHRpbW9yZSBJbXBsZW1lbnRhdGlvbjCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBALx+xDmcjOPWHIb/ymKt4H8wRXqOGrO4x/nRNv8i +805qX4QQ+2aBw5R5MdKR4XeOGCrDFN5R9U+jK7wYFuK13XneIviCfsuBH/0nLI/6 +l2Qijvj/YaOcGx6Sj8CoCd8JEey3fTGaGuqDIQY8n7pc/5TqarjDa1U0Tz0yH92B +FODEPM2dMPgwqZfT7syj0B9fHBOB1BirlNFjw55/NZKeX0Tq7PQiXLfoPX2k+Ymp +kbIq2eszh+6l/ePazIjmiSZuxyuC0F6dWdsU7JGDBcNeDsYq0ATdcT0gTlgn/FP7 +eHgZFLL8kFKJOGJgB7Sg7KxrUNb9uShr71ItOrL/8QFArDcCAwEAAaOCAh4wggIa +MA8GA1UdEwEB/wQFMAMBAf8wggG1BgNVHSAEggGsMIIBqDCCAaQGDysGAQQBsT4A +AAEJKIORMTCCAY8wggFIBggrBgEFBQcCAjCCAToaggE2UmVsaWFuY2Ugb24gb3Ig +dXNlIG9mIHRoaXMgQ2VydGlmaWNhdGUgY3JlYXRlcyBhbiBhY2tub3dsZWRnbWVu +dCBhbmQgYWNjZXB0YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJk +IHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHVzZSwgdGhlIENlcnRpZmljYXRpb24g +UHJhY3RpY2UgU3RhdGVtZW50IGFuZCB0aGUgUmVseWluZyBQYXJ0eSBBZ3JlZW1l +bnQsIHdoaWNoIGNhbiBiZSBmb3VuZCBhdCB0aGUgYmVUUlVTVGVkIHdlYiBzaXRl +LCBodHRwOi8vd3d3LmJldHJ1c3RlZC5jb20vcHJvZHVjdHNfc2VydmljZXMvaW5k +ZXguaHRtbDBBBggrBgEFBQcCARY1aHR0cDovL3d3dy5iZXRydXN0ZWQuY29tL3By +b2R1Y3RzX3NlcnZpY2VzL2luZGV4Lmh0bWwwHQYDVR0OBBYEFEU9w6nR3D8kVpgc +cxiIav+DR+22MB8GA1UdIwQYMBaAFEU9w6nR3D8kVpgccxiIav+DR+22MA4GA1Ud +DwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEASZK8o+6svfoNyYt5hhwjdrCA +WXf82n+0S9/DZEtqTg6t8n1ZdwWtColzsPq8y9yNAIiPpqCy6qxSJ7+hSHyXEHu6 +7RMdmgduyzFiEuhjA6p9beP4G3YheBufS0OM00mG9htc9i5gFdPp43t1P9ACg9AY +gkHNZTfqjjJ+vWuZXTARyNtIVBw74acT02pIk/c9jH8F6M7ziCpjBLjqflh8AXtb +4cV97yHgjQ5dUX2xZ/2jvTg2xvI4hocalmhgRvsoFEdV4aeADGvi6t9NfJBIoDa9 +CReJf8Py05yc493EG931t3GzUwWJBtDLSoDByFOQtTwxiBdQn8nEDovYqAJjDQ== +-----END CERTIFICATE----- + +beTRUSTed Root CA - Entrust Implementation +========================================== + +MD5 Fingerprint=7D:86:90:8F:5B:F1:F2:40:C0:F7:3D:62:B5:A4:A9:3B +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1018515264 (0x3cb54f40) + Signature Algorithm: sha1WithRSAEncryption + Issuer: O=beTRUSTed, OU=beTRUSTed Root CAs, CN=beTRUSTed Root CA - Entrust Implementation + Validity + Not Before: Apr 11 08:24:27 2002 GMT + Not After : Apr 11 08:54:27 2022 GMT + Subject: O=beTRUSTed, OU=beTRUSTed Root CAs, CN=beTRUSTed Root CA - Entrust Implementation + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:ba:f4:44:03:aa:12:6a:b5:43:ec:55:92:b6:30: + 7d:35:57:0c:db:f3:0d:27:6e:4c:f7:50:a8:9b:4e: + 2b:6f:db:f5:ad:1c:4b:5d:b3:a9:c1:fe:7b:44:eb: + 5b:a3:05:0d:1f:c5:34:2b:30:00:29:f1:78:40:b2: + a4:ff:3a:f4:01:88:17:7e:e6:d4:26:d3:ba:4c:ea: + 32:fb:43:77:97:87:23:c5:db:43:a3:f5:2a:a3:51: + 5e:e1:3b:d2:65:69:7e:55:15:9b:7a:e7:69:f7:44: + e0:57:b5:15:e8:66:60:0f:0d:03:fb:82:8e:a3:e8: + 11:7b:6c:be:c7:63:0e:17:93:df:cf:4b:ae:6e:73: + 75:e0:f3:aa:b9:a4:c0:09:1b:85:ea:71:29:88:41: + 32:f9:f0:2a:0e:6c:09:f2:74:6b:66:6c:52:13:1f: + 18:bc:d4:3e:f7:d8:6e:20:9e:ca:fe:fc:21:94:ee: + 13:28:4b:d7:5c:5e:0c:66:ee:e9:bb:0f:c1:34:b1: + 7f:08:76:f3:3d:26:70:c9:8b:25:1d:62:24:0c:ea: + 1c:75:4e:c0:12:e4:ba:13:1d:30:29:2d:56:33:05: + bb:97:59:7e:c6:49:4f:89:d7:2f:24:a8:b6:88:40: + b5:64:92:53:56:24:e4:a2:a0:85:b3:5e:90:b4:12: + 33:cd + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.6334.0.0.2.9.40.51377 + User Notice: + Explicit Text: Reliance on or use of this Certificate creates an acknowledgment and acceptance of the then applicable standard terms and conditions of use, the Certification Practice Statement and the Relying Party Agreement, which can be found at the beTRUSTed web site, https://www.betrusted.com/products_services/index.html + CPS: https://www.betrusted.com/products_services/index.html + + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/O=beTRUSTed/OU=beTRUSTed Root CAs/CN=beTRUSTed Root CA - Entrust Implementation/CN=CRL1 + + X509v3 Private Key Usage Period: + Not Before: Apr 11 08:24:27 2002 GMT, Not After: Apr 11 08:54:27 2022 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:7D:70:E5:AE:38:8B:06:3F:AA:1C:1A:8F:F9:CF:24:30:AA:84:84:16 + + X509v3 Subject Key Identifier: + 7D:70:E5:AE:38:8B:06:3F:AA:1C:1A:8F:F9:CF:24:30:AA:84:84:16 + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0...V6.0:4.0.... + Signature Algorithm: sha1WithRSAEncryption + 2a:b8:17:ce:1f:10:94:eb:b8:9a:b7:b9:5f:ec:da:f7:92:24: + ac:dc:92:3b:c7:20:8d:f2:99:e5:5d:38:a1:c2:34:ed:c5:13: + 59:5c:05:b5:2b:4f:61:9b:91:fb:41:fc:fc:d5:3c:4d:98:76: + 06:f5:81:7d:eb:dd:90:e6:d1:56:54:da:e3:2d:0c:9f:11:32: + 94:22:01:7a:f6:6c:2c:74:67:04:cc:a5:8f:8e:2c:b3:43:b5: + 94:a2:d0:7d:e9:62:7f:06:be:27:01:83:9e:3a:fd:8a:ee:98: + 43:4a:6b:d7:b5:97:3b:3a:bf:4f:6d:b4:63:fa:33:00:34:2e: + 2d:6d:96:c9:7b:ca:99:63:ba:be:f4:f6:30:a0:2d:98:96:e9: + 56:44:05:a9:44:a3:61:10:eb:82:a1:67:5d:bc:5d:27:75:aa: + 8a:28:36:2a:38:92:d9:dd:a4:5e:00:a5:cc:cc:7c:29:2a:de: + 28:90:ab:b7:e1:b6:ff:7d:25:0b:40:d8:aa:34:a3:2d:de:07: + eb:5f:ce:0a:dd:ca:7e:3a:7d:26:c1:62:68:3a:e6:2f:37:f3: + 81:86:21:c4:a9:64:aa:ef:45:36:d1:1a:66:7c:f8:e9:37:d6: + d6:61:be:a2:ad:48:e7:df:e6:74:fe:d3:6d:7d:d2:25:dc:ac: + 62:57:a9:f7 +-----BEGIN CERTIFICATE----- +MIIGUTCCBTmgAwIBAgIEPLVPQDANBgkqhkiG9w0BAQUFADBmMRIwEAYDVQQKEwli +ZVRSVVNUZWQxGzAZBgNVBAsTEmJlVFJVU1RlZCBSb290IENBczEzMDEGA1UEAxMq +YmVUUlVTVGVkIFJvb3QgQ0EgLSBFbnRydXN0IEltcGxlbWVudGF0aW9uMB4XDTAy +MDQxMTA4MjQyN1oXDTIyMDQxMTA4NTQyN1owZjESMBAGA1UEChMJYmVUUlVTVGVk +MRswGQYDVQQLExJiZVRSVVNUZWQgUm9vdCBDQXMxMzAxBgNVBAMTKmJlVFJVU1Rl +ZCBSb290IENBIC0gRW50cnVzdCBJbXBsZW1lbnRhdGlvbjCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBALr0RAOqEmq1Q+xVkrYwfTVXDNvzDSduTPdQqJtO +K2/b9a0cS12zqcH+e0TrW6MFDR/FNCswACnxeECypP869AGIF37m1CbTukzqMvtD +d5eHI8XbQ6P1KqNRXuE70mVpflUVm3rnafdE4Fe1FehmYA8NA/uCjqPoEXtsvsdj +DheT389Lrm5zdeDzqrmkwAkbhepxKYhBMvnwKg5sCfJ0a2ZsUhMfGLzUPvfYbiCe +yv78IZTuEyhL11xeDGbu6bsPwTSxfwh28z0mcMmLJR1iJAzqHHVOwBLkuhMdMCkt +VjMFu5dZfsZJT4nXLySotohAtWSSU1Yk5KKghbNekLQSM80CAwEAAaOCAwUwggMB +MIIBtwYDVR0gBIIBrjCCAaowggGmBg8rBgEEAbE+AAACCSiDkTEwggGRMIIBSQYI +KwYBBQUHAgIwggE7GoIBN1JlbGlhbmNlIG9uIG9yIHVzZSBvZiB0aGlzIENlcnRp +ZmljYXRlIGNyZWF0ZXMgYW4gYWNrbm93bGVkZ21lbnQgYW5kIGFjY2VwdGFuY2Ug +b2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0 +aW9ucyBvZiB1c2UsIHRoZSBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVu +dCBhbmQgdGhlIFJlbHlpbmcgUGFydHkgQWdyZWVtZW50LCB3aGljaCBjYW4gYmUg +Zm91bmQgYXQgdGhlIGJlVFJVU1RlZCB3ZWIgc2l0ZSwgaHR0cHM6Ly93d3cuYmV0 +cnVzdGVkLmNvbS9wcm9kdWN0c19zZXJ2aWNlcy9pbmRleC5odG1sMEIGCCsGAQUF +BwIBFjZodHRwczovL3d3dy5iZXRydXN0ZWQuY29tL3Byb2R1Y3RzX3NlcnZpY2Vz +L2luZGV4Lmh0bWwwEQYJYIZIAYb4QgEBBAQDAgAHMIGJBgNVHR8EgYEwfzB9oHug +eaR3MHUxEjAQBgNVBAoTCWJlVFJVU1RlZDEbMBkGA1UECxMSYmVUUlVTVGVkIFJv +b3QgQ0FzMTMwMQYDVQQDEypiZVRSVVNUZWQgUm9vdCBDQSAtIEVudHJ1c3QgSW1w +bGVtZW50YXRpb24xDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMjAwMjA0MTEw +ODI0MjdagQ8yMDIyMDQxMTA4NTQyN1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaA +FH1w5a44iwY/qhwaj/nPJDCqhIQWMB0GA1UdDgQWBBR9cOWuOIsGP6ocGo/5zyQw +qoSEFjAMBgNVHRMEBTADAQH/MB0GCSqGSIb2fQdBAAQQMA4bCFY2LjA6NC4wAwIE +kDANBgkqhkiG9w0BAQUFAAOCAQEAKrgXzh8QlOu4mre5X+za95IkrNySO8cgjfKZ +5V04ocI07cUTWVwFtStPYZuR+0H8/NU8TZh2BvWBfevdkObRVlTa4y0MnxEylCIB +evZsLHRnBMylj44ss0O1lKLQfelifwa+JwGDnjr9iu6YQ0pr17WXOzq/T220Y/oz +ADQuLW2WyXvKmWO6vvT2MKAtmJbpVkQFqUSjYRDrgqFnXbxdJ3Wqiig2KjiS2d2k +XgClzMx8KSreKJCrt+G2/30lC0DYqjSjLd4H61/OCt3Kfjp9JsFiaDrmLzfzgYYh +xKlkqu9FNtEaZnz46TfW1mG+oq1I59/mdP7TbX3SJdysYlep9w== +-----END CERTIFICATE----- + +beTRUSTed Root CA - RSA Implementation +====================================== + +MD5 Fingerprint=86:42:05:09:BC:A7:9D:EC:1D:F3:2E:0E:BA:D8:1D:D0 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 3b:59:c7:7b:cd:5b:57:9e:bd:37:52:ac:76:b4:aa:1a + Signature Algorithm: sha1WithRSAEncryption + Issuer: O=beTRUSTed, OU=beTRUSTed Root CAs, CN=beTRUSTed Root CA - RSA Implementation + Validity + Not Before: Apr 11 11:18:13 2002 GMT + Not After : Apr 12 11:07:25 2022 GMT + Subject: O=beTRUSTed, OU=beTRUSTed Root CAs, CN=beTRUSTed Root CA - RSA Implementation + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:e4:ba:34:30:09:8e:57:d0:b9:06:2c:6f:6e:24: + 80:22:bf:5d:43:a6:fa:4f:ac:82:e7:1c:68:70:85: + 1b:a3:6e:b5:aa:78:d9:6e:07:4b:3f:e9:df:f5:ea: + e8:54:a1:61:8a:0e:2f:69:75:18:b7:0c:e5:14:8d: + 71:6e:98:b8:55:fc:0c:95:d0:9b:6e:e1:2d:88:d4: + 3a:40:6b:92:f1:99:96:64:de:db:ff:78:f4:ee:96: + 1d:47:89:7c:d4:be:b9:88:77:23:3a:09:e6:04:9e: + 6d:aa:5e:d2:c8:bd:9a:4e:19:df:89:ea:5b:0e:7e: + c3:e4:b4:f0:e0:69:3b:88:0f:41:90:f8:d4:71:43: + 24:c1:8f:26:4b:3b:56:e9:ff:8c:6c:37:e9:45:ad: + 85:8c:53:c3:60:86:90:4a:96:c9:b3:54:b0:bb:17: + f0:1c:45:d9:d4:1b:19:64:56:0a:19:f7:cc:e1:ff: + 86:af:7e:58:5e:ac:7a:90:1f:c9:28:39:45:7b:a2: + b6:c7:9c:1f:da:85:d4:21:86:59:30:93:be:53:33: + 37:f6:ef:41:cf:33:c7:ab:72:6b:25:f5:f3:53:1b: + 0c:4c:2e:f1:75:4b:ef:a0:87:f7:fe:8a:15:d0:6c: + d5:cb:f9:68:53:b9:70:15:13:c2:f5:2e:fb:43:35: + 75:2d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.6334.0.0.3.9.40.51377 + CPS: http://www.betrusted.com/products_services/index.html + User Notice: + Explicit Text: Reliance on or use of this Certificate creates an acknowledgment and acceptance of the then applicable standard terms and conditions of use, the Certification Practice Statement and the Relying Party Agreement, which can be found at the beTRUSTed web site, http://www.betrusted.com/products_services/index.html + + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:A9:EC:14:7E:F9:D9:43:CC:53:2B:14:AD:CF:F7:F0:59:89:41:CD:19 + + X509v3 Subject Key Identifier: + A9:EC:14:7E:F9:D9:43:CC:53:2B:14:AD:CF:F7:F0:59:89:41:CD:19 + Signature Algorithm: sha1WithRSAEncryption + db:97:b0:75:ea:0c:c4:c1:98:ca:56:05:c0:a8:ad:26:48:af: + 2d:20:e8:81:c7:b6:df:43:c1:2c:1d:75:4b:d4:42:8d:e7:7a: + a8:74:dc:66:42:59:87:b3:f5:69:6d:d9:a9:9e:b3:7d:1c:31: + c1:f5:54:e2:59:24:49:e5:ee:bd:39:a6:6b:8a:98:44:fb:9b: + d7:2a:83:97:34:2d:c7:7d:35:4c:2d:34:b8:3e:0d:c4:ec:88: + 27:af:9e:92:fd:50:61:82:a8:60:07:14:53:cc:65:13:c1:f6: + 47:44:69:d2:31:c8:a6:dd:2e:b3:0b:de:4a:8d:5b:3d:ab:0d: + c2:35:52:a2:56:37:cc:32:8b:28:85:42:9c:91:40:7a:70:2b: + 38:36:d5:e1:73:1a:1f:e5:fa:7e:5f:dc:d6:9c:3b:30:ea:db: + c0:5b:27:5c:d3:73:07:c1:c2:f3:4c:9b:6f:9f:1b:ca:1e:aa: + a8:38:33:09:58:b2:ae:fc:07:e8:36:dc:55:ba:2f:4f:40:fe: + 7a:bd:06:a6:81:c1:93:22:7c:86:11:0a:06:77:48:ae:35:b7: + 2f:32:9a:61:5e:8b:be:29:9f:29:24:88:56:39:2c:a8:d2:ab: + 96:03:5a:d4:48:9f:b9:40:84:0b:98:68:fb:01:43:d6:1b:e2: + 09:b1:97:1c +-----BEGIN CERTIFICATE----- +MIIFaDCCBFCgAwIBAgIQO1nHe81bV569N1KsdrSqGjANBgkqhkiG9w0BAQUFADBi +MRIwEAYDVQQKEwliZVRSVVNUZWQxGzAZBgNVBAsTEmJlVFJVU1RlZCBSb290IENB +czEvMC0GA1UEAxMmYmVUUlVTVGVkIFJvb3QgQ0EgLSBSU0EgSW1wbGVtZW50YXRp +b24wHhcNMDIwNDExMTExODEzWhcNMjIwNDEyMTEwNzI1WjBiMRIwEAYDVQQKEwli +ZVRSVVNUZWQxGzAZBgNVBAsTEmJlVFJVU1RlZCBSb290IENBczEvMC0GA1UEAxMm +YmVUUlVTVGVkIFJvb3QgQ0EgLSBSU0EgSW1wbGVtZW50YXRpb24wggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkujQwCY5X0LkGLG9uJIAiv11DpvpPrILn +HGhwhRujbrWqeNluB0s/6d/16uhUoWGKDi9pdRi3DOUUjXFumLhV/AyV0Jtu4S2I +1DpAa5LxmZZk3tv/ePTulh1HiXzUvrmIdyM6CeYEnm2qXtLIvZpOGd+J6lsOfsPk +tPDgaTuID0GQ+NRxQyTBjyZLO1bp/4xsN+lFrYWMU8NghpBKlsmzVLC7F/AcRdnU +GxlkVgoZ98zh/4avflherHqQH8koOUV7orbHnB/ahdQhhlkwk75TMzf270HPM8er +cmsl9fNTGwxMLvF1S++gh/f+ihXQbNXL+WhTuXAVE8L1LvtDNXUtAgMBAAGjggIY +MIICFDAMBgNVHRMEBTADAQH/MIIBtQYDVR0gBIIBrDCCAagwggGkBg8rBgEEAbE+ +AAADCSiDkTEwggGPMEEGCCsGAQUFBwIBFjVodHRwOi8vd3d3LmJldHJ1c3RlZC5j +b20vcHJvZHVjdHNfc2VydmljZXMvaW5kZXguaHRtbDCCAUgGCCsGAQUFBwICMIIB +OhqCATZSZWxpYW5jZSBvbiBvciB1c2Ugb2YgdGhpcyBDZXJ0aWZpY2F0ZSBjcmVh +dGVzIGFuIGFja25vd2xlZGdtZW50IGFuZCBhY2NlcHRhbmNlIG9mIHRoZSB0aGVu +IGFwcGxpY2FibGUgc3RhbmRhcmQgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YgdXNl +LCB0aGUgQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1lbnQgYW5kIHRoZSBS +ZWx5aW5nIFBhcnR5IEFncmVlbWVudCwgd2hpY2ggY2FuIGJlIGZvdW5kIGF0IHRo +ZSBiZVRSVVNUZWQgd2ViIHNpdGUsIGh0dHA6Ly93d3cuYmV0cnVzdGVkLmNvbS9w +cm9kdWN0c19zZXJ2aWNlcy9pbmRleC5odG1sMAsGA1UdDwQEAwIBBjAfBgNVHSME +GDAWgBSp7BR++dlDzFMrFK3P9/BZiUHNGTAdBgNVHQ4EFgQUqewUfvnZQ8xTKxSt +z/fwWYlBzRkwDQYJKoZIhvcNAQEFBQADggEBANuXsHXqDMTBmMpWBcCorSZIry0g +6IHHtt9DwSwddUvUQo3neqh03GZCWYez9Wlt2ames30cMcH1VOJZJEnl7r05pmuK +mET7m9cqg5c0Lcd9NUwtNLg+DcTsiCevnpL9UGGCqGAHFFPMZRPB9kdEadIxyKbd +LrML3kqNWz2rDcI1UqJWN8wyiyiFQpyRQHpwKzg21eFzGh/l+n5f3NacOzDq28Bb +J1zTcwfBwvNMm2+fG8oeqqg4MwlYsq78B+g23FW6L09A/nq9BqaBwZMifIYRCgZ3 +SK41ty8ymmFei74pnykkiFY5LKjSq5YDWtRIn7lAhAuYaPsBQ9Yb4gmxlxw= +-----END CERTIFICATE----- + +RSA Security 2048 v3 +==================== + +MD5 Fingerprint=77:0D:19:B1:21:FD:00:42:9C:3E:0C:A5:DD:0B:02:8E +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 0a:01:01:01:00:00:02:7c:00:00:00:0a:00:00:00:02 + Signature Algorithm: sha1WithRSAEncryption + Issuer: O=RSA Security Inc, OU=RSA Security 2048 V3 + Validity + Not Before: Feb 22 20:39:23 2001 GMT + Not After : Feb 22 20:39:23 2026 GMT + Subject: O=RSA Security Inc, OU=RSA Security 2048 V3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b7:8f:55:71:d2:80:dd:7b:69:79:a7:f0:18:50: + 32:3c:62:67:f6:0a:95:07:dd:e6:1b:f3:9e:d9:d2: + 41:54:6b:ad:9f:7c:be:19:cd:fb:46:ab:41:68:1e: + 18:ea:55:c8:2f:91:78:89:28:fb:27:29:60:ff:df: + 8f:8c:3b:c9:49:9b:b5:a4:94:ce:01:ea:3e:b5:63: + 7b:7f:26:fd:19:dd:c0:21:bd:84:d1:2d:4f:46:c3: + 4e:dc:d8:37:39:3b:28:af:cb:9d:1a:ea:2b:af:21: + a5:c1:23:22:b8:b8:1b:5a:13:87:57:83:d1:f0:20: + e7:e8:4f:23:42:b0:00:a5:7d:89:e9:e9:61:73:94: + 98:71:26:bc:2d:6a:e0:f7:4d:f0:f1:b6:2a:38:31: + 81:0d:29:e1:00:c1:51:0f:4c:52:f8:04:5a:aa:7d: + 72:d3:b8:87:2a:bb:63:10:03:2a:b3:a1:4f:0d:5a: + 5e:46:b7:3d:0e:f5:74:ec:99:9f:f9:3d:24:81:88: + a6:dd:60:54:e8:95:36:3d:c6:09:93:9a:a3:12:80: + 00:55:99:19:47:bd:d0:a5:7c:c3:ba:fb:1f:f7:f5: + 0f:f8:ac:b9:b5:f4:37:98:13:18:de:85:5b:b7:0c: + 82:3b:87:6f:95:39:58:30:da:6e:01:68:17:22:cc: + c0:0b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:07:C3:51:30:A4:AA:E9:45:AE:35:24:FA:FF:24:2C:33:D0:B1:9D:8C + + X509v3 Subject Key Identifier: + 07:C3:51:30:A4:AA:E9:45:AE:35:24:FA:FF:24:2C:33:D0:B1:9D:8C + Signature Algorithm: sha1WithRSAEncryption + 5f:3e:86:76:6e:b8:35:3c:4e:36:1c:1e:79:98:bf:fd:d5:12: + 11:79:52:0e:ee:31:89:bc:dd:7f:f9:d1:c6:15:21:e8:8a:01: + 54:0d:3a:fb:54:b9:d6:63:d4:b1:aa:96:4d:a2:42:4d:d4:53: + 1f:8b:10:de:7f:65:be:60:13:27:71:88:a4:73:e3:84:63:d1: + a4:55:e1:50:93:e6:1b:0e:79:d0:67:bc:46:c8:bf:3f:17:0d: + 95:e6:c6:90:69:de:e7:b4:2f:de:95:7d:d0:12:3f:3d:3e:7f: + 4d:3f:14:68:f5:11:50:d5:c1:f4:90:a5:08:1d:31:60:ff:60: + 8c:23:54:0a:af:fe:a1:6e:c5:d1:7a:2a:68:78:cf:1e:82:0a: + 20:b4:1f:ad:e5:85:b2:6a:68:75:4e:ad:25:37:94:85:be:bd: + a1:d4:ea:b7:0c:4b:3c:9d:e8:12:00:f0:5f:ac:0d:e1:ac:70: + 63:73:f7:7f:79:9f:32:25:42:74:05:80:28:bf:bd:c1:24:96: + 58:15:b1:17:21:e9:89:4b:db:07:88:67:f4:15:ad:70:3e:2f: + 4d:85:3b:c2:b7:db:fe:98:68:23:89:e1:74:0f:de:f4:c5:84: + 63:29:1b:cc:cb:07:c9:00:a4:a9:d7:c2:22:4f:67:d7:77:ec: + 20:05:61:de +-----BEGIN CERTIFICATE----- +MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6 +MRkwFwYDVQQKExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJp +dHkgMjA0OCBWMzAeFw0wMTAyMjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAX +BgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAbBgNVBAsTFFJTQSBTZWN1cml0eSAy +MDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt49VcdKA3Xtp +eafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7Jylg +/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGl +wSMiuLgbWhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnh +AMFRD0xS+ARaqn1y07iHKrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2 +PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP+Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpu +AWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4EFgQUB8NR +MKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYc +HnmYv/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/ +Zb5gEydxiKRz44Rj0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+ +f00/FGj1EVDVwfSQpQgdMWD/YIwjVAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVO +rSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395nzIlQnQFgCi/vcEkllgVsRch +6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kApKnXwiJPZ9d3 +7CAFYd4= +-----END CERTIFICATE----- + +RSA Security 1024 v3 +==================== + +MD5 Fingerprint=3A:E5:50:B0:39:BE:C7:46:36:33:A1:FE:82:3E:8D:94 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 0a:01:01:01:00:00:02:7c:00:00:00:0b:00:00:00:02 + Signature Algorithm: sha1WithRSAEncryption + Issuer: O=RSA Security Inc, OU=RSA Security 1024 V3 + Validity + Not Before: Feb 22 21:01:49 2001 GMT + Not After : Feb 22 20:01:49 2026 GMT + Subject: O=RSA Security Inc, OU=RSA Security 1024 V3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d5:dd:fe:66:09:cf:24:3c:3e:ae:81:4e:4e:8a: + c4:69:80:5b:59:3b:df:b9:4d:4c:ca:b5:2d:c3:27: + 2d:3c:af:00:42:6d:bc:28:a6:96:cf:7f:d7:58:ac: + 83:0a:a3:55:b5:7b:17:90:15:84:4c:8a:ee:26:99: + dc:58:ef:c7:38:a6:aa:af:d0:8e:42:c8:62:d7:ab: + ac:a9:fb:4a:7d:bf:ea:fe:12:4d:dd:ff:26:2d:6f: + 36:54:68:c8:d2:84:56:ee:92:53:61:09:b3:3f:39: + 9b:a8:c9:9b:bd:ce:9f:7e:d4:19:6a:16:29:18:be: + d7:3a:69:dc:25:5b:33:1a:51 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:C4:C0:1C:A4:07:94:FD:CD:4D:01:D4:54:DA:A5:0C:5F:DE:AE:05:5A + + X509v3 Subject Key Identifier: + C4:C0:1C:A4:07:94:FD:CD:4D:01:D4:54:DA:A5:0C:5F:DE:AE:05:5A + Signature Algorithm: sha1WithRSAEncryption + 3f:2d:6a:e3:26:43:95:7d:89:97:65:fb:75:e4:72:1d:46:57: + c4:61:6b:69:9f:12:9b:2c:d5:5a:e8:c0:a2:f0:43:95:e3:1f: + e9:76:cd:dc:eb:bc:93:a0:65:0a:c7:4d:4f:5f:a7:af:a2:46: + 14:b9:0c:f3:cc:bd:6a:6e:b7:9d:de:25:42:d0:54:ff:9e:68: + 73:63:dc:24:eb:22:bf:a8:72:f2:5e:00:e1:0d:4e:3a:43:6e: + 99:4e:3f:89:78:03:98:ca:f3:55:cc:9d:ae:8e:c1:aa:45:98: + fa:8f:1a:a0:8d:88:23:f1:15:41:0d:a5:46:3e:91:3f:8b:eb: + f7:71 +-----BEGIN CERTIFICATE----- +MIICXDCCAcWgAwIBAgIQCgEBAQAAAnwAAAALAAAAAjANBgkqhkiG9w0BAQUFADA6 +MRkwFwYDVQQKExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJp +dHkgMTAyNCBWMzAeFw0wMTAyMjIyMTAxNDlaFw0yNjAyMjIyMDAxNDlaMDoxGTAX +BgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAbBgNVBAsTFFJTQSBTZWN1cml0eSAx +MDI0IFYzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDV3f5mCc8kPD6ugU5O +isRpgFtZO9+5TUzKtS3DJy08rwBCbbwoppbPf9dYrIMKo1W1exeQFYRMiu4mmdxY +78c4pqqv0I5CyGLXq6yp+0p9v+r+Ek3d/yYtbzZUaMjShFbuklNhCbM/OZuoyZu9 +zp9+1BlqFikYvtc6adwlWzMaUQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBTEwBykB5T9zU0B1FTapQxf3q4FWjAd +BgNVHQ4EFgQUxMAcpAeU/c1NAdRU2qUMX96uBVowDQYJKoZIhvcNAQEFBQADgYEA +Py1q4yZDlX2Jl2X7deRyHUZXxGFraZ8SmyzVWujAovBDleMf6XbN3Ou8k6BlCsdN +T1+nr6JGFLkM88y9am63nd4lQtBU/55oc2PcJOsiv6hy8l4A4Q1OOkNumU4/iXgD +mMrzVcydro7BqkWY+o8aoI2II/EVQQ2lRj6RP4vr93E= +-----END CERTIFICATE----- + +GeoTrust Global CA +================== + +MD5 Fingerprint=F7:75:AB:29:FB:51:4E:B7:77:5E:FF:05:3C:99:8E:F5 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 144470 (0x23456) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=GeoTrust Inc., CN=GeoTrust Global CA + Validity + Not Before: May 21 04:00:00 2002 GMT + Not After : May 21 04:00:00 2022 GMT + Subject: C=US, O=GeoTrust Inc., CN=GeoTrust Global CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:da:cc:18:63:30:fd:f4:17:23:1a:56:7e:5b:df: + 3c:6c:38:e4:71:b7:78:91:d4:bc:a1:d8:4c:f8:a8: + 43:b6:03:e9:4d:21:07:08:88:da:58:2f:66:39:29: + bd:05:78:8b:9d:38:e8:05:b7:6a:7e:71:a4:e6:c4: + 60:a6:b0:ef:80:e4:89:28:0f:9e:25:d6:ed:83:f3: + ad:a6:91:c7:98:c9:42:18:35:14:9d:ad:98:46:92: + 2e:4f:ca:f1:87:43:c1:16:95:57:2d:50:ef:89:2d: + 80:7a:57:ad:f2:ee:5f:6b:d2:00:8d:b9:14:f8:14: + 15:35:d9:c0:46:a3:7b:72:c8:91:bf:c9:55:2b:cd: + d0:97:3e:9c:26:64:cc:df:ce:83:19:71:ca:4e:e6: + d4:d5:7b:a9:19:cd:55:de:c8:ec:d2:5e:38:53:e5: + 5c:4f:8c:2d:fe:50:23:36:fc:66:e6:cb:8e:a4:39: + 19:00:b7:95:02:39:91:0b:0e:fe:38:2e:d1:1d:05: + 9a:f6:4d:3e:6f:0f:07:1d:af:2c:1e:8f:60:39:e2: + fa:36:53:13:39:d4:5e:26:2b:db:3d:a8:14:bd:32: + eb:18:03:28:52:04:71:e5:ab:33:3d:e1:38:bb:07: + 36:84:62:9c:79:ea:16:30:f4:5f:c0:2b:e8:71:6b: + e4:f9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + C0:7A:98:68:8D:89:FB:AB:05:64:0C:11:7D:AA:7D:65:B8:CA:CC:4E + X509v3 Authority Key Identifier: + keyid:C0:7A:98:68:8D:89:FB:AB:05:64:0C:11:7D:AA:7D:65:B8:CA:CC:4E + + Signature Algorithm: sha1WithRSAEncryption + 35:e3:29:6a:e5:2f:5d:54:8e:29:50:94:9f:99:1a:14:e4:8f: + 78:2a:62:94:a2:27:67:9e:d0:cf:1a:5e:47:e9:c1:b2:a4:cf: + dd:41:1a:05:4e:9b:4b:ee:4a:6f:55:52:b3:24:a1:37:0a:eb: + 64:76:2a:2e:2c:f3:fd:3b:75:90:bf:fa:71:d8:c7:3d:37:d2: + b5:05:95:62:b9:a6:de:89:3d:36:7b:38:77:48:97:ac:a6:20: + 8f:2e:a6:c9:0c:c2:b2:99:45:00:c7:ce:11:51:22:22:e0:a5: + ea:b6:15:48:09:64:ea:5e:4f:74:f7:05:3e:c7:8a:52:0c:db: + 15:b4:bd:6d:9b:e5:c6:b1:54:68:a9:e3:69:90:b6:9a:a5:0f: + b8:b9:3f:20:7d:ae:4a:b5:b8:9c:e4:1d:b6:ab:e6:94:a5:c1: + c7:83:ad:db:f5:27:87:0e:04:6c:d5:ff:dd:a0:5d:ed:87:52: + b7:2b:15:02:ae:39:a6:6a:74:e9:da:c4:e7:bc:4d:34:1e:a9: + 5c:4d:33:5f:92:09:2f:88:66:5d:77:97:c7:1d:76:13:a9:d5: + e5:f1:16:09:11:35:d5:ac:db:24:71:70:2c:98:56:0b:d9:17: + b4:d1:e3:51:2b:5e:75:e8:d5:d0:dc:4f:34:ed:c2:05:66:80: + a1:cb:e6:33 +-----BEGIN CERTIFICATE----- +MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT +MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i +YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG +EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg +R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 +9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq +fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv +iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU +1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ +bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW +MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA +ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l +uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn +Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS +tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF +PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un +hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV +5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== +-----END CERTIFICATE----- + +UTN-USER First-Network Applications +=================================== + +MD5 Fingerprint=BF:60:59:A3:5B:BA:F6:A7:76:42:DA:6F:1A:7B:50:CF +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 44:be:0c:8b:50:00:24:b4:11:d3:36:30:4b:c0:33:77 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Network Applications + Validity + Not Before: Jul 9 18:48:39 1999 GMT + Not After : Jul 9 18:57:49 2019 GMT + Subject: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Network Applications + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b3:fb:91:a1:e4:36:55:85:ac:06:34:5b:a0:9a: + 58:b2:f8:b5:0f:05:77:83:ae:32:b1:76:92:68:ec: + 23:4a:c9:76:3f:e3:9c:b6:37:79:03:b9:ab:69:8d: + 07:25:b6:19:67:e4:b0:1b:18:73:61:4a:e8:7e:cd: + d3:2f:64:e3:a6:7c:0c:fa:17:80:a3:0d:47:89:4f: + 51:71:2f:ee:fc:3f:f9:b8:16:80:87:89:93:25:20: + 9a:43:82:69:24:76:28:59:35:a1:1d:c0:7f:83:06: + 64:16:20:2c:d3:49:a4:85:b4:c0:61:7f:51:08:f8: + 68:15:91:80:cb:a5:d5:ee:3b:3a:f4:84:04:5e:60: + 59:a7:8c:34:72:ee:b8:78:c5:d1:3b:12:4a:6f:7e: + 65:27:b9:a4:55:c5:b9:6f:43:a4:c5:1d:2c:99:c0: + 52:a4:78:4c:15:b3:40:98:08:6b:43:c6:01:b0:7a: + 7b:f5:6b:1c:22:3f:cb:ef:ff:a8:d0:3a:4b:76:15: + 9e:d2:d1:c6:2e:e3:db:57:1b:32:a2:b8:6f:e8:86: + a6:3f:70:ab:e5:70:92:ab:44:1e:40:50:fb:9c:a3: + 62:e4:6c:6e:a0:c8:de:e2:80:42:fa:e9:2f:e8:ce: + 32:04:8f:7c:8d:b7:1c:a3:35:3c:15:dd:9e:c3:ae: + 97:a5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: + Digital Signature, Non Repudiation, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + FA:86:C9:DB:E0:BA:E9:78:F5:4B:A8:D6:15:DF:F0:D3:E1:6A:14:3C + X509v3 CRL Distribution Points: + URI:http://crl.usertrust.com/UTN-USERFirst-NetworkApplications.crl + + Signature Algorithm: sha1WithRSAEncryption + a4:f3:25:cc:d1:d4:91:83:22:d0:cc:32:ab:9b:96:4e:34:91: + 54:20:25:34:61:5f:2a:02:15:e1:8b:aa:ff:7d:64:51:cf:0a: + ff:bc:7d:d8:21:6a:78:cb:2f:51:6f:f8:42:1d:33:bd:eb:b5: + 7b:94:c3:c3:a9:a0:2d:df:d1:29:1f:1d:fe:8f:3f:bb:a8:45: + 2a:7f:d1:6e:55:24:e2:bb:02:fb:31:3f:be:e8:bc:ec:40:2b: + f8:01:d4:56:38:e4:ca:44:82:b5:61:20:21:67:65:f6:f0:0b: + e7:34:f8:a5:c2:9c:a3:5c:40:1f:85:93:95:06:de:4f:d4:27: + a9:b6:a5:fc:16:cd:73:31:3f:b8:65:27:cf:d4:53:1a:f0:ac: + 6e:9f:4f:05:0c:03:81:a7:84:29:c4:5a:bd:64:57:72:ad:3b: + cf:37:18:a6:98:c6:ad:06:b4:dc:08:a3:04:d5:29:a4:96:9a: + 12:67:4a:8c:60:45:9d:f1:23:9a:b0:00:9c:68:b5:98:50:d3: + ef:8e:2e:92:65:b1:48:3e:21:be:15:30:2a:0d:b5:0c:a3:6b: + 3f:ae:7f:57:f5:1f:96:7c:df:6f:dd:82:30:2c:65:1b:40:4a: + cd:68:b9:72:ec:71:76:ec:54:8e:1f:85:0c:01:6a:fa:a6:38: + ac:1f:c4:84 +-----BEGIN CERTIFICATE----- +MIIEZDCCA0ygAwIBAgIQRL4Mi1AAJLQR0zYwS8AzdzANBgkqhkiG9w0BAQUFADCB +ozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug +Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho +dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VSRmlyc3Qt +TmV0d29yayBBcHBsaWNhdGlvbnMwHhcNOTkwNzA5MTg0ODM5WhcNMTkwNzA5MTg1 +NzQ5WjCBozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0 +IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYD +VQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VS +Rmlyc3QtTmV0d29yayBBcHBsaWNhdGlvbnMwggEiMA0GCSqGSIb3DQEBAQUAA4IB +DwAwggEKAoIBAQCz+5Gh5DZVhawGNFugmliy+LUPBXeDrjKxdpJo7CNKyXY/45y2 +N3kDuatpjQclthln5LAbGHNhSuh+zdMvZOOmfAz6F4CjDUeJT1FxL+78P/m4FoCH +iZMlIJpDgmkkdihZNaEdwH+DBmQWICzTSaSFtMBhf1EI+GgVkYDLpdXuOzr0hARe +YFmnjDRy7rh4xdE7EkpvfmUnuaRVxblvQ6TFHSyZwFKkeEwVs0CYCGtDxgGwenv1 +axwiP8vv/6jQOkt2FZ7S0cYu49tXGzKiuG/ohqY/cKvlcJKrRB5AUPuco2LkbG6g +yN7igEL66S/ozjIEj3yNtxyjNTwV3Z7DrpelAgMBAAGjgZEwgY4wCwYDVR0PBAQD +AgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFPqGydvguul49Uuo1hXf8NPh +ahQ8ME8GA1UdHwRIMEYwRKBCoECGPmh0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9V +VE4tVVNFUkZpcnN0LU5ldHdvcmtBcHBsaWNhdGlvbnMuY3JsMA0GCSqGSIb3DQEB +BQUAA4IBAQCk8yXM0dSRgyLQzDKrm5ZONJFUICU0YV8qAhXhi6r/fWRRzwr/vH3Y +IWp4yy9Rb/hCHTO967V7lMPDqaAt39EpHx3+jz+7qEUqf9FuVSTiuwL7MT++6Lzs +QCv4AdRWOOTKRIK1YSAhZ2X28AvnNPilwpyjXEAfhZOVBt5P1CeptqX8Fs1zMT+4 +ZSfP1FMa8Kxun08FDAOBp4QpxFq9ZFdyrTvPNximmMatBrTcCKME1SmklpoSZ0qM +YEWd8SOasACcaLWYUNPvji6SZbFIPiG+FTAqDbUMo2s/rn9X9R+WfN9v3YIwLGUb +QErNaLly7HF27FSOH4UMAWr6pjisH8SE +-----END CERTIFICATE----- + +Thawte Personal Freemail CA +=========================== + +MD5 Fingerprint=1E:74:C3:86:3C:0C:35:C5:3E:C2:7F:EF:3C:AA:3C:D9 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/emailAddress=personal-freemail@thawte.com + Validity + Not Before: Jan 1 00:00:00 1996 GMT + Not After : Dec 31 23:59:59 2020 GMT + Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA/emailAddress=personal-freemail@thawte.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d4:69:d7:d4:b0:94:64:5b:71:e9:47:d8:0c:51: + b6:ea:72:91:b0:84:5e:7d:2d:0d:8f:7b:12:df:85: + 25:75:28:74:3a:42:2c:63:27:9f:95:7b:4b:ef:7e: + 19:87:1d:86:ea:a3:dd:b9:ce:96:64:1a:c2:14:6e: + 44:ac:7c:e6:8f:e8:4d:0f:71:1f:40:38:a6:00:a3: + 87:78:f6:f9:94:86:5e:ad:ea:c0:5e:76:eb:d9:14: + a3:5d:6e:7a:7c:0c:a5:4b:55:7f:06:19:29:7f:9e: + 9a:26:d5:6a:bb:38:24:08:6a:98:c7:b1:da:a3:98: + 91:fd:79:db:e5:5a:c4:1c:b9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + c7:ec:92:7e:4e:f8:f5:96:a5:67:62:2a:a4:f0:4d:11:60:d0: + 6f:8d:60:58:61:ac:26:bb:52:35:5c:08:cf:30:fb:a8:4a:96: + 8a:1f:62:42:23:8c:17:0f:f4:ba:64:9c:17:ac:47:29:df:9d: + 98:5e:d2:6c:60:71:5c:a2:ac:dc:79:e3:e7:6e:00:47:1f:b5: + 0d:28:e8:02:9d:e4:9a:fd:13:f4:a6:d9:7c:b1:f8:dc:5f:23: + 26:09:91:80:73:d0:14:1b:de:43:a9:83:25:f2:e6:9c:2f:15: + ca:fe:a6:ab:8a:07:75:8b:0c:dd:51:84:6b:e4:f8:d1:ce:77: + a2:81 +-----BEGIN CERTIFICATE----- +MIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkEx +FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD +VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT +ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVt +YWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUu +Y29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYT +AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa +MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRp +b24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBG +cmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhh +d3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfY +DFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5E +rHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVq +uzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN +BgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjP +MPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa +/RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRznei +gQ== +-----END CERTIFICATE----- + +America Online Root Certification Authority 1 +============================================= + +MD5 Fingerprint=14:F1:08:AD:9D:FA:64:E2:89:E7:1C:CF:A8:AD:7D:5E +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=America Online Inc., CN=America Online Root Certification Authority 1 + Validity + Not Before: May 28 06:00:00 2002 GMT + Not After : Nov 19 20:43:00 2037 GMT + Subject: C=US, O=America Online Inc., CN=America Online Root Certification Authority 1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:a8:2f:e8:a4:69:06:03:47:c3:e9:2a:98:ff:19: + a2:70:9a:c6:50:b2:7e:a5:df:68:4d:1b:7c:0f:b6: + 97:68:7d:2d:a6:8b:97:e9:64:86:c9:a3:ef:a0:86: + bf:60:65:9c:4b:54:88:c2:48:c5:4a:39:bf:14:e3: + 59:55:e5:19:b4:74:c8:b4:05:39:5c:16:a5:e2:95: + 05:e0:12:ae:59:8b:a2:33:68:58:1c:a6:d4:15:b7: + d8:9f:d7:dc:71:ab:7e:9a:bf:9b:8e:33:0f:22:fd: + 1f:2e:e7:07:36:ef:62:39:c5:dd:cb:ba:25:14:23: + de:0c:c6:3d:3c:ce:82:08:e6:66:3e:da:51:3b:16: + 3a:a3:05:7f:a0:dc:87:d5:9c:fc:72:a9:a0:7d:78: + e4:b7:31:55:1e:65:bb:d4:61:b0:21:60:ed:10:32: + 72:c5:92:25:1e:f8:90:4a:18:78:47:df:7e:30:37: + 3e:50:1b:db:1c:d3:6b:9a:86:53:07:b0:ef:ac:06: + 78:f8:84:99:fe:21:8d:4c:80:b6:0c:82:f6:66:70: + 79:1a:d3:4f:a3:cf:f1:cf:46:b0:4b:0f:3e:dd:88: + 62:b8:8c:a9:09:28:3b:7a:c7:97:e1:1e:e5:f4:9f: + c0:c0:ae:24:a0:c8:a1:d9:0f:d6:7b:26:82:69:32: + 3d:a7 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 00:AD:D9:A3:F6:79:F6:6E:74:A9:7F:33:3D:81:17:D7:4C:CF:33:DE + X509v3 Authority Key Identifier: + keyid:00:AD:D9:A3:F6:79:F6:6E:74:A9:7F:33:3D:81:17:D7:4C:CF:33:DE + + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 7c:8a:d1:1f:18:37:82:e0:b8:b0:a3:ed:56:95:c8:62:61:9c: + 05:a2:cd:c2:62:26:61:cd:10:16:d7:cc:b4:65:34:d0:11:8a: + ad:a8:a9:05:66:ef:74:f3:6d:5f:9d:99:af:f6:8b:fb:eb:52: + b2:05:98:a2:6f:2a:c5:54:bd:25:bd:5f:ae:c8:86:ea:46:2c: + c1:b3:bd:c1:e9:49:70:18:16:97:08:13:8c:20:e0:1b:2e:3a: + 47:cb:1e:e4:00:30:95:5b:f4:45:a3:c0:1a:b0:01:4e:ab:bd: + c0:23:6e:63:3f:80:4a:c5:07:ed:dc:e2:6f:c7:c1:62:f1:e3: + 72:d6:04:c8:74:67:0b:fa:88:ab:a1:01:c8:6f:f0:14:af:d2: + 99:cd:51:93:7e:ed:2e:38:c7:bd:ce:46:50:3d:72:e3:79:25: + 9d:9b:88:2b:10:20:dd:a5:b8:32:9f:8d:e0:29:df:21:74:86: + 82:db:2f:82:30:c6:c7:35:86:b3:f9:96:5f:46:db:0c:45:fd: + f3:50:c3:6f:c6:c3:48:ad:46:a6:e1:27:47:0a:1d:0e:9b:b6: + c2:77:7f:63:f2:e0:7d:1a:be:fc:e0:df:d7:c7:a7:6c:b0:f9: + ae:ba:3c:fd:74:b4:11:e8:58:0d:80:bc:d3:a8:80:3a:99:ed: + 75:cc:46:7b +-----BEGIN CERTIFICATE----- +MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc +MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP +bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2 +MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft +ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lk +hsmj76CGv2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym +1BW32J/X3HGrfpq/m44zDyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsW +OqMFf6Dch9Wc/HKpoH145LcxVR5lu9RhsCFg7RAycsWSJR74kEoYeEfffjA3PlAb +2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP8c9GsEsPPt2IYriMqQko +O3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAU +AK3Zo/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB +BQUAA4IBAQB8itEfGDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkF +Zu90821fnZmv9ov761KyBZiibyrFVL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAb +LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir +oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C +MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds +sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7 +-----END CERTIFICATE----- + +America Online Root Certification Authority 2 +============================================= + +MD5 Fingerprint=D6:ED:3C:CA:E2:66:0F:AF:10:43:0D:77:9B:04:09:BF +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=America Online Inc., CN=America Online Root Certification Authority 2 + Validity + Not Before: May 28 06:00:00 2002 GMT + Not After : Sep 29 14:08:00 2037 GMT + Subject: C=US, O=America Online Inc., CN=America Online Root Certification Authority 2 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (4096 bit) + Modulus (4096 bit): + 00:cc:41:45:1d:e9:3d:4d:10:f6:8c:b1:41:c9:e0: + 5e:cb:0d:b7:bf:47:73:d3:f0:55:4d:dd:c6:0c:fa: + b1:66:05:6a:cd:78:b4:dc:02:db:4e:81:f3:d7:a7: + 7c:71:bc:75:63:a0:5d:e3:07:0c:48:ec:25:c4:03: + 20:f4:ff:0e:3b:12:ff:9b:8d:e1:c6:d5:1b:b4:6d: + 22:e3:b1:db:7f:21:64:af:86:bc:57:22:2a:d6:47: + 81:57:44:82:56:53:bd:86:14:01:0b:fc:7f:74:a4: + 5a:ae:f1:ba:11:b5:9b:58:5a:80:b4:37:78:09:33: + 7c:32:47:03:5c:c4:a5:83:48:f4:57:56:6e:81:36: + 27:18:4f:ec:9b:28:c2:d4:b4:d7:7c:0c:3e:0c:2b: + df:ca:04:d7:c6:8e:ea:58:4e:a8:a4:a5:18:1c:6c: + 45:98:a3:41:d1:2d:d2:c7:6d:8d:19:f1:ad:79:b7: + 81:3f:bd:06:82:27:2d:10:58:05:b5:78:05:b9:2f: + db:0c:6b:90:90:7e:14:59:38:bb:94:24:13:e5:d1: + 9d:14:df:d3:82:4d:46:f0:80:39:52:32:0f:e3:84: + b2:7a:43:f2:5e:de:5f:3f:1d:dd:e3:b2:1b:a0:a1: + 2a:23:03:6e:2e:01:15:87:5c:a6:75:75:c7:97:61: + be:de:86:dc:d4:48:db:bd:2a:bf:4a:55:da:e8:7d: + 50:fb:b4:80:17:b8:94:bf:01:3d:ea:da:ba:7c:e0: + 58:67:17:b9:58:e0:88:86:46:67:6c:9d:10:47:58: + 32:d0:35:7c:79:2a:90:a2:5a:10:11:23:35:ad:2f: + cc:e4:4a:5b:a7:c8:27:f2:83:de:5e:bb:5e:77:e7: + e8:a5:6e:63:c2:0d:5d:61:d0:8c:d2:6c:5a:21:0e: + ca:28:a3:ce:2a:e9:95:c7:48:cf:96:6f:1d:92:25: + c8:c6:c6:c1:c1:0c:05:ac:26:c4:d2:75:d2:e1:2a: + 67:c0:3d:5b:a5:9a:eb:cf:7b:1a:a8:9d:14:45:e5: + 0f:a0:9a:65:de:2f:28:bd:ce:6f:94:66:83:48:29: + d8:ea:65:8c:af:93:d9:64:9f:55:57:26:bf:6f:cb: + 37:31:99:a3:60:bb:1c:ad:89:34:32:62:b8:43:21: + 06:72:0c:a1:5c:6d:46:c5:fa:29:cf:30:de:89:dc: + 71:5b:dd:b6:37:3e:df:50:f5:b8:07:25:26:e5:bc: + b5:fe:3c:02:b3:b7:f8:be:43:c1:87:11:94:9e:23: + 6c:17:8a:b8:8a:27:0c:54:47:f0:a9:b3:c0:80:8c: + a0:27:eb:1d:19:e3:07:8e:77:70:ca:2b:f4:7d:76: + e0:78:67 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 4D:45:C1:68:38:BB:73:A9:69:A1:20:E7:ED:F5:22:A1:23:14:D7:9E + X509v3 Authority Key Identifier: + keyid:4D:45:C1:68:38:BB:73:A9:69:A1:20:E7:ED:F5:22:A1:23:14:D7:9E + + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 67:6b:06:b9:5f:45:3b:2a:4b:33:b3:e6:1b:6b:59:4e:22:cc: + b9:b7:a4:25:c9:a7:c4:f0:54:96:0b:64:f3:b1:58:4f:5e:51: + fc:b2:97:7b:27:65:c2:e5:ca:e7:0d:0c:25:7b:62:e3:fa:9f: + b4:87:b7:45:46:af:83:a5:97:48:8c:a5:bd:f1:16:2b:9b:76: + 2c:7a:35:60:6c:11:80:97:cc:a9:92:52:e6:2b:e6:69:ed:a9: + f8:36:2d:2c:77:bf:61:48:d1:63:0b:b9:5b:52:ed:18:b0:43: + 42:22:a6:b1:77:ae:de:69:c5:cd:c7:1c:a1:b1:a5:1c:10:fb: + 18:be:1a:70:dd:c1:92:4b:be:29:5a:9d:3f:35:be:e5:7d:51: + f8:55:e0:25:75:23:87:1e:5c:dc:ba:9d:b0:ac:b3:69:db:17: + 83:c9:f7:de:0c:bc:08:dc:91:9e:a8:d0:d7:15:37:73:a5:35: + b8:fc:7e:c5:44:40:06:c3:eb:f8:22:80:5c:47:ce:02:e3:11: + 9f:44:ff:fd:9a:32:cc:7d:64:51:0e:eb:57:26:76:3a:e3:1e: + 22:3c:c2:a6:36:dd:19:ef:a7:fc:12:f3:26:c0:59:31:85:4c: + 9c:d8:cf:df:a4:cc:cc:29:93:ff:94:6d:76:5c:13:08:97:f2: + ed:a5:0b:4d:dd:e8:c9:68:0e:66:d3:00:0e:33:12:5b:bc:95: + e5:32:90:a8:b3:c6:6c:83:ad:77:ee:8b:7e:7e:b1:a9:ab:d3: + e1:f1:b6:c0:b1:ea:88:c0:e7:d3:90:e9:28:92:94:7b:68:7b: + 97:2a:0a:67:2d:85:02:38:10:e4:03:61:d4:da:25:36:c7:08: + 58:2d:a1:a7:51:af:30:0a:49:f5:a6:69:87:07:2d:44:46:76: + 8e:2a:e5:9a:3b:d7:18:a2:fc:9c:38:10:cc:c6:3b:d2:b5:17: + 3a:6f:fd:ae:25:bd:f5:72:59:64:b1:74:2a:38:5f:18:4c:df: + cf:71:04:5a:36:d4:bf:2f:99:9c:e8:d9:ba:b1:95:e6:02:4b: + 21:a1:5b:d5:c1:4f:8f:ae:69:6d:53:db:01:93:b5:5c:1e:18: + dd:64:5a:ca:18:28:3e:63:04:11:fd:1c:8d:00:0f:b8:37:df: + 67:8a:9d:66:a9:02:6a:91:ff:13:ca:2f:5d:83:bc:87:93:6c: + dc:24:51:16:04:25:66:fa:b3:d9:c2:ba:29:be:9a:48:38:82: + 99:f4:bf:3b:4a:31:19:f9:bf:8e:21:33:14:ca:4f:54:5f:fb: + ce:fb:8f:71:7f:fd:5e:19:a0:0f:4b:91:b8:c4:54:bc:06:b0: + 45:8f:26:91:a2:8e:fe:a9 +-----BEGIN CERTIFICATE----- +MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc +MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP +bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2 +MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft +ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC +206B89enfHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFci +KtZHgVdEglZTvYYUAQv8f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2 +JxhP7JsowtS013wMPgwr38oE18aO6lhOqKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9 +BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JNRvCAOVIyD+OEsnpD8l7e +Xz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0gBe4lL8B +PeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67 +Xnfn6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEq +Z8A9W6Wa6897GqidFEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZ +o2C7HK2JNDJiuEMhBnIMoVxtRsX6Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3 ++L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnjB453cMor9H124HhnAgMBAAGj +YzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3OpaaEg5+31IqEj +FNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmn +xPBUlgtk87FYT15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2 +LHo1YGwRgJfMqZJS5ivmae2p+DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzccc +obGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8 +CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe +IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA +DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F +AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX +Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb +AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl +Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw +RY8mkaKO/qk= +-----END CERTIFICATE----- + +Visa eCommerce Root +=================== + +MD5 Fingerprint=FC:11:B8:D8:08:93:30:00:6D:23:F9:7E:EB:52:1E:02 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 13:86:35:4d:1d:3f:06:f2:c1:f9:65:05:d5:90:1c:62 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=VISA, OU=Visa International Service Association, CN=Visa eCommerce Root + Validity + Not Before: Jun 26 02:18:36 2002 GMT + Not After : Jun 24 00:16:12 2022 GMT + Subject: C=US, O=VISA, OU=Visa International Service Association, CN=Visa eCommerce Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:af:57:de:56:1e:6e:a1:da:60:b1:94:27:cb:17: + db:07:3f:80:85:4f:c8:9c:b6:d0:f4:6f:4f:cf:99: + d8:e1:db:c2:48:5c:3a:ac:39:33:c7:1f:6a:8b:26: + 3d:2b:35:f5:48:b1:91:c1:02:4e:04:96:91:7b:b0: + 33:f0:b1:14:4e:11:6f:b5:40:af:1b:45:a5:4a:ef: + 7e:b6:ac:f2:a0:1f:58:3f:12:46:60:3c:8d:a1:e0: + 7d:cf:57:3e:33:1e:fb:47:f1:aa:15:97:07:55:66: + a5:b5:2d:2e:d8:80:59:b2:a7:0d:b7:46:ec:21:63: + ff:35:ab:a5:02:cf:2a:f4:4c:fe:7b:f5:94:5d:84: + 4d:a8:f2:60:8f:db:0e:25:3c:9f:73:71:cf:94:df: + 4a:ea:db:df:72:38:8c:f3:96:bd:f1:17:bc:d2:ba: + 3b:45:5a:c6:a7:f6:c6:17:8b:01:9d:fc:19:a8:2a: + 83:16:b8:3a:48:fe:4e:3e:a0:ab:06:19:e9:53:f3: + 80:13:07:ed:2d:bf:3f:0a:3c:55:20:39:2c:2c:00: + 69:74:95:4a:bc:20:b2:a9:79:e5:18:89:91:a8:dc: + 1c:4d:ef:bb:7e:37:0b:5d:fe:39:a5:88:52:8c:00: + 6c:ec:18:7c:41:bd:f6:8b:75:77:ba:60:9d:84:e7: + fe:2d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 15:38:83:0F:3F:2C:3F:70:33:1E:CD:46:FE:07:8C:20:E0:D7:C3:B7 + Signature Algorithm: sha1WithRSAEncryption + 5f:f1:41:7d:7c:5c:08:b9:2b:e0:d5:92:47:fa:67:5c:a5:13: + c3:03:21:9b:2b:4c:89:46:cf:59:4d:c9:fe:a5:40:b6:63:cd: + dd:71:28:95:67:11:cc:24:ac:d3:44:6c:71:ae:01:20:6b:03: + a2:8f:18:b7:29:3a:7d:e5:16:60:53:78:3c:c0:af:15:83:f7: + 8f:52:33:24:bd:64:93:97:ee:8b:f7:db:18:a8:6d:71:b3:f7: + 2c:17:d0:74:25:69:f7:fe:6b:3c:94:be:4d:4b:41:8c:4e:e2: + 73:d0:e3:90:22:73:43:cd:f3:ef:ea:73:ce:45:8a:b0:a6:49: + ff:4c:7d:9d:71:88:c4:76:1d:90:5b:1d:ee:fd:cc:f7:ee:fd: + 60:a5:b1:7a:16:71:d1:16:d0:7c:12:3c:6c:69:97:db:ae:5f: + 39:9a:70:2f:05:3c:19:46:04:99:20:36:d0:60:6e:61:06:bb: + 16:42:8c:70:f7:30:fb:e0:db:66:a3:00:01:bd:e6:2c:da:91: + 5f:a0:46:8b:4d:6a:9c:3d:3d:dd:05:46:fe:76:bf:a0:0a:3c: + e4:00:e6:27:b7:ff:84:2d:de:ba:22:27:96:10:71:eb:22:ed: + df:df:33:9c:cf:e3:ad:ae:8e:d4:8e:e6:4f:51:af:16:92:e0: + 5c:f6:07:0f +-----BEGIN CERTIFICATE----- +MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBr +MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl +cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv +bW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2WhcNMjIwNjI0MDAxNjEyWjBrMQsw +CQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5h +dGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1l +cmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h +2mCxlCfLF9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4E +lpF7sDPwsRROEW+1QK8bRaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdV +ZqW1LS7YgFmypw23RuwhY/81q6UCzyr0TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq +299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI/k4+oKsGGelT84ATB+0t +vz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzsGHxBvfaL +dXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD +AgEGMB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUF +AAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR +zCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3 +LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd +7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw +++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt +398znM/jra6O1I7mT1GvFpLgXPYHDw== +-----END CERTIFICATE----- + +TC TrustCenter, Germany, Class 2 CA +=================================== + +MD5 Fingerprint=B8:16:33:4C:4C:4C:F2:D8:D3:4D:06:B4:A6:5B:40:03 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1002 (0x3ea) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/emailAddress=certificate@trustcenter.de + Validity + Not Before: Mar 9 11:59:59 1998 GMT + Not After : Jan 1 11:59:59 2011 GMT + Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 2 CA/emailAddress=certificate@trustcenter.de + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:da:38:e8:ed:32:00:29:71:83:01:0d:bf:8c:01: + dc:da:c6:ad:39:a4:a9:8a:2f:d5:8b:5c:68:5f:50: + c6:62:f5:66:bd:ca:91:22:ec:aa:1d:51:d7:3d:b3: + 51:b2:83:4e:5d:cb:49:b0:f0:4c:55:e5:6b:2d:c7: + 85:0b:30:1c:92:4e:82:d4:ca:02:ed:f7:6f:be:dc: + e0:e3:14:b8:05:53:f2:9a:f4:56:8b:5a:9e:85:93: + d1:b4:82:56:ae:4d:bb:a8:4b:57:16:bc:fe:f8:58: + 9e:f8:29:8d:b0:7b:cd:78:c9:4f:ac:8b:67:0c:f1: + 9c:fb:fc:57:9b:57:5c:4f:0d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Netscape CA Policy Url: + http://www.trustcenter.de/guidelines + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + Signature Algorithm: md5WithRSAEncryption + 84:52:fb:28:df:ff:1f:75:01:bc:01:be:04:56:97:6a:74:42: + 24:31:83:f9:46:b1:06:8a:89:cf:96:2c:33:bf:8c:b5:5f:7a: + 72:a1:85:06:ce:86:f8:05:8e:e8:f9:25:ca:da:83:8c:06:ac: + eb:36:6d:85:91:34:04:36:f4:42:f0:f8:79:2e:0a:48:5c:ab: + cc:51:4f:78:76:a0:d9:ac:19:bd:2a:d1:69:04:28:91:ca:36: + 10:27:80:57:5b:d2:5c:f5:c2:5b:ab:64:81:63:74:51:f4:97: + bf:cd:12:28:f7:4d:66:7f:a7:f0:1c:01:26:78:b2:66:47:70: + 51:64 +-----BEGIN CERTIFICATE----- +MIIDXDCCAsWgAwIBAgICA+owDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRF +MRAwDgYDVQQIEwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFU +QyBUcnVzdENlbnRlciBmb3IgU2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJI +MSIwIAYDVQQLExlUQyBUcnVzdENlbnRlciBDbGFzcyAyIENBMSkwJwYJKoZIhvcN +AQkBFhpjZXJ0aWZpY2F0ZUB0cnVzdGNlbnRlci5kZTAeFw05ODAzMDkxMTU5NTla +Fw0xMTAxMDExMTU5NTlaMIG8MQswCQYDVQQGEwJERTEQMA4GA1UECBMHSGFtYnVy +ZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMxVEMgVHJ1c3RDZW50ZXIgZm9y +IFNlY3VyaXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAGA1UECxMZVEMgVHJ1 +c3RDZW50ZXIgQ2xhc3MgMiBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlmaWNhdGVA +dHJ1c3RjZW50ZXIuZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANo46O0y +AClxgwENv4wB3NrGrTmkqYov1YtcaF9QxmL1Zr3KkSLsqh1R1z2zUbKDTl3LSbDw +TFXlay3HhQswHJJOgtTKAu33b77c4OMUuAVT8pr0VotanoWT0bSCVq5Nu6hLVxa8 +/vhYnvgpjbB7zXjJT6yLZwzxnPv8V5tXXE8NAgMBAAGjazBpMA8GA1UdEwEB/wQF +MAMBAf8wDgYDVR0PAQH/BAQDAgGGMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3 +LnRydXN0Y2VudGVyLmRlL2d1aWRlbGluZXMwEQYJYIZIAYb4QgEBBAQDAgAHMA0G +CSqGSIb3DQEBBAUAA4GBAIRS+yjf/x91AbwBvgRWl2p0QiQxg/lGsQaKic+WLDO/ +jLVfenKhhQbOhvgFjuj5Jcrag4wGrOs2bYWRNAQ29ELw+HkuCkhcq8xRT3h2oNms +Gb0q0WkEKJHKNhAngFdb0lz1wlurZIFjdFH0l7/NEij3TWZ/p/AcASZ4smZHcFFk +-----END CERTIFICATE----- + +TC TrustCenter, Germany, Class 3 CA +=================================== + +MD5 Fingerprint=5F:94:4A:73:22:B8:F7:D1:31:EC:59:39:F7:8E:FE:6E +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1003 (0x3eb) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/emailAddress=certificate@trustcenter.de + Validity + Not Before: Mar 9 11:59:59 1998 GMT + Not After : Jan 1 11:59:59 2011 GMT + Subject: C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data Networks GmbH, OU=TC TrustCenter Class 3 CA/emailAddress=certificate@trustcenter.de + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:b6:b4:c1:35:05:2e:0d:8d:ec:a0:40:6a:1c:0e: + 27:a6:50:92:6b:50:1b:07:de:2e:e7:76:cc:e0:da: + fc:84:a8:5e:8c:63:6a:2b:4d:d9:4e:02:76:11:c1: + 0b:f2:8d:79:ca:00:b6:f1:b0:0e:d7:fb:a4:17:3d: + af:ab:69:7a:96:27:bf:af:33:a1:9a:2a:59:aa:c4: + b5:37:08:f2:12:a5:31:b6:43:f5:32:96:71:28:28: + ab:8d:28:86:df:bb:ee:e3:0c:7d:30:d6:c3:52:ab: + 8f:5d:27:9c:6b:c0:a3:e7:05:6b:57:49:44:b3:6e: + ea:64:cf:d2:8e:7a:50:77:77 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + Netscape CA Policy Url: + http://www.trustcenter.de/guidelines + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + Signature Algorithm: md5WithRSAEncryption + 16:3d:c6:cd:c1:bb:85:71:85:46:9f:3e:20:8f:51:28:99:ec: + 2d:45:21:63:23:5b:04:bb:4c:90:b8:88:92:04:4d:bd:7d:01: + a3:3f:f6:ec:ce:f1:de:fe:7d:e5:e1:3e:bb:c6:ab:5e:0b:dd: + 3d:96:c4:cb:a9:d4:f9:26:e6:06:4e:9e:0c:a5:7a:ba:6e:c3: + 7c:82:19:d1:c7:b1:b1:c3:db:0d:8e:9b:40:7c:37:0b:f1:5d: + e8:fd:1f:90:88:a5:0e:4e:37:64:21:a8:4e:8d:b4:9f:f1:de: + 48:ad:d5:56:18:52:29:8b:47:34:12:09:d4:bb:92:35:ef:0f: + db:34 +-----BEGIN CERTIFICATE----- +MIIDXDCCAsWgAwIBAgICA+swDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRF +MRAwDgYDVQQIEwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFU +QyBUcnVzdENlbnRlciBmb3IgU2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJI +MSIwIAYDVQQLExlUQyBUcnVzdENlbnRlciBDbGFzcyAzIENBMSkwJwYJKoZIhvcN +AQkBFhpjZXJ0aWZpY2F0ZUB0cnVzdGNlbnRlci5kZTAeFw05ODAzMDkxMTU5NTla +Fw0xMTAxMDExMTU5NTlaMIG8MQswCQYDVQQGEwJERTEQMA4GA1UECBMHSGFtYnVy +ZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMxVEMgVHJ1c3RDZW50ZXIgZm9y +IFNlY3VyaXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAGA1UECxMZVEMgVHJ1 +c3RDZW50ZXIgQ2xhc3MgMyBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlmaWNhdGVA +dHJ1c3RjZW50ZXIuZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALa0wTUF +Lg2N7KBAahwOJ6ZQkmtQGwfeLud2zODa/ISoXoxjaitN2U4CdhHBC/KNecoAtvGw +Dtf7pBc9r6tpepYnv68zoZoqWarEtTcI8hKlMbZD9TKWcSgoq40oht+77uMMfTDW +w1Krj10nnGvAo+cFa1dJRLNu6mTP0o56UHd3AgMBAAGjazBpMA8GA1UdEwEB/wQF +MAMBAf8wDgYDVR0PAQH/BAQDAgGGMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3 +LnRydXN0Y2VudGVyLmRlL2d1aWRlbGluZXMwEQYJYIZIAYb4QgEBBAQDAgAHMA0G +CSqGSIb3DQEBBAUAA4GBABY9xs3Bu4VxhUafPiCPUSiZ7C1FIWMjWwS7TJC4iJIE +Tb19AaM/9uzO8d7+feXhPrvGq14L3T2WxMup1Pkm5gZOngylerpuw3yCGdHHsbHD +2w2Om0B8NwvxXej9H5CIpQ5ON2QhqE6NtJ/x3kit1VYYUimLRzQSCdS7kjXvD9s0 +-----END CERTIFICATE----- + +Certum Root CA +============== + +MD5 Fingerprint=2C:8F:9F:66:1D:18:90:B1:47:26:9D:8E:86:82:8C:A9 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 65568 (0x10020) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=PL, O=Unizeto Sp. z o.o., CN=Certum CA + Validity + Not Before: Jun 11 10:46:39 2002 GMT + Not After : Jun 11 10:46:39 2027 GMT + Subject: C=PL, O=Unizeto Sp. z o.o., CN=Certum CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:ce:b1:c1:2e:d3:4f:7c:cd:25:ce:18:3e:4f:c4: + 8c:6f:80:6a:73:c8:5b:51:f8:9b:d2:dc:bb:00:5c: + b1:a0:fc:75:03:ee:81:f0:88:ee:23:52:e9:e6:15: + 33:8d:ac:2d:09:c5:76:f9:2b:39:80:89:e4:97:4b: + 90:a5:a8:78:f8:73:43:7b:a4:61:b0:d8:58:cc:e1: + 6c:66:7e:9c:f3:09:5e:55:63:84:d5:a8:ef:f3:b1: + 2e:30:68:b3:c4:3c:d8:ac:6e:8d:99:5a:90:4e:34: + dc:36:9a:8f:81:88:50:b7:6d:96:42:09:f3:d7:95: + 83:0d:41:4b:b0:6a:6b:f8:fc:0f:7e:62:9f:67:c4: + ed:26:5f:10:26:0f:08:4f:f0:a4:57:28:ce:8f:b8: + ed:45:f6:6e:ee:25:5d:aa:6e:39:be:e4:93:2f:d9: + 47:a0:72:eb:fa:a6:5b:af:ca:53:3f:e2:0e:c6:96: + 56:11:6e:f7:e9:66:a9:26:d8:7f:95:53:ed:0a:85: + 88:ba:4f:29:a5:42:8c:5e:b6:fc:85:20:00:aa:68: + 0b:a1:1a:85:01:9c:c4:46:63:82:88:b6:22:b1:ee: + fe:aa:46:59:7e:cf:35:2c:d5:b6:da:5d:f7:48:33: + 14:54:b6:eb:d9:6f:ce:cd:88:d6:ab:1b:da:96:3b: + 1d:59 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + b8:8d:ce:ef:e7:14:ba:cf:ee:b0:44:92:6c:b4:39:3e:a2:84: + 6e:ad:b8:21:77:d2:d4:77:82:87:e6:20:41:81:ee:e2:f8:11: + b7:63:d1:17:37:be:19:76:24:1c:04:1a:4c:eb:3d:aa:67:6f: + 2d:d4:cd:fe:65:31:70:c5:1b:a6:02:0a:ba:60:7b:6d:58:c2: + 9a:49:fe:63:32:0b:6b:e3:3a:c0:ac:ab:3b:b0:e8:d3:09:51: + 8c:10:83:c6:34:e0:c5:2b:e0:1a:b6:60:14:27:6c:32:77:8c: + bc:b2:72:98:cf:cd:cc:3f:b9:c8:24:42:14:d6:57:fc:e6:26: + 43:a9:1d:e5:80:90:ce:03:54:28:3e:f7:3f:d3:f8:4d:ed:6a: + 0a:3a:93:13:9b:3b:14:23:13:63:9c:3f:d1:87:27:79:e5:4c: + 51:e3:01:ad:85:5d:1a:3b:b1:d5:73:10:a4:d3:f2:bc:6e:64: + f5:5a:56:90:a8:c7:0e:4c:74:0f:2e:71:3b:f7:c8:47:f4:69: + 6f:15:f2:11:5e:83:1e:9c:7c:52:ae:fd:02:da:12:a8:59:67: + 18:db:bc:70:dd:9b:b1:69:ed:80:ce:89:40:48:6a:0e:35:ca: + 29:66:15:21:94:2c:e8:60:2a:9b:85:4a:40:f3:6b:8a:24:ec: + 06:16:2c:73 +-----BEGIN CERTIFICATE----- +MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM +MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD +QTAeFw0wMjA2MTExMDQ2MzlaFw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBM +MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD +QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6xwS7TT3zNJc4YPk/E +jG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdLkKWo +ePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GI +ULdtlkIJ89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapu +Ob7kky/ZR6By6/qmW6/KUz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUg +AKpoC6EahQGcxEZjgoi2IrHu/qpGWX7PNSzVttpd90gzFFS269lvzs2I1qsb2pY7 +HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEA +uI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+GXYkHAQa +TOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTg +xSvgGrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1q +CjqTE5s7FCMTY5w/0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5x +O/fIR/RpbxXyEV6DHpx8Uq79AtoSqFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs +6GAqm4VKQPNriiTsBhYscw== +-----END CERTIFICATE----- + +Comodo AAA Services root +======================== + +MD5 Fingerprint=49:79:04:B0:EB:87:19:AC:47:B0:BC:11:51:9B:74:D0 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=AAA Certificate Services + Validity + Not Before: Jan 1 00:00:00 2004 GMT + Not After : Dec 31 23:59:59 2028 GMT + Subject: C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=AAA Certificate Services + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:be:40:9d:f4:6e:e1:ea:76:87:1c:4d:45:44:8e: + be:46:c8:83:06:9d:c1:2a:fe:18:1f:8e:e4:02:fa: + f3:ab:5d:50:8a:16:31:0b:9a:06:d0:c5:70:22:cd: + 49:2d:54:63:cc:b6:6e:68:46:0b:53:ea:cb:4c:24: + c0:bc:72:4e:ea:f1:15:ae:f4:54:9a:12:0a:c3:7a: + b2:33:60:e2:da:89:55:f3:22:58:f3:de:dc:cf:ef: + 83:86:a2:8c:94:4f:9f:68:f2:98:90:46:84:27:c7: + 76:bf:e3:cc:35:2c:8b:5e:07:64:65:82:c0:48:b0: + a8:91:f9:61:9f:76:20:50:a8:91:c7:66:b5:eb:78: + 62:03:56:f0:8a:1a:13:ea:31:a3:1e:a0:99:fd:38: + f6:f6:27:32:58:6f:07:f5:6b:b8:fb:14:2b:af:b7: + aa:cc:d6:63:5f:73:8c:da:05:99:a8:38:a8:cb:17: + 78:36:51:ac:e9:9e:f4:78:3a:8d:cf:0f:d9:42:e2: + 98:0c:ab:2f:9f:0e:01:de:ef:9f:99:49:f1:2d:df: + ac:74:4d:1b:98:b5:47:c5:e5:29:d1:f9:90:18:c7: + 62:9c:be:83:c7:26:7b:3e:8a:25:c7:c0:dd:9d:e6: + 35:68:10:20:9d:8f:d8:de:d2:c3:84:9c:0d:5e:e8: + 2f:c9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + A0:11:0A:23:3E:96:F1:07:EC:E2:AF:29:EF:82:A5:7F:D0:30:A4:B4 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 CRL Distribution Points: + URI:http://crl.comodoca.com/AAACertificateServices.crl + URI:http://crl.comodo.net/AAACertificateServices.crl + + Signature Algorithm: sha1WithRSAEncryption + 08:56:fc:02:f0:9b:e8:ff:a4:fa:d6:7b:c6:44:80:ce:4f:c4: + c5:f6:00:58:cc:a6:b6:bc:14:49:68:04:76:e8:e6:ee:5d:ec: + 02:0f:60:d6:8d:50:18:4f:26:4e:01:e3:e6:b0:a5:ee:bf:bc: + 74:54:41:bf:fd:fc:12:b8:c7:4f:5a:f4:89:60:05:7f:60:b7: + 05:4a:f3:f6:f1:c2:bf:c4:b9:74:86:b6:2d:7d:6b:cc:d2:f3: + 46:dd:2f:c6:e0:6a:c3:c3:34:03:2c:7d:96:dd:5a:c2:0e:a7: + 0a:99:c1:05:8b:ab:0c:2f:f3:5c:3a:cf:6c:37:55:09:87:de: + 53:40:6c:58:ef:fc:b6:ab:65:6e:04:f6:1b:dc:3c:e0:5a:15: + c6:9e:d9:f1:59:48:30:21:65:03:6c:ec:e9:21:73:ec:9b:03: + a1:e0:37:ad:a0:15:18:8f:fa:ba:02:ce:a7:2c:a9:10:13:2c: + d4:e5:08:26:ab:22:97:60:f8:90:5e:74:d4:a2:9a:53:bd:f2: + a9:68:e0:a2:6e:c2:d7:6c:b1:a3:0f:9e:bf:eb:68:e7:56:f2: + ae:f2:e3:2b:38:3a:09:81:b5:6b:85:d7:be:2d:ed:3f:1a:b7: + b2:63:e2:f5:62:2c:82:d4:6a:00:41:50:f1:39:83:9f:95:e9: + 36:96:98:6e +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb +MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow +GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj +YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL +MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE +BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM +GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua +BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe +3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4 +YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR +rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm +ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU +oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v +QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t +b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF +AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q +GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2 +G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi +l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 +smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +Comodo Secure Services root +=========================== + +MD5 Fingerprint=D3:D9:BD:AE:9F:AC:67:24:B3:C8:1B:52:E1:B9:A9:BD +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=Secure Certificate Services + Validity + Not Before: Jan 1 00:00:00 2004 GMT + Not After : Dec 31 23:59:59 2028 GMT + Subject: C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=Secure Certificate Services + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:c0:71:33:82:8a:d0:70:eb:73:87:82:40:d5:1d: + e4:cb:c9:0e:42:90:f9:de:34:b9:a1:ba:11:f4:25: + 85:f3:cc:72:6d:f2:7b:97:6b:b3:07:f1:77:24:91: + 5f:25:8f:f6:74:3d:e4:80:c2:f8:3c:0d:f3:bf:40: + ea:f7:c8:52:d1:72:6f:ef:c8:ab:41:b8:6e:2e:17: + 2a:95:69:0c:cd:d2:1e:94:7b:2d:94:1d:aa:75:d7: + b3:98:cb:ac:bc:64:53:40:bc:8f:ac:ac:36:cb:5c: + ad:bb:dd:e0:94:17:ec:d1:5c:d0:bf:ef:a5:95:c9: + 90:c5:b0:ac:fb:1b:43:df:7a:08:5d:b7:b8:f2:40: + 1b:2b:27:9e:50:ce:5e:65:82:88:8c:5e:d3:4e:0c: + 7a:ea:08:91:b6:36:aa:2b:42:fb:ea:c2:a3:39:e5: + db:26:38:ad:8b:0a:ee:19:63:c7:1c:24:df:03:78: + da:e6:ea:c1:47:1a:0b:0b:46:09:dd:02:fc:de:cb: + 87:5f:d7:30:63:68:a1:ae:dc:32:a1:ba:be:fe:44: + ab:68:b6:a5:17:15:fd:bd:d5:a7:a7:9a:e4:44:33: + e9:88:8e:fc:ed:51:eb:93:71:4e:ad:01:e7:44:8e: + ab:2d:cb:a8:fe:01:49:48:f0:c0:dd:c7:68:d8:92: + fe:3d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 3C:D8:93:88:C2:C0:82:09:CC:01:99:06:93:20:E9:9E:70:09:63:4F + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 CRL Distribution Points: + URI:http://crl.comodoca.com/SecureCertificateServices.crl + URI:http://crl.comodo.net/SecureCertificateServices.crl + + Signature Algorithm: sha1WithRSAEncryption + 87:01:6d:23:1d:7e:5b:17:7d:c1:61:32:cf:8f:e7:f3:8a:94: + 59:66:e0:9e:28:a8:5e:d3:b7:f4:34:e6:aa:39:b2:97:16:c5: + 82:6f:32:a4:e9:8c:e7:af:fd:ef:c2:e8:b9:4b:aa:a3:f4:e6: + da:8d:65:21:fb:ba:80:eb:26:28:85:1a:fe:39:8c:de:5b:04: + 04:b4:54:f9:a3:67:9e:41:fa:09:52:cc:05:48:a8:c9:3f:21: + 04:1e:ce:48:6b:fc:85:e8:c2:7b:af:7f:b7:cc:f8:5f:3a:fd: + 35:c6:0d:ef:97:dc:4c:ab:11:e1:6b:cb:31:d1:6c:fb:48:80: + ab:dc:9c:37:b8:21:14:4b:0d:71:3d:ec:83:33:6e:d1:6e:32: + 16:ec:98:c7:16:8b:59:a6:34:ab:05:57:2d:93:f7:aa:13:cb: + d2:13:e2:b7:2e:3b:cd:6b:50:17:09:68:3e:b5:26:57:ee:b6: + e0:b6:dd:b9:29:80:79:7d:8f:a3:f0:a4:28:a4:15:c4:85:f4: + 27:d4:6b:bf:e5:5c:e4:65:02:76:54:b4:e3:37:66:24:d3:19: + 61:c8:52:10:e5:8b:37:9a:b9:a9:f9:1d:bf:ea:99:92:61:96: + ff:01:cd:a1:5f:0d:bc:71:bc:0e:ac:0b:1d:47:45:1d:c1:ec: + 7c:ec:fd:29 +-----BEGIN CERTIFICATE----- +MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb +MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow +GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp +ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow +fjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G +A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAiBgNV +BAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPM +cm3ye5drswfxdySRXyWP9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3S +HpR7LZQdqnXXs5jLrLxkU0C8j6ysNstcrbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996 +CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rCoznl2yY4rYsK7hljxxwk +3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3Vp6ea5EQz +6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNV +HQ4EFgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1Ud +EwEB/wQFMAMBAf8wgYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2Rv +Y2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRw +Oi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmww +DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0 +5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj +Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI +gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ +aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl +izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk= +-----END CERTIFICATE----- + +Comodo Trusted Services root +============================ + +MD5 Fingerprint=91:1B:3F:6E:CD:9E:AB:EE:07:FE:1F:71:D2:B3:61:27 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=Trusted Certificate Services + Validity + Not Before: Jan 1 00:00:00 2004 GMT + Not After : Dec 31 23:59:59 2028 GMT + Subject: C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=Trusted Certificate Services + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:df:71:6f:36:58:53:5a:f2:36:54:57:80:c4:74: + 08:20:ed:18:7f:2a:1d:e6:35:9a:1e:25:ac:9c:e5: + 96:7e:72:52:a0:15:42:db:59:dd:64:7a:1a:d0:b8: + 7b:dd:39:15:bc:55:48:c4:ed:3a:00:ea:31:11:ba: + f2:71:74:1a:67:b8:cf:33:cc:a8:31:af:a3:e3:d7: + 7f:bf:33:2d:4c:6a:3c:ec:8b:c3:92:d2:53:77:24: + 74:9c:07:6e:70:fc:bd:0b:5b:76:ba:5f:f2:ff:d7: + 37:4b:4a:60:78:f7:f0:fa:ca:70:b4:ea:59:aa:a3: + ce:48:2f:a9:c3:b2:0b:7e:17:72:16:0c:a6:07:0c: + 1b:38:cf:c9:62:b7:3f:a0:93:a5:87:41:f2:b7:70: + 40:77:d8:be:14:7c:e3:a8:c0:7a:8e:e9:63:6a:d1: + 0f:9a:c6:d2:f4:8b:3a:14:04:56:d4:ed:b8:cc:6e: + f5:fb:e2:2c:58:bd:7f:4f:6b:2b:f7:60:24:58:24: + ce:26:ef:34:91:3a:d5:e3:81:d0:b2:f0:04:02:d7: + 5b:b7:3e:92:ac:6b:12:8a:f9:e4:05:b0:3b:91:49: + 5c:b2:eb:53:ea:f8:9f:47:86:ee:bf:95:c0:c0:06: + 9f:d2:5b:5e:11:1b:f4:c7:04:35:29:d2:55:5c:e4: + ed:eb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + C5:7B:58:BD:ED:DA:25:69:D2:F7:59:16:A8:B3:32:C0:7B:27:5B:F4 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 CRL Distribution Points: + URI:http://crl.comodoca.com/TrustedCertificateServices.crl + URI:http://crl.comodo.net/TrustedCertificateServices.crl + + Signature Algorithm: sha1WithRSAEncryption + c8:93:81:3b:89:b4:af:b8:84:12:4c:8d:d2:f0:db:70:ba:57: + 86:15:34:10:b9:2f:7f:1e:b0:a8:89:60:a1:8a:c2:77:0c:50: + 4a:9b:00:8b:d8:8b:f4:41:e2:d0:83:8a:4a:1c:14:06:b0:a3: + 68:05:70:31:30:a7:53:9b:0e:e9:4a:a0:58:69:67:0e:ae:9d: + f6:a5:2c:41:bf:3c:06:6b:e4:59:cc:6d:10:f1:96:6f:1f:df: + f4:04:02:a4:9f:45:3e:c8:d8:fa:36:46:44:50:3f:82:97:91: + 1f:28:db:18:11:8c:2a:e4:65:83:57:12:12:8c:17:3f:94:36: + fe:5d:b0:c0:04:77:13:b8:f4:15:d5:3f:38:cc:94:3a:55:d0: + ac:98:f5:ba:00:5f:e0:86:19:81:78:2f:28:c0:7e:d3:cc:42: + 0a:f5:ae:50:a0:d1:3e:c6:a1:71:ec:3f:a0:20:8c:66:3a:89: + b4:8e:d4:d8:b1:4d:25:47:ee:2f:88:c8:b5:e1:05:45:c0:be: + 14:71:de:7a:fd:8e:7b:7d:4d:08:96:a5:12:73:f0:2d:ca:37: + 27:74:12:27:4c:cb:b6:97:e9:d9:ae:08:6d:5a:39:40:dd:05: + 47:75:6a:5a:21:b3:a3:18:cf:4e:f7:2e:57:b7:98:70:5e:c8: + c4:78:b0:62 +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb +MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow +GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0 +aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEwMDAwMDBaFw0yODEyMzEyMzU5NTla +MH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO +BgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUwIwYD +VQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWW +fnJSoBVC21ndZHoa0Lh73TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMt +TGo87IvDktJTdyR0nAducPy9C1t2ul/y/9c3S0pgePfw+spwtOpZqqPOSC+pw7IL +fhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6juljatEPmsbS9Is6FARW +1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsSivnkBbA7 +kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0G +A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v +ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo +dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu +Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/ +HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32 +pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS +jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+ +xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn +dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi +-----END CERTIFICATE----- + +IPS Chained CAs root +==================== + +MD5 Fingerprint=8D:72:51:DB:A0:3A:CF:20:77:DF:F2:65:06:5E:DF:EF +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA Chained CAs Certification Authority, CN=IPS CA Chained CAs Certification Authority/emailAddress=ips@mail.ips.es + Validity + Not Before: Dec 29 00:53:58 2001 GMT + Not After : Dec 27 00:53:58 2025 GMT + Subject: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA Chained CAs Certification Authority, CN=IPS CA Chained CAs Certification Authority/emailAddress=ips@mail.ips.es + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:dc:56:92:49:b2:94:20:bc:98:4f:50:eb:68:a4: + a7:49:0b:bf:d2:31:e8:c7:4f:c2:86:0b:fa:68:fd: + 43:5a:8a:f3:60:92:35:99:38:bb:4d:03:52:21:5b: + f0:37:99:35:e1:41:20:81:85:81:05:71:81:9d:b4: + 95:19:a9:5f:76:34:2e:63:37:35:57:8e:b4:1f:42: + 3f:15:5c:e1:7a:c1:5f:13:18:32:31:c9:ad:be:a3: + c7:83:66:1e:b9:9c:04:13:cb:69:c1:06:de:30:06: + bb:33:a3:b5:1f:f0:8f:6f:ce:ff:96:e8:54:be:66: + 80:ae:6b:db:41:84:36:a2:3d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + A1:AD:31:B1:F9:3E:E1:17:A6:C8:AB:34:FC:52:87:09:1E:62:52:41 + X509v3 Authority Key Identifier: + keyid:A1:AD:31:B1:F9:3E:E1:17:A6:C8:AB:34:FC:52:87:09:1E:62:52:41 + DirName:/C=ES/ST=Barcelona/L=Barcelona/O=IPS Internet publishing Services s.l./O=ips@mail.ips.es C.I.F. B-60929452/OU=IPS CA Chained CAs Certification Authority/CN=IPS CA Chained CAs Certification Authority/emailAddress=ips@mail.ips.es + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Key Usage: + Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement, Certificate Sign, CRL Sign, Encipher Only, Decipher Only + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication, Code Signing, E-mail Protection, Time Stamping, Microsoft Individual Code Signing, Microsoft Commercial Code Signing, Microsoft Trust List Signing, Microsoft Encrypted File System + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:ips@mail.ips.es + X509v3 Issuer Alternative Name: + email:ips@mail.ips.es + Netscape Comment: + Chained CA Certificate issued by http://www.ips.es/ + Netscape Base Url: + http://www.ips.es/ips2002/ + Netscape CA Revocation Url: + http://www.ips.es/ips2002/ips2002CAC.crl + Netscape Revocation Url: + http://www.ips.es/ips2002/revocationCAC.html? + Netscape Renewal Url: + http://www.ips.es/ips2002/renewalCAC.html? + Netscape CA Policy Url: + http://www.ips.es/ips2002/policyCAC.html + X509v3 CRL Distribution Points: + URI:http://www.ips.es/ips2002/ips2002CAC.crl + URI:http://wwwback.ips.es/ips2002/ips2002CAC.crl + + Authority Information Access: + OCSP - URI:http://ocsp.ips.es/ + + Signature Algorithm: sha1WithRSAEncryption + 44:72:30:9d:56:58:a2:41:1b:28:b7:95:e1:a6:1a:95:5f:a7: + 78:40:2b:ef:db:96:4a:fc:4c:71:63:d9:73:95:bd:02:e2:a2: + 06:c7:be:97:2a:93:80:34:86:03:fa:dc:d8:3d:1e:07:cd:1e: + 73:43:24:60:f5:1d:61:dc:dc:96:a0:bc:fb:1d:e3:e7:12:00: + 27:33:02:c0:c0:2b:53:3d:d8:6b:03:81:a3:db:d6:93:95:20: + ef:d3:96:7e:26:90:89:9c:26:9b:cd:6f:66:ab:ed:03:22:44: + 38:cc:59:bd:9f:db:f6:07:a2:01:7f:26:c4:63:f5:25:42:5e: + 62:bd +-----BEGIN CERTIFICATE----- +MIIH9zCCB2CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCCARwxCzAJBgNVBAYTAkVT +MRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQBgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UE +ChMlSVBTIEludGVybmV0IHB1Ymxpc2hpbmcgU2VydmljZXMgcy5sLjErMCkGA1UE +ChQiaXBzQG1haWwuaXBzLmVzIEMuSS5GLiAgQi02MDkyOTQ1MjEzMDEGA1UECxMq +SVBTIENBIENoYWluZWQgQ0FzIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MTMwMQYD +VQQDEypJUFMgQ0EgQ2hhaW5lZCBDQXMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx +HjAcBgkqhkiG9w0BCQEWD2lwc0BtYWlsLmlwcy5lczAeFw0wMTEyMjkwMDUzNTha +Fw0yNTEyMjcwMDUzNThaMIIBHDELMAkGA1UEBhMCRVMxEjAQBgNVBAgTCUJhcmNl +bG9uYTESMBAGA1UEBxMJQmFyY2Vsb25hMS4wLAYDVQQKEyVJUFMgSW50ZXJuZXQg +cHVibGlzaGluZyBTZXJ2aWNlcyBzLmwuMSswKQYDVQQKFCJpcHNAbWFpbC5pcHMu +ZXMgQy5JLkYuICBCLTYwOTI5NDUyMTMwMQYDVQQLEypJUFMgQ0EgQ2hhaW5lZCBD +QXMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxMzAxBgNVBAMTKklQUyBDQSBDaGFp +bmVkIENBcyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEeMBwGCSqGSIb3DQEJARYP +aXBzQG1haWwuaXBzLmVzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDcVpJJ +spQgvJhPUOtopKdJC7/SMejHT8KGC/po/UNaivNgkjWZOLtNA1IhW/A3mTXhQSCB +hYEFcYGdtJUZqV92NC5jNzVXjrQfQj8VXOF6wV8TGDIxya2+o8eDZh65nAQTy2nB +Bt4wBrszo7Uf8I9vzv+W6FS+ZoCua9tBhDaiPQIDAQABo4IEQzCCBD8wHQYDVR0O +BBYEFKGtMbH5PuEXpsirNPxShwkeYlJBMIIBTgYDVR0jBIIBRTCCAUGAFKGtMbH5 +PuEXpsirNPxShwkeYlJBoYIBJKSCASAwggEcMQswCQYDVQQGEwJFUzESMBAGA1UE +CBMJQmFyY2Vsb25hMRIwEAYDVQQHEwlCYXJjZWxvbmExLjAsBgNVBAoTJUlQUyBJ +bnRlcm5ldCBwdWJsaXNoaW5nIFNlcnZpY2VzIHMubC4xKzApBgNVBAoUImlwc0Bt +YWlsLmlwcy5lcyBDLkkuRi4gIEItNjA5Mjk0NTIxMzAxBgNVBAsTKklQUyBDQSBD +aGFpbmVkIENBcyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEzMDEGA1UEAxMqSVBT +IENBIENoYWluZWQgQ0FzIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MR4wHAYJKoZI +hvcNAQkBFg9pcHNAbWFpbC5pcHMuZXOCAQAwDAYDVR0TBAUwAwEB/zAMBgNVHQ8E +BQMDB/+AMGsGA1UdJQRkMGIGCCsGAQUFBwMBBggrBgEFBQcDAgYIKwYBBQUHAwMG +CCsGAQUFBwMEBggrBgEFBQcDCAYKKwYBBAGCNwIBFQYKKwYBBAGCNwIBFgYKKwYB +BAGCNwoDAQYKKwYBBAGCNwoDBDARBglghkgBhvhCAQEEBAMCAAcwGgYDVR0RBBMw +EYEPaXBzQG1haWwuaXBzLmVzMBoGA1UdEgQTMBGBD2lwc0BtYWlsLmlwcy5lczBC +BglghkgBhvhCAQ0ENRYzQ2hhaW5lZCBDQSBDZXJ0aWZpY2F0ZSBpc3N1ZWQgYnkg +aHR0cDovL3d3dy5pcHMuZXMvMCkGCWCGSAGG+EIBAgQcFhpodHRwOi8vd3d3Lmlw +cy5lcy9pcHMyMDAyLzA3BglghkgBhvhCAQQEKhYoaHR0cDovL3d3dy5pcHMuZXMv +aXBzMjAwMi9pcHMyMDAyQ0FDLmNybDA8BglghkgBhvhCAQMELxYtaHR0cDovL3d3 +dy5pcHMuZXMvaXBzMjAwMi9yZXZvY2F0aW9uQ0FDLmh0bWw/MDkGCWCGSAGG+EIB +BwQsFipodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL3JlbmV3YWxDQUMuaHRtbD8w +NwYJYIZIAYb4QgEIBCoWKGh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvcG9saWN5 +Q0FDLmh0bWwwbQYDVR0fBGYwZDAuoCygKoYoaHR0cDovL3d3dy5pcHMuZXMvaXBz +MjAwMi9pcHMyMDAyQ0FDLmNybDAyoDCgLoYsaHR0cDovL3d3d2JhY2suaXBzLmVz +L2lwczIwMDIvaXBzMjAwMkNBQy5jcmwwLwYIKwYBBQUHAQEEIzAhMB8GCCsGAQUF +BzABhhNodHRwOi8vb2NzcC5pcHMuZXMvMA0GCSqGSIb3DQEBBQUAA4GBAERyMJ1W +WKJBGyi3leGmGpVfp3hAK+/blkr8THFj2XOVvQLiogbHvpcqk4A0hgP63Ng9HgfN +HnNDJGD1HWHc3JagvPsd4+cSACczAsDAK1M92GsDgaPb1pOVIO/Tln4mkImcJpvN +b2ar7QMiRDjMWb2f2/YHogF/JsRj9SVCXmK9 +-----END CERTIFICATE----- + +Thawte Server CA +================ + +MD5 Fingerprint=C5:70:C4:A2:ED:53:78:0C:C8:10:53:81:64:CB:D0:1D +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/emailAddress=server-certs@thawte.com + Validity + Not Before: Aug 1 00:00:00 1996 GMT + Not After : Dec 31 23:59:59 2020 GMT + Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA/emailAddress=server-certs@thawte.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d3:a4:50:6e:c8:ff:56:6b:e6:cf:5d:b6:ea:0c: + 68:75:47:a2:aa:c2:da:84:25:fc:a8:f4:47:51:da: + 85:b5:20:74:94:86:1e:0f:75:c9:e9:08:61:f5:06: + 6d:30:6e:15:19:02:e9:52:c0:62:db:4d:99:9e:e2: + 6a:0c:44:38:cd:fe:be:e3:64:09:70:c5:fe:b1:6b: + 29:b6:2f:49:c8:3b:d4:27:04:25:10:97:2f:e7:90: + 6d:c0:28:42:99:d7:4c:43:de:c3:f5:21:6d:54:9f: + 5d:c3:58:e1:c0:e4:d9:5b:b0:b8:dc:b4:7b:df:36: + 3a:c2:b5:66:22:12:d6:87:0d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + 07:fa:4c:69:5c:fb:95:cc:46:ee:85:83:4d:21:30:8e:ca:d9: + a8:6f:49:1a:e6:da:51:e3:60:70:6c:84:61:11:a1:1a:c8:48: + 3e:59:43:7d:4f:95:3d:a1:8b:b7:0b:62:98:7a:75:8a:dd:88: + 4e:4e:9e:40:db:a8:cc:32:74:b9:6f:0d:c6:e3:b3:44:0b:d9: + 8a:6f:9a:29:9b:99:18:28:3b:d1:e3:40:28:9a:5a:3c:d5:b5: + e7:20:1b:8b:ca:a4:ab:8d:e9:51:d9:e2:4c:2c:59:a9:da:b9: + b2:75:1b:f6:42:f2:ef:c7:f2:18:f9:89:bc:a3:ff:8a:23:2e: + 70:47 +-----BEGIN CERTIFICATE----- +MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx +FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD +VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv +biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm +MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx +MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3 +dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl +cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3 +DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD +gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91 +yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX +L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj +EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG +7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e +QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ +qdq5snUb9kLy78fyGPmJvKP/iiMucEc= +-----END CERTIFICATE----- + +IPS CLASE1 root +=============== + +MD5 Fingerprint=84:90:1D:95:30:49:56:FC:41:81:F0:45:D7:76:C4:6B +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASE1 Certification Authority, CN=IPS CA CLASE1 Certification Authority/emailAddress=ips@mail.ips.es + Validity + Not Before: Dec 29 00:59:38 2001 GMT + Not After : Dec 27 00:59:38 2025 GMT + Subject: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASE1 Certification Authority, CN=IPS CA CLASE1 Certification Authority/emailAddress=ips@mail.ips.es + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:e0:51:27:a7:0b:dd:af:d1:b9:43:5b:82:37:45: + 56:72:ef:9a:b6:c2:12:ef:2c:12:cc:76:f9:06:59: + af:5d:21:d4:d2:5a:b8:a0:d4:f3:6a:fd:ca:69:8d: + 66:48:f7:74:e6:ee:36:bd:e8:96:91:75:a6:71:28: + ca:e7:22:12:32:69:b0:3e:1e:6b:f4:50:52:62:62: + fd:63:3b:7d:7e:ec:ee:38:ea:62:f4:6c:a8:71:8d: + e1:e9:8b:c9:3f:c6:b5:cd:94:42:6f:dd:82:45:3c: + e8:df:09:e8:ef:0a:55:a9:56:47:61:4c:49:64:73: + 10:28:3f:ca:bf:09:ff:c6:2f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + EB:B3:19:79:F3:C1:A5:1C:AC:DC:BA:1F:66:A2:B2:9B:69:D0:78:08 + X509v3 Authority Key Identifier: + keyid:EB:B3:19:79:F3:C1:A5:1C:AC:DC:BA:1F:66:A2:B2:9B:69:D0:78:08 + DirName:/C=ES/ST=Barcelona/L=Barcelona/O=IPS Internet publishing Services s.l./O=ips@mail.ips.es C.I.F. B-60929452/OU=IPS CA CLASE1 Certification Authority/CN=IPS CA CLASE1 Certification Authority/emailAddress=ips@mail.ips.es + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Key Usage: + Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement, Certificate Sign, CRL Sign, Encipher Only, Decipher Only + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication, Code Signing, E-mail Protection, Time Stamping, Microsoft Individual Code Signing, Microsoft Commercial Code Signing, Microsoft Trust List Signing, Microsoft Encrypted File System + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:ips@mail.ips.es + X509v3 Issuer Alternative Name: + email:ips@mail.ips.es + Netscape Comment: + CLASE1 CA Certificate issued by http://www.ips.es/ + Netscape Base Url: + http://www.ips.es/ips2002/ + Netscape CA Revocation Url: + http://www.ips.es/ips2002/ips2002CLASE1.crl + Netscape Revocation Url: + http://www.ips.es/ips2002/revocationCLASE1.html? + Netscape Renewal Url: + http://www.ips.es/ips2002/renewalCLASE1.html? + Netscape CA Policy Url: + http://www.ips.es/ips2002/policyCLASE1.html + X509v3 CRL Distribution Points: + URI:http://www.ips.es/ips2002/ips2002CLASE1.crl + URI:http://wwwback.ips.es/ips2002/ips2002CLASE1.crl + + Authority Information Access: + OCSP - URI:http://ocsp.ips.es/ + + Signature Algorithm: sha1WithRSAEncryption + 2b:d0:eb:fd:da:c8:ca:59:6a:da:d3:cc:32:2e:c9:54:1b:8a: + 62:7e:15:2d:e9:d9:31:d3:2e:f4:27:23:ff:5b:ab:c5:4a:b6: + 72:40:ae:53:74:f4:bc:05:b4:c6:d9:c8:c9:77:fb:b7:f9:34: + 7f:78:00:f8:d6:a4:e4:52:3f:2c:4a:63:57:81:75:5a:8e:e8: + 8c:fb:02:c0:94:c6:29:ba:b3:dc:1c:e8:b2:af:d2:2e:62:5b: + 1a:a9:8e:0e:cc:c5:57:45:51:14:e9:4e:1c:88:a5:91:f4:a3: + f7:8e:51:c8:a9:be:86:33:3e:e6:2f:48:6e:af:54:90:4e:ad: + b1:25 +-----BEGIN CERTIFICATE----- +MIIH6jCCB1OgAwIBAgIBADANBgkqhkiG9w0BAQUFADCCARIxCzAJBgNVBAYTAkVT +MRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQBgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UE +ChMlSVBTIEludGVybmV0IHB1Ymxpc2hpbmcgU2VydmljZXMgcy5sLjErMCkGA1UE +ChQiaXBzQG1haWwuaXBzLmVzIEMuSS5GLiAgQi02MDkyOTQ1MjEuMCwGA1UECxMl +SVBTIENBIENMQVNFMSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMl +SVBTIENBIENMQVNFMSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEeMBwGCSqGSIb3 +DQEJARYPaXBzQG1haWwuaXBzLmVzMB4XDTAxMTIyOTAwNTkzOFoXDTI1MTIyNzAw +NTkzOFowggESMQswCQYDVQQGEwJFUzESMBAGA1UECBMJQmFyY2Vsb25hMRIwEAYD +VQQHEwlCYXJjZWxvbmExLjAsBgNVBAoTJUlQUyBJbnRlcm5ldCBwdWJsaXNoaW5n +IFNlcnZpY2VzIHMubC4xKzApBgNVBAoUImlwc0BtYWlsLmlwcy5lcyBDLkkuRi4g +IEItNjA5Mjk0NTIxLjAsBgNVBAsTJUlQUyBDQSBDTEFTRTEgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxLjAsBgNVBAMTJUlQUyBDQSBDTEFTRTEgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxHjAcBgkqhkiG9w0BCQEWD2lwc0BtYWlsLmlwcy5lczCBnzAN +BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4FEnpwvdr9G5Q1uCN0VWcu+atsIS7ywS +zHb5BlmvXSHU0lq4oNTzav3KaY1mSPd05u42veiWkXWmcSjK5yISMmmwPh5r9FBS +YmL9Yzt9fuzuOOpi9GyocY3h6YvJP8a1zZRCb92CRTzo3wno7wpVqVZHYUxJZHMQ +KD/Kvwn/xi8CAwEAAaOCBEowggRGMB0GA1UdDgQWBBTrsxl588GlHKzcuh9morKb +adB4CDCCAUQGA1UdIwSCATswggE3gBTrsxl588GlHKzcuh9morKbadB4CKGCARqk +ggEWMIIBEjELMAkGA1UEBhMCRVMxEjAQBgNVBAgTCUJhcmNlbG9uYTESMBAGA1UE +BxMJQmFyY2Vsb25hMS4wLAYDVQQKEyVJUFMgSW50ZXJuZXQgcHVibGlzaGluZyBT +ZXJ2aWNlcyBzLmwuMSswKQYDVQQKFCJpcHNAbWFpbC5pcHMuZXMgQy5JLkYuICBC +LTYwOTI5NDUyMS4wLAYDVQQLEyVJUFMgQ0EgQ0xBU0UxIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5MS4wLAYDVQQDEyVJUFMgQ0EgQ0xBU0UxIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5MR4wHAYJKoZIhvcNAQkBFg9pcHNAbWFpbC5pcHMuZXOCAQAwDAYD +VR0TBAUwAwEB/zAMBgNVHQ8EBQMDB/+AMGsGA1UdJQRkMGIGCCsGAQUFBwMBBggr +BgEFBQcDAgYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYKKwYBBAGCNwIB +FQYKKwYBBAGCNwIBFgYKKwYBBAGCNwoDAQYKKwYBBAGCNwoDBDARBglghkgBhvhC +AQEEBAMCAAcwGgYDVR0RBBMwEYEPaXBzQG1haWwuaXBzLmVzMBoGA1UdEgQTMBGB +D2lwc0BtYWlsLmlwcy5lczBBBglghkgBhvhCAQ0ENBYyQ0xBU0UxIENBIENlcnRp +ZmljYXRlIGlzc3VlZCBieSBodHRwOi8vd3d3Lmlwcy5lcy8wKQYJYIZIAYb4QgEC +BBwWGmh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvMDoGCWCGSAGG+EIBBAQtFito +dHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL2lwczIwMDJDTEFTRTEuY3JsMD8GCWCG +SAGG+EIBAwQyFjBodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL3Jldm9jYXRpb25D +TEFTRTEuaHRtbD8wPAYJYIZIAYb4QgEHBC8WLWh0dHA6Ly93d3cuaXBzLmVzL2lw +czIwMDIvcmVuZXdhbENMQVNFMS5odG1sPzA6BglghkgBhvhCAQgELRYraHR0cDov +L3d3dy5pcHMuZXMvaXBzMjAwMi9wb2xpY3lDTEFTRTEuaHRtbDBzBgNVHR8EbDBq +MDGgL6AthitodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL2lwczIwMDJDTEFTRTEu +Y3JsMDWgM6Axhi9odHRwOi8vd3d3YmFjay5pcHMuZXMvaXBzMjAwMi9pcHMyMDAy +Q0xBU0UxLmNybDAvBggrBgEFBQcBAQQjMCEwHwYIKwYBBQUHMAGGE2h0dHA6Ly9v +Y3NwLmlwcy5lcy8wDQYJKoZIhvcNAQEFBQADgYEAK9Dr/drIyllq2tPMMi7JVBuK +Yn4VLenZMdMu9Ccj/1urxUq2ckCuU3T0vAW0xtnIyXf7t/k0f3gA+Nak5FI/LEpj +V4F1Wo7ojPsCwJTGKbqz3Bzosq/SLmJbGqmODszFV0VRFOlOHIilkfSj945RyKm+ +hjM+5i9Ibq9UkE6tsSU= +-----END CERTIFICATE----- + +IPS CLASE3 root +=============== + +MD5 Fingerprint=42:76:97:68:CF:A6:B4:38:24:AA:A1:1B:F2:67:DE:CA +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASE3 Certification Authority, CN=IPS CA CLASE3 Certification Authority/emailAddress=ips@mail.ips.es + Validity + Not Before: Dec 29 01:01:44 2001 GMT + Not After : Dec 27 01:01:44 2025 GMT + Subject: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASE3 Certification Authority, CN=IPS CA CLASE3 Certification Authority/emailAddress=ips@mail.ips.es + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:ab:17:fe:0e:b0:c6:68:1b:53:f0:52:be:9f:fa: + da:fa:8b:13:04:bb:01:8f:32:d9:1f:8f:4d:ce:36: + 98:da:e4:00:44:8c:28:d8:13:44:2a:a4:6b:4e:17: + 24:42:9c:d3:88:a4:41:82:d6:23:fb:8b:c9:86:e5: + b9:a9:82:05:dc:f1:de:1f:e0:0c:99:55:98:f2:38: + ec:6c:9d:20:03:c0:ef:aa:a3:c6:64:04:51:2d:78: + 0d:a3:d2:a8:3a:d6:24:4c:e9:96:7a:18:ac:13:23: + 22:1b:7c:e8:31:11:b3:5f:09:aa:30:70:71:46:25: + 6b:49:71:80:2b:95:01:b2:1f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + B8:93:FF:2E:CB:DC:2C:8E:A2:E7:7A:FE:36:51:21:A3:98:5B:0C:34 + X509v3 Authority Key Identifier: + keyid:B8:93:FF:2E:CB:DC:2C:8E:A2:E7:7A:FE:36:51:21:A3:98:5B:0C:34 + DirName:/C=ES/ST=Barcelona/L=Barcelona/O=IPS Internet publishing Services s.l./O=ips@mail.ips.es C.I.F. B-60929452/OU=IPS CA CLASE3 Certification Authority/CN=IPS CA CLASE3 Certification Authority/emailAddress=ips@mail.ips.es + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Key Usage: + Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement, Certificate Sign, CRL Sign, Encipher Only, Decipher Only + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication, Code Signing, E-mail Protection, Time Stamping, Microsoft Individual Code Signing, Microsoft Commercial Code Signing, Microsoft Trust List Signing, Microsoft Encrypted File System + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:ips@mail.ips.es + X509v3 Issuer Alternative Name: + email:ips@mail.ips.es + Netscape Comment: + CLASE3 CA Certificate issued by http://www.ips.es/ + Netscape Base Url: + http://www.ips.es/ips2002/ + Netscape CA Revocation Url: + http://www.ips.es/ips2002/ips2002CLASE3.crl + Netscape Revocation Url: + http://www.ips.es/ips2002/revocationCLASE3.html? + Netscape Renewal Url: + http://www.ips.es/ips2002/renewalCLASE3.html? + Netscape CA Policy Url: + http://www.ips.es/ips2002/policyCLASE3.html + X509v3 CRL Distribution Points: + URI:http://www.ips.es/ips2002/ips2002CLASE3.crl + URI:http://wwwback.ips.es/ips2002/ips2002CLASE3.crl + + Authority Information Access: + OCSP - URI:http://ocsp.ips.es/ + + Signature Algorithm: sha1WithRSAEncryption + 17:65:5c:99:95:43:03:27:af:26:e5:eb:d0:b3:17:23:f7:43: + aa:c7:f0:7d:ec:0f:c6:a9:ae:ae:96:0f:76:29:1c:e2:06:2d: + 7e:26:c5:3c:fa:a1:c1:81:ce:53:b0:42:d1:97:57:1a:17:7e: + a4:51:61:c6:ee:e9:5e:ef:05:ba:eb:bd:0f:a7:92:6f:d8:a3: + 06:68:29:8e:79:f5:ff:bf:f9:a7:af:e4:b1:ce:c2:d1:80:42: + 27:05:04:34:f8:c3:7f:16:78:23:0c:07:24:f2:46:47:ad:3b: + 54:d0:af:d5:31:b2:af:7d:c8:ea:e9:d4:56:d9:0e:13:b2:c5: + 45:50 +-----BEGIN CERTIFICATE----- +MIIH6jCCB1OgAwIBAgIBADANBgkqhkiG9w0BAQUFADCCARIxCzAJBgNVBAYTAkVT +MRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQBgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UE +ChMlSVBTIEludGVybmV0IHB1Ymxpc2hpbmcgU2VydmljZXMgcy5sLjErMCkGA1UE +ChQiaXBzQG1haWwuaXBzLmVzIEMuSS5GLiAgQi02MDkyOTQ1MjEuMCwGA1UECxMl +SVBTIENBIENMQVNFMyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMl +SVBTIENBIENMQVNFMyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEeMBwGCSqGSIb3 +DQEJARYPaXBzQG1haWwuaXBzLmVzMB4XDTAxMTIyOTAxMDE0NFoXDTI1MTIyNzAx +MDE0NFowggESMQswCQYDVQQGEwJFUzESMBAGA1UECBMJQmFyY2Vsb25hMRIwEAYD +VQQHEwlCYXJjZWxvbmExLjAsBgNVBAoTJUlQUyBJbnRlcm5ldCBwdWJsaXNoaW5n +IFNlcnZpY2VzIHMubC4xKzApBgNVBAoUImlwc0BtYWlsLmlwcy5lcyBDLkkuRi4g +IEItNjA5Mjk0NTIxLjAsBgNVBAsTJUlQUyBDQSBDTEFTRTMgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxLjAsBgNVBAMTJUlQUyBDQSBDTEFTRTMgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxHjAcBgkqhkiG9w0BCQEWD2lwc0BtYWlsLmlwcy5lczCBnzAN +BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAqxf+DrDGaBtT8FK+n/ra+osTBLsBjzLZ +H49NzjaY2uQARIwo2BNEKqRrThckQpzTiKRBgtYj+4vJhuW5qYIF3PHeH+AMmVWY +8jjsbJ0gA8DvqqPGZARRLXgNo9KoOtYkTOmWehisEyMiG3zoMRGzXwmqMHBxRiVr +SXGAK5UBsh8CAwEAAaOCBEowggRGMB0GA1UdDgQWBBS4k/8uy9wsjqLnev42USGj +mFsMNDCCAUQGA1UdIwSCATswggE3gBS4k/8uy9wsjqLnev42USGjmFsMNKGCARqk +ggEWMIIBEjELMAkGA1UEBhMCRVMxEjAQBgNVBAgTCUJhcmNlbG9uYTESMBAGA1UE +BxMJQmFyY2Vsb25hMS4wLAYDVQQKEyVJUFMgSW50ZXJuZXQgcHVibGlzaGluZyBT +ZXJ2aWNlcyBzLmwuMSswKQYDVQQKFCJpcHNAbWFpbC5pcHMuZXMgQy5JLkYuICBC +LTYwOTI5NDUyMS4wLAYDVQQLEyVJUFMgQ0EgQ0xBU0UzIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5MS4wLAYDVQQDEyVJUFMgQ0EgQ0xBU0UzIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5MR4wHAYJKoZIhvcNAQkBFg9pcHNAbWFpbC5pcHMuZXOCAQAwDAYD +VR0TBAUwAwEB/zAMBgNVHQ8EBQMDB/+AMGsGA1UdJQRkMGIGCCsGAQUFBwMBBggr +BgEFBQcDAgYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYKKwYBBAGCNwIB +FQYKKwYBBAGCNwIBFgYKKwYBBAGCNwoDAQYKKwYBBAGCNwoDBDARBglghkgBhvhC +AQEEBAMCAAcwGgYDVR0RBBMwEYEPaXBzQG1haWwuaXBzLmVzMBoGA1UdEgQTMBGB +D2lwc0BtYWlsLmlwcy5lczBBBglghkgBhvhCAQ0ENBYyQ0xBU0UzIENBIENlcnRp +ZmljYXRlIGlzc3VlZCBieSBodHRwOi8vd3d3Lmlwcy5lcy8wKQYJYIZIAYb4QgEC +BBwWGmh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvMDoGCWCGSAGG+EIBBAQtFito +dHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL2lwczIwMDJDTEFTRTMuY3JsMD8GCWCG +SAGG+EIBAwQyFjBodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL3Jldm9jYXRpb25D +TEFTRTMuaHRtbD8wPAYJYIZIAYb4QgEHBC8WLWh0dHA6Ly93d3cuaXBzLmVzL2lw +czIwMDIvcmVuZXdhbENMQVNFMy5odG1sPzA6BglghkgBhvhCAQgELRYraHR0cDov +L3d3dy5pcHMuZXMvaXBzMjAwMi9wb2xpY3lDTEFTRTMuaHRtbDBzBgNVHR8EbDBq +MDGgL6AthitodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL2lwczIwMDJDTEFTRTMu +Y3JsMDWgM6Axhi9odHRwOi8vd3d3YmFjay5pcHMuZXMvaXBzMjAwMi9pcHMyMDAy +Q0xBU0UzLmNybDAvBggrBgEFBQcBAQQjMCEwHwYIKwYBBQUHMAGGE2h0dHA6Ly9v +Y3NwLmlwcy5lcy8wDQYJKoZIhvcNAQEFBQADgYEAF2VcmZVDAyevJuXr0LMXI/dD +qsfwfewPxqmurpYPdikc4gYtfibFPPqhwYHOU7BC0ZdXGhd+pFFhxu7pXu8Fuuu9 +D6eSb9ijBmgpjnn1/7/5p6/ksc7C0YBCJwUENPjDfxZ4IwwHJPJGR607VNCv1TGy +r33I6unUVtkOE7LFRVA= +-----END CERTIFICATE----- + +IPS CLASEA1 root +================ + +MD5 Fingerprint=0C:F8:9E:17:FC:D4:03:BD:E6:8D:9B:3C:05:87:FE:84 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASEA1 Certification Authority, CN=IPS CA CLASEA1 Certification Authority/emailAddress=ips@mail.ips.es + Validity + Not Before: Dec 29 01:05:32 2001 GMT + Not After : Dec 27 01:05:32 2025 GMT + Subject: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASEA1 Certification Authority, CN=IPS CA CLASEA1 Certification Authority/emailAddress=ips@mail.ips.es + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:bb:30:d7:dc:d0:54:bd:35:4e:9f:c5:4c:82:ea: + d1:50:3c:47:98:fc:9b:69:9d:77:cd:6e:e0:3f:ee: + eb:32:5f:5f:9f:d2:d0:79:e5:95:73:44:21:32:e0: + 0a:db:9d:d7:ce:8d:ab:52:8b:2b:78:e0:9b:5b:7d: + f4:fd:6d:09:e5:ae:e1:6c:1d:07:23:a0:17:d1:f9: + 7d:a8:46:46:91:22:a8:b2:69:c6:ad:f7:f5:f5:94: + a1:30:94:bd:00:cc:44:7f:ee:c4:9e:c9:c1:e6:8f: + 0a:36:c1:fd:24:3d:01:a0:f5:7b:e2:7c:78:66:43: + 8b:4f:59:f2:9b:d9:fa:49:b3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 67:26:96:E7:A1:BF:D8:B5:03:9D:FE:3B:DC:FE:F2:8A:E6:15:DD:30 + X509v3 Authority Key Identifier: + keyid:67:26:96:E7:A1:BF:D8:B5:03:9D:FE:3B:DC:FE:F2:8A:E6:15:DD:30 + DirName:/C=ES/ST=Barcelona/L=Barcelona/O=IPS Internet publishing Services s.l./O=ips@mail.ips.es C.I.F. B-60929452/OU=IPS CA CLASEA1 Certification Authority/CN=IPS CA CLASEA1 Certification Authority/emailAddress=ips@mail.ips.es + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Key Usage: + Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement, Certificate Sign, CRL Sign, Encipher Only, Decipher Only + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication, Code Signing, E-mail Protection, Time Stamping, Microsoft Individual Code Signing, Microsoft Commercial Code Signing, Microsoft Trust List Signing, Microsoft Encrypted File System + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:ips@mail.ips.es + X509v3 Issuer Alternative Name: + email:ips@mail.ips.es + Netscape Comment: + CLASEA1 CA Certificate issued by http://www.ips.es/ + Netscape Base Url: + http://www.ips.es/ips2002/ + Netscape CA Revocation Url: + http://www.ips.es/ips2002/ips2002CLASEA1.crl + Netscape Revocation Url: + http://www.ips.es/ips2002/revocationCLASEA1.html? + Netscape Renewal Url: + http://www.ips.es/ips2002/renewalCLASEA1.html? + Netscape CA Policy Url: + http://www.ips.es/ips2002/policyCLASEA1.html + X509v3 CRL Distribution Points: + URI:http://www.ips.es/ips2002/ips2002CLASEA1.crl + URI:http://wwwback.ips.es/ips2002/ips2002CLASEA1.crl + + Authority Information Access: + OCSP - URI:http://ocsp.ips.es/ + + Signature Algorithm: sha1WithRSAEncryption + 7e:ba:8a:ac:80:00:84:15:0a:d5:98:51:0c:64:c5:9c:02:58: + 83:66:ca:ad:1e:07:cd:7e:6a:da:80:07:df:03:34:4a:1c:93: + c4:4b:58:20:35:36:71:ed:a2:0a:35:12:a5:a6:65:a7:85:69: + 0a:0e:e3:61:ee:ea:be:28:93:33:d5:ec:e8:be:c4:db:5f:7f: + a8:f9:63:31:c8:6b:96:e2:29:c2:5b:a0:e7:97:36:9d:77:5e: + 31:6b:fe:d3:a7:db:2a:db:db:96:8b:1f:66:de:b6:03:c0:2b: + b3:78:d6:55:07:e5:8f:39:50:de:07:23:72:e6:bd:20:14:4b: + b4:86 +-----BEGIN CERTIFICATE----- +MIIH9zCCB2CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCCARQxCzAJBgNVBAYTAkVT +MRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQBgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UE +ChMlSVBTIEludGVybmV0IHB1Ymxpc2hpbmcgU2VydmljZXMgcy5sLjErMCkGA1UE +ChQiaXBzQG1haWwuaXBzLmVzIEMuSS5GLiAgQi02MDkyOTQ1MjEvMC0GA1UECxMm +SVBTIENBIENMQVNFQTEgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxLzAtBgNVBAMT +JklQUyBDQSBDTEFTRUExIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MR4wHAYJKoZI +hvcNAQkBFg9pcHNAbWFpbC5pcHMuZXMwHhcNMDExMjI5MDEwNTMyWhcNMjUxMjI3 +MDEwNTMyWjCCARQxCzAJBgNVBAYTAkVTMRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQ +BgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UEChMlSVBTIEludGVybmV0IHB1Ymxpc2hp +bmcgU2VydmljZXMgcy5sLjErMCkGA1UEChQiaXBzQG1haWwuaXBzLmVzIEMuSS5G +LiAgQi02MDkyOTQ1MjEvMC0GA1UECxMmSVBTIENBIENMQVNFQTEgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkxLzAtBgNVBAMTJklQUyBDQSBDTEFTRUExIENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5MR4wHAYJKoZIhvcNAQkBFg9pcHNAbWFpbC5pcHMuZXMw +gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALsw19zQVL01Tp/FTILq0VA8R5j8 +m2mdd81u4D/u6zJfX5/S0HnllXNEITLgCtud186Nq1KLK3jgm1t99P1tCeWu4Wwd +ByOgF9H5fahGRpEiqLJpxq339fWUoTCUvQDMRH/uxJ7JweaPCjbB/SQ9AaD1e+J8 +eGZDi09Z8pvZ+kmzAgMBAAGjggRTMIIETzAdBgNVHQ4EFgQUZyaW56G/2LUDnf47 +3P7yiuYV3TAwggFGBgNVHSMEggE9MIIBOYAUZyaW56G/2LUDnf473P7yiuYV3TCh +ggEcpIIBGDCCARQxCzAJBgNVBAYTAkVTMRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQ +BgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UEChMlSVBTIEludGVybmV0IHB1Ymxpc2hp +bmcgU2VydmljZXMgcy5sLjErMCkGA1UEChQiaXBzQG1haWwuaXBzLmVzIEMuSS5G +LiAgQi02MDkyOTQ1MjEvMC0GA1UECxMmSVBTIENBIENMQVNFQTEgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkxLzAtBgNVBAMTJklQUyBDQSBDTEFTRUExIENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5MR4wHAYJKoZIhvcNAQkBFg9pcHNAbWFpbC5pcHMuZXOC +AQAwDAYDVR0TBAUwAwEB/zAMBgNVHQ8EBQMDB/+AMGsGA1UdJQRkMGIGCCsGAQUF +BwMBBggrBgEFBQcDAgYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYKKwYB +BAGCNwIBFQYKKwYBBAGCNwIBFgYKKwYBBAGCNwoDAQYKKwYBBAGCNwoDBDARBglg +hkgBhvhCAQEEBAMCAAcwGgYDVR0RBBMwEYEPaXBzQG1haWwuaXBzLmVzMBoGA1Ud +EgQTMBGBD2lwc0BtYWlsLmlwcy5lczBCBglghkgBhvhCAQ0ENRYzQ0xBU0VBMSBD +QSBDZXJ0aWZpY2F0ZSBpc3N1ZWQgYnkgaHR0cDovL3d3dy5pcHMuZXMvMCkGCWCG +SAGG+EIBAgQcFhpodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyLzA7BglghkgBhvhC +AQQELhYsaHR0cDovL3d3dy5pcHMuZXMvaXBzMjAwMi9pcHMyMDAyQ0xBU0VBMS5j +cmwwQAYJYIZIAYb4QgEDBDMWMWh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvcmV2 +b2NhdGlvbkNMQVNFQTEuaHRtbD8wPQYJYIZIAYb4QgEHBDAWLmh0dHA6Ly93d3cu +aXBzLmVzL2lwczIwMDIvcmVuZXdhbENMQVNFQTEuaHRtbD8wOwYJYIZIAYb4QgEI +BC4WLGh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvcG9saWN5Q0xBU0VBMS5odG1s +MHUGA1UdHwRuMGwwMqAwoC6GLGh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvaXBz +MjAwMkNMQVNFQTEuY3JsMDagNKAyhjBodHRwOi8vd3d3YmFjay5pcHMuZXMvaXBz +MjAwMi9pcHMyMDAyQ0xBU0VBMS5jcmwwLwYIKwYBBQUHAQEEIzAhMB8GCCsGAQUF +BzABhhNodHRwOi8vb2NzcC5pcHMuZXMvMA0GCSqGSIb3DQEBBQUAA4GBAH66iqyA +AIQVCtWYUQxkxZwCWINmyq0eB81+atqAB98DNEock8RLWCA1NnHtogo1EqWmZaeF +aQoO42Hu6r4okzPV7Oi+xNtff6j5YzHIa5biKcJboOeXNp13XjFr/tOn2yrb25aL +H2betgPAK7N41lUH5Y85UN4HI3LmvSAUS7SG +-----END CERTIFICATE----- + +IPS CLASEA3 root +================ + +MD5 Fingerprint=06:F9:EB:EC:CC:56:9D:88:BA:90:F5:BA:B0:1A:E0:02 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASEA3 Certification Authority, CN=IPS CA CLASEA3 Certification Authority/emailAddress=ips@mail.ips.es + Validity + Not Before: Dec 29 01:07:50 2001 GMT + Not After : Dec 27 01:07:50 2025 GMT + Subject: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA CLASEA3 Certification Authority, CN=IPS CA CLASEA3 Certification Authority/emailAddress=ips@mail.ips.es + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:ee:80:00:f6:1a:64:2e:ad:6a:c8:83:b1:8b:a7: + ee:8f:d9:b6:db:cd:1b:bb:86:06:22:76:33:0c:12: + 6d:48:56:61:d2:dc:82:25:62:2f:9f:d2:69:30:65: + 03:42:23:58:bc:47:dc:6b:d6:75:5d:17:3c:e1:ff: + f2:58:67:79:a0:c1:81:b1:d4:56:a2:f2:8d:11:99: + fd:f6:7d:f1:c7:c4:5e:02:2a:9a:e2:4a:b5:13:8a: + 00:fd:8c:77:86:e6:d7:94:f5:20:75:2e:0e:4c:bf: + 74:c4:3f:81:3e:83:b4:a3:38:36:29:e7:e8:2a:f5: + 8c:88:41:aa:80:a6:e3:6c:ef + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 1E:9F:57:50:47:B6:61:93:39:D3:2C:FC:DA:5D:3D:05:75:B7:99:02 + X509v3 Authority Key Identifier: + keyid:1E:9F:57:50:47:B6:61:93:39:D3:2C:FC:DA:5D:3D:05:75:B7:99:02 + DirName:/C=ES/ST=Barcelona/L=Barcelona/O=IPS Internet publishing Services s.l./O=ips@mail.ips.es C.I.F. B-60929452/OU=IPS CA CLASEA3 Certification Authority/CN=IPS CA CLASEA3 Certification Authority/emailAddress=ips@mail.ips.es + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Key Usage: + Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement, Certificate Sign, CRL Sign, Encipher Only, Decipher Only + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication, Code Signing, E-mail Protection, Time Stamping, Microsoft Individual Code Signing, Microsoft Commercial Code Signing, Microsoft Trust List Signing, Microsoft Encrypted File System + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:ips@mail.ips.es + X509v3 Issuer Alternative Name: + email:ips@mail.ips.es + Netscape Comment: + CLASEA3 CA Certificate issued by http://www.ips.es/ + Netscape Base Url: + http://www.ips.es/ips2002/ + Netscape CA Revocation Url: + http://www.ips.es/ips2002/ips2002CLASEA3.crl + Netscape Revocation Url: + http://www.ips.es/ips2002/revocationCLASEA3.html? + Netscape Renewal Url: + http://www.ips.es/ips2002/renewalCLASEA3.html? + Netscape CA Policy Url: + http://www.ips.es/ips2002/policyCLASEA3.html + X509v3 CRL Distribution Points: + URI:http://www.ips.es/ips2002/ips2002CLASEA3.crl + URI:http://wwwback.ips.es/ips2002/ips2002CLASEA3.crl + + Authority Information Access: + OCSP - URI:http://ocsp.ips.es/ + + Signature Algorithm: sha1WithRSAEncryption + 4a:3d:20:47:1a:da:89:f4:7a:2b:31:79:ec:01:c0:cc:01:f5: + d6:c1:fc:c8:c3:f3:50:02:51:90:58:2a:9f:e7:35:09:5b:30: + 0a:81:00:25:47:af:d4:0f:0e:9e:60:26:a8:95:a7:83:08:df: + 2d:ac:e9:0e:f7:9c:c8:9f:cb:93:45:f1:ba:6a:c6:67:51:4a: + 69:4f:6b:fe:7d:0b:2f:52:29:c2:50:ad:24:44:ed:23:b3:48: + cb:44:40:c1:03:95:0c:0a:78:06:12:01:f5:91:31:2d:49:8d: + bb:3f:45:4e:2c:e0:e8:cd:b5:c9:14:15:0c:e3:07:83:9b:26: + 75:ef +-----BEGIN CERTIFICATE----- +MIIH9zCCB2CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCCARQxCzAJBgNVBAYTAkVT +MRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQBgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UE +ChMlSVBTIEludGVybmV0IHB1Ymxpc2hpbmcgU2VydmljZXMgcy5sLjErMCkGA1UE +ChQiaXBzQG1haWwuaXBzLmVzIEMuSS5GLiAgQi02MDkyOTQ1MjEvMC0GA1UECxMm +SVBTIENBIENMQVNFQTMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxLzAtBgNVBAMT +JklQUyBDQSBDTEFTRUEzIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MR4wHAYJKoZI +hvcNAQkBFg9pcHNAbWFpbC5pcHMuZXMwHhcNMDExMjI5MDEwNzUwWhcNMjUxMjI3 +MDEwNzUwWjCCARQxCzAJBgNVBAYTAkVTMRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQ +BgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UEChMlSVBTIEludGVybmV0IHB1Ymxpc2hp +bmcgU2VydmljZXMgcy5sLjErMCkGA1UEChQiaXBzQG1haWwuaXBzLmVzIEMuSS5G +LiAgQi02MDkyOTQ1MjEvMC0GA1UECxMmSVBTIENBIENMQVNFQTMgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkxLzAtBgNVBAMTJklQUyBDQSBDTEFTRUEzIENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5MR4wHAYJKoZIhvcNAQkBFg9pcHNAbWFpbC5pcHMuZXMw +gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAO6AAPYaZC6tasiDsYun7o/ZttvN +G7uGBiJ2MwwSbUhWYdLcgiViL5/SaTBlA0IjWLxH3GvWdV0XPOH/8lhneaDBgbHU +VqLyjRGZ/fZ98cfEXgIqmuJKtROKAP2Md4bm15T1IHUuDky/dMQ/gT6DtKM4Ninn +6Cr1jIhBqoCm42zvAgMBAAGjggRTMIIETzAdBgNVHQ4EFgQUHp9XUEe2YZM50yz8 +2l09BXW3mQIwggFGBgNVHSMEggE9MIIBOYAUHp9XUEe2YZM50yz82l09BXW3mQKh +ggEcpIIBGDCCARQxCzAJBgNVBAYTAkVTMRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQ +BgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UEChMlSVBTIEludGVybmV0IHB1Ymxpc2hp +bmcgU2VydmljZXMgcy5sLjErMCkGA1UEChQiaXBzQG1haWwuaXBzLmVzIEMuSS5G +LiAgQi02MDkyOTQ1MjEvMC0GA1UECxMmSVBTIENBIENMQVNFQTMgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkxLzAtBgNVBAMTJklQUyBDQSBDTEFTRUEzIENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5MR4wHAYJKoZIhvcNAQkBFg9pcHNAbWFpbC5pcHMuZXOC +AQAwDAYDVR0TBAUwAwEB/zAMBgNVHQ8EBQMDB/+AMGsGA1UdJQRkMGIGCCsGAQUF +BwMBBggrBgEFBQcDAgYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYKKwYB +BAGCNwIBFQYKKwYBBAGCNwIBFgYKKwYBBAGCNwoDAQYKKwYBBAGCNwoDBDARBglg +hkgBhvhCAQEEBAMCAAcwGgYDVR0RBBMwEYEPaXBzQG1haWwuaXBzLmVzMBoGA1Ud +EgQTMBGBD2lwc0BtYWlsLmlwcy5lczBCBglghkgBhvhCAQ0ENRYzQ0xBU0VBMyBD +QSBDZXJ0aWZpY2F0ZSBpc3N1ZWQgYnkgaHR0cDovL3d3dy5pcHMuZXMvMCkGCWCG +SAGG+EIBAgQcFhpodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyLzA7BglghkgBhvhC +AQQELhYsaHR0cDovL3d3dy5pcHMuZXMvaXBzMjAwMi9pcHMyMDAyQ0xBU0VBMy5j +cmwwQAYJYIZIAYb4QgEDBDMWMWh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvcmV2 +b2NhdGlvbkNMQVNFQTMuaHRtbD8wPQYJYIZIAYb4QgEHBDAWLmh0dHA6Ly93d3cu +aXBzLmVzL2lwczIwMDIvcmVuZXdhbENMQVNFQTMuaHRtbD8wOwYJYIZIAYb4QgEI +BC4WLGh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvcG9saWN5Q0xBU0VBMy5odG1s +MHUGA1UdHwRuMGwwMqAwoC6GLGh0dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvaXBz +MjAwMkNMQVNFQTMuY3JsMDagNKAyhjBodHRwOi8vd3d3YmFjay5pcHMuZXMvaXBz +MjAwMi9pcHMyMDAyQ0xBU0VBMy5jcmwwLwYIKwYBBQUHAQEEIzAhMB8GCCsGAQUF +BzABhhNodHRwOi8vb2NzcC5pcHMuZXMvMA0GCSqGSIb3DQEBBQUAA4GBAEo9IEca +2on0eisxeewBwMwB9dbB/MjD81ACUZBYKp/nNQlbMAqBACVHr9QPDp5gJqiVp4MI +3y2s6Q73nMify5NF8bpqxmdRSmlPa/59Cy9SKcJQrSRE7SOzSMtEQMEDlQwKeAYS +AfWRMS1Jjbs/RU4s4OjNtckUFQzjB4ObJnXv +-----END CERTIFICATE----- + +IPS Servidores root +=================== + +MD5 Fingerprint=7B:B5:08:99:9A:8C:18:BF:85:27:7D:0E:AE:DA:B2:AB +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 0 (0x0) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=ES, ST=BARCELONA, L=BARCELONA, O=IPS Seguridad CA, OU=Certificaciones, CN=IPS SERVIDORES/emailAddress=ips@mail.ips.es + Validity + Not Before: Jan 1 23:21:07 1998 GMT + Not After : Dec 29 23:21:07 2009 GMT + Subject: C=ES, ST=BARCELONA, L=BARCELONA, O=IPS Seguridad CA, OU=Certificaciones, CN=IPS SERVIDORES/emailAddress=ips@mail.ips.es + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:ac:4f:52:74:9f:39:ea:8e:dc:25:c4:bc:98:5d: + 98:64:24:09:3c:21:b3:cc:19:b5:8e:94:8e:87:d1: + f8:37:3e:a1:c8:2d:58:a4:80:35:5b:a1:75:6c:1d: + 45:0c:1f:61:63:6a:5e:6f:9b:0a:4c:c1:c8:b8:61: + 23:35:81:ff:fe:ac:78:70:2d:68:e1:3a:07:98:95: + 02:54:dd:cd:23:b7:80:53:d7:c8:37:45:72:06:24: + 12:ba:13:61:21:8a:6e:75:28:e0:c5:0f:34:fd:36: + d8:45:7f:e1:b8:36:ef:b3:e1:c6:20:8e:e8:b4:38: + bc:e1:3e:f6:11:de:8c:9d:01 + Exponent: 65537 (0x10001) + Signature Algorithm: md5WithRSAEncryption + 2c:f3:c3:79:58:24:de:c6:3b:d1:e0:42:69:b8:ee:64:b3:3d: + 62:01:b9:b3:84:df:23:7d:dd:98:cf:10:a9:fe:00:d8:22:96: + 05:13:07:54:57:c5:a7:de:cb:d9:b8:88:42:f6:99:db:14:77: + 1f:b6:fe:25:3d:e1:a2:3e:03:a9:81:d2:2d:6c:47:f5:96:46: + 8c:22:ab:c8:cc:0d:0e:97:5e:8b:41:b4:3b:c4:0a:06:40:1d: + dd:46:f4:01:dd:ba:82:2e:3c:3d:78:70:9e:7c:18:d0:ab:f8: + b8:77:07:46:71:f1:ca:0b:63:5c:6a:f9:72:94:d5:01:4f:a0: + db:42 +-----BEGIN CERTIFICATE----- +MIICtzCCAiACAQAwDQYJKoZIhvcNAQEEBQAwgaMxCzAJBgNVBAYTAkVTMRIwEAYD +VQQIEwlCQVJDRUxPTkExEjAQBgNVBAcTCUJBUkNFTE9OQTEZMBcGA1UEChMQSVBT +IFNlZ3VyaWRhZCBDQTEYMBYGA1UECxMPQ2VydGlmaWNhY2lvbmVzMRcwFQYDVQQD +Ew5JUFMgU0VSVklET1JFUzEeMBwGCSqGSIb3DQEJARYPaXBzQG1haWwuaXBzLmVz +MB4XDTk4MDEwMTIzMjEwN1oXDTA5MTIyOTIzMjEwN1owgaMxCzAJBgNVBAYTAkVT +MRIwEAYDVQQIEwlCQVJDRUxPTkExEjAQBgNVBAcTCUJBUkNFTE9OQTEZMBcGA1UE +ChMQSVBTIFNlZ3VyaWRhZCBDQTEYMBYGA1UECxMPQ2VydGlmaWNhY2lvbmVzMRcw +FQYDVQQDEw5JUFMgU0VSVklET1JFUzEeMBwGCSqGSIb3DQEJARYPaXBzQG1haWwu +aXBzLmVzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCsT1J0nznqjtwlxLyY +XZhkJAk8IbPMGbWOlI6H0fg3PqHILVikgDVboXVsHUUMH2Fjal5vmwpMwci4YSM1 +gf/+rHhwLWjhOgeYlQJU3c0jt4BT18g3RXIGJBK6E2Ehim51KODFDzT9NthFf+G4 +Nu+z4cYgjui0OLzhPvYR3oydAQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBACzzw3lY +JN7GO9HgQmm47mSzPWIBubOE3yN93ZjPEKn+ANgilgUTB1RXxafey9m4iEL2mdsU +dx+2/iU94aI+A6mB0i1sR/WWRowiq8jMDQ6XXotBtDvECgZAHd1G9AHduoIuPD14 +cJ58GNCr+Lh3B0Zx8coLY1xq+XKU1QFPoNtC +-----END CERTIFICATE----- + +IPS Timestamping root +===================== + +MD5 Fingerprint=2E:03:FD:C5:F5:D7:2B:94:64:C1:BE:89:31:F1:16:9B +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA Timestamping Certification Authority, CN=IPS CA Timestamping Certification Authority/emailAddress=ips@mail.ips.es + Validity + Not Before: Dec 29 01:10:18 2001 GMT + Not After : Dec 27 01:10:18 2025 GMT + Subject: C=ES, ST=Barcelona, L=Barcelona, O=IPS Internet publishing Services s.l., O=ips@mail.ips.es C.I.F. B-60929452, OU=IPS CA Timestamping Certification Authority, CN=IPS CA Timestamping Certification Authority/emailAddress=ips@mail.ips.es + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:bc:b8:ee:56:a5:9a:8c:e6:36:c9:c2:62:a0:66: + 81:8d:1a:d5:7a:d2:73:9f:0e:84:64:ba:95:b4:90: + a7:78:af:ca:fe:54:61:5b:ce:b2:20:57:01:ae:44: + 92:43:10:38:11:f7:68:fc:17:40:a5:68:27:32:3b: + c4:a7:e6:42:71:c5:99:ef:76:ff:2b:95:24:f5:49: + 92:18:68:ca:00:b5:a4:5a:2f:6e:cb:d6:1b:2c:0d: + 54:67:6b:7a:29:a1:58:ab:a2:5a:00:d6:5b:bb:18: + c2:df:f6:1e:13:56:76:9b:a5:68:e2:98:ce:c6:03: + 8a:34:db:4c:83:41:a6:a9:a3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 8B:D0:10:50:09:81:F2:9D:09:D5:0E:60:78:03:22:A2:3F:C8:CA:66 + X509v3 Authority Key Identifier: + keyid:8B:D0:10:50:09:81:F2:9D:09:D5:0E:60:78:03:22:A2:3F:C8:CA:66 + DirName:/C=ES/ST=Barcelona/L=Barcelona/O=IPS Internet publishing Services s.l./O=ips@mail.ips.es C.I.F. B-60929452/OU=IPS CA Timestamping Certification Authority/CN=IPS CA Timestamping Certification Authority/emailAddress=ips@mail.ips.es + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + X509v3 Key Usage: + Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreement, Certificate Sign, CRL Sign, Encipher Only, Decipher Only + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication, Code Signing, E-mail Protection, Time Stamping, Microsoft Individual Code Signing, Microsoft Commercial Code Signing, Microsoft Trust List Signing, Microsoft Encrypted File System + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:ips@mail.ips.es + X509v3 Issuer Alternative Name: + email:ips@mail.ips.es + Netscape Comment: + Timestamping CA Certificate issued by http://www.ips.es/ + Netscape Base Url: + http://www.ips.es/ips2002/ + Netscape CA Revocation Url: + http://www.ips.es/ips2002/ips2002Timestamping.crl + Netscape Revocation Url: + http://www.ips.es/ips2002/revocationTimestamping.html? + Netscape Renewal Url: + http://www.ips.es/ips2002/renewalTimestamping.html? + Netscape CA Policy Url: + http://www.ips.es/ips2002/policyTimestamping.html + X509v3 CRL Distribution Points: + URI:http://www.ips.es/ips2002/ips2002Timestamping.crl + URI:http://wwwback.ips.es/ips2002/ips2002Timestamping.crl + + Authority Information Access: + OCSP - URI:http://ocsp.ips.es/ + + Signature Algorithm: sha1WithRSAEncryption + 65:ba:c1:cc:00:1a:95:91:ca:e9:6c:3a:bf:3a:1e:14:08:7c: + fb:83:ee:6b:62:51:d3:33:91:b5:60:79:7e:04:d8:5d:79:37: + e8:c3:5b:b0:c4:67:2d:68:5a:b2:5f:0e:0a:fa:cd:3f:3a:45: + a1:ea:36:cf:26:1e:a7:11:28:c5:94:8f:84:4c:53:08:c5:93: + b3:fc:e2:7f:f5:8d:f3:b1:a9:85:5f:88:de:91:96:ee:17:5b: + ae:a5:ea:70:65:78:2c:21:64:01:95:ce:ce:4c:3e:50:f4:b6: + 59:cb:63:8d:b6:bd:18:d4:87:4a:5f:dc:ef:e9:56:f0:0a:0c: + e8:75 +-----BEGIN CERTIFICATE----- +MIIIODCCB6GgAwIBAgIBADANBgkqhkiG9w0BAQUFADCCAR4xCzAJBgNVBAYTAkVT +MRIwEAYDVQQIEwlCYXJjZWxvbmExEjAQBgNVBAcTCUJhcmNlbG9uYTEuMCwGA1UE +ChMlSVBTIEludGVybmV0IHB1Ymxpc2hpbmcgU2VydmljZXMgcy5sLjErMCkGA1UE +ChQiaXBzQG1haWwuaXBzLmVzIEMuSS5GLiAgQi02MDkyOTQ1MjE0MDIGA1UECxMr +SVBTIENBIFRpbWVzdGFtcGluZyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTE0MDIG +A1UEAxMrSVBTIENBIFRpbWVzdGFtcGluZyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 +eTEeMBwGCSqGSIb3DQEJARYPaXBzQG1haWwuaXBzLmVzMB4XDTAxMTIyOTAxMTAx +OFoXDTI1MTIyNzAxMTAxOFowggEeMQswCQYDVQQGEwJFUzESMBAGA1UECBMJQmFy +Y2Vsb25hMRIwEAYDVQQHEwlCYXJjZWxvbmExLjAsBgNVBAoTJUlQUyBJbnRlcm5l +dCBwdWJsaXNoaW5nIFNlcnZpY2VzIHMubC4xKzApBgNVBAoUImlwc0BtYWlsLmlw +cy5lcyBDLkkuRi4gIEItNjA5Mjk0NTIxNDAyBgNVBAsTK0lQUyBDQSBUaW1lc3Rh +bXBpbmcgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxNDAyBgNVBAMTK0lQUyBDQSBU +aW1lc3RhbXBpbmcgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHjAcBgkqhkiG9w0B +CQEWD2lwc0BtYWlsLmlwcy5lczCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA +vLjuVqWajOY2ycJioGaBjRrVetJznw6EZLqVtJCneK/K/lRhW86yIFcBrkSSQxA4 +Efdo/BdApWgnMjvEp+ZCccWZ73b/K5Uk9UmSGGjKALWkWi9uy9YbLA1UZ2t6KaFY +q6JaANZbuxjC3/YeE1Z2m6Vo4pjOxgOKNNtMg0GmqaMCAwEAAaOCBIAwggR8MB0G +A1UdDgQWBBSL0BBQCYHynQnVDmB4AyKiP8jKZjCCAVAGA1UdIwSCAUcwggFDgBSL +0BBQCYHynQnVDmB4AyKiP8jKZqGCASakggEiMIIBHjELMAkGA1UEBhMCRVMxEjAQ +BgNVBAgTCUJhcmNlbG9uYTESMBAGA1UEBxMJQmFyY2Vsb25hMS4wLAYDVQQKEyVJ +UFMgSW50ZXJuZXQgcHVibGlzaGluZyBTZXJ2aWNlcyBzLmwuMSswKQYDVQQKFCJp +cHNAbWFpbC5pcHMuZXMgQy5JLkYuICBCLTYwOTI5NDUyMTQwMgYDVQQLEytJUFMg +Q0EgVGltZXN0YW1waW5nIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MTQwMgYDVQQD +EytJUFMgQ0EgVGltZXN0YW1waW5nIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MR4w +HAYJKoZIhvcNAQkBFg9pcHNAbWFpbC5pcHMuZXOCAQAwDAYDVR0TBAUwAwEB/zAM +BgNVHQ8EBQMDB/+AMGsGA1UdJQRkMGIGCCsGAQUFBwMBBggrBgEFBQcDAgYIKwYB +BQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYKKwYBBAGCNwIBFQYKKwYBBAGCNwIB +FgYKKwYBBAGCNwoDAQYKKwYBBAGCNwoDBDARBglghkgBhvhCAQEEBAMCAAcwGgYD +VR0RBBMwEYEPaXBzQG1haWwuaXBzLmVzMBoGA1UdEgQTMBGBD2lwc0BtYWlsLmlw +cy5lczBHBglghkgBhvhCAQ0EOhY4VGltZXN0YW1waW5nIENBIENlcnRpZmljYXRl +IGlzc3VlZCBieSBodHRwOi8vd3d3Lmlwcy5lcy8wKQYJYIZIAYb4QgECBBwWGmh0 +dHA6Ly93d3cuaXBzLmVzL2lwczIwMDIvMEAGCWCGSAGG+EIBBAQzFjFodHRwOi8v +d3d3Lmlwcy5lcy9pcHMyMDAyL2lwczIwMDJUaW1lc3RhbXBpbmcuY3JsMEUGCWCG +SAGG+EIBAwQ4FjZodHRwOi8vd3d3Lmlwcy5lcy9pcHMyMDAyL3Jldm9jYXRpb25U +aW1lc3RhbXBpbmcuaHRtbD8wQgYJYIZIAYb4QgEHBDUWM2h0dHA6Ly93d3cuaXBz +LmVzL2lwczIwMDIvcmVuZXdhbFRpbWVzdGFtcGluZy5odG1sPzBABglghkgBhvhC +AQgEMxYxaHR0cDovL3d3dy5pcHMuZXMvaXBzMjAwMi9wb2xpY3lUaW1lc3RhbXBp +bmcuaHRtbDB/BgNVHR8EeDB2MDegNaAzhjFodHRwOi8vd3d3Lmlwcy5lcy9pcHMy +MDAyL2lwczIwMDJUaW1lc3RhbXBpbmcuY3JsMDugOaA3hjVodHRwOi8vd3d3YmFj +ay5pcHMuZXMvaXBzMjAwMi9pcHMyMDAyVGltZXN0YW1waW5nLmNybDAvBggrBgEF +BQcBAQQjMCEwHwYIKwYBBQUHMAGGE2h0dHA6Ly9vY3NwLmlwcy5lcy8wDQYJKoZI +hvcNAQEFBQADgYEAZbrBzAAalZHK6Ww6vzoeFAh8+4Pua2JR0zORtWB5fgTYXXk3 +6MNbsMRnLWhasl8OCvrNPzpFoeo2zyYepxEoxZSPhExTCMWTs/zif/WN87GphV+I +3pGW7hdbrqXqcGV4LCFkAZXOzkw+UPS2Wctjjba9GNSHSl/c7+lW8AoM6HU= +-----END CERTIFICATE----- + +QuoVadis Root CA +================ + +MD5 Fingerprint=27:DE:36:FE:72:B7:00:03:00:9D:F4:F0:1E:6C:04:24 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 985026699 (0x3ab6508b) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=BM, O=QuoVadis Limited, OU=Root Certification Authority, CN=QuoVadis Root Certification Authority + Validity + Not Before: Mar 19 18:33:33 2001 GMT + Not After : Mar 17 18:33:33 2021 GMT + Subject: C=BM, O=QuoVadis Limited, OU=Root Certification Authority, CN=QuoVadis Root Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:bf:61:b5:95:53:ba:57:fc:fa:f2:67:0b:3a:1a: + df:11:80:64:95:b4:d1:bc:cd:7a:cf:f6:29:96:2e: + 24:54:40:24:38:f7:1a:85:dc:58:4c:cb:a4:27:42: + 97:d0:9f:83:8a:c3:e4:06:03:5b:00:a5:51:1e:70: + 04:74:e2:c1:d4:3a:ab:d7:ad:3b:07:18:05:8e:fd: + 83:ac:ea:66:d9:18:1b:68:8a:f5:57:1a:98:ba:f5: + ed:76:3d:7c:d9:de:94:6a:3b:4b:17:c1:d5:8f:bd: + 65:38:3a:95:d0:3d:55:36:4e:df:79:57:31:2a:1e: + d8:59:65:49:58:20:98:7e:ab:5f:7e:9f:e9:d6:4d: + ec:83:74:a9:c7:6c:d8:ee:29:4a:85:2a:06:14:f9: + 54:e6:d3:da:65:07:8b:63:37:12:d7:d0:ec:c3:7b: + 20:41:44:a3:ed:cb:a0:17:e1:71:65:ce:1d:66:31: + f7:76:01:19:c8:7d:03:58:b6:95:49:1d:a6:12:26: + e8:c6:0c:76:e0:e3:66:cb:ea:5d:a6:26:ee:e5:cc: + 5f:bd:67:a7:01:27:0e:a2:ca:54:c5:b1:7a:95:1d: + 71:1e:4a:29:8a:03:dc:6a:45:c1:a4:19:5e:6f:36: + cd:c3:a2:b0:b7:fe:5c:38:e2:52:bc:f8:44:43:e6: + 90:bb + Exponent: 65537 (0x10001) + X509v3 extensions: + Authority Information Access: + OCSP - URI:https://ocsp.quovadisoffshore.com + + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.8024.0.1 + User Notice: + Explicit Text: Reliance on the QuoVadis Root Certificate by any party assumes acceptance of the then applicable standard terms and conditions of use, certification practices, and the QuoVadis Certificate Policy. + CPS: http://www.quovadis.bm + + X509v3 Subject Key Identifier: + 8B:4B:6D:ED:D3:29:B9:06:19:EC:39:39:A9:F0:97:84:6A:CB:EF:DF + X509v3 Authority Key Identifier: + keyid:8B:4B:6D:ED:D3:29:B9:06:19:EC:39:39:A9:F0:97:84:6A:CB:EF:DF + DirName:/C=BM/O=QuoVadis Limited/OU=Root Certification Authority/CN=QuoVadis Root Certification Authority + serial:3A:B6:50:8B + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 8a:d4:14:b5:fe:f4:9a:92:a7:19:d4:a4:7e:72:18:8f:d9:68: + 7c:52:24:dd:67:6f:39:7a:c4:aa:5e:3d:e2:58:b0:4d:70:98: + 84:61:e8:1b:e3:69:18:0e:ce:fb:47:50:a0:4e:ff:f0:24:1f: + bd:b2:ce:f5:27:fc:ec:2f:53:aa:73:7b:03:3d:74:6e:e6:16: + 9e:eb:a5:2e:c4:bf:56:27:50:2b:62:ba:be:4b:1c:3c:55:5c: + 41:1d:24:be:82:20:47:5d:d5:44:7e:7a:16:68:df:7d:4d:51: + 70:78:57:1d:33:1e:fd:02:99:9c:0c:cd:0a:05:4f:c7:bb:8e: + a4:75:fa:4a:6d:b1:80:8e:09:56:b9:9c:1a:60:fe:5d:c1:d7: + 7a:dc:11:78:d0:d6:5d:c1:b7:d5:ad:32:99:03:3a:8a:cc:54: + 25:39:31:81:7b:13:22:51:ba:46:6c:a1:bb:9e:fa:04:6c:49: + 26:74:8f:d2:73:eb:cc:30:a2:e6:ea:59:22:87:f8:97:f5:0e: + fd:ea:cc:92:a4:16:c4:52:18:ea:21:ce:b1:f1:e6:84:81:e5: + ba:a9:86:28:f2:43:5a:5d:12:9d:ac:1e:d9:a8:e5:0a:6a:a7: + 7f:a0:87:29:cf:f2:89:4d:d4:ec:c5:e2:e6:7a:d0:36:23:8a: + 4a:74:36:f9 +-----BEGIN CERTIFICATE----- +MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC +TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0 +aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0 +aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMz +MzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUw +IwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVR +dW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Yp +li4kVEAkOPcahdxYTMukJ0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2D +rOpm2RgbaIr1VxqYuvXtdj182d6UajtLF8HVj71lODqV0D1VNk7feVcxKh7YWWVJ +WCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeLYzcS19Dsw3sgQUSj7cug +F+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWenAScOospU +xbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCC +Ak4wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVv +dmFkaXNvZmZzaG9yZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREw +ggENMIIBCQYJKwYBBAG+WAABMIH7MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNl +IG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBh +c3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFy +ZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh +Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI +KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T +KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq +y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p +dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD +VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL +MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk +fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8 +7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R +cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y +mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW +xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK +SnQ2+Q== +-----END CERTIFICATE----- + +Security Communication Root CA +============================== + +MD5 Fingerprint=F1:BC:63:6A:54:E0:B5:27:F5:CD:E7:1A:E3:4D:6E:4A +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=JP, O=SECOM Trust.net, OU=Security Communication RootCA1 + Validity + Not Before: Sep 30 04:20:49 2003 GMT + Not After : Sep 30 04:20:49 2023 GMT + Subject: C=JP, O=SECOM Trust.net, OU=Security Communication RootCA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b3:b3:fe:7f:d3:6d:b1:ef:16:7c:57:a5:0c:6d: + 76:8a:2f:4b:bf:64:fb:4c:ee:8a:f0:f3:29:7c:f5: + ff:ee:2a:e0:e9:e9:ba:5b:64:22:9a:9a:6f:2c:3a: + 26:69:51:05:99:26:dc:d5:1c:6a:71:c6:9a:7d:1e: + 9d:dd:7c:6c:c6:8c:67:67:4a:3e:f8:71:b0:19:27: + a9:09:0c:a6:95:bf:4b:8c:0c:fa:55:98:3b:d8:e8: + 22:a1:4b:71:38:79:ac:97:92:69:b3:89:7e:ea:21: + 68:06:98:14:96:87:d2:61:36:bc:6d:27:56:9e:57: + ee:c0:c0:56:fd:32:cf:a4:d9:8e:c2:23:d7:8d:a8: + f3:d8:25:ac:97:e4:70:38:f4:b6:3a:b4:9d:3b:97: + 26:43:a3:a1:bc:49:59:72:4c:23:30:87:01:58:f6: + 4e:be:1c:68:56:66:af:cd:41:5d:c8:b3:4d:2a:55: + 46:ab:1f:da:1e:e2:40:3d:db:cd:7d:b9:92:80:9c: + 37:dd:0c:96:64:9d:dc:22:f7:64:8b:df:61:de:15: + 94:52:15:a0:7d:52:c9:4b:a8:21:c9:c6:b1:ed:cb: + c3:95:60:d1:0f:f0:ab:70:f8:df:cb:4d:7e:ec:d6: + fa:ab:d9:bd:7f:54:f2:a5:e9:79:fa:d9:d6:76:24: + 28:73 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + A0:73:49:99:68:DC:85:5B:65:E3:9B:28:2F:57:9F:BD:33:BC:07:48 + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 68:40:a9:a8:bb:e4:4f:5d:79:b3:05:b5:17:b3:60:13:eb:c6: + 92:5d:e0:d1:d3:6a:fe:fb:be:9b:6d:bf:c7:05:6d:59:20:c4: + 1c:f0:b7:da:84:58:02:63:fa:48:16:ef:4f:a5:0b:f7:4a:98: + f2:3f:9e:1b:ad:47:6b:63:ce:08:47:eb:52:3f:78:9c:af:4d: + ae:f8:d5:4f:cf:9a:98:2a:10:41:39:52:c4:dd:d9:9b:0e:ef: + 93:01:ae:b2:2e:ca:68:42:24:42:6c:b0:b3:3a:3e:cd:e9:da: + 48:c4:15:cb:e9:f9:07:0f:92:50:49:8a:dd:31:97:5f:c9:e9: + 37:aa:3b:59:65:97:94:32:c9:b3:9f:3e:3a:62:58:c5:49:ad: + 62:0e:71:a5:32:aa:2f:c6:89:76:43:40:13:13:67:3d:a2:54: + 25:10:cb:f1:3a:f2:d9:fa:db:49:56:bb:a6:fe:a7:41:35:c3: + e0:88:61:c9:88:c7:df:36:10:22:98:59:ea:b0:4a:fb:56:16: + 73:6e:ac:4d:f7:22:a1:4f:ad:1d:7a:2d:45:27:e5:30:c1:5e: + f2:da:13:cb:25:42:51:95:47:03:8c:6c:21:cc:74:42:ed:53: + ff:33:8b:8f:0f:57:01:16:2f:cf:a6:ee:c9:70:22:14:bd:fd: + be:6c:0b:03 +-----BEGIN CERTIFICATE----- +MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEY +MBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21t +dW5pY2F0aW9uIFJvb3RDQTEwHhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5 +WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYD +VQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw8yl8 +9f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJ +DKaVv0uMDPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9 +Ms+k2Y7CI9eNqPPYJayX5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/N +QV3Is00qVUarH9oe4kA92819uZKAnDfdDJZkndwi92SL32HeFZRSFaB9UslLqCHJ +xrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2JChzAgMBAAGjPzA9MB0G +A1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYwDwYDVR0T +AQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vG +kl3g0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfr +Uj94nK9NrvjVT8+amCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5 +Bw+SUEmK3TGXX8npN6o7WWWXlDLJs58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJU +JRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ6rBK+1YWc26sTfcioU+tHXot +RSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAiFL39vmwLAw== +-----END CERTIFICATE----- + +Sonera Class 1 Root CA +====================== + +MD5 Fingerprint=33:B7:84:F5:5F:27:D7:68:27:DE:14:DE:12:2A:ED:6F +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 36 (0x24) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=FI, O=Sonera, CN=Sonera Class1 CA + Validity + Not Before: Apr 6 10:49:13 2001 GMT + Not After : Apr 6 10:49:13 2021 GMT + Subject: C=FI, O=Sonera, CN=Sonera Class1 CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b5:89:1f:2b:4f:67:0a:79:ff:c5:1e:f8:7f:3c: + ed:d1:7e:da:b0:cd:6d:2f:36:ac:34:c6:db:d9:64: + 17:08:63:30:33:22:8a:4c:ee:8e:bb:0f:0d:42:55: + c9:9d:2e:a5:ef:f7:a7:8c:c3:ab:b9:97:cb:8e:ef: + 3f:15:67:a8:82:72:63:53:0f:41:8c:7d:10:95:24: + a1:5a:a5:06:fa:92:57:9d:fa:a5:01:f2:75:e9:1f: + bc:56:26:52:4e:78:19:65:58:55:03:58:c0:14:ae: + 8c:7c:55:5f:70:5b:77:23:06:36:97:f3:24:b5:9a: + 46:95:e4:df:0d:0b:05:45:e5:d1:f2:1d:82:bb:c6: + 13:e0:fe:aa:7a:fd:69:30:94:f3:d2:45:85:fc:f2: + 32:5b:32:de:e8:6c:5d:1f:cb:a4:22:74:b0:80:8e: + 5d:94:f7:06:00:4b:a9:d4:5e:2e:35:50:09:f3:80: + 97:f4:0c:17:ae:39:d8:5f:cd:33:c1:1c:ca:89:c2: + 22:f7:45:12:ed:5e:12:93:9d:63:ab:82:2e:b9:eb: + 42:41:44:cb:4a:1a:00:82:0d:9e:f9:8b:57:3e:4c: + c7:17:ed:2c:8b:72:33:5f:72:7a:38:56:d5:e6:d9: + ae:05:1a:1d:75:45:b1:cb:a5:25:1c:12:57:36:fd: + 22:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 47:E2:0C:8B:F6:53:88:52 + X509v3 Key Usage: + Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 8b:1a:b2:c9:5d:61:b4:e1:b9:2b:b9:53:d1:b2:85:9d:77:8e: + 16:ee:11:3d:db:c2:63:d9:5b:97:65:fb:12:67:d8:2a:5c:b6: + ab:e5:5e:c3:b7:16:2f:c8:e8:ab:1d:8a:fd:ab:1a:7c:d5:5f: + 63:cf:dc:b0:dd:77:b9:a8:e6:d2:22:38:87:07:14:d9:ff:be: + 56:b5:fd:07:0e:3c:55:ca:16:cc:a7:a6:77:37:fb:db:5c:1f: + 4e:59:06:87:a3:03:43:f5:16:ab:b7:84:bd:4e:ef:9f:31:37: + f0:46:f1:40:b6:d1:0c:a5:64:f8:63:5e:21:db:55:4e:4f:31: + 76:9c:10:61:8e:b6:53:3a:a3:11:be:af:6d:7c:1e:bd:ae:2d: + e2:0c:69:c7:85:53:68:a2:61:ba:c5:3e:b4:79:54:78:9e:0a: + c7:02:be:62:d1:11:82:4b:65:2f:91:5a:c2:a8:87:b1:56:68: + 94:79:f9:25:f7:c1:d5:ae:1a:b8:bb:3d:8f:a9:8a:38:15:f7: + 73:d0:5a:60:d1:80:b0:f0:dc:d5:50:cd:4e:ee:92:48:69:ed: + b2:23:1e:30:cc:c8:94:c8:b6:f5:3b:86:7f:3f:a6:2e:9f:f6: + 3e:2c:b5:92:96:3e:df:2c:93:8a:ff:81:8c:0f:0f:59:21:19: + 57:bd:55:9a +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP +MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAx +MDQwNjEwNDkxM1oXDTIxMDQwNjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNV +BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMSBDQTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H887dF+2rDNbS82rDTG +29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9EJUk +oVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk +3w0LBUXl0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBL +qdReLjVQCfOAl/QMF6452F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIIN +nvmLVz5MxxftLItyM19yejhW1ebZrgUaHXVFsculJRwSVzb9IjcCAwEAAaMzMDEw +DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZTiFIwCwYDVR0PBAQDAgEG +MA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE928Jj2VuX +ZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxTZ/75Wtf0H +DjxVyhbMp6Z3N/vbXB9OWQaHowND9Rart4S9Tu+fMTfwRvFAttEMpWT4Y14h21VO +TzF2nBBhjrZTOqMRvq9tfB69ri3iDGnHhVNoomG6xT60eVR4ngrHAr5i0RGCS2Uv +kVrCqIexVmiUefkl98HVrhq4uz2PqYo4Ffdz0Fpg0YCw8NzVUM1O7pJIae2yIx4w +zMiUyLb1O4Z/P6Yun/Y+LLWSlj7fLJOK/4GMDw9ZIRlXvVWa +-----END CERTIFICATE----- + +Sonera Class 2 Root CA +====================== + +MD5 Fingerprint=A3:EC:75:0F:2E:88:DF:FA:48:01:4E:0B:5C:48:6F:FB +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 29 (0x1d) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=FI, O=Sonera, CN=Sonera Class2 CA + Validity + Not Before: Apr 6 07:29:40 2001 GMT + Not After : Apr 6 07:29:40 2021 GMT + Subject: C=FI, O=Sonera, CN=Sonera Class2 CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:90:17:4a:35:9d:ca:f0:0d:96:c7:44:fa:16:37: + fc:48:bd:bd:7f:80:2d:35:3b:e1:6f:a8:67:a9:bf: + 03:1c:4d:8c:6f:32:47:d5:41:68:a4:13:04:c1:35: + 0c:9a:84:43:fc:5c:1d:ff:89:b3:e8:17:18:cd:91: + 5f:fb:89:e3:ea:bf:4e:5d:7c:1b:26:d3:75:79:ed: + e6:84:e3:57:e5:ad:29:c4:f4:3a:28:e7:a5:7b:84: + 36:69:b3:fd:5e:76:bd:a3:2d:99:d3:90:4e:23:28: + 7d:18:63:f1:54:3b:26:9d:76:5b:97:42:b2:ff:ae: + f0:4e:ec:dd:39:95:4e:83:06:7f:e7:49:40:c8:c5: + 01:b2:54:5a:66:1d:3d:fc:f9:e9:3c:0a:9e:81:b8: + 70:f0:01:8b:e4:23:54:7c:c8:ae:f8:90:1e:00:96: + 72:d4:54:cf:61:23:bc:ea:fb:9d:02:95:d1:b6:b9: + 71:3a:69:08:3f:0f:b4:e1:42:c7:88:f5:3f:98:a8: + a7:ba:1c:e0:71:71:ef:58:57:81:50:7a:5c:6b:74: + 46:0e:83:03:98:c3:8e:a8:6e:f2:76:32:6e:27:83: + c2:73:f3:dc:18:e8:b4:93:ea:75:44:6b:04:60:20: + 71:57:87:9d:f3:be:a0:90:23:3d:8a:24:e1:da:21: + db:c3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 4A:A0:AA:58:84:D3:5E:3C + X509v3 Key Usage: + Certificate Sign, CRL Sign + Signature Algorithm: sha1WithRSAEncryption + 5a:ce:87:f9:16:72:15:57:4b:1d:d9:9b:e7:a2:26:30:ec:93: + 67:df:d6:2d:d2:34:af:f7:38:a5:ce:ab:16:b9:ab:2f:7c:35: + cb:ac:d0:0f:b4:4c:2b:fc:80:ef:6b:8c:91:5f:36:76:f7:db: + b3:1b:19:ea:f4:b2:11:fd:61:71:44:bf:28:b3:3a:1d:bf:b3: + 43:e8:9f:bf:dc:31:08:71:b0:9d:8d:d6:34:47:32:90:c6:65: + 24:f7:a0:4a:7c:04:73:8f:39:6f:17:8c:72:b5:bd:4b:c8:7a: + f8:7b:83:c3:28:4e:9c:09:ea:67:3f:b2:67:04:1b:c3:14:da: + f8:e7:49:24:91:d0:1d:6a:fa:61:39:ef:6b:e7:21:75:06:07: + d8:12:b4:21:20:70:42:71:81:da:3c:9a:36:be:a6:5b:0d:6a: + 6c:9a:1f:91:7b:f9:f9:ef:42:ba:4e:4e:9e:cc:0c:8d:94:dc: + d9:45:9c:5e:ec:42:50:63:ae:f4:5d:c4:b1:12:dc:ca:3b:a8: + 2e:9d:14:5a:05:75:b7:ec:d7:63:e2:ba:35:b6:04:08:91:e8: + da:9d:9c:f6:66:b5:18:ac:0a:a6:54:26:34:33:d2:1b:c1:d4: + 7f:1a:3a:8e:0b:aa:32:6e:db:fc:4f:25:9f:d9:32:c7:96:5a: + 70:ac:df:4c +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP +MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAx +MDQwNjA3Mjk0MFoXDTIxMDQwNjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNV +BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMiBDQTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3/Ei9vX+ALTU74W+o +Z6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybTdXnt +5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s +3TmVToMGf+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2Ej +vOr7nQKV0ba5cTppCD8PtOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu +8nYybieDwnPz3BjotJPqdURrBGAgcVeHnfO+oJAjPYok4doh28MCAwEAAaMzMDEw +DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEG +MA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zil +zqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/ +3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvD +FNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6 +Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2 +ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M +-----END CERTIFICATE----- + +Thawte Premium Server CA +======================== + +MD5 Fingerprint=06:9F:69:79:16:66:90:02:1B:8C:8C:A2:C3:07:6F:3A +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1 (0x1) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com + Validity + Not Before: Aug 1 00:00:00 1996 GMT + Not After : Dec 31 23:59:59 2020 GMT + Subject: C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:d2:36:36:6a:8b:d7:c2:5b:9e:da:81:41:62:8f: + 38:ee:49:04:55:d6:d0:ef:1c:1b:95:16:47:ef:18: + 48:35:3a:52:f4:2b:6a:06:8f:3b:2f:ea:56:e3:af: + 86:8d:9e:17:f7:9e:b4:65:75:02:4d:ef:cb:09:a2: + 21:51:d8:9b:d0:67:d0:ba:0d:92:06:14:73:d4:93: + cb:97:2a:00:9c:5c:4e:0c:bc:fa:15:52:fc:f2:44: + 6e:da:11:4a:6e:08:9f:2f:2d:e3:f9:aa:3a:86:73: + b6:46:53:58:c8:89:05:bd:83:11:b8:73:3f:aa:07: + 8d:f4:42:4d:e7:40:9d:1c:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: md5WithRSAEncryption + 26:48:2c:16:c2:58:fa:e8:16:74:0c:aa:aa:5f:54:3f:f2:d7: + c9:78:60:5e:5e:6e:37:63:22:77:36:7e:b2:17:c4:34:b9:f5: + 08:85:fc:c9:01:38:ff:4d:be:f2:16:42:43:e7:bb:5a:46:fb: + c1:c6:11:1f:f1:4a:b0:28:46:c9:c3:c4:42:7d:bc:fa:ab:59: + 6e:d5:b7:51:88:11:e3:a4:85:19:6b:82:4c:a4:0c:12:ad:e9: + a4:ae:3f:f1:c3:49:65:9a:8c:c5:c8:3e:25:b7:94:99:bb:92: + 32:71:07:f0:86:5e:ed:50:27:a6:0d:a6:23:f9:bb:cb:a6:07: + 14:42 +-----BEGIN CERTIFICATE----- +MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx +FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD +VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv +biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy +dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t +MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB +MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG +A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp +b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl +cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv +bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE +VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ +ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR +uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG +9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI +hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM +pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg== +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA +============================= + +MD5 Fingerprint=60:84:7C:5A:CE:DB:0C:D4:CB:A7:E9:FE:02:C6:A9:C0 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 10000010 (0x98968a) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=NL, O=Staat der Nederlanden, CN=Staat der Nederlanden Root CA + Validity + Not Before: Dec 17 09:23:49 2002 GMT + Not After : Dec 16 09:15:38 2015 GMT + Subject: C=NL, O=Staat der Nederlanden, CN=Staat der Nederlanden Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:98:d2:b5:51:11:7a:81:a6:14:98:71:6d:be:cc: + e7:13:1b:d6:27:0e:7a:b3:6a:18:1c:b6:61:5a:d5: + 61:09:bf:de:90:13:c7:67:ee:dd:f3:da:c5:0c:12: + 9e:35:55:3e:2c:27:88:40:6b:f7:dc:dd:22:61:f5: + c2:c7:0e:f5:f6:d5:76:53:4d:8f:8c:bc:18:76:37: + 85:9d:e8:ca:49:c7:d2:4f:98:13:09:a2:3e:22:88: + 9c:7f:d6:f2:10:65:b4:ee:5f:18:d5:17:e3:f8:c5: + fd:e2:9d:a2:ef:53:0e:85:77:a2:0f:e1:30:47:ee: + 00:e7:33:7d:44:67:1a:0b:51:e8:8b:a0:9e:50:98: + 68:34:52:1f:2e:6d:01:f2:60:45:f2:31:eb:a9:31: + 68:29:bb:7a:41:9e:c6:19:7f:94:b4:51:39:03:7f: + b2:de:a7:32:9b:b4:47:8e:6f:b4:4a:ae:e5:af:b1: + dc:b0:1b:61:bc:99:72:de:e4:89:b7:7a:26:5d:da: + 33:49:5b:52:9c:0e:f5:8a:ad:c3:b8:3d:e8:06:6a: + c2:d5:2a:0b:6c:7b:84:bd:56:05:cb:86:65:92:ec: + 44:2b:b0:8e:b9:dc:70:0b:46:da:ad:bc:63:88:39: + fa:db:6a:fe:23:fa:bc:e4:48:f4:67:2b:6a:11:10: + 21:49 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:TRUE + X509v3 Certificate Policies: + Policy: 2.5.29.32.0 + CPS: http://www.pkioverheid.nl/policies/root-policy + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + A8:7D:EB:BC:63:A4:74:13:74:00:EC:96:E0:D3:34:C1:2C:BF:6C:F8 + Signature Algorithm: sha1WithRSAEncryption + 05:84:87:55:74:36:61:c1:bb:d1:d4:c6:15:a8:13:b4:9f:a4: + fe:bb:ee:15:b4:2f:06:0c:29:f2:a8:92:a4:61:0d:fc:ab:5c: + 08:5b:51:13:2b:4d:c2:2a:61:c8:f8:09:58:fc:2d:02:b2:39: + 7d:99:66:81:bf:6e:5c:95:45:20:6c:e6:79:a7:d1:d8:1c:29: + fc:c2:20:27:51:c8:f1:7c:5d:34:67:69:85:11:30:c6:00:d2: + d7:f3:d3:7c:b6:f0:31:57:28:12:82:73:e9:33:2f:a6:55:b4: + 0b:91:94:47:9c:fa:bb:7a:42:32:e8:ae:7e:2d:c8:bc:ac:14: + bf:d9:0f:d9:5b:fc:c1:f9:7a:95:e1:7d:7e:96:fc:71:b0:c2: + 4c:c8:df:45:34:c9:ce:0d:f2:9c:64:08:d0:3b:c3:29:c5:b2: + ed:90:04:c1:b1:29:91:c5:30:6f:c1:a9:72:33:cc:fe:5d:16: + 17:2c:11:69:e7:7e:fe:c5:83:08:df:bc:dc:22:3a:2e:20:69: + 23:39:56:60:67:90:8b:2e:76:39:fb:11:88:97:f6:7c:bd:4b: + b8:20:16:67:05:8d:e2:3b:c1:72:3f:94:95:37:c7:5d:b9:9e: + d8:93:a1:17:8f:ff:0c:66:15:c1:24:7c:32:7c:03:1d:3b:a1: + 58:45:32:93 +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJO +TDEeMBwGA1UEChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFh +dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEy +MTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4wHAYDVQQKExVTdGFhdCBkZXIgTmVk +ZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxhbmRlbiBSb290IENB +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFtvszn +ExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw71 +9tV2U02PjLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MO +hXeiD+EwR+4A5zN9RGcaC1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+U +tFE5A3+y3qcym7RHjm+0Sq7lr7HcsBthvJly3uSJt3omXdozSVtSnA71iq3DuD3o +BmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn622r+I/q85Ej0ZytqERAh +SQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRVHSAAMDww +OgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMv +cm9vdC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA +7Jbg0zTBLL9s+DANBgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k +/rvuFbQvBgwp8qiSpGEN/KtcCFtREytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzm +eafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbwMVcoEoJz6TMvplW0C5GUR5z6 +u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3ynGQI0DvDKcWy +7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR +iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw== +-----END CERTIFICATE----- + +TDC Internet Root CA +==================== + +MD5 Fingerprint=91:F4:03:55:20:A1:F8:63:2C:62:DE:AC:FB:61:1C:8E +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 986490188 (0x3acca54c) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=DK, O=TDC Internet, OU=TDC Internet Root CA + Validity + Not Before: Apr 5 16:33:17 2001 GMT + Not After : Apr 5 17:03:17 2021 GMT + Subject: C=DK, O=TDC Internet, OU=TDC Internet Root CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:c4:b8:40:bc:91:d5:63:1f:d7:99:a0:8b:0c:40: + 1e:74:b7:48:9d:46:8c:02:b2:e0:24:5f:f0:19:13: + a7:37:83:6b:5d:c7:8e:f9:84:30:ce:1a:3b:fa:fb: + ce:8b:6d:23:c6:c3:6e:66:9f:89:a5:df:e0:42:50: + 67:fa:1f:6c:1e:f4:d0:05:d6:bf:ca:d6:4e:e4:68: + 60:6c:46:aa:1c:5d:63:e1:07:86:0e:65:00:a7:2e: + a6:71:c6:bc:b9:81:a8:3a:7d:1a:d2:f9:d1:ac:4b: + cb:ce:75:af:dc:7b:fa:81:73:d4:fc:ba:bd:41:88: + d4:74:b3:f9:5e:38:3a:3c:43:a8:d2:95:4e:77:6d: + 13:0c:9d:8f:78:01:b7:5a:20:1f:03:37:35:e2:2c: + db:4b:2b:2c:78:b9:49:db:c4:d0:c7:9c:9c:e4:8a: + 20:09:21:16:56:66:ff:05:ec:5b:e3:f0:cf:ab:24: + 24:5e:c3:7f:70:7a:12:c4:d2:b5:10:a0:b6:21:e1: + 8d:78:69:55:44:69:f5:ca:96:1c:34:85:17:25:77: + e2:f6:2f:27:98:78:fd:79:06:3a:a2:d6:5a:43:c1: + ff:ec:04:3b:ee:13:ef:d3:58:5a:ff:92:eb:ec:ae: + da:f2:37:03:47:41:b6:97:c9:2d:0a:41:22:bb:bb: + e6:a7 + Exponent: 65537 (0x10001) + X509v3 extensions: + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/C=DK/O=TDC Internet/OU=TDC Internet Root CA/CN=CRL1 + + X509v3 Private Key Usage Period: + Not Before: Apr 5 16:33:17 2001 GMT, Not After: Apr 5 17:03:17 2021 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:6C:64:01:C7:FD:85:6D:AC:C8:DA:9E:50:08:85:08:B5:3C:56:A8:50 + + X509v3 Subject Key Identifier: + 6C:64:01:C7:FD:85:6D:AC:C8:DA:9E:50:08:85:08:B5:3C:56:A8:50 + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0...V5.0:4.0.... + Signature Algorithm: sha1WithRSAEncryption + 4e:43:cc:d1:dd:1d:10:1b:06:7f:b7:a4:fa:d3:d9:4d:fb:23: + 9f:23:54:5b:e6:8b:2f:04:28:8b:b5:27:6d:89:a1:ec:98:69: + dc:e7:8d:26:83:05:79:74:ec:b4:b9:a3:97:c1:35:00:fd:15: + da:39:81:3a:95:31:90:de:97:e9:86:a8:99:77:0c:e5:5a:a0: + 84:ff:12:16:ac:6e:b8:8d:c3:7b:92:c2:ac:2e:d0:7d:28:ec: + b6:f3:60:38:69:6f:3e:d8:04:55:3e:9e:cc:55:d2:ba:fe:bb: + 47:04:d7:0a:d9:16:0a:34:29:f5:58:13:d5:4f:cf:8f:56:4b: + b3:1e:ee:d3:98:79:da:08:1e:0c:6f:b8:f8:16:27:ef:c2:6f: + 3d:f6:a3:4b:3e:0e:e4:6d:6c:db:3b:41:12:9b:bd:0d:47:23: + 7f:3c:4a:d0:af:c0:af:f6:ef:1b:b5:15:c4:eb:83:c4:09:5f: + 74:8b:d9:11:fb:c2:56:b1:3c:f8:70:ca:34:8d:43:40:13:8c: + fd:99:03:54:79:c6:2e:ea:86:a1:f6:3a:d4:09:bc:f4:bc:66: + cc:3d:58:d0:57:49:0a:ee:25:e2:41:ee:13:f9:9b:38:34:d1: + 00:f5:7e:e7:94:1d:fc:69:03:62:b8:99:05:05:3d:6b:78:12: + bd:b0:6f:65 +-----BEGIN CERTIFICATE----- +MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJE +SzEVMBMGA1UEChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQg +Um9vdCBDQTAeFw0wMTA0MDUxNjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNV +BAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJuZXQxHTAbBgNVBAsTFFREQyBJbnRl +cm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxLhA +vJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20jxsNu +Zp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a +0vnRrEvLznWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc1 +4izbSysseLlJ28TQx5yc5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGN +eGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcD +R0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZIAYb4QgEBBAQDAgAHMGUG +A1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMMVERDIElu +dGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxME +Q1JMMTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3 +WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAw +HQYDVR0OBBYEFGxkAcf9hW2syNqeUAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJ +KoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4IBAQBO +Q8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540mgwV5dOy0uaOX +wTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+ +2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm89 +9qNLPg7kbWzbO0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0 +jUNAE4z9mQNUecYu6oah9jrUCbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38 +aQNiuJkFBT1reBK9sG9l +-----END CERTIFICATE----- + +TDC OCES Root CA +================ + +MD5 Fingerprint=93:7F:90:1C:ED:84:67:17:A4:65:5F:9B:CB:30:02:97 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1044954564 (0x3e48bdc4) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=DK, O=TDC, CN=TDC OCES CA + Validity + Not Before: Feb 11 08:39:30 2003 GMT + Not After : Feb 11 09:09:30 2037 GMT + Subject: C=DK, O=TDC, CN=TDC OCES CA + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:ac:62:f6:61:20:b2:cf:c0:c6:85:d7:e3:79:e6: + cc:ed:f2:39:92:a4:97:2e:64:a3:84:5b:87:9c:4c: + fd:a4:f3:c4:5f:21:bd:56:10:eb:db:2e:61:ec:93: + 69:e3:a3:cc:bd:99:c3:05:fc:06:b8:ca:36:1c:fe: + 90:8e:49:4c:c4:56:9a:2f:56:bc:cf:7b:0c:f1:6f: + 47:a6:0d:43:4d:e2:e9:1d:39:34:cd:8d:2c:d9:12: + 98:f9:e3:e1:c1:4a:7c:86:38:c4:a9:c4:61:88:d2: + 5e:af:1a:26:4d:d5:e4:a0:22:47:84:d9:64:b7:19: + 96:fc:ec:19:e4:b2:97:26:4e:4a:4c:cb:8f:24:8b: + 54:18:1c:48:61:7b:d5:88:68:da:5d:b5:ea:cd:1a: + 30:c1:80:83:76:50:aa:4f:d1:d4:dd:38:f0:ef:16: + f4:e1:0c:50:06:bf:ea:fb:7a:49:a1:28:2b:1c:f6: + fc:15:32:a3:74:6a:8f:a9:c3:62:29:71:31:e5:3b: + a4:60:17:5e:74:e6:da:13:ed:e9:1f:1f:1b:d1:b2: + 68:73:c6:10:34:75:46:10:10:e3:90:00:76:40:cb: + 8b:b7:43:09:21:ff:ab:4e:93:c6:58:e9:a5:82:db: + 77:c4:3a:99:b1:72:95:49:04:f0:b7:2b:fa:7b:59: + 8e:dd + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Certificate Policies: + Policy: 1.2.208.169.1.1.1 + CPS: http://www.certifikat.dk/repository + User Notice: + Organization: TDC + Number: 1 + Explicit Text: Certifikater fra denne CA udstedes under OID 1.2.208.169.1.1.1. Certificates from this CA are issued under OID 1.2.208.169.1.1.1. + + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 CRL Distribution Points: + DirName:/C=DK/O=TDC/CN=TDC OCES CA/CN=CRL1 + URI:http://crl.oces.certifikat.dk/oces.crl + + X509v3 Private Key Usage Period: + Not Before: Feb 11 08:39:30 2003 GMT, Not After: Feb 11 09:09:30 2037 GMT + X509v3 Authority Key Identifier: + keyid:60:B5:85:EC:56:64:7E:12:19:27:67:1D:50:15:4B:73:AE:3B:F9:12 + + X509v3 Subject Key Identifier: + 60:B5:85:EC:56:64:7E:12:19:27:67:1D:50:15:4B:73:AE:3B:F9:12 + 1.2.840.113533.7.65.0: + 0...V6.0:4.0.... + Signature Algorithm: sha1WithRSAEncryption + 0a:ba:26:26:46:d3:73:a8:09:f3:6b:0b:30:99:fd:8a:e1:57: + 7a:11:d3:b8:94:d7:09:10:6e:a3:b1:38:03:d1:b6:f2:43:41: + 29:62:a7:72:d8:fb:7c:05:e6:31:70:27:54:18:4e:8a:7c:4e: + e5:d1:ca:8c:78:88:cf:1b:d3:90:8b:e6:23:f8:0b:0e:33:43: + 7d:9c:e2:0a:19:8f:c9:01:3e:74:5d:74:c9:8b:1c:03:e5:18: + c8:01:4c:3f:cb:97:05:5d:98:71:a6:98:6f:b6:7c:bd:37:7f: + be:e1:93:25:6d:6f:f0:0a:ad:17:18:e1:03:bc:07:29:c8:ad: + 26:e8:f8:61:f0:fd:21:09:7e:9a:8e:a9:68:7d:48:62:72:bd: + 00:ea:01:99:b8:06:82:51:81:4e:f1:f5:b4:91:54:b9:23:7a: + 00:9a:9f:5d:8d:e0:3c:64:b9:1a:12:92:2a:c7:82:44:72:39: + dc:e2:3c:c6:d8:55:f5:15:4e:c8:05:0e:db:c6:d0:62:a6:ec: + 15:b4:b5:02:82:db:ac:8c:a2:81:f0:9b:99:31:f5:20:20:a8: + 88:61:0a:07:9f:94:fc:d0:d7:1b:cc:2e:17:f3:04:27:76:67: + eb:54:83:fd:a4:90:7e:06:3d:04:a3:43:2d:da:fc:0b:62:ea: + 2f:5f:62:53 +-----BEGIN CERTIFICATE----- +MIIFGTCCBAGgAwIBAgIEPki9xDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJE +SzEMMAoGA1UEChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzAyMTEw +ODM5MzBaFw0zNzAyMTEwOTA5MzBaMDExCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNU +REMxFDASBgNVBAMTC1REQyBPQ0VTIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEArGL2YSCyz8DGhdfjeebM7fI5kqSXLmSjhFuHnEz9pPPEXyG9VhDr +2y5h7JNp46PMvZnDBfwGuMo2HP6QjklMxFaaL1a8z3sM8W9Hpg1DTeLpHTk0zY0s +2RKY+ePhwUp8hjjEqcRhiNJerxomTdXkoCJHhNlktxmW/OwZ5LKXJk5KTMuPJItU +GBxIYXvViGjaXbXqzRowwYCDdlCqT9HU3Tjw7xb04QxQBr/q+3pJoSgrHPb8FTKj +dGqPqcNiKXEx5TukYBdedObaE+3pHx8b0bJoc8YQNHVGEBDjkAB2QMuLt0MJIf+r +TpPGWOmlgtt3xDqZsXKVSQTwtyv6e1mO3QIDAQABo4ICNzCCAjMwDwYDVR0TAQH/ +BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwgewGA1UdIASB5DCB4TCB3gYIKoFQgSkB +AQEwgdEwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlmaWthdC5kay9yZXBv +c2l0b3J5MIGdBggrBgEFBQcCAjCBkDAKFgNUREMwAwIBARqBgUNlcnRpZmlrYXRl +ciBmcmEgZGVubmUgQ0EgdWRzdGVkZXMgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEu +MS4xLiBDZXJ0aWZpY2F0ZXMgZnJvbSB0aGlzIENBIGFyZSBpc3N1ZWQgdW5kZXIg +T0lEIDEuMi4yMDguMTY5LjEuMS4xLjARBglghkgBhvhCAQEEBAMCAAcwgYEGA1Ud +HwR6MHgwSKBGoESkQjBAMQswCQYDVQQGEwJESzEMMAoGA1UEChMDVERDMRQwEgYD +VQQDEwtUREMgT0NFUyBDQTENMAsGA1UEAxMEQ1JMMTAsoCqgKIYmaHR0cDovL2Ny +bC5vY2VzLmNlcnRpZmlrYXQuZGsvb2Nlcy5jcmwwKwYDVR0QBCQwIoAPMjAwMzAy +MTEwODM5MzBagQ8yMDM3MDIxMTA5MDkzMFowHwYDVR0jBBgwFoAUYLWF7FZkfhIZ +J2cdUBVLc647+RIwHQYDVR0OBBYEFGC1hexWZH4SGSdnHVAVS3OuO/kSMB0GCSqG +SIb2fQdBAAQQMA4bCFY2LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEACrom +JkbTc6gJ82sLMJn9iuFXehHTuJTXCRBuo7E4A9G28kNBKWKnctj7fAXmMXAnVBhO +inxO5dHKjHiIzxvTkIvmI/gLDjNDfZziChmPyQE+dF10yYscA+UYyAFMP8uXBV2Y +caaYb7Z8vTd/vuGTJW1v8AqtFxjhA7wHKcitJuj4YfD9IQl+mo6paH1IYnK9AOoB +mbgGglGBTvH1tJFUuSN6AJqfXY3gPGS5GhKSKseCRHI53OI8xthV9RVOyAUO28bQ +YqbsFbS1AoLbrIyigfCbmTH1ICCoiGEKB5+U/NDXG8wuF/MEJ3Zn61SD/aSQfgY9 +BKNDLdr8C2LqL19iUw== +-----END CERTIFICATE----- + +UTN DATACorp SGC Root CA +======================== + +MD5 Fingerprint=B3:A5:3E:77:21:6D:AC:4A:C0:C9:FB:D5:41:3D:CA:06 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 44:be:0c:8b:50:00:21:b4:11:d3:2a:68:06:a9:ad:69 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN - DATACorp SGC + Validity + Not Before: Jun 24 18:57:21 1999 GMT + Not After : Jun 24 19:06:30 2019 GMT + Subject: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN - DATACorp SGC + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:df:ee:58:10:a2:2b:6e:55:c4:8e:bf:2e:46:09: + e7:e0:08:0f:2e:2b:7a:13:94:1b:bd:f6:b6:80:8e: + 65:05:93:00:1e:bc:af:e2:0f:8e:19:0d:12:47:ec: + ac:ad:a3:fa:2e:70:f8:de:6e:fb:56:42:15:9e:2e: + 5c:ef:23:de:21:b9:05:76:27:19:0f:4f:d6:c3:9c: + b4:be:94:19:63:f2:a6:11:0a:eb:53:48:9c:be:f2: + 29:3b:16:e8:1a:a0:4c:a6:c9:f4:18:59:68:c0:70: + f2:53:00:c0:5e:50:82:a5:56:6f:36:f9:4a:e0:44: + 86:a0:4d:4e:d6:47:6e:49:4a:cb:67:d7:a6:c4:05: + b9:8e:1e:f4:fc:ff:cd:e7:36:e0:9c:05:6c:b2:33: + 22:15:d0:b4:e0:cc:17:c0:b2:c0:f4:fe:32:3f:29: + 2a:95:7b:d8:f2:a7:4e:0f:54:7c:a1:0d:80:b3:09: + 03:c1:ff:5c:dd:5e:9a:3e:bc:ae:bc:47:8a:6a:ae: + 71:ca:1f:b1:2a:b8:5f:42:05:0b:ec:46:30:d1:72: + 0b:ca:e9:56:6d:f5:ef:df:78:be:61:ba:b2:a5:ae: + 04:4c:bc:a8:ac:69:15:97:bd:ef:eb:b4:8c:bf:35: + f8:d4:c3:d1:28:0e:5c:3a:9f:70:18:33:20:77:c4: + a2:af + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: + Digital Signature, Non Repudiation, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 53:32:D1:B3:CF:7F:FA:E0:F1:A0:5D:85:4E:92:D2:9E:45:1D:B4:4F + X509v3 CRL Distribution Points: + URI:http://crl.usertrust.com/UTN-DATACorpSGC.crl + + X509v3 Extended Key Usage: + TLS Web Server Authentication, Microsoft Server Gated Crypto, Netscape Server Gated Crypto + Signature Algorithm: sha1WithRSAEncryption + 27:35:97:00:8a:8b:28:bd:c6:33:30:1e:29:fc:e2:f7:d5:98: + d4:40:bb:60:ca:bf:ab:17:2c:09:36:7f:50:fa:41:dc:ae:96: + 3a:0a:23:3e:89:59:c9:a3:07:ed:1b:37:ad:fc:7c:be:51:49: + 5a:de:3a:0a:54:08:16:45:c2:99:b1:87:cd:8c:68:e0:69:03: + e9:c4:4e:98:b2:3b:8c:16:b3:0e:a0:0c:98:50:9b:93:a9:70: + 09:c8:2c:a3:8f:df:02:e4:e0:71:3a:f1:b4:23:72:a0:aa:01: + df:df:98:3e:14:50:a0:31:26:bd:28:e9:5a:30:26:75:f9:7b: + 60:1c:8d:f3:cd:50:26:6d:04:27:9a:df:d5:0d:45:47:29:6b: + 2c:e6:76:d9:a9:29:7d:32:dd:c9:36:3c:bd:ae:35:f1:11:9e: + 1d:bb:90:3f:12:47:4e:8e:d7:7e:0f:62:73:1d:52:26:38:1c: + 18:49:fd:30:74:9a:c4:e5:22:2f:d8:c0:8d:ed:91:7a:4c:00: + 8f:72:7f:5d:da:dd:1b:8b:45:6b:e7:dd:69:97:a8:c5:56:4c: + 0f:0c:f6:9f:7a:91:37:f6:97:82:e0:dd:71:69:ff:76:3f:60: + 4d:3c:cf:f7:99:f9:c6:57:f4:c9:55:39:78:ba:2c:79:c9:a6: + 88:2b:f4:08 +-----BEGIN CERTIFICATE----- +MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB +kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug +Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho +dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw +IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG +EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD +VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu +dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6 +E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ +D0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlowHDyUwDAXlCCpVZvNvlK +4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA9P4yPykq +lXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulW +bfXv33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQAB +o4GrMIGoMAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRT +MtGzz3/64PGgXYVOktKeRR20TzA9BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3Js +LnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dDLmNybDAqBgNVHSUEIzAhBggr +BgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB +AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft +Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj +j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH +KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv +2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3 +mfnGV/TJVTl4uix5yaaIK/QI +-----END CERTIFICATE----- + +UTN USERFirst Email Root CA +=========================== + +MD5 Fingerprint=D7:34:3D:EF:1D:27:09:28:E1:31:02:5B:13:2B:DD:F7 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 44:be:0c:8b:50:00:24:b4:11:d3:36:25:25:67:c9:89 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Client Authentication and Email + Validity + Not Before: Jul 9 17:28:50 1999 GMT + Not After : Jul 9 17:36:58 2019 GMT + Subject: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Client Authentication and Email + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b2:39:85:a4:f2:7d:ab:41:3b:62:46:37:ae:cd: + c1:60:75:bc:39:65:f9:4a:1a:47:a2:b9:cc:48:cc: + 6a:98:d5:4d:35:19:b9:a4:42:e5:ce:49:e2:8a:2f: + 1e:7c:d2:31:07:c7:4e:b4:83:64:9d:2e:29:d5:a2: + 64:c4:85:bd:85:51:35:79:a4:4e:68:90:7b:1c:7a: + a4:92:a8:17:f2:98:15:f2:93:cc:c9:a4:32:95:bb: + 0c:4f:30:bd:98:a0:0b:8b:e5:6e:1b:a2:46:fa:78: + bc:a2:6f:ab:59:5e:a5:2f:cf:ca:da:6d:aa:2f:eb: + ac:a1:b3:6a:aa:b7:2e:67:35:8b:79:e1:1e:69:88: + e2:e6:46:cd:a0:a5:ea:be:0b:ce:76:3a:7a:0e:9b: + ea:fc:da:27:5b:3d:73:1f:22:e6:48:61:c6:4c:f3: + 69:b1:a8:2e:1b:b6:d4:31:20:2c:bc:82:8a:8e:a4: + 0e:a5:d7:89:43:fc:16:5a:af:1d:71:d7:11:59:da: + ba:87:0d:af:fa:f3:e1:c2:f0:a4:c5:67:8c:d6:d6: + 54:3a:de:0a:a4:ba:03:77:b3:65:c8:fd:1e:d3:74: + 62:aa:18:ca:68:93:1e:a1:85:7e:f5:47:65:cb:f8: + 4d:57:28:74:d2:34:ff:30:b6:ee:f6:62:30:14:8c: + 2c:eb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: + Digital Signature, Non Repudiation, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 89:82:67:7D:C4:9D:26:70:00:4B:B4:50:48:7C:DE:3D:AE:04:6E:7D + X509v3 CRL Distribution Points: + URI:http://crl.usertrust.com/UTN-USERFirst-ClientAuthenticationandEmail.crl + + X509v3 Extended Key Usage: + TLS Web Client Authentication, E-mail Protection + Signature Algorithm: sha1WithRSAEncryption + b1:6d:61:5d:a6:1a:7f:7c:ab:4a:e4:30:fc:53:6f:25:24:c6: + ca:ed:e2:31:5c:2b:0e:ee:ee:61:55:6f:04:3e:cf:39:de:c5: + 1b:49:94:e4:eb:20:4c:b4:e6:9e:50:2e:72:d9:8d:f5:aa:a3: + b3:4a:da:56:1c:60:97:80:dc:82:a2:ad:4a:bd:8a:2b:ff:0b: + 09:b4:c6:d7:20:04:45:e4:cd:80:01:ba:ba:2b:6e:ce:aa:d7: + 92:fe:e4:af:eb:f4:26:1d:16:2a:7f:6c:30:95:37:2f:33:12: + ac:7f:dd:c7:d1:11:8c:51:98:b2:d0:a3:91:d0:ad:f6:9f:9e: + 83:93:1e:1d:42:b8:46:af:6b:66:f0:9b:7f:ea:e3:03:02:e5: + 02:51:c1:aa:d5:35:9d:72:40:03:89:ba:31:1d:c5:10:68:52: + 9e:df:a2:85:c5:5c:08:a6:78:e6:53:4f:b1:e8:b7:d3:14:9e: + 93:a6:c3:64:e3:ac:7e:71:cd:bc:9f:e9:03:1b:cc:fb:e9:ac: + 31:c1:af:7c:15:74:02:99:c3:b2:47:a6:c2:32:61:d7:c7:6f: + 48:24:51:27:a1:d5:87:55:f2:7b:8f:98:3d:16:9e:ee:75:b6: + f8:d0:8e:f2:f3:c6:ae:28:5b:a7:f0:f3:36:17:fc:c3:05:d3: + ca:03:4a:54 +-----BEGIN CERTIFICATE----- +MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCB +rjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug +Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho +dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0BgNVBAMTLVVUTi1VU0VSRmlyc3Qt +Q2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05OTA3MDkxNzI4NTBa +Fw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAV +BgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5l +dHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTE2MDQGA1UE +AxMtVVROLVVTRVJGaXJzdC1DbGllbnQgQXV0aGVudGljYXRpb24gYW5kIEVtYWls +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsjmFpPJ9q0E7YkY3rs3B +YHW8OWX5ShpHornMSMxqmNVNNRm5pELlzkniii8efNIxB8dOtINknS4p1aJkxIW9 +hVE1eaROaJB7HHqkkqgX8pgV8pPMyaQylbsMTzC9mKALi+VuG6JG+ni8om+rWV6l +L8/K2m2qL+usobNqqrcuZzWLeeEeaYji5kbNoKXqvgvOdjp6Dpvq/NonWz1zHyLm +SGHGTPNpsaguG7bUMSAsvIKKjqQOpdeJQ/wWWq8dcdcRWdq6hw2v+vPhwvCkxWeM +1tZUOt4KpLoDd7NlyP0e03RiqhjKaJMeoYV+9Udly/hNVyh00jT/MLbu9mIwFIws +6wIDAQABo4G5MIG2MAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud +DgQWBBSJgmd9xJ0mcABLtFBIfN49rgRufTBYBgNVHR8EUTBPME2gS6BJhkdodHRw +Oi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLVVTRVJGaXJzdC1DbGllbnRBdXRoZW50 +aWNhdGlvbmFuZEVtYWlsLmNybDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH +AwQwDQYJKoZIhvcNAQEFBQADggEBALFtYV2mGn98q0rkMPxTbyUkxsrt4jFcKw7u +7mFVbwQ+zznexRtJlOTrIEy05p5QLnLZjfWqo7NK2lYcYJeA3IKirUq9iiv/Cwm0 +xtcgBEXkzYABurorbs6q15L+5K/r9CYdFip/bDCVNy8zEqx/3cfREYxRmLLQo5HQ +rfafnoOTHh1CuEava2bwm3/q4wMC5QJRwarVNZ1yQAOJujEdxRBoUp7fooXFXAim +eOZTT7Hot9MUnpOmw2TjrH5xzbyf6QMbzPvprDHBr3wVdAKZw7JHpsIyYdfHb0gk +USeh1YdV8nuPmD0Wnu51tvjQjvLzxq4oW6fw8zYX/MMF08oDSlQ= +-----END CERTIFICATE----- + +UTN USERFirst Hardware Root CA +============================== + +MD5 Fingerprint=4C:56:41:E5:0D:BB:2B:E8:CA:A3:ED:18:08:AD:43:39 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 44:be:0c:8b:50:00:24:b4:11:d3:36:2a:fe:65:0a:fd + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Hardware + Validity + Not Before: Jul 9 18:10:42 1999 GMT + Not After : Jul 9 18:19:22 2019 GMT + Subject: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Hardware + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b1:f7:c3:38:3f:b4:a8:7f:cf:39:82:51:67:d0: + 6d:9f:d2:ff:58:f3:e7:9f:2b:ec:0d:89:54:99:b9: + 38:99:16:f7:e0:21:79:48:c2:bb:61:74:12:96:1d: + 3c:6a:72:d5:3c:10:67:3a:39:ed:2b:13:cd:66:eb: + 95:09:33:a4:6c:97:b1:e8:c6:ec:c1:75:79:9c:46: + 5e:8d:ab:d0:6a:fd:b9:2a:55:17:10:54:b3:19:f0: + 9a:f6:f1:b1:5d:b6:a7:6d:fb:e0:71:17:6b:a2:88: + fb:00:df:fe:1a:31:77:0c:9a:01:7a:b1:32:e3:2b: + 01:07:38:6e:c3:a5:5e:23:bc:45:9b:7b:50:c1:c9: + 30:8f:db:e5:2b:7a:d3:5b:fb:33:40:1e:a0:d5:98: + 17:bc:8b:87:c3:89:d3:5d:a0:8e:b2:aa:aa:f6:8e: + 69:88:06:c5:fa:89:21:f3:08:9d:69:2e:09:33:9b: + 29:0d:46:0f:8c:cc:49:34:b0:69:51:bd:f9:06:cd: + 68:ad:66:4c:bc:3e:ac:61:bd:0a:88:0e:c8:df:3d: + ee:7c:04:4c:9d:0a:5e:6b:91:d6:ee:c7:ed:28:8d: + ab:4d:87:89:73:d0:6e:a4:d0:1e:16:8b:14:e1:76: + 44:03:7f:63:ac:e4:cd:49:9c:c5:92:f4:ab:32:a1: + 48:5b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: + Digital Signature, Non Repudiation, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + A1:72:5F:26:1B:28:98:43:95:5D:07:37:D5:85:96:9D:4B:D2:C3:45 + X509v3 CRL Distribution Points: + URI:http://crl.usertrust.com/UTN-USERFirst-Hardware.crl + + X509v3 Extended Key Usage: + TLS Web Server Authentication, IPSec End System, IPSec Tunnel, IPSec User + Signature Algorithm: sha1WithRSAEncryption + 47:19:0f:de:74:c6:99:97:af:fc:ad:28:5e:75:8e:eb:2d:67: + ee:4e:7b:2b:d7:0c:ff:f6:de:cb:55:a2:0a:e1:4c:54:65:93: + 60:6b:9f:12:9c:ad:5e:83:2c:eb:5a:ae:c0:e4:2d:f4:00:63: + 1d:b8:c0:6c:f2:cf:49:bb:4d:93:6f:06:a6:0a:22:b2:49:62: + 08:4e:ff:c8:c8:14:b2:88:16:5d:e7:01:e4:12:95:e5:45:34: + b3:8b:69:bd:cf:b4:85:8f:75:51:9e:7d:3a:38:3a:14:48:12: + c6:fb:a7:3b:1a:8d:0d:82:40:07:e8:04:08:90:a1:89:cb:19: + 50:df:ca:1c:01:bc:1d:04:19:7b:10:76:97:3b:ee:90:90:ca: + c4:0e:1f:16:6e:75:ef:33:f8:d3:6f:5b:1e:96:e3:e0:74:77: + 74:7b:8a:a2:6e:2d:dd:76:d6:39:30:82:f0:ab:9c:52:f2:2a: + c7:af:49:5e:7e:c7:68:e5:82:81:c8:6a:27:f9:27:88:2a:d5: + 58:50:95:1f:f0:3b:1c:57:bb:7d:14:39:62:2b:9a:c9:94:92: + 2a:a3:22:0c:ff:89:26:7d:5f:23:2b:47:d7:15:1d:a9:6a:9e: + 51:0d:2a:51:9e:81:f9:d4:3b:5e:70:12:7f:10:32:9c:1e:bb: + 9d:f8:66:a8 +-----BEGIN CERTIFICATE----- +MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB +lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug +Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho +dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt +SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG +A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe +MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v +d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh +cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn +0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ +M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a +MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd +oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI +DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy +oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0 +dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy +bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF +BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM +//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli +CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE +CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t +3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS +KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA== +-----END CERTIFICATE----- + +UTN USERFirst Object Root CA +============================ + +MD5 Fingerprint=A7:F2:E4:16:06:41:11:50:30:6B:9C:E3:B4:9C:B0:C9 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 44:be:0c:8b:50:00:24:b4:11:d3:36:2d:e0:b3:5f:1b + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Object + Validity + Not Before: Jul 9 18:31:20 1999 GMT + Not After : Jul 9 18:40:36 2019 GMT + Subject: C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network, OU=http://www.usertrust.com, CN=UTN-USERFirst-Object + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:ce:aa:81:3f:a3:a3:61:78:aa:31:00:55:95:11: + 9e:27:0f:1f:1c:df:3a:9b:82:68:30:c0:4a:61:1d: + f1:2f:0e:fa:be:79:f7:a5:23:ef:55:51:96:84:cd: + db:e3:b9:6e:3e:31:d8:0a:20:67:c7:f4:d9:bf:94: + eb:47:04:3e:02:ce:2a:a2:5d:87:04:09:f6:30:9d: + 18:8a:97:b2:aa:1c:fc:41:d2:a1:36:cb:fb:3d:91: + ba:e7:d9:70:35:fa:e4:e7:90:c3:9b:a3:9b:d3:3c: + f5:12:99:77:b1:b7:09:e0:68:e6:1c:b8:f3:94:63: + 88:6a:6a:fe:0b:76:c9:be:f4:22:e4:67:b9:ab:1a: + 5e:77:c1:85:07:dd:0d:6c:bf:ee:06:c7:77:6a:41: + 9e:a7:0f:d7:fb:ee:94:17:b7:fc:85:be:a4:ab:c4: + 1c:31:dd:d7:b6:d1:e4:f0:ef:df:16:8f:b2:52:93: + d7:a1:d4:89:a1:07:2e:bf:e1:01:12:42:1e:1a:e1: + d8:95:34:db:64:79:28:ff:ba:2e:11:c2:e5:e8:5b: + 92:48:fb:47:0b:c2:6c:da:ad:32:83:41:f3:a5:e5: + 41:70:fd:65:90:6d:fa:fa:51:c4:f9:bd:96:2b:19: + 04:2c:d3:6d:a7:dc:f0:7f:6f:83:65:e2:6a:ab:87: + 86:75 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: + Digital Signature, Non Repudiation, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + DA:ED:64:74:14:9C:14:3C:AB:DD:99:A9:BD:5B:28:4D:8B:3C:C9:D8 + X509v3 CRL Distribution Points: + URI:http://crl.usertrust.com/UTN-USERFirst-Object.crl + + X509v3 Extended Key Usage: + Code Signing, Time Stamping, Microsoft Encrypted File System + Signature Algorithm: sha1WithRSAEncryption + 08:1f:52:b1:37:44:78:db:fd:ce:b9:da:95:96:98:aa:55:64: + 80:b5:5a:40:dd:21:a5:c5:c1:f3:5f:2c:4c:c8:47:5a:69:ea: + e8:f0:35:35:f4:d0:25:f3:c8:a6:a4:87:4a:bd:1b:b1:73:08: + bd:d4:c3:ca:b6:35:bb:59:86:77:31:cd:a7:80:14:ae:13:ef: + fc:b1:48:f9:6b:25:25:2d:51:b6:2c:6d:45:c1:98:c8:8a:56: + 5d:3e:ee:43:4e:3e:6b:27:8e:d0:3a:4b:85:0b:5f:d3:ed:6a: + a7:75:cb:d1:5a:87:2f:39:75:13:5a:72:b0:02:81:9f:be:f0: + 0f:84:54:20:62:6c:69:d4:e1:4d:c6:0d:99:43:01:0d:12:96: + 8c:78:9d:bf:50:a2:b1:44:aa:6a:cf:17:7a:cf:6f:0f:d4:f8: + 24:55:5f:f0:34:16:49:66:3e:50:46:c9:63:71:38:31:62:b8: + 62:b9:f3:53:ad:6c:b5:2b:a2:12:aa:19:4f:09:da:5e:e7:93: + c6:8e:14:08:fe:f0:30:80:18:a0:86:85:4d:c8:7d:d7:8b:03: + fe:6e:d5:f7:9d:16:ac:92:2c:a0:23:e5:9c:91:52:1f:94:df: + 17:94:73:c3:b3:c1:c1:71:05:20:00:78:bd:13:52:1d:a8:3e: + cd:00:1f:c8 +-----BEGIN CERTIFICATE----- +MIIEZjCCA06gAwIBAgIQRL4Mi1AAJLQR0zYt4LNfGzANBgkqhkiG9w0BAQUFADCB +lTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug +Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho +dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAbBgNVBAMTFFVUTi1VU0VSRmlyc3Qt +T2JqZWN0MB4XDTk5MDcwOTE4MzEyMFoXDTE5MDcwOTE4NDAzNlowgZUxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAc +BgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3 +dy51c2VydHJ1c3QuY29tMR0wGwYDVQQDExRVVE4tVVNFUkZpcnN0LU9iamVjdDCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6qgT+jo2F4qjEAVZURnicP +HxzfOpuCaDDASmEd8S8O+r5596Uj71VRloTN2+O5bj4x2AogZ8f02b+U60cEPgLO +KqJdhwQJ9jCdGIqXsqoc/EHSoTbL+z2RuufZcDX65OeQw5ujm9M89RKZd7G3CeBo +5hy485RjiGpq/gt2yb70IuRnuasaXnfBhQfdDWy/7gbHd2pBnqcP1/vulBe3/IW+ +pKvEHDHd17bR5PDv3xaPslKT16HUiaEHLr/hARJCHhrh2JU022R5KP+6LhHC5ehb +kkj7RwvCbNqtMoNB86XlQXD9ZZBt+vpRxPm9lisZBCzTbafc8H9vg2XiaquHhnUC +AwEAAaOBrzCBrDALBgNVHQ8EBAMCAcYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E +FgQU2u1kdBScFDyr3ZmpvVsoTYs8ydgwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDov +L2NybC51c2VydHJ1c3QuY29tL1VUTi1VU0VSRmlyc3QtT2JqZWN0LmNybDApBgNV +HSUEIjAgBggrBgEFBQcDAwYIKwYBBQUHAwgGCisGAQQBgjcKAwQwDQYJKoZIhvcN +AQEFBQADggEBAAgfUrE3RHjb/c652pWWmKpVZIC1WkDdIaXFwfNfLEzIR1pp6ujw +NTX00CXzyKakh0q9G7FzCL3Uw8q2NbtZhncxzaeAFK4T7/yxSPlrJSUtUbYsbUXB +mMiKVl0+7kNOPmsnjtA6S4ULX9Ptaqd1y9Fahy85dRNacrACgZ++8A+EVCBibGnU +4U3GDZlDAQ0Slox4nb9QorFEqmrPF3rPbw/U+CRVX/A0FklmPlBGyWNxODFiuGK5 +81OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCGhU3IfdeLA/5u1fedFqySLKAj5ZyR +Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g= +-----END CERTIFICATE----- + +Camerfirma Chambers of Commerce Root +==================================== + +MD5 Fingerprint=B0:01:EE:14:D9:AF:29:18:94:76:8E:F1:69:33:2A:84 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=EU, O=AC Camerfirma SA CIF A82743287, OU=http://www.chambersign.org, CN=Chambers of Commerce Root + Validity + Not Before: Sep 30 16:13:43 2003 GMT + Not After : Sep 30 16:13:44 2037 GMT + Subject: C=EU, O=AC Camerfirma SA CIF A82743287, OU=http://www.chambersign.org, CN=Chambers of Commerce Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b7:36:55:e5:a5:5d:18:30:e0:da:89:54:91:fc: + c8:c7:52:f8:2f:50:d9:ef:b1:75:73:65:47:7d:1b: + 5b:ba:75:c5:fc:a1:88:24:fa:2f:ed:ca:08:4a:39: + 54:c4:51:7a:b5:da:60:ea:38:3c:81:b2:cb:f1:bb: + d9:91:23:3f:48:01:70:75:a9:05:2a:ad:1f:71:f3: + c9:54:3d:1d:06:6a:40:3e:b3:0c:85:ee:5c:1b:79: + c2:62:c4:b8:36:8e:35:5d:01:0c:23:04:47:35:aa: + 9b:60:4e:a0:66:3d:cb:26:0a:9c:40:a1:f4:5d:98: + bf:71:ab:a5:00:68:2a:ed:83:7a:0f:a2:14:b5:d4: + 22:b3:80:b0:3c:0c:5a:51:69:2d:58:18:8f:ed:99: + 9e:f1:ae:e2:95:e6:f6:47:a8:d6:0c:0f:b0:58:58: + db:c3:66:37:9e:9b:91:54:33:37:d2:94:1c:6a:48: + c9:c9:f2:a5:da:a5:0c:23:f7:23:0e:9c:32:55:5e: + 71:9c:84:05:51:9a:2d:fd:e6:4e:2a:34:5a:de:ca: + 40:37:67:0c:54:21:55:77:da:0a:0c:cc:97:ae:80: + dc:94:36:4a:f4:3e:ce:36:13:1e:53:e4:ac:4e:3a: + 05:ec:db:ae:72:9c:38:8b:d0:39:3b:89:0a:3e:77: + fe:75 + Exponent: 3 (0x3) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:12 + X509v3 CRL Distribution Points: + URI:http://crl.chambersign.org/chambersroot.crl + + X509v3 Subject Key Identifier: + E3:94:F5:B1:4D:E9:DB:A1:29:5B:57:8B:4D:76:06:76:E1:D1:A2:8A + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:chambersroot@chambersign.org + X509v3 Issuer Alternative Name: + email:chambersroot@chambersign.org + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.17326.10.3.1 + CPS: http://cps.chambersign.org/cps/chambersroot.html + + Signature Algorithm: sha1WithRSAEncryption + 0c:41:97:c2:1a:86:c0:22:7c:9f:fb:90:f3:1a:d1:03:b1:ef: + 13:f9:21:5f:04:9c:da:c9:a5:8d:27:6c:96:87:91:be:41:90: + 01:72:93:e7:1e:7d:5f:f6:89:c6:5d:a7:40:09:3d:ac:49:45: + 45:dc:2e:8d:30:68:b2:09:ba:fb:c3:2f:cc:ba:0b:df:3f:77: + 7b:46:7d:3a:12:24:8e:96:8f:3c:05:0a:6f:d2:94:28:1d:6d: + 0c:c0:2e:88:22:d5:d8:cf:1d:13:c7:f0:48:d7:d7:05:a7:cf: + c7:47:9e:3b:3c:34:c8:80:4f:d4:14:bb:fc:0d:50:f7:fa:b3: + ec:42:5f:a9:dd:6d:c8:f4:75:cf:7b:c1:72:26:b1:01:1c:5c: + 2c:fd:7a:4e:b4:01:c5:05:57:b9:e7:3c:aa:05:d9:88:e9:07: + 46:41:ce:ef:41:81:ae:58:df:83:a2:ae:ca:d7:77:1f:e7:00: + 3c:9d:6f:8e:e4:32:09:1d:4d:78:34:78:34:3c:94:9b:26:ed: + 4f:71:c6:19:7a:bd:20:22:48:5a:fe:4b:7d:03:b7:e7:58:be: + c6:32:4e:74:1e:68:dd:a8:68:5b:b3:3e:ee:62:7d:d9:80:e8: + 0a:75:7a:b7:ee:b4:65:9a:21:90:e0:aa:d0:98:bc:38:b5:73: + 3c:8b:f8:dc +-----BEGIN CERTIFICATE----- +MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEn +MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL +ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMg +b2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAxNjEzNDNaFw0zNzA5MzAxNjEzNDRa +MH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZpcm1hIFNBIENJRiBB +ODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3JnMSIw +IAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0B +AQEFAAOCAQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtb +unXF/KGIJPov7coISjlUxFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0d +BmpAPrMMhe5cG3nCYsS4No41XQEMIwRHNaqbYE6gZj3LJgqcQKH0XZi/caulAGgq +7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jWDA+wWFjbw2Y3npuRVDM3 +0pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFVd9oKDMyX +roDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIG +A1UdEwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5j +aGFtYmVyc2lnbi5vcmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p +26EpW1eLTXYGduHRooowDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIA +BzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hhbWJlcnNpZ24ub3JnMCcGA1Ud +EgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYDVR0gBFEwTzBN +BgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz +aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEB +AAxBl8IahsAifJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZd +p0AJPaxJRUXcLo0waLIJuvvDL8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi +1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wNUPf6s+xCX6ndbcj0dc97wXImsQEc +XCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/nADydb47kMgkdTXg0 +eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1erfu +tGWaIZDgqtCYvDi1czyL+Nw= +-----END CERTIFICATE----- + +Camerfirma Global Chambersign Root +================================== + +MD5 Fingerprint=C5:E6:7B:BF:06:D0:4F:43:ED:C4:7A:65:8A:FB:6B:19 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=EU, O=AC Camerfirma SA CIF A82743287, OU=http://www.chambersign.org, CN=Global Chambersign Root + Validity + Not Before: Sep 30 16:14:18 2003 GMT + Not After : Sep 30 16:14:18 2037 GMT + Subject: C=EU, O=AC Camerfirma SA CIF A82743287, OU=http://www.chambersign.org, CN=Global Chambersign Root + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:a2:70:a2:d0:9f:42:ae:5b:17:c7:d8:7d:cf:14: + 83:fc:4f:c9:a1:b7:13:af:8a:d7:9e:3e:04:0a:92: + 8b:60:56:fa:b4:32:2f:88:4d:a1:60:08:f4:b7:09: + 4e:a0:49:2f:49:d6:d3:df:9d:97:5a:9f:94:04:70: + ec:3f:59:d9:b7:cc:66:8b:98:52:28:09:02:df:c5: + 2f:84:8d:7a:97:77:bf:ec:40:9d:25:72:ab:b5:3f: + 32:98:fb:b7:b7:fc:72:84:e5:35:87:f9:55:fa:a3: + 1f:0e:6f:2e:28:dd:69:a0:d9:42:10:c6:f8:b5:44: + c2:d0:43:7f:db:bc:e4:a2:3c:6a:55:78:0a:77:a9: + d8:ea:19:32:b7:2f:fe:5c:3f:1b:ee:b1:98:ec:ca: + ad:7a:69:45:e3:96:0f:55:f6:e6:ed:75:ea:65:e8: + 32:56:93:46:89:a8:25:8a:65:06:ee:6b:bf:79:07: + d0:f1:b7:af:ed:2c:4d:92:bb:c0:a8:5f:a7:67:7d: + 04:f2:15:08:70:ac:92:d6:7d:04:d2:33:fb:4c:b6: + 0b:0b:fb:1a:c9:c4:8d:03:a9:7e:5c:f2:50:ab:12: + a5:a1:cf:48:50:a5:ef:d2:c8:1a:13:fa:b0:7f:b1: + 82:1c:77:6a:0f:5f:dc:0b:95:8f:ef:43:7e:e6:45: + 09:25 + Exponent: 3 (0x3) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:12 + X509v3 CRL Distribution Points: + URI:http://crl.chambersign.org/chambersignroot.crl + + X509v3 Subject Key Identifier: + 43:9C:36:9F:B0:9E:30:4D:C6:CE:5F:AD:10:AB:E5:03:A5:FA:A9:14 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + X509v3 Subject Alternative Name: + email:chambersignroot@chambersign.org + X509v3 Issuer Alternative Name: + email:chambersignroot@chambersign.org + X509v3 Certificate Policies: + Policy: 1.3.6.1.4.1.17326.10.1.1 + CPS: http://cps.chambersign.org/cps/chambersignroot.html + + Signature Algorithm: sha1WithRSAEncryption + 3c:3b:70:91:f9:04:54:27:91:e1:ed:ed:fe:68:7f:61:5d:e5: + 41:65:4f:32:f1:18:05:94:6a:1c:de:1f:70:db:3e:7b:32:02: + 34:b5:0c:6c:a1:8a:7c:a5:f4:8f:ff:d4:d8:ad:17:d5:2d:04: + d1:3f:58:80:e2:81:59:88:be:c0:e3:46:93:24:fe:90:bd:26: + a2:30:2d:e8:97:26:57:35:89:74:96:18:f6:15:e2:af:24:19: + 56:02:02:b2:ba:0f:14:ea:c6:8a:66:c1:86:45:55:8b:be:92: + be:9c:a4:04:c7:49:3c:9e:e8:29:7a:89:d7:fe:af:ff:68:f5: + a5:17:90:bd:ac:99:cc:a5:86:57:09:67:46:db:d6:16:c2:46: + f1:e4:a9:50:f5:8f:d1:92:15:d3:5f:3e:c6:00:49:3a:6e:58: + b2:d1:d1:27:0d:25:c8:32:f8:20:11:cd:7d:32:33:48:94:54: + 4c:dd:dc:79:c4:30:9f:eb:8e:b8:55:b5:d7:88:5c:c5:6a:24: + 3d:b2:d3:05:03:51:c6:07:ef:cc:14:72:74:3d:6e:72:ce:18: + 28:8c:4a:a0:77:e5:09:2b:45:44:47:ac:b7:67:7f:01:8a:05: + 5a:93:be:a1:c1:ff:f8:e7:0e:67:a4:47:49:76:5d:75:90:1a: + f5:26:8f:f0 +-----BEGIN CERTIFICATE----- +MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEn +MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL +ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENo +YW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYxNDE4WhcNMzcwOTMwMTYxNDE4WjB9 +MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgy +NzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4G +A1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUA +A4IBDQAwggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0 +Mi+ITaFgCPS3CU6gSS9J1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/s +QJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8Oby4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpV +eAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl6DJWk0aJqCWKZQbua795 +B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c8lCrEqWh +z0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0T +AQH/BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1i +ZXJzaWduLm9yZy9jaGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4w +TcbOX60Qq+UDpfqpFDAOBgNVHQ8BAf8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAH +MCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBjaGFtYmVyc2lnbi5vcmcwKgYD +VR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9yZzBbBgNVHSAE +VDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh +bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0B +AQUFAAOCAQEAPDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUM +bKGKfKX0j//U2K0X1S0E0T9YgOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXi +ryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJPJ7oKXqJ1/6v/2j1pReQvayZzKWG +VwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4IBHNfTIzSJRUTN3c +ecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREest2d/ +AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A== +-----END CERTIFICATE----- + +NetLock Notary (Class A) Root +============================= + +MD5 Fingerprint=86:38:6D:5E:49:63:6C:85:5C:DB:6D:DC:94:B7:D0:F7 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 259 (0x103) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=HU, ST=Hungary, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok, CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado + Validity + Not Before: Feb 24 23:14:47 1999 GMT + Not After : Feb 19 23:14:47 2019 GMT + Subject: C=HU, ST=Hungary, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok, CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:bc:74:8c:0f:bb:4c:f4:37:1e:a9:05:82:d8:e6: + e1:6c:70:ea:78:b5:6e:d1:38:44:0d:a8:83:ce:5d: + d2:d6:d5:81:c5:d4:4b:e7:5b:94:70:26:db:3b:9d: + 6a:4c:62:f7:71:f3:64:d6:61:3b:3d:eb:73:a3:37: + d9:cf:ea:8c:92:3b:cd:f7:07:dc:66:74:97:f4:45: + 22:dd:f4:5c:e0:bf:6d:f3:be:65:33:e4:15:3a:bf: + db:98:90:55:38:c4:ed:a6:55:63:0b:b0:78:04:f4: + e3:6e:c1:3f:8e:fc:51:78:1f:92:9e:83:c2:fe:d9: + b0:a9:c9:bc:5a:00:ff:a9:a8:98:74:fb:f6:2c:3e: + 15:39:0d:b6:04:55:a8:0e:98:20:42:b3:b1:25:ad: + 7e:9a:6f:5d:53:b1:ab:0c:fc:eb:e0:f3:7a:b3:a8: + b3:ff:46:f6:63:a2:d8:3a:98:7b:b6:ac:85:ff:b0: + 25:4f:74:63:e7:13:07:a5:0a:8f:05:f7:c0:64:6f: + 7e:a7:27:80:96:de:d4:2e:86:60:c7:6b:2b:5e:73: + 7b:17:e7:91:3f:64:0c:d8:4b:22:34:2b:9b:32:f2: + 48:1f:9f:a1:0a:84:7a:e2:c2:ad:97:3d:8e:d5:c1: + f9:56:a3:50:e9:c6:b4:fa:98:a2:ee:95:e6:2a:03: + 8c:df + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:4 + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + Netscape Comment: + FIGYELEM! Ezen tanusitvany a NetLock Kft. Altalanos Szolgaltatasi Felteteleiben leirt eljarasok alapjan keszult. A hitelesites folyamatat a NetLock Kft. termekfelelosseg-biztositasa vedi. A digitalis alairas elfogadasanak feltetele az eloirt ellenorzesi eljaras megtetele. Az eljaras leirasa megtalalhato a NetLock Kft. Internet honlapjan a https://www.netlock.net/docs cimen vagy kerheto az ellenorzes@netlock.net e-mail cimen. IMPORTANT! The issuance and the use of this certificate is subject to the NetLock CPS available at https://www.netlock.net/docs or by e-mail at cps@netlock.net. + Signature Algorithm: md5WithRSAEncryption + 48:24:46:f7:ba:56:6f:fa:c8:28:03:40:4e:e5:31:39:6b:26: + 6b:53:7f:db:df:df:f3:71:3d:26:c0:14:0e:c6:67:7b:23:a8: + 0c:73:dd:01:bb:c6:ca:6e:37:39:55:d5:c7:8c:56:20:0e:28: + 0a:0e:d2:2a:a4:b0:49:52:c6:38:07:fe:be:0a:09:8c:d1:98: + cf:ca:da:14:31:a1:4f:d2:39:fc:0f:11:2c:43:c3:dd:ab:93: + c7:55:3e:47:7c:18:1a:00:dc:f3:7b:d8:f2:7f:52:6c:20:f4: + 0b:5f:69:52:f4:ee:f8:b2:29:60:eb:e3:49:31:21:0d:d6:b5: + 10:41:e2:41:09:6c:e2:1a:9a:56:4b:77:02:f6:a0:9b:9a:27: + 87:e8:55:29:71:c2:90:9f:45:78:1a:e1:15:64:3d:d0:0e:d8: + a0:76:9f:ae:c5:d0:2e:ea:d6:0f:56:ec:64:7f:5a:9b:14:58: + 01:27:7e:13:50:c7:6b:2a:e6:68:3c:bf:5c:a0:0a:1b:e1:0e: + 7a:e9:e2:80:c3:e9:e9:f6:fd:6c:11:9e:d0:e5:28:27:2b:54: + 32:42:14:82:75:e6:4a:f0:2b:66:75:63:8c:a2:fb:04:3e:83: + 0e:9b:36:f0:18:e4:26:20:c3:8c:f0:28:07:ad:3c:17:66:88: + b5:fd:b6:88 +-----BEGIN CERTIFICATE----- +MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhV +MRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMe +TmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0 +dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBB +KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0 +N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhC +dWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQu +MRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBL +b3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSMD7tM9DceqQWC2ObhbHDqeLVu0ThEDaiD +zl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7PetzozfZz+qMkjvN9wfcZnSX9EUi +3fRc4L9t875lM+QVOr/bmJBVOMTtplVjC7B4BPTjbsE/jvxReB+SnoPC/tmwqcm8 +WgD/qaiYdPv2LD4VOQ22BFWoDpggQrOxJa1+mm9dU7GrDPzr4PN6s6iz/0b2Y6LY +Oph7tqyF/7AlT3Rj5xMHpQqPBffAZG9+pyeAlt7ULoZgx2srXnN7F+eRP2QM2Esi +NCubMvJIH5+hCoR64sKtlz2O1cH5VqNQ6ca0+pii7pXmKgOM3wIDAQABo4ICnzCC +ApswDgYDVR0PAQH/BAQDAgAGMBIGA1UdEwEB/wQIMAYBAf8CAQQwEQYJYIZIAYb4 +QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZRUxFTSEgRXplbiB0 +YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRhdGFz +aSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQu +IEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtm +ZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMg +ZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVs +amFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJhc2EgbWVndGFsYWxoYXRv +IGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBzOi8vd3d3 +Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6 +ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1 +YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3Qg +dG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRs +b2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNAbmV0bG9jay5uZXQuMA0G +CSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5ayZrU3/b39/zcT0mwBQO +xmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjPytoUMaFP +0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQ +QeJBCWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxk +f1qbFFgBJ34TUMdrKuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK +8CtmdWOMovsEPoMOmzbwGOQmIMOM8CgHrTwXZoi1/baI +-----END CERTIFICATE----- + +Equifax Secure CA +================= + +MD5 Fingerprint=67:CB:9D:C0:13:24:8A:82:9B:B2:17:1E:D1:1B:EC:D4 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 903804111 (0x35def4cf) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=Equifax, OU=Equifax Secure Certificate Authority + Validity + Not Before: Aug 22 16:41:51 1998 GMT + Not After : Aug 22 16:41:51 2018 GMT + Subject: C=US, O=Equifax, OU=Equifax Secure Certificate Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:c1:5d:b1:58:67:08:62:ee:a0:9a:2d:1f:08:6d: + 91:14:68:98:0a:1e:fe:da:04:6f:13:84:62:21:c3: + d1:7c:ce:9f:05:e0:b8:01:f0:4e:34:ec:e2:8a:95: + 04:64:ac:f1:6b:53:5f:05:b3:cb:67:80:bf:42:02: + 8e:fe:dd:01:09:ec:e1:00:14:4f:fc:fb:f0:0c:dd: + 43:ba:5b:2b:e1:1f:80:70:99:15:57:93:16:f1:0f: + 97:6a:b7:c2:68:23:1c:cc:4d:59:30:ac:51:1e:3b: + af:2b:d6:ee:63:45:7b:c5:d9:5f:50:d2:e3:50:0f: + 3a:88:e7:bf:14:fd:e0:c7:b9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 CRL Distribution Points: + DirName:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority/CN=CRL1 + + X509v3 Private Key Usage Period: + Not After: Aug 22 16:41:51 2018 GMT + X509v3 Key Usage: + Certificate Sign, CRL Sign + X509v3 Authority Key Identifier: + keyid:48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4 + + X509v3 Subject Key Identifier: + 48:E6:68:F9:2B:D2:B2:95:D7:47:D8:23:20:10:4F:33:98:90:9F:D4 + X509v3 Basic Constraints: + CA:TRUE + 1.2.840.113533.7.65.0: + 0...V3.0c.... + Signature Algorithm: sha1WithRSAEncryption + 58:ce:29:ea:fc:f7:de:b5:ce:02:b9:17:b5:85:d1:b9:e3:e0: + 95:cc:25:31:0d:00:a6:92:6e:7f:b6:92:63:9e:50:95:d1:9a: + 6f:e4:11:de:63:85:6e:98:ee:a8:ff:5a:c8:d3:55:b2:66:71: + 57:de:c0:21:eb:3d:2a:a7:23:49:01:04:86:42:7b:fc:ee:7f: + a2:16:52:b5:67:67:d3:40:db:3b:26:58:b2:28:77:3d:ae:14: + 77:61:d6:fa:2a:66:27:a0:0d:fa:a7:73:5c:ea:70:f1:94:21: + 65:44:5f:fa:fc:ef:29:68:a9:a2:87:79:ef:79:ef:4f:ac:07: + 77:38 +-----BEGIN CERTIFICATE----- +MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV +UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy +dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1 +MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx +dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B +AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f +BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A +cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC +AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm +aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw +ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj +IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF +MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA +A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y +7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh +1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4 +-----END CERTIFICATE----- + +NetLock Business (Class B) Root +=============================== + +MD5 Fingerprint=39:16:AA:B9:6A:41:E1:14:69:DF:9E:6C:3B:72:DC:B6 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 105 (0x69) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=HU, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok, CN=NetLock Uzleti (Class B) Tanusitvanykiado + Validity + Not Before: Feb 25 14:10:22 1999 GMT + Not After : Feb 20 14:10:22 2019 GMT + Subject: C=HU, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok, CN=NetLock Uzleti (Class B) Tanusitvanykiado + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:b1:ea:04:ec:20:a0:23:c2:8f:38:60:cf:c7:46: + b3:d5:1b:fe:fb:b9:99:9e:04:dc:1c:7f:8c:4a:81: + 98:ee:a4:d4:ca:8a:17:b9:22:7f:83:0a:75:4c:9b: + c0:69:d8:64:39:a3:ed:92:a3:fd:5b:5c:74:1a:c0: + 47:ca:3a:69:76:9a:ba:e2:44:17:fc:4c:a3:d5:fe: + b8:97:88:af:88:03:89:1f:a4:f2:04:3e:c8:07:0b: + e6:f9:b3:2f:7a:62:14:09:46:14:ca:64:f5:8b:80: + b5:62:a8:d8:6b:d6:71:93:2d:b3:bf:09:54:58:ed: + 06:eb:a8:7b:dc:43:b1:a1:69 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:4 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + Netscape Comment: + FIGYELEM! Ezen tanusitvany a NetLock Kft. Altalanos Szolgaltatasi Felteteleiben leirt eljarasok alapjan keszult. A hitelesites folyamatat a NetLock Kft. termekfelelosseg-biztositasa vedi. A digitalis alairas elfogadasanak feltetele az eloirt ellenorzesi eljaras megtetele. Az eljaras leirasa megtalalhato a NetLock Kft. Internet honlapjan a https://www.netlock.net/docs cimen vagy kerheto az ellenorzes@netlock.net e-mail cimen. IMPORTANT! The issuance and the use of this certificate is subject to the NetLock CPS available at https://www.netlock.net/docs or by e-mail at cps@netlock.net. + Signature Algorithm: md5WithRSAEncryption + 04:db:ae:8c:17:af:f8:0e:90:31:4e:cd:3e:09:c0:6d:3a:b0: + f8:33:4c:47:4c:e3:75:88:10:97:ac:b0:38:15:91:c6:29:96: + cc:21:c0:6d:3c:a5:74:cf:d8:82:a5:39:c3:65:e3:42:70:bb: + 22:90:e3:7d:db:35:76:e1:a0:b5:da:9f:70:6e:93:1a:30:39: + 1d:30:db:2e:e3:7c:b2:91:b2:d1:37:29:fa:b9:d6:17:5c:47: + 4f:e3:1d:38:eb:9f:d5:7b:95:a8:28:9e:15:4a:d1:d1:d0:2b: + 00:97:a0:e2:92:36:2b:63:ac:58:01:6b:33:29:50:86:83:f1: + 01:48 +-----BEGIN CERTIFICATE----- +MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUx +ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0 +b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQD +EylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikgVGFudXNpdHZhbnlraWFkbzAeFw05 +OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYDVQQGEwJIVTERMA8G +A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh +Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5l +dExvY2sgVXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqG +SIb3DQEBAQUAA4GNADCBiQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xK +gZjupNTKihe5In+DCnVMm8Bp2GQ5o+2So/1bXHQawEfKOml2mrriRBf8TKPV/riX +iK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr1nGTLbO/CVRY7QbrqHvc +Q7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNVHQ8BAf8E +BAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1G +SUdZRUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFu +b3MgU3pvbGdhbHRhdGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBh +bGFwamFuIGtlc3p1bHQuIEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExv +Y2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGln +aXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0 +IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh +c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGph +biBhIGh0dHBzOi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJo +ZXRvIGF6IGVsbGVub3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBP +UlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmlj +YXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBo +dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNA +bmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06 +sPgzTEdM43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXa +n3BukxowOR0w2y7jfLKRstE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKS +NitjrFgBazMpUIaD8QFI +-----END CERTIFICATE----- + +NetLock Express (Class C) Root +============================== + +MD5 Fingerprint=4F:EB:F1:F0:70:C2:80:63:5D:58:9F:DA:12:3C:A9:C4 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 104 (0x68) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=HU, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok, CN=NetLock Expressz (Class C) Tanusitvanykiado + Validity + Not Before: Feb 25 14:08:11 1999 GMT + Not After : Feb 20 14:08:11 2019 GMT + Subject: C=HU, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok, CN=NetLock Expressz (Class C) Tanusitvanykiado + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:eb:ec:b0:6c:61:8a:23:25:af:60:20:e3:d9:9f: + fc:93:0b:db:5d:8d:b0:a1:b3:40:3a:82:ce:fd:75: + e0:78:32:03:86:5a:86:95:91:ed:53:fa:9d:40:fc: + e6:e8:dd:d9:5b:7a:03:bd:5d:f3:3b:0c:c3:51:79: + 9b:ad:55:a0:e9:d0:03:10:af:0a:ba:14:42:d9:52: + 26:11:22:c7:d2:20:cc:82:a4:9a:a9:fe:b8:81:76: + 9d:6a:b7:d2:36:75:3e:b1:86:09:f6:6e:6d:7e:4e: + b7:7a:ec:ae:71:84:f6:04:33:08:25:32:eb:74:ac: + 16:44:c6:e4:40:93:1d:7f:ad + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:4 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Netscape Cert Type: + SSL CA, S/MIME CA, Object Signing CA + Netscape Comment: + FIGYELEM! Ezen tanusitvany a NetLock Kft. Altalanos Szolgaltatasi Felteteleiben leirt eljarasok alapjan keszult. A hitelesites folyamatat a NetLock Kft. termekfelelosseg-biztositasa vedi. A digitalis alairas elfogadasanak feltetele az eloirt ellenorzesi eljaras megtetele. Az eljaras leirasa megtalalhato a NetLock Kft. Internet honlapjan a https://www.netlock.net/docs cimen vagy kerheto az ellenorzes@netlock.net e-mail cimen. IMPORTANT! The issuance and the use of this certificate is subject to the NetLock CPS available at https://www.netlock.net/docs or by e-mail at cps@netlock.net. + Signature Algorithm: md5WithRSAEncryption + 10:ad:7f:d7:0c:32:80:0a:d8:86:f1:79:98:b5:ad:d4:cd:b3: + 36:c4:96:48:c1:5c:cd:9a:d9:05:2e:9f:be:50:eb:f4:26:14: + 10:2d:d4:66:17:f8:9e:c1:27:fd:f1:ed:e4:7b:4b:a0:6c:b5: + ab:9a:57:70:a6:ed:a0:a4:ed:2e:f5:fd:fc:bd:fe:4d:37:08: + 0c:bc:e3:96:83:22:f5:49:1b:7f:4b:2b:b4:54:c1:80:7c:99: + 4e:1d:d0:8c:ee:d0:ac:e5:92:fa:75:56:fe:64:a0:13:8f:b8: + b8:16:9d:61:05:67:80:c8:d0:d8:a5:07:02:34:98:04:8d:33: + 04:d4 +-----BEGIN CERTIFICATE----- +MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUx +ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0 +b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQD +EytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4X +DTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREw +DwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9u +c2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMr +TmV0TG9jayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzAN +BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNA +OoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3ZW3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC +2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63euyucYT2BDMIJTLrdKwW +RMbkQJMdf60CAwEAAaOCAp8wggKbMBIGA1UdEwEB/wQIMAYBAf8CAQQwDgYDVR0P +AQH/BAQDAgAGMBEGCWCGSAGG+EIBAQQEAwIABzCCAmAGCWCGSAGG+EIBDQSCAlEW +ggJNRklHWUVMRU0hIEV6ZW4gdGFudXNpdHZhbnkgYSBOZXRMb2NrIEtmdC4gQWx0 +YWxhbm9zIFN6b2xnYWx0YXRhc2kgRmVsdGV0ZWxlaWJlbiBsZWlydCBlbGphcmFz +b2sgYWxhcGphbiBrZXN6dWx0LiBBIGhpdGVsZXNpdGVzIGZvbHlhbWF0YXQgYSBO +ZXRMb2NrIEtmdC4gdGVybWVrZmVsZWxvc3NlZy1iaXp0b3NpdGFzYSB2ZWRpLiBB +IGRpZ2l0YWxpcyBhbGFpcmFzIGVsZm9nYWRhc2FuYWsgZmVsdGV0ZWxlIGF6IGVs +b2lydCBlbGxlbm9yemVzaSBlbGphcmFzIG1lZ3RldGVsZS4gQXogZWxqYXJhcyBs +ZWlyYXNhIG1lZ3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25s +YXBqYW4gYSBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kg +a2VyaGV0byBheiBlbGxlbm9yemVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4g +SU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5kIHRoZSB1c2Ugb2YgdGhpcyBjZXJ0 +aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQUyBhdmFpbGFibGUg +YXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwgYXQg +Y3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmY +ta3UzbM2xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2g +pO0u9f38vf5NNwgMvOOWgyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4 +Fp1hBWeAyNDYpQcCNJgEjTME1A== +-----END CERTIFICATE----- + +XRamp Global CA Root +==================== + +MD5 Fingerprint=A1:0B:44:B3:CA:10:D8:00:6E:9D:0F:D8:0F:92:0A:D1 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 50:94:6c:ec:18:ea:d5:9c:4d:d5:97:ef:75:8f:a0:ad + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, OU=www.xrampsecurity.com, O=XRamp Security Services Inc, CN=XRamp Global Certification Authority + Validity + Not Before: Nov 1 17:14:04 2004 GMT + Not After : Jan 1 05:37:19 2035 GMT + Subject: C=US, OU=www.xrampsecurity.com, O=XRamp Security Services Inc, CN=XRamp Global Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:98:24:1e:bd:15:b4:ba:df:c7:8c:a5:27:b6:38: + 0b:69:f3:b6:4e:a8:2c:2e:21:1d:5c:44:df:21:5d: + 7e:23:74:fe:5e:7e:b4:4a:b7:a6:ad:1f:ae:e0:06: + 16:e2:9b:5b:d9:67:74:6b:5d:80:8f:29:9d:86:1b: + d9:9c:0d:98:6d:76:10:28:58:e4:65:b0:7f:4a:98: + 79:9f:e0:c3:31:7e:80:2b:b5:8c:c0:40:3b:11:86: + d0:cb:a2:86:36:60:a4:d5:30:82:6d:d9:6e:d0:0f: + 12:04:33:97:5f:4f:61:5a:f0:e4:f9:91:ab:e7:1d: + 3b:bc:e8:cf:f4:6b:2d:34:7c:e2:48:61:1c:8e:f3: + 61:44:cc:6f:a0:4a:a9:94:b0:4d:da:e7:a9:34:7a: + 72:38:a8:41:cc:3c:94:11:7d:eb:c8:a6:8c:b7:86: + cb:ca:33:3b:d9:3d:37:8b:fb:7a:3e:86:2c:e7:73: + d7:0a:57:ac:64:9b:19:eb:f4:0f:04:08:8a:ac:03: + 17:19:64:f4:5a:25:22:8d:34:2c:b2:f6:68:1d:12: + 6d:d3:8a:1e:14:da:c4:8f:a6:e2:23:85:d5:7a:0d: + bd:6a:e0:e9:ec:ec:17:bb:42:1b:67:aa:25:ed:45: + 83:21:fc:c1:c9:7c:d5:62:3e:fa:f2:c5:2d:d3:fd: + d4:65 + Exponent: 65537 (0x10001) + X509v3 extensions: + 1.3.6.1.4.1.311.20.2: + ...C.A + X509v3 Key Usage: + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + C6:4F:A2:3D:06:63:84:09:9C:CE:62:E4:04:AC:8D:5C:B5:E9:B6:1B + X509v3 CRL Distribution Points: + URI:http://crl.xrampsecurity.com/XGCA.crl + + 1.3.6.1.4.1.311.21.1: + ... + Signature Algorithm: sha1WithRSAEncryption + 91:15:39:03:01:1b:67:fb:4a:1c:f9:0a:60:5b:a1:da:4d:97: + 62:f9:24:53:27:d7:82:64:4e:90:2e:c3:49:1b:2b:9a:dc:fc: + a8:78:67:35:f1:1d:f0:11:bd:b7:48:e3:10:f6:0d:df:3f:d2: + c9:b6:aa:55:a4:48:ba:02:db:de:59:2e:15:5b:3b:9d:16:7d: + 47:d7:37:ea:5f:4d:76:12:36:bb:1f:d7:a1:81:04:46:20:a3: + 2c:6d:a9:9e:01:7e:3f:29:ce:00:93:df:fd:c9:92:73:89:89: + 64:9e:e7:2b:e4:1c:91:2c:d2:b9:ce:7d:ce:6f:31:99:d3:e6: + be:d2:1e:90:f0:09:14:79:5c:23:ab:4d:d2:da:21:1f:4d:99: + 79:9d:e1:cf:27:9f:10:9b:1c:88:0d:b0:8a:64:41:31:b8:0e: + 6c:90:24:a4:9b:5c:71:8f:ba:bb:7e:1c:1b:db:6a:80:0f:21: + bc:e9:db:a6:b7:40:f4:b2:8b:a9:b1:e4:ef:9a:1a:d0:3d:69: + 99:ee:a8:28:a3:e1:3c:b3:f0:b2:11:9c:cf:7c:40:e6:dd:e7: + 43:7d:a2:d8:3a:b5:a9:8d:f2:34:99:c4:d4:10:e1:06:fd:09: + 84:10:3b:ee:c4:4c:f4:ec:27:7c:42:c2:74:7c:82:8a:09:c9: + b4:03:25:bc +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB +gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk +MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY +UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx +NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3 +dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy +dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6 +38eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP +KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7Q +DxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4 +qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRa +JSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNVi +PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P +BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs +jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0 +eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD +ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR +vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt +qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa +IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy +i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ +O+7ETPTsJ3xCwnR8gooJybQDJbw= +-----END CERTIFICATE----- + +Go Daddy Class 2 CA +=================== + +MD5 Fingerprint=91:DE:06:25:AB:DA:FD:32:17:0C:BB:25:17:2A:84:67 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority + Validity + Not Before: Jun 29 17:06:20 2004 GMT + Not After : Jun 29 17:06:20 2034 GMT + Subject: C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:de:9d:d7:ea:57:18:49:a1:5b:eb:d7:5f:48:86: + ea:be:dd:ff:e4:ef:67:1c:f4:65:68:b3:57:71:a0: + 5e:77:bb:ed:9b:49:e9:70:80:3d:56:18:63:08:6f: + da:f2:cc:d0:3f:7f:02:54:22:54:10:d8:b2:81:d4: + c0:75:3d:4b:7f:c7:77:c3:3e:78:ab:1a:03:b5:20: + 6b:2f:6a:2b:b1:c5:88:7e:c4:bb:1e:b0:c1:d8:45: + 27:6f:aa:37:58:f7:87:26:d7:d8:2d:f6:a9:17:b7: + 1f:72:36:4e:a6:17:3f:65:98:92:db:2a:6e:5d:a2: + fe:88:e0:0b:de:7f:e5:8d:15:e1:eb:cb:3a:d5:e2: + 12:a2:13:2d:d8:8e:af:5f:12:3d:a0:08:05:08:b6: + 5c:a5:65:38:04:45:99:1e:a3:60:60:74:c5:41:a5: + 72:62:1b:62:c5:1f:6f:5f:1a:42:be:02:51:65:a8: + ae:23:18:6a:fc:78:03:a9:4d:7f:80:c3:fa:ab:5a: + fc:a1:40:a4:ca:19:16:fe:b2:c8:ef:5e:73:0d:ee: + 77:bd:9a:f6:79:98:bc:b1:07:67:a2:15:0d:dd:a0: + 58:c6:44:7b:0a:3e:62:28:5f:ba:41:07:53:58:cf: + 11:7e:38:74:c5:f8:ff:b5:69:90:8f:84:74:ea:97: + 1b:af + Exponent: 3 (0x3) + X509v3 extensions: + X509v3 Subject Key Identifier: + D2:C4:B0:D2:91:D4:4C:11:71:B3:61:CB:3D:A1:FE:DD:A8:6A:D4:E3 + X509v3 Authority Key Identifier: + keyid:D2:C4:B0:D2:91:D4:4C:11:71:B3:61:CB:3D:A1:FE:DD:A8:6A:D4:E3 + DirName:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 32:4b:f3:b2:ca:3e:91:fc:12:c6:a1:07:8c:8e:77:a0:33:06: + 14:5c:90:1e:18:f7:08:a6:3d:0a:19:f9:87:80:11:6e:69:e4: + 96:17:30:ff:34:91:63:72:38:ee:cc:1c:01:a3:1d:94:28:a4: + 31:f6:7a:c4:54:d7:f6:e5:31:58:03:a2:cc:ce:62:db:94:45: + 73:b5:bf:45:c9:24:b5:d5:82:02:ad:23:79:69:8d:b8:b6:4d: + ce:cf:4c:ca:33:23:e8:1c:88:aa:9d:8b:41:6e:16:c9:20:e5: + 89:9e:cd:3b:da:70:f7:7e:99:26:20:14:54:25:ab:6e:73:85: + e6:9b:21:9d:0a:6c:82:0e:a8:f8:c2:0c:fa:10:1e:6c:96:ef: + 87:0d:c4:0f:61:8b:ad:ee:83:2b:95:f8:8e:92:84:72:39:eb: + 20:ea:83:ed:83:cd:97:6e:08:bc:eb:4e:26:b6:73:2b:e4:d3: + f6:4c:fe:26:71:e2:61:11:74:4a:ff:57:1a:87:0f:75:48:2e: + cf:51:69:17:a0:02:12:61:95:d5:d1:40:b2:10:4c:ee:c4:ac: + 10:43:a6:a5:9e:0a:d5:95:62:9a:0d:cf:88:82:c5:32:0c:e4: + 2b:9f:45:e6:0d:9f:28:9c:b1:b9:2a:5a:57:ad:37:0f:af:1d: + 7f:db:bd:9f +-----BEGIN CERTIFICATE----- +MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh +MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE +YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3 +MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo +ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg +MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN +ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA +PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w +wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi +EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY +avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+ +YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE +sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h +/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5 +IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD +ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy +OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P +TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER +dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf +ReYNnyicsbkqWletNw+vHX/bvZ8= +-----END CERTIFICATE----- + +Starfield Class 2 CA +==================== + +MD5 Fingerprint=32:4A:4B:BB:C8:63:69:9B:BE:74:9A:C6:DD:1D:46:24 +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=US, O=Starfield Technologies, Inc., OU=Starfield Class 2 Certification Authority + Validity + Not Before: Jun 29 17:39:16 2004 GMT + Not After : Jun 29 17:39:16 2034 GMT + Subject: C=US, O=Starfield Technologies, Inc., OU=Starfield Class 2 Certification Authority + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (2048 bit) + Modulus (2048 bit): + 00:b7:32:c8:fe:e9:71:a6:04:85:ad:0c:11:64:df: + ce:4d:ef:c8:03:18:87:3f:a1:ab:fb:3c:a6:9f:f0: + c3:a1:da:d4:d8:6e:2b:53:90:fb:24:a4:3e:84:f0: + 9e:e8:5f:ec:e5:27:44:f5:28:a6:3f:7b:de:e0:2a: + f0:c8:af:53:2f:9e:ca:05:01:93:1e:8f:66:1c:39: + a7:4d:fa:5a:b6:73:04:25:66:eb:77:7f:e7:59:c6: + 4a:99:25:14:54:eb:26:c7:f3:7f:19:d5:30:70:8f: + af:b0:46:2a:ff:ad:eb:29:ed:d7:9f:aa:04:87:a3: + d4:f9:89:a5:34:5f:db:43:91:82:36:d9:66:3c:b1: + b8:b9:82:fd:9c:3a:3e:10:c8:3b:ef:06:65:66:7a: + 9b:19:18:3d:ff:71:51:3c:30:2e:5f:be:3d:77:73: + b2:5d:06:6c:c3:23:56:9a:2b:85:26:92:1c:a7:02: + b3:e4:3f:0d:af:08:79:82:b8:36:3d:ea:9c:d3:35: + b3:bc:69:ca:f5:cc:9d:e8:fd:64:8d:17:80:33:6e: + 5e:4a:5d:99:c9:1e:87:b4:9d:1a:c0:d5:6e:13:35: + 23:5e:df:9b:5f:3d:ef:d6:f7:76:c2:ea:3e:bb:78: + 0d:1c:42:67:6b:04:d8:f8:d6:da:6f:8b:f2:44:a0: + 01:ab + Exponent: 3 (0x3) + X509v3 extensions: + X509v3 Subject Key Identifier: + BF:5F:B7:D1:CE:DD:1F:86:F4:5B:55:AC:DC:D7:10:C2:0E:A9:88:E7 + X509v3 Authority Key Identifier: + keyid:BF:5F:B7:D1:CE:DD:1F:86:F4:5B:55:AC:DC:D7:10:C2:0E:A9:88:E7 + DirName:/C=US/O=Starfield Technologies, Inc./OU=Starfield Class 2 Certification Authority + serial:00 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + 05:9d:3f:88:9d:d1:c9:1a:55:a1:ac:69:f3:f3:59:da:9b:01: + 87:1a:4f:57:a9:a1:79:09:2a:db:f7:2f:b2:1e:cc:c7:5e:6a: + d8:83:87:a1:97:ef:49:35:3e:77:06:41:58:62:bf:8e:58:b8: + 0a:67:3f:ec:b3:dd:21:66:1f:c9:54:fa:72:cc:3d:4c:40:d8: + 81:af:77:9e:83:7a:bb:a2:c7:f5:34:17:8e:d9:11:40:f4:fc: + 2c:2a:4d:15:7f:a7:62:5d:2e:25:d3:00:0b:20:1a:1d:68:f9: + 17:b8:f4:bd:8b:ed:28:59:dd:4d:16:8b:17:83:c8:b2:65:c7: + 2d:7a:a5:aa:bc:53:86:6d:dd:57:a4:ca:f8:20:41:0b:68:f0: + f4:fb:74:be:56:5d:7a:79:f5:f9:1d:85:e3:2d:95:be:f5:71: + 90:43:cc:8d:1f:9a:00:0a:87:29:e9:55:22:58:00:23:ea:e3: + 12:43:29:5b:47:08:dd:8c:41:6a:65:06:a8:e5:21:aa:41:b4: + 95:21:95:b9:7d:d1:34:ab:13:d6:ad:bc:dc:e2:3d:39:cd:bd: + 3e:75:70:a1:18:59:03:c9:22:b4:8f:9c:d5:5e:2a:d7:a5:b6: + d4:0a:6d:f8:b7:40:11:46:9a:1f:79:0e:62:bf:0f:97:ec:e0: + 2f:1f:17:94 +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl +MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp +U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw +NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE +ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp +ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3 +DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf +8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN ++lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0 +X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa +K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA +1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G +A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR +zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0 +YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD +bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3 +L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D +eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp +VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY +WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- diff --git a/vendor/plugins/paypal/LPGL-LICENSE b/vendor/plugins/paypal/LPGL-LICENSE new file mode 100644 index 0000000..8add30a --- /dev/null +++ b/vendor/plugins/paypal/LPGL-LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/vendor/plugins/paypal/README b/vendor/plugins/paypal/README new file mode 100644 index 0000000..802a43f --- /dev/null +++ b/vendor/plugins/paypal/README @@ -0,0 +1,227 @@ +Ruby on Rails PayPal Plugin v1.4 + by Andre Price, ELC Technologies +Based off of the PayPal Web Services Example by Will C +PayPal Plugin- +---------------------- +This package implements various paypal merchant actions. They are intended to e used at a level transparent to parent applications. Therefore the express check out and other actions that link to and back from paypal's site are curently not implemented. These actions return a response packet that the user can process as they see fit. + + +Requirements- +---------------------- +Valid PayPal Business Account ( or Developer account for testing) -- Instructions for setting up developer account below. +Soap4r -- Install the latest from http://dev.ctor.org/soap4r. + + +Getting Developer Account and needed certificates +---------------------- + Visit https://developer.paypal.com + Create an account( remember name and password) + Login and select the sandbox + Select Create an Account and follow the steps to create a premier account (remember name and password) + Once created launch the account via the sandbox site + Click on the Profile tab in the My Account section + CLick on API Access and request a direct access certificate + Download and install certificats as indicated below. + +Installation- +---------------------- + 1) Extract tar -- Should put paypal.rb int correct directory + Or + Copy paypal.rb, to corresponding plugin directory. + ex. vendor/plugins/paypal/lib + + Move to vendor/.../lib/ directory + + 2) Create the default.rb, defaultDriver.rb and + PayPalAPIInterfaceServiceClient.rb. + Some are included but they may refer to older versions of the PayPal api. + + Use wsdl4r (from soap4r) to create the above files. Execute the following + command. + ./bin/wsdl2ruby.rb --wsdl http://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl --type client --force + + Place the created files in the vendor/.../paypal/lib/ directory + + 4) Obtain the api chain cert from PayPal. Save this to: + lib/api_cert_chain.crt + This file is obtainable through their SDK downloads at http://developer.paypal.com. + + 5) Obtain a crt/key pair for your sandbox account and save to: + sandbox_api.crt + sandbox_api.key + + 6) Obtain a crt/key pair for your live account and save to: + live_api.crt + live_api.key + + 7) Edit paypal/lib/paypal.rb. Replace 'SANDBOX_ACCOUNT_NAME' with the account + name that was created for your sandbox account api access. + + 8) Edit paypal/lib/paypal.rb. Replace 'SANDBOX_ACCOUNT_PASS' with the account + password for the sandbox api. + + 9) Repeat the for live account and password: + change 'LIVE_ACCOUNT_NAME' and 'LIVE_ACCOUNT_PASSWD' + + + 10) Edit paypal/test/paypal_test.rb. + a) Replace the variables in good_params with known good parameters + i)Credit card numbers can be "genereated" trough paypal by using the + sandbox to add credit cards to your test account. + (see http://paypaltech.com/Patrick/testAcctOpt/) for more info + + b) Replace the variables in bad_params with known invalid values. + + 11) From within /vendor/plugins/paypal, run: + rake + this will do dummy operations with the sandbox account + You should see the following output: + +/usr/bin/ruby -Ilib:lib "/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader.rb" "test/paypal_test.rb" +Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader +Started +....... +Finished in 10.361749 seconds. + +7 tests, 7 assertions, 0 failures, 0 errors + + 11) Success! If you do have had troubles along the way, see the troubleshooting section below. + + + +Usage: +----------------- + Each function in the Paypal suite have two ways of calling it one for + test or dummy charges. And one for live acions. + testing,sandbox: Paypal.directcharge(params) + live : Paypal.directcharge(params,true) + +Function: directcharge + This function performs a doDirectCharge action. Transfering funds from the parameter's account to your paypal merchant account. + + The return value of this function is the response object from paypal. + For instance: + res = Paypal.directcharge(params) + res.ack == Success // true if action was succesful + res.ack == Failure // true if action failed + The directcharge method takes a hash argument (params). + The method expects the hash to be in the form of: + :firstName => "", + :lastName => "", + :ip => " "", //This value has a maximum of 10,000.00 + :itemName => " "Billing", + :street1 => "", + :street2 => "", + :cityName => "", + :postalCode => "", + :stateOrProvince => "", + :country => "", + :creditCardType => "Visa or MasterCard or Amex or Discover", + :creditCardNumber => " " 1 , //Expiration month in numerical form not string + :expYear => 2006 ///Expiration year in numerical form + +Function: directauth + This function performs a directcharge in authorization mode. This means no actual funds are + transfered upon comletetion of this action. + + + The return value of this function is the response object from paypal. + For instance: + res = Paypal.directauth(params) + res.ack == Success // true if action was succesful + res.ack == Failure // true if action failed + + The transactionID is needed if you intend to capture the funds authroized by this function. + The method expects the param hash to be in the form of : + :firstName => "", + :lastName => "", + :ip => " "", //This value has a maximum of 10,000.00 + :itemName => " "Billing", + :street1 => "", + :street2 => "", + :cityName => "", + :postalCode => "", + :stateOrProvince => "", + :country => "", + :creditCardType => "Visa or MasterCard or Amex or Discover", + :creditCardNumber => " " 1 , //Expiration month in numerical form not string + :expYear => 2006 ///Expiration year in numerical form + + + +Function: capture + + This funcion performs a doCapture. It captures or collects the charge from a previously authorized + transaction. This transaction is referenced by the transactionID returned from directauth. + + + The return value of this function is the response object from paypal. + For instance: + res = Paypal.capture(params) + res.ack == Success // true if action was succesful + res.ack == Failure // true if action failed + + The parameter hash for this function is to be in the following form: + :transactionID => "" + :amount = > "" //should be less than or equal to + //auth's amount +Function: void + + This funcion performs a DoVoid. It voids the charge from a previously authorized + transaction. This transaction is referenced by the transactionID value of the return object from directauth. + + + The return value of this function is the response object from paypal. + For instance: + res = Paypal.void(params) + res.ack == Success // true if action was succesful + res.ack == Failure // true if action failed + + The parameter hash for this function is to be in the following form: + :transactionID => "" + + +You can run test charges through the console and get an idea on how to use the class by: +./script/console +paypal.directcharge( { + :firstName => "Justin", + --- SNIP --- + :expYear => 2008 } ) + +You should see a bunch of data relating to the response object from paypal. +For more information on what specific data is given/useful please refer to the PayPal developer api. + +If things go well and the charge should show in your sandbox. To run the charge live, just add a second parameter of true. + +paypal.directcharge( {...}, true ) + +If your certificates are all setup correctly, you'll see a credit on your live paypal account. + +Please direct any questions or comments to: aprice@elctech.com + + + +Troubleshooting +----------------------- +Put the command line to run the test in debug mode. +/usr/bin/ruby -d -Ilib:lib "/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb" "test/paypal_test.rb" + +This will give you lots of information. Look for errors in the XML response. Often passwords with '<' or other non-XML unencoded friendly characters will cause ruby to fail due to the Web Service support being incomplete at this time. + + +If you are recieving a "NoMethodError: for each..." when trying to perform a capture. Your soap version may need to be updated. +If this does not work please refer to the following pages which concern this bug in soap4r. + bug link : http://dev.ctor.org/soap4r/ticket/184 + code fix: http://dev.ctor.org/soap4r/changeset/1674 + +Upgrading Soap4r- + Please see the following site for more information on upgrading soap4r +http://www.pranavbihari.com/articles/2005/12/02/testing-paypal-web-services-with-ruby-soap4r diff --git a/vendor/plugins/paypal/Rakefile b/vendor/plugins/paypal/Rakefile new file mode 100644 index 0000000..001cfd8 --- /dev/null +++ b/vendor/plugins/paypal/Rakefile @@ -0,0 +1,22 @@ +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' + +desc 'Default: run unit tests.' +task :default => :test + +desc 'Test the paypal plugin.' +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.pattern = 'test/**/*_test.rb' + t.verbose = true +end + +desc 'Generate documentation for the paypal plugin.' +Rake::RDocTask.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'PayPal' + rdoc.options << '--line-numbers --inline-source' + rdoc.rdoc_files.include('README') + rdoc.rdoc_files.include('lib/**/*.rb') +end diff --git a/vendor/plugins/paypal/init.rb b/vendor/plugins/paypal/init.rb new file mode 100644 index 0000000..b14f145 --- /dev/null +++ b/vendor/plugins/paypal/init.rb @@ -0,0 +1 @@ +require 'paypal' diff --git a/vendor/plugins/paypal/lib/PayPalAPIInterfaceServiceClient.rb b/vendor/plugins/paypal/lib/PayPalAPIInterfaceServiceClient.rb new file mode 100644 index 0000000..16fafec --- /dev/null +++ b/vendor/plugins/paypal/lib/PayPalAPIInterfaceServiceClient.rb @@ -0,0 +1,221 @@ +#!/usr/bin/env ruby +require 'defaultDriver.rb' + +endpoint_url = ARGV.shift +obj = PayPalAPIInterface.new(endpoint_url) + +# run ruby with -d to see SOAP wiredumps. +obj.wiredump_dev = STDERR if $DEBUG + +# SYNOPSIS +# RefundTransaction(refundTransactionRequest) +# +# ARGS +# refundTransactionRequest RefundTransactionReq - {urn:ebay:api:PayPalAPI}RefundTransactionReq +# +# RETURNS +# refundTransactionResponse RefundTransactionResponse - {urn:ebay:api:PayPalAPI}RefundTransactionResponse +# +refundTransactionRequest = nil +puts obj.refundTransaction(refundTransactionRequest) + +# SYNOPSIS +# GetTransactionDetails(getTransactionDetailsRequest) +# +# ARGS +# getTransactionDetailsRequest GetTransactionDetailsReq - {urn:ebay:api:PayPalAPI}GetTransactionDetailsReq +# +# RETURNS +# getTransactionDetailsResponse GetTransactionDetailsResponse - {urn:ebay:api:PayPalAPI}GetTransactionDetailsResponse +# +getTransactionDetailsRequest = nil +puts obj.getTransactionDetails(getTransactionDetailsRequest) + +# SYNOPSIS +# BillUser(billUserRequest) +# +# ARGS +# billUserRequest BillUserReq - {urn:ebay:api:PayPalAPI}BillUserReq +# +# RETURNS +# billUserResponse BillUserResponse - {urn:ebay:api:PayPalAPI}BillUserResponse +# +billUserRequest = nil +puts obj.billUser(billUserRequest) + +# SYNOPSIS +# TransactionSearch(transactionSearchRequest) +# +# ARGS +# transactionSearchRequest TransactionSearchReq - {urn:ebay:api:PayPalAPI}TransactionSearchReq +# +# RETURNS +# transactionSearchResponse TransactionSearchResponse - {urn:ebay:api:PayPalAPI}TransactionSearchResponse +# +transactionSearchRequest = nil +puts obj.transactionSearch(transactionSearchRequest) + +# SYNOPSIS +# MassPay(massPayRequest) +# +# ARGS +# massPayRequest MassPayReq - {urn:ebay:api:PayPalAPI}MassPayReq +# +# RETURNS +# massPayResponse MassPayResponse - {urn:ebay:api:PayPalAPI}MassPayResponse +# +massPayRequest = nil +puts obj.massPay(massPayRequest) + +# SYNOPSIS +# BillAgreementUpdate(billAgreementUpdateRequest) +# +# ARGS +# billAgreementUpdateRequest BillAgreementUpdateReq - {urn:ebay:api:PayPalAPI}BillAgreementUpdateReq +# +# RETURNS +# body BAUpdateResponse - {urn:ebay:api:PayPalAPI}BAUpdateResponse +# +billAgreementUpdateRequest = nil +puts obj.billAgreementUpdate(billAgreementUpdateRequest) + +# SYNOPSIS +# AddressVerify(addressVerifyRequest) +# +# ARGS +# addressVerifyRequest AddressVerifyReq - {urn:ebay:api:PayPalAPI}AddressVerifyReq +# +# RETURNS +# addressVerifyResponse AddressVerifyResponse - {urn:ebay:api:PayPalAPI}AddressVerifyResponse +# +addressVerifyRequest = nil +puts obj.addressVerify(addressVerifyRequest) + +# SYNOPSIS +# EnterBoarding(enterBoardingRequest) +# +# ARGS +# enterBoardingRequest EnterBoardingReq - {urn:ebay:api:PayPalAPI}EnterBoardingReq +# +# RETURNS +# enterBoardingResponse EnterBoardingResponse - {urn:ebay:api:PayPalAPI}EnterBoardingResponse +# +enterBoardingRequest = nil +puts obj.enterBoarding(enterBoardingRequest) + +# SYNOPSIS +# GetBoardingDetails(getBoardingDetailsRequest) +# +# ARGS +# getBoardingDetailsRequest GetBoardingDetailsReq - {urn:ebay:api:PayPalAPI}GetBoardingDetailsReq +# +# RETURNS +# getBoardingDetailsResponse GetBoardingDetailsResponse - {urn:ebay:api:PayPalAPI}GetBoardingDetailsResponse +# +getBoardingDetailsRequest = nil +puts obj.getBoardingDetails(getBoardingDetailsRequest) + + +endpoint_url = ARGV.shift +obj = PayPalAPIAAInterface.new(endpoint_url) + +# run ruby with -d to see SOAP wiredumps. +obj.wiredump_dev = STDERR if $DEBUG + +# SYNOPSIS +# DoExpressCheckoutPayment(doExpressCheckoutPaymentRequest) +# +# ARGS +# doExpressCheckoutPaymentRequest DoExpressCheckoutPaymentReq - {urn:ebay:api:PayPalAPI}DoExpressCheckoutPaymentReq +# +# RETURNS +# doExpressCheckoutPaymentResponse DoExpressCheckoutPaymentResponse - {urn:ebay:api:PayPalAPI}DoExpressCheckoutPaymentResponse +# +doExpressCheckoutPaymentRequest = nil +puts obj.doExpressCheckoutPayment(doExpressCheckoutPaymentRequest) + +# SYNOPSIS +# SetExpressCheckout(setExpressCheckoutRequest) +# +# ARGS +# setExpressCheckoutRequest SetExpressCheckoutReq - {urn:ebay:api:PayPalAPI}SetExpressCheckoutReq +# +# RETURNS +# setExpressCheckoutResponse SetExpressCheckoutResponse - {urn:ebay:api:PayPalAPI}SetExpressCheckoutResponse +# +setExpressCheckoutRequest = nil +puts obj.setExpressCheckout(setExpressCheckoutRequest) + +# SYNOPSIS +# GetExpressCheckoutDetails(getExpressCheckoutDetailsRequest) +# +# ARGS +# getExpressCheckoutDetailsRequest GetExpressCheckoutDetailsReq - {urn:ebay:api:PayPalAPI}GetExpressCheckoutDetailsReq +# +# RETURNS +# getExpressCheckoutDetailsResponse GetExpressCheckoutDetailsResponse - {urn:ebay:api:PayPalAPI}GetExpressCheckoutDetailsResponse +# +getExpressCheckoutDetailsRequest = nil +puts obj.getExpressCheckoutDetails(getExpressCheckoutDetailsRequest) + +# SYNOPSIS +# DoDirectPayment(doDirectPaymentRequest) +# +# ARGS +# doDirectPaymentRequest DoDirectPaymentReq - {urn:ebay:api:PayPalAPI}DoDirectPaymentReq +# +# RETURNS +# doDirectPaymentResponse DoDirectPaymentResponse - {urn:ebay:api:PayPalAPI}DoDirectPaymentResponse +# +doDirectPaymentRequest = nil +puts obj.doDirectPayment(doDirectPaymentRequest) + +# SYNOPSIS +# DoCapture(doCaptureRequest) +# +# ARGS +# doCaptureRequest DoCaptureReq - {urn:ebay:api:PayPalAPI}DoCaptureReq +# +# RETURNS +# doCaptureResponse DoCaptureResponse - {urn:ebay:api:PayPalAPI}DoCaptureResponse +# +doCaptureRequest = nil +puts obj.doCapture(doCaptureRequest) + +# SYNOPSIS +# DoReauthorization(doReauthorizationRequest) +# +# ARGS +# doReauthorizationRequest DoReauthorizationReq - {urn:ebay:api:PayPalAPI}DoReauthorizationReq +# +# RETURNS +# doReauthorizationResponse DoReauthorizationResponse - {urn:ebay:api:PayPalAPI}DoReauthorizationResponse +# +doReauthorizationRequest = nil +puts obj.doReauthorization(doReauthorizationRequest) + +# SYNOPSIS +# DoVoid(doVoidRequest) +# +# ARGS +# doVoidRequest DoVoidReq - {urn:ebay:api:PayPalAPI}DoVoidReq +# +# RETURNS +# doVoidResponse DoVoidResponse - {urn:ebay:api:PayPalAPI}DoVoidResponse +# +doVoidRequest = nil +puts obj.doVoid(doVoidRequest) + +# SYNOPSIS +# DoAuthorization(doAuthorizationRequest) +# +# ARGS +# doAuthorizationRequest DoAuthorizationReq - {urn:ebay:api:PayPalAPI}DoAuthorizationReq +# +# RETURNS +# doAuthorizationResponse DoAuthorizationResponse - {urn:ebay:api:PayPalAPI}DoAuthorizationResponse +# +doAuthorizationRequest = nil +puts obj.doAuthorization(doAuthorizationRequest) + + diff --git a/vendor/plugins/paypal/lib/default.rb b/vendor/plugins/paypal/lib/default.rb new file mode 100644 index 0000000..14933c9 --- /dev/null +++ b/vendor/plugins/paypal/lib/default.rb @@ -0,0 +1,5976 @@ +require 'xsd/qname' + +# {urn:ebay:api:PayPalAPI}RefundTransactionReq +class RefundTransactionReq + @@schema_type = "RefundTransactionReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["refundTransactionRequest", ["RefundTransactionRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "RefundTransactionRequest")]] + ] + + attr_accessor :refundTransactionRequest + + def initialize(refundTransactionRequest = nil) + @refundTransactionRequest = refundTransactionRequest + end +end + +# {urn:ebay:api:PayPalAPI}GetTransactionDetailsReq +class GetTransactionDetailsReq + @@schema_type = "GetTransactionDetailsReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["getTransactionDetailsRequest", ["GetTransactionDetailsRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "GetTransactionDetailsRequest")]] + ] + + attr_accessor :getTransactionDetailsRequest + + def initialize(getTransactionDetailsRequest = nil) + @getTransactionDetailsRequest = getTransactionDetailsRequest + end +end + +# {urn:ebay:api:PayPalAPI}BillUserReq +class BillUserReq + @@schema_type = "BillUserReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["billUserRequest", ["BillUserRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "BillUserRequest")]] + ] + + attr_accessor :billUserRequest + + def initialize(billUserRequest = nil) + @billUserRequest = billUserRequest + end +end + +# {urn:ebay:api:PayPalAPI}TransactionSearchReq +class TransactionSearchReq + @@schema_type = "TransactionSearchReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["transactionSearchRequest", ["TransactionSearchRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionSearchRequest")]] + ] + + attr_accessor :transactionSearchRequest + + def initialize(transactionSearchRequest = nil) + @transactionSearchRequest = transactionSearchRequest + end +end + +# {urn:ebay:api:PayPalAPI}MassPayReq +class MassPayReq + @@schema_type = "MassPayReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["massPayRequest", ["MassPayRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "MassPayRequest")]] + ] + + attr_accessor :massPayRequest + + def initialize(massPayRequest = nil) + @massPayRequest = massPayRequest + end +end + +# {urn:ebay:api:PayPalAPI}BillAgreementUpdateReq +class BillAgreementUpdateReq + @@schema_type = "BillAgreementUpdateReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["bAUpdateRequest", ["BAUpdateRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "BAUpdateRequest")]] + ] + + attr_accessor :bAUpdateRequest + + def initialize(bAUpdateRequest = nil) + @bAUpdateRequest = bAUpdateRequest + end +end + +# {urn:ebay:api:PayPalAPI}AddressVerifyReq +class AddressVerifyReq + @@schema_type = "AddressVerifyReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["addressVerifyRequest", ["AddressVerifyRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "AddressVerifyRequest")]] + ] + + attr_accessor :addressVerifyRequest + + def initialize(addressVerifyRequest = nil) + @addressVerifyRequest = addressVerifyRequest + end +end + +# {urn:ebay:api:PayPalAPI}EnterBoardingReq +class EnterBoardingReq + @@schema_type = "EnterBoardingReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["enterBoardingRequest", ["EnterBoardingRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "EnterBoardingRequest")]] + ] + + attr_accessor :enterBoardingRequest + + def initialize(enterBoardingRequest = nil) + @enterBoardingRequest = enterBoardingRequest + end +end + +# {urn:ebay:api:PayPalAPI}GetBoardingDetailsReq +class GetBoardingDetailsReq + @@schema_type = "GetBoardingDetailsReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["getBoardingDetailsRequest", ["GetBoardingDetailsRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "GetBoardingDetailsRequest")]] + ] + + attr_accessor :getBoardingDetailsRequest + + def initialize(getBoardingDetailsRequest = nil) + @getBoardingDetailsRequest = getBoardingDetailsRequest + end +end + +# {urn:ebay:api:PayPalAPI}SetExpressCheckoutReq +class SetExpressCheckoutReq + @@schema_type = "SetExpressCheckoutReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["setExpressCheckoutRequest", ["SetExpressCheckoutRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "SetExpressCheckoutRequest")]] + ] + + attr_accessor :setExpressCheckoutRequest + + def initialize(setExpressCheckoutRequest = nil) + @setExpressCheckoutRequest = setExpressCheckoutRequest + end +end + +# {urn:ebay:api:PayPalAPI}GetExpressCheckoutDetailsReq +class GetExpressCheckoutDetailsReq + @@schema_type = "GetExpressCheckoutDetailsReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["getExpressCheckoutDetailsRequest", ["GetExpressCheckoutDetailsRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "GetExpressCheckoutDetailsRequest")]] + ] + + attr_accessor :getExpressCheckoutDetailsRequest + + def initialize(getExpressCheckoutDetailsRequest = nil) + @getExpressCheckoutDetailsRequest = getExpressCheckoutDetailsRequest + end +end + +# {urn:ebay:api:PayPalAPI}DoExpressCheckoutPaymentReq +class DoExpressCheckoutPaymentReq + @@schema_type = "DoExpressCheckoutPaymentReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["doExpressCheckoutPaymentRequest", ["DoExpressCheckoutPaymentRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "DoExpressCheckoutPaymentRequest")]] + ] + + attr_accessor :doExpressCheckoutPaymentRequest + + def initialize(doExpressCheckoutPaymentRequest = nil) + @doExpressCheckoutPaymentRequest = doExpressCheckoutPaymentRequest + end +end + +# {urn:ebay:api:PayPalAPI}DoDirectPaymentReq +class DoDirectPaymentReq + @@schema_type = "DoDirectPaymentReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["doDirectPaymentRequest", ["DoDirectPaymentRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "DoDirectPaymentRequest")]] + ] + + attr_accessor :doDirectPaymentRequest + + def initialize(doDirectPaymentRequest = nil) + @doDirectPaymentRequest = doDirectPaymentRequest + end +end + +# {urn:ebay:api:PayPalAPI}DoCaptureReq +class DoCaptureReq + @@schema_type = "DoCaptureReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["doCaptureRequest", ["DoCaptureRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "DoCaptureRequest")]] + ] + + attr_accessor :doCaptureRequest + + def initialize(doCaptureRequest = nil) + @doCaptureRequest = doCaptureRequest + end +end + +# {urn:ebay:api:PayPalAPI}DoReauthorizationReq +class DoReauthorizationReq + @@schema_type = "DoReauthorizationReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["doReauthorizationRequest", ["DoReauthorizationRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "DoReauthorizationRequest")]] + ] + + attr_accessor :doReauthorizationRequest + + def initialize(doReauthorizationRequest = nil) + @doReauthorizationRequest = doReauthorizationRequest + end +end + +# {urn:ebay:api:PayPalAPI}DoVoidReq +class DoVoidReq + @@schema_type = "DoVoidReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["doVoidRequest", ["DoVoidRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "DoVoidRequest")]] + ] + + attr_accessor :doVoidRequest + + def initialize(doVoidRequest = nil) + @doVoidRequest = doVoidRequest + end +end + +# {urn:ebay:api:PayPalAPI}DoAuthorizationReq +class DoAuthorizationReq + @@schema_type = "DoAuthorizationReq" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_qualified = "true" + @@schema_element = [ + ["doAuthorizationRequest", ["DoAuthorizationRequestType", XSD::QName.new("urn:ebay:api:PayPalAPI", "DoAuthorizationRequest")]] + ] + + attr_accessor :doAuthorizationRequest + + def initialize(doAuthorizationRequest = nil) + @doAuthorizationRequest = doAuthorizationRequest + end +end + +# {urn:ebay:api:PayPalAPI}RefundTransactionRequestType +class RefundTransactionRequestType + @@schema_type = "RefundTransactionRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionID")]], + ["refundType", ["RefundPurposeTypeCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "RefundType")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]], + ["memo", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Memo")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :transactionID + attr_accessor :refundType + attr_accessor :amount + attr_accessor :memo + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, transactionID = nil, refundType = nil, amount = nil, memo = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @transactionID = transactionID + @refundType = refundType + @amount = amount + @memo = memo + end +end + +# {urn:ebay:api:PayPalAPI}RefundTransactionResponseType +class RefundTransactionResponseType + @@schema_type = "RefundTransactionResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["refundTransactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "RefundTransactionID")]], + ["netRefundAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "NetRefundAmount")]], + ["feeRefundAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "FeeRefundAmount")]], + ["grossRefundAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "GrossRefundAmount")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :refundTransactionID + attr_accessor :netRefundAmount + attr_accessor :feeRefundAmount + attr_accessor :grossRefundAmount + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, refundTransactionID = nil, netRefundAmount = nil, feeRefundAmount = nil, grossRefundAmount = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @refundTransactionID = refundTransactionID + @netRefundAmount = netRefundAmount + @feeRefundAmount = feeRefundAmount + @grossRefundAmount = grossRefundAmount + end +end + +# {urn:ebay:api:PayPalAPI}GetTransactionDetailsRequestType +class GetTransactionDetailsRequestType + @@schema_type = "GetTransactionDetailsRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionID")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :transactionID + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, transactionID = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @transactionID = transactionID + end +end + +# {urn:ebay:api:PayPalAPI}GetTransactionDetailsResponseType +class GetTransactionDetailsResponseType + @@schema_type = "GetTransactionDetailsResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["paymentTransactionDetails", ["PaymentTransactionType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentTransactionDetails")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :paymentTransactionDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, paymentTransactionDetails = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @paymentTransactionDetails = paymentTransactionDetails + end +end + +# {urn:ebay:api:PayPalAPI}BillUserRequestType +class BillUserRequestType + @@schema_type = "BillUserRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["merchantPullPaymentDetails", ["MerchantPullPaymentType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MerchantPullPaymentDetails")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :merchantPullPaymentDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, merchantPullPaymentDetails = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @merchantPullPaymentDetails = merchantPullPaymentDetails + end +end + +# {urn:ebay:api:PayPalAPI}BillUserResponseType +class BillUserResponseType + @@schema_type = "BillUserResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["billUserResponseDetails", ["MerchantPullPaymentResponseType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BillUserResponseDetails")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :billUserResponseDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, billUserResponseDetails = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @billUserResponseDetails = billUserResponseDetails + end +end + +# {urn:ebay:api:PayPalAPI}TransactionSearchRequestType +class TransactionSearchRequestType + @@schema_type = "TransactionSearchRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["startDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:api:PayPalAPI", "StartDate")]], + ["endDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:api:PayPalAPI", "EndDate")]], + ["payer", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Payer")]], + ["receiver", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Receiver")]], + ["receiptID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "ReceiptID")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionID")]], + ["payerName", ["PersonNameType", XSD::QName.new("urn:ebay:api:PayPalAPI", "PayerName")]], + ["auctionItemNumber", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "AuctionItemNumber")]], + ["invoiceID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "InvoiceID")]], + ["transactionClass", ["PaymentTransactionClassCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionClass")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]], + ["currencyCode", ["CurrencyCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "CurrencyCode")]], + ["status", ["PaymentTransactionStatusCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Status")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :startDate + attr_accessor :endDate + attr_accessor :payer + attr_accessor :receiver + attr_accessor :receiptID + attr_accessor :transactionID + attr_accessor :payerName + attr_accessor :auctionItemNumber + attr_accessor :invoiceID + attr_accessor :transactionClass + attr_accessor :amount + attr_accessor :currencyCode + attr_accessor :status + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, startDate = nil, endDate = nil, payer = nil, receiver = nil, receiptID = nil, transactionID = nil, payerName = nil, auctionItemNumber = nil, invoiceID = nil, transactionClass = nil, amount = nil, currencyCode = nil, status = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @startDate = startDate + @endDate = endDate + @payer = payer + @receiver = receiver + @receiptID = receiptID + @transactionID = transactionID + @payerName = payerName + @auctionItemNumber = auctionItemNumber + @invoiceID = invoiceID + @transactionClass = transactionClass + @amount = amount + @currencyCode = currencyCode + @status = status + end +end + +# {urn:ebay:api:PayPalAPI}TransactionSearchResponseType +class TransactionSearchResponseType + @@schema_type = "TransactionSearchResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["paymentTransactions", ["PaymentTransactionSearchResultType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentTransactions")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :paymentTransactions + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, paymentTransactions = []) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @paymentTransactions = paymentTransactions + end +end + +# {urn:ebay:api:PayPalAPI}MassPayRequestType +class MassPayRequestType + @@schema_type = "MassPayRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["emailSubject", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "EmailSubject")]], + ["receiverType", ["ReceiverInfoCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "ReceiverType")]], + ["massPayItem", ["MassPayRequestItemType[]", XSD::QName.new("urn:ebay:api:PayPalAPI", "MassPayItem")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :emailSubject + attr_accessor :receiverType + attr_accessor :massPayItem + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, emailSubject = nil, receiverType = nil, massPayItem = []) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @emailSubject = emailSubject + @receiverType = receiverType + @massPayItem = massPayItem + end +end + +# {urn:ebay:api:PayPalAPI}MassPayResponseType +class MassPayResponseType + @@schema_type = "MassPayResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + end +end + +# {urn:ebay:api:PayPalAPI}MassPayRequestItemType +class MassPayRequestItemType + @@schema_type = "MassPayRequestItemType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["receiverEmail", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "ReceiverEmail")]], + ["receiverID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "ReceiverID")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]], + ["uniqueId", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "UniqueId")]], + ["note", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Note")]] + ] + + attr_accessor :receiverEmail + attr_accessor :receiverID + attr_accessor :amount + attr_accessor :uniqueId + attr_accessor :note + + def initialize(receiverEmail = nil, receiverID = nil, amount = nil, uniqueId = nil, note = nil) + @receiverEmail = receiverEmail + @receiverID = receiverID + @amount = amount + @uniqueId = uniqueId + @note = note + end +end + +# {urn:ebay:api:PayPalAPI}BAUpdateRequestType +class BAUpdateRequestType + @@schema_type = "BAUpdateRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["mpID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "MpID")]], + ["custom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Custom")]], + ["desc", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Desc")]], + ["mpStatus", ["MerchantPullStatusCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "MpStatus")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :mpID + attr_accessor :custom + attr_accessor :desc + attr_accessor :mpStatus + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, mpID = nil, custom = nil, desc = nil, mpStatus = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @mpID = mpID + @custom = custom + @desc = desc + @mpStatus = mpStatus + end +end + +# {urn:ebay:api:PayPalAPI}BAUpdateResponseType +class BAUpdateResponseType + @@schema_type = "BAUpdateResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["bAUpdateResponseDetails", ["BAUpdateResponseDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BAUpdateResponseDetails")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :bAUpdateResponseDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, bAUpdateResponseDetails = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @bAUpdateResponseDetails = bAUpdateResponseDetails + end +end + +# {urn:ebay:api:PayPalAPI}AddressVerifyRequestType +class AddressVerifyRequestType + @@schema_type = "AddressVerifyRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["email", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Email")]], + ["street", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Street")]], + ["zip", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Zip")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :email + attr_accessor :street + attr_accessor :zip + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, email = nil, street = nil, zip = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @email = email + @street = street + @zip = zip + end +end + +# {urn:ebay:api:PayPalAPI}AddressVerifyResponseType +class AddressVerifyResponseType + @@schema_type = "AddressVerifyResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["confirmationCode", ["AddressStatusCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "ConfirmationCode")]], + ["streetMatch", ["MatchStatusCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "StreetMatch")]], + ["zipMatch", ["MatchStatusCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "ZipMatch")]], + ["countryCode", ["CountryCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "CountryCode")]], + ["payPalToken", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "PayPalToken")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :confirmationCode + attr_accessor :streetMatch + attr_accessor :zipMatch + attr_accessor :countryCode + attr_accessor :payPalToken + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, confirmationCode = nil, streetMatch = nil, zipMatch = nil, countryCode = nil, payPalToken = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @confirmationCode = confirmationCode + @streetMatch = streetMatch + @zipMatch = zipMatch + @countryCode = countryCode + @payPalToken = payPalToken + end +end + +# {urn:ebay:api:PayPalAPI}EnterBoardingRequestType +class EnterBoardingRequestType + @@schema_type = "EnterBoardingRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["enterBoardingRequestDetails", ["EnterBoardingRequestDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "EnterBoardingRequestDetails")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :enterBoardingRequestDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, enterBoardingRequestDetails = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @enterBoardingRequestDetails = enterBoardingRequestDetails + end +end + +# {urn:ebay:api:PayPalAPI}EnterBoardingResponseType +class EnterBoardingResponseType + @@schema_type = "EnterBoardingResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Token")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :token + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, token = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @token = token + end +end + +# {urn:ebay:api:PayPalAPI}GetBoardingDetailsRequestType +class GetBoardingDetailsRequestType + @@schema_type = "GetBoardingDetailsRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Token")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :token + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, token = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @token = token + end +end + +# {urn:ebay:api:PayPalAPI}GetBoardingDetailsResponseType +class GetBoardingDetailsResponseType + @@schema_type = "GetBoardingDetailsResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["getBoardingDetailsResponseDetails", ["GetBoardingDetailsResponseDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GetBoardingDetailsResponseDetails")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :getBoardingDetailsResponseDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, getBoardingDetailsResponseDetails = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @getBoardingDetailsResponseDetails = getBoardingDetailsResponseDetails + end +end + +# {urn:ebay:api:PayPalAPI}SetExpressCheckoutRequestType +class SetExpressCheckoutRequestType + @@schema_type = "SetExpressCheckoutRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["setExpressCheckoutRequestDetails", ["SetExpressCheckoutRequestDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SetExpressCheckoutRequestDetails")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :setExpressCheckoutRequestDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, setExpressCheckoutRequestDetails = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @setExpressCheckoutRequestDetails = setExpressCheckoutRequestDetails + end +end + +# {urn:ebay:api:PayPalAPI}SetExpressCheckoutResponseType +class SetExpressCheckoutResponseType + @@schema_type = "SetExpressCheckoutResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Token")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :token + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, token = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @token = token + end +end + +# {urn:ebay:api:PayPalAPI}GetExpressCheckoutDetailsRequestType +class GetExpressCheckoutDetailsRequestType + @@schema_type = "GetExpressCheckoutDetailsRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Token")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :token + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, token = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @token = token + end +end + +# {urn:ebay:api:PayPalAPI}GetExpressCheckoutDetailsResponseType +class GetExpressCheckoutDetailsResponseType + @@schema_type = "GetExpressCheckoutDetailsResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["getExpressCheckoutDetailsResponseDetails", ["GetExpressCheckoutDetailsResponseDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GetExpressCheckoutDetailsResponseDetails")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :getExpressCheckoutDetailsResponseDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, getExpressCheckoutDetailsResponseDetails = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @getExpressCheckoutDetailsResponseDetails = getExpressCheckoutDetailsResponseDetails + end +end + +# {urn:ebay:api:PayPalAPI}DoExpressCheckoutPaymentRequestType +class DoExpressCheckoutPaymentRequestType + @@schema_type = "DoExpressCheckoutPaymentRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["doExpressCheckoutPaymentRequestDetails", ["DoExpressCheckoutPaymentRequestDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DoExpressCheckoutPaymentRequestDetails")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :doExpressCheckoutPaymentRequestDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, doExpressCheckoutPaymentRequestDetails = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @doExpressCheckoutPaymentRequestDetails = doExpressCheckoutPaymentRequestDetails + end +end + +# {urn:ebay:api:PayPalAPI}DoExpressCheckoutPaymentResponseType +class DoExpressCheckoutPaymentResponseType + @@schema_type = "DoExpressCheckoutPaymentResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["doExpressCheckoutPaymentResponseDetails", ["DoExpressCheckoutPaymentResponseDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DoExpressCheckoutPaymentResponseDetails")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :doExpressCheckoutPaymentResponseDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, doExpressCheckoutPaymentResponseDetails = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @doExpressCheckoutPaymentResponseDetails = doExpressCheckoutPaymentResponseDetails + end +end + +# {urn:ebay:api:PayPalAPI}DoDirectPaymentRequestType +class DoDirectPaymentRequestType + @@schema_type = "DoDirectPaymentRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["doDirectPaymentRequestDetails", ["DoDirectPaymentRequestDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DoDirectPaymentRequestDetails")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :doDirectPaymentRequestDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, doDirectPaymentRequestDetails = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @doDirectPaymentRequestDetails = doDirectPaymentRequestDetails + end +end + +# {urn:ebay:api:PayPalAPI}DoDirectPaymentResponseType +class DoDirectPaymentResponseType + @@schema_type = "DoDirectPaymentResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]], + ["aVSCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "AVSCode")]], + ["cVV2Code", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "CVV2Code")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionID")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :amount + attr_accessor :aVSCode + attr_accessor :cVV2Code + attr_accessor :transactionID + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, amount = nil, aVSCode = nil, cVV2Code = nil, transactionID = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @amount = amount + @aVSCode = aVSCode + @cVV2Code = cVV2Code + @transactionID = transactionID + end +end + +# {urn:ebay:api:PayPalAPI}DoCaptureRequestType +class DoCaptureRequestType + @@schema_type = "DoCaptureRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["authorizationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "AuthorizationID")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]], + ["completeType", ["CompleteCodeType", XSD::QName.new("urn:ebay:api:PayPalAPI", "CompleteType")]], + ["note", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Note")]], + ["invoiceID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "InvoiceID")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :authorizationID + attr_accessor :amount + attr_accessor :completeType + attr_accessor :note + attr_accessor :invoiceID + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, authorizationID = nil, amount = nil, completeType = nil, note = nil, invoiceID = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @authorizationID = authorizationID + @amount = amount + @completeType = completeType + @note = note + @invoiceID = invoiceID + end +end + +# {urn:ebay:api:PayPalAPI}DoCaptureResponseType +class DoCaptureResponseType + @@schema_type = "DoCaptureResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["doCaptureResponseDetails", ["DoCaptureResponseDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DoCaptureResponseDetails")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :doCaptureResponseDetails + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, doCaptureResponseDetails = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @doCaptureResponseDetails = doCaptureResponseDetails + end +end + +# {urn:ebay:api:PayPalAPI}DoReauthorizationRequestType +class DoReauthorizationRequestType + @@schema_type = "DoReauthorizationRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["authorizationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "AuthorizationID")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :authorizationID + attr_accessor :amount + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, authorizationID = nil, amount = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @authorizationID = authorizationID + @amount = amount + end +end + +# {urn:ebay:api:PayPalAPI}DoReauthorizationResponseType +class DoReauthorizationResponseType + @@schema_type = "DoReauthorizationResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["authorizationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "AuthorizationID")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :authorizationID + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, authorizationID = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @authorizationID = authorizationID + end +end + +# {urn:ebay:api:PayPalAPI}DoVoidRequestType +class DoVoidRequestType + @@schema_type = "DoVoidRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["authorizationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "AuthorizationID")]], + ["note", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "Note")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :authorizationID + attr_accessor :note + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, authorizationID = nil, note = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @authorizationID = authorizationID + @note = note + end +end + +# {urn:ebay:api:PayPalAPI}DoVoidResponseType +class DoVoidResponseType + @@schema_type = "DoVoidResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["authorizationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "AuthorizationID")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :authorizationID + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, authorizationID = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @authorizationID = authorizationID + end +end + +# {urn:ebay:api:PayPalAPI}DoAuthorizationRequestType +class DoAuthorizationRequestType + @@schema_type = "DoAuthorizationRequestType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionID")]], + ["transactionEntity", ["TransactionEntityType", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionEntity")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + attr_accessor :transactionID + attr_accessor :transactionEntity + attr_accessor :amount + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil, transactionID = nil, transactionEntity = nil, amount = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + @transactionID = transactionID + @transactionEntity = transactionEntity + @amount = amount + end +end + +# {urn:ebay:api:PayPalAPI}DoAuthorizationResponseType +class DoAuthorizationResponseType + @@schema_type = "DoAuthorizationResponseType" + @@schema_ns = "urn:ebay:api:PayPalAPI" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:api:PayPalAPI", "TransactionID")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:api:PayPalAPI", "Amount")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + attr_accessor :transactionID + attr_accessor :amount + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil, transactionID = nil, amount = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + @transactionID = transactionID + @amount = amount + end +end + +# {urn:ebay:apis:CoreComponentTypes}AmountType +# contains SOAP::SOAPDouble +class AmountType < ::String + @@schema_attribute = { + XSD::QName.new(nil, "currencyID") => nil + } + + def xmlattr_currencyID + (@__xmlattr ||= {})[XSD::QName.new(nil, "currencyID")] + end + + def xmlattr_currencyID=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "currencyID")] = value + end + + def initialize(*arg) + super + @__xmlattr = {} + end +end + +# {urn:ebay:apis:CoreComponentTypes}BasicAmountType +# contains SOAP::SOAPString +class BasicAmountType < ::String + @@schema_attribute = { + XSD::QName.new(nil, "currencyID") => nil + } + + def xmlattr_currencyID + (@__xmlattr ||= {})[XSD::QName.new(nil, "currencyID")] + end + + def xmlattr_currencyID=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "currencyID")] = value + end + + def initialize(*arg) + super + @__xmlattr = {} + end +end + +# {urn:ebay:apis:CoreComponentTypes}MeasureType +# contains SOAP::SOAPDouble +class MeasureType < ::String + @@schema_attribute = { + XSD::QName.new(nil, "unit") => nil + } + + def xmlattr_unit + (@__xmlattr ||= {})[XSD::QName.new(nil, "unit")] + end + + def xmlattr_unit=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "unit")] = value + end + + def initialize(*arg) + super + @__xmlattr = {} + end +end + +# {urn:ebay:apis:CoreComponentTypes}QuantityType +# contains SOAP::SOAPDouble +class QuantityType < ::String + @@schema_attribute = { + XSD::QName.new(nil, "unit") => nil + } + + def xmlattr_unit + (@__xmlattr ||= {})[XSD::QName.new(nil, "unit")] + end + + def xmlattr_unit=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "unit")] = value + end + + def initialize(*arg) + super + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}AccountEntryType +class AccountEntryType + @@schema_type = "AccountEntryType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["balance", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Balance")]], + ["credit", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Credit")]], + ["date", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Date")]], + ["debit", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Debit")]], + ["itemID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemID")]], + ["memo", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Memo")]], + ["refNumber", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RefNumber")]], + ["accountEntryDetailsType", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AccountEntryDetailsType")]] + ] + + attr_accessor :balance + attr_accessor :credit + attr_accessor :date + attr_accessor :debit + attr_accessor :itemID + attr_accessor :memo + attr_accessor :refNumber + attr_accessor :accountEntryDetailsType + + def initialize(balance = nil, credit = nil, date = nil, debit = nil, itemID = nil, memo = nil, refNumber = nil, accountEntryDetailsType = nil) + @balance = balance + @credit = credit + @date = date + @debit = debit + @itemID = itemID + @memo = memo + @refNumber = refNumber + @accountEntryDetailsType = accountEntryDetailsType + end +end + +# {urn:ebay:apis:eBLBaseComponents}AdditionalAccountType +class AdditionalAccountType + @@schema_type = "AdditionalAccountType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["balance", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Balance")]], + ["currency", ["CurrencyCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Currency")]], + ["accountCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AccountCode")]] + ] + + attr_accessor :balance + attr_accessor :currency + attr_accessor :accountCode + + def initialize(balance = nil, currency = nil, accountCode = nil) + @balance = balance + @currency = currency + @accountCode = accountCode + end +end + +# {urn:ebay:apis:eBLBaseComponents}PromotedItemType +class PromotedItemType + @@schema_type = "PromotedItemType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["itemID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemID")]], + ["pictureURL", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PictureURL")]], + ["position", "SOAP::SOAPInt"], + ["promotionPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PromotionPrice")]], + ["promotionPriceType", ["PromotionItemPriceTypeCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PromotionPriceType")]], + ["selectionType", ["PromotionItemSelectionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SelectionType")]], + ["title", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Title")]], + ["listingType", ["ListingTypeCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ListingType")]] + ] + + attr_accessor :itemID + attr_accessor :pictureURL + attr_accessor :position + attr_accessor :promotionPrice + attr_accessor :promotionPriceType + attr_accessor :selectionType + attr_accessor :title + attr_accessor :listingType + + def initialize(itemID = nil, pictureURL = nil, position = nil, promotionPrice = nil, promotionPriceType = nil, selectionType = nil, title = nil, listingType = nil) + @itemID = itemID + @pictureURL = pictureURL + @position = position + @promotionPrice = promotionPrice + @promotionPriceType = promotionPriceType + @selectionType = selectionType + @title = title + @listingType = listingType + end +end + +# {urn:ebay:apis:eBLBaseComponents}CrossPromotionsType +class CrossPromotionsType + @@schema_type = "CrossPromotionsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["itemID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemID")]], + ["primaryScheme", ["PromotionSchemeCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PrimaryScheme")]], + ["promotionMethod", ["PromotionMethodCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PromotionMethod")]], + ["sellerID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SellerID")]], + ["shippingDiscount", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingDiscount")]], + ["sellerKey", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SellerKey")]], + ["storeName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StoreName")]], + ["promotedItem", ["PromotedItemType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PromotedItem")]] + ] + + attr_accessor :itemID + attr_accessor :primaryScheme + attr_accessor :promotionMethod + attr_accessor :sellerID + attr_accessor :shippingDiscount + attr_accessor :sellerKey + attr_accessor :storeName + attr_accessor :promotedItem + + def initialize(itemID = nil, primaryScheme = nil, promotionMethod = nil, sellerID = nil, shippingDiscount = nil, sellerKey = nil, storeName = nil, promotedItem = []) + @itemID = itemID + @primaryScheme = primaryScheme + @promotionMethod = promotionMethod + @sellerID = sellerID + @shippingDiscount = shippingDiscount + @sellerKey = sellerKey + @storeName = storeName + @promotedItem = promotedItem + end +end + +# {urn:ebay:apis:eBLBaseComponents}AccountSummaryType +class AccountSummaryType + @@schema_type = "AccountSummaryType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ :choice, + ["accountState", ["AccountStateCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AccountState")]], + ["additionalAccount", ["AdditionalAccountType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AdditionalAccount")]], + ["additionalAccountsCount", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AdditionalAccountsCount")]], + ["amountPastDue", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AmountPastDue")]], + ["bankAccountInfo", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BankAccountInfo")]], + ["bankModifyDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BankModifyDate")]], + ["billingCycleDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BillingCycleDate")]], + ["cCExp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CCExp")]], + ["cCInfo", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CCInfo")]], + ["cCModifyDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CCModifyDate")]], + ["currentBalance", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CurrentBalance")]], + ["lastAmountPaid", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LastAmountPaid")]], + ["lastInvoiceAmount", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LastInvoiceAmount")]], + ["lastInvoiceDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LastInvoiceDate")]], + ["lastPaymentDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LastPaymentDate")]], + ["pastDue", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PastDue")]], + ["paymentMethod", ["SellerPaymentMethodCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentMethod")]] + ] + + attr_accessor :accountState + attr_accessor :additionalAccount + attr_accessor :additionalAccountsCount + attr_accessor :amountPastDue + attr_accessor :bankAccountInfo + attr_accessor :bankModifyDate + attr_accessor :billingCycleDate + attr_accessor :cCExp + attr_accessor :cCInfo + attr_accessor :cCModifyDate + attr_accessor :currentBalance + attr_accessor :lastAmountPaid + attr_accessor :lastInvoiceAmount + attr_accessor :lastInvoiceDate + attr_accessor :lastPaymentDate + attr_accessor :pastDue + attr_accessor :paymentMethod + + def initialize(accountState = nil, additionalAccount = [], additionalAccountsCount = nil, amountPastDue = nil, bankAccountInfo = nil, bankModifyDate = nil, billingCycleDate = nil, cCExp = nil, cCInfo = nil, cCModifyDate = nil, currentBalance = nil, lastAmountPaid = nil, lastInvoiceAmount = nil, lastInvoiceDate = nil, lastPaymentDate = nil, pastDue = nil, paymentMethod = nil) + @accountState = accountState + @additionalAccount = additionalAccount + @additionalAccountsCount = additionalAccountsCount + @amountPastDue = amountPastDue + @bankAccountInfo = bankAccountInfo + @bankModifyDate = bankModifyDate + @billingCycleDate = billingCycleDate + @cCExp = cCExp + @cCInfo = cCInfo + @cCModifyDate = cCModifyDate + @currentBalance = currentBalance + @lastAmountPaid = lastAmountPaid + @lastInvoiceAmount = lastInvoiceAmount + @lastInvoiceDate = lastInvoiceDate + @lastPaymentDate = lastPaymentDate + @pastDue = pastDue + @paymentMethod = paymentMethod + end +end + +# {urn:ebay:apis:eBLBaseComponents}BuyerType +class BuyerType + @@schema_type = "BuyerType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["shippingAddress", ["AddressType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingAddress")]] + ] + + attr_accessor :shippingAddress + + def initialize(shippingAddress = nil) + @shippingAddress = shippingAddress + end +end + +# {urn:ebay:apis:eBLBaseComponents}SellerType +class SellerType + @@schema_type = "SellerType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["allowPaymentEdit", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AllowPaymentEdit")]], + ["billingCurrency", ["CurrencyCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BillingCurrency")]], + ["checkoutEnabled", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CheckoutEnabled")]], + ["cIPBankAccountStored", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CIPBankAccountStored")]], + ["goodStanding", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GoodStanding")]], + ["liveAuctionAuthorized", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LiveAuctionAuthorized")]], + ["merchandizingPref", ["MerchandizingPrefCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MerchandizingPref")]], + ["qualifiesForB2BVAT", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "QualifiesForB2BVAT")]], + ["sellerLevel", ["SellerLevelCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SellerLevel")]], + ["sellerPaymentAddress", ["AddressType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SellerPaymentAddress")]], + ["schedulingInfo", ["SchedulingInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SchedulingInfo")]], + ["storeOwner", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StoreOwner")]], + ["storeURL", ["SOAP::SOAPAnyURI", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StoreURL")]] + ] + + attr_accessor :allowPaymentEdit + attr_accessor :billingCurrency + attr_accessor :checkoutEnabled + attr_accessor :cIPBankAccountStored + attr_accessor :goodStanding + attr_accessor :liveAuctionAuthorized + attr_accessor :merchandizingPref + attr_accessor :qualifiesForB2BVAT + attr_accessor :sellerLevel + attr_accessor :sellerPaymentAddress + attr_accessor :schedulingInfo + attr_accessor :storeOwner + attr_accessor :storeURL + + def initialize(allowPaymentEdit = nil, billingCurrency = nil, checkoutEnabled = nil, cIPBankAccountStored = nil, goodStanding = nil, liveAuctionAuthorized = nil, merchandizingPref = nil, qualifiesForB2BVAT = nil, sellerLevel = nil, sellerPaymentAddress = nil, schedulingInfo = nil, storeOwner = nil, storeURL = nil) + @allowPaymentEdit = allowPaymentEdit + @billingCurrency = billingCurrency + @checkoutEnabled = checkoutEnabled + @cIPBankAccountStored = cIPBankAccountStored + @goodStanding = goodStanding + @liveAuctionAuthorized = liveAuctionAuthorized + @merchandizingPref = merchandizingPref + @qualifiesForB2BVAT = qualifiesForB2BVAT + @sellerLevel = sellerLevel + @sellerPaymentAddress = sellerPaymentAddress + @schedulingInfo = schedulingInfo + @storeOwner = storeOwner + @storeURL = storeURL + end +end + +# {urn:ebay:apis:eBLBaseComponents}FeeType +class FeeType + @@schema_type = "FeeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["name", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Name")]], + ["fee", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Fee")]] + ] + + attr_accessor :name + attr_accessor :fee + + def initialize(name = nil, fee = nil) + @name = name + @fee = fee + end +end + +# {urn:ebay:apis:eBLBaseComponents}FeesType +class FeesType < ::Array + @@schema_element = [ + ["Fee", ["FeeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Fee")]] + ] +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingCarrierDetailsType +class ShippingCarrierDetailsType + @@schema_type = "ShippingCarrierDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["carrierShippingFee", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CarrierShippingFee")]], + ["insuranceFee", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InsuranceFee")]], + ["insuranceOption", ["InsuranceOptionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InsuranceOption")]], + ["packagingHandlingCosts", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PackagingHandlingCosts")]], + ["shippingRateErrorMessage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingRateErrorMessage")]], + ["shippingService", ["ShippingServiceCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingService")]] + ] + + attr_accessor :carrierShippingFee + attr_accessor :insuranceFee + attr_accessor :insuranceOption + attr_accessor :packagingHandlingCosts + attr_accessor :shippingRateErrorMessage + attr_accessor :shippingService + + def initialize(carrierShippingFee = nil, insuranceFee = nil, insuranceOption = nil, packagingHandlingCosts = nil, shippingRateErrorMessage = nil, shippingService = nil) + @carrierShippingFee = carrierShippingFee + @insuranceFee = insuranceFee + @insuranceOption = insuranceOption + @packagingHandlingCosts = packagingHandlingCosts + @shippingRateErrorMessage = shippingRateErrorMessage + @shippingService = shippingService + end +end + +# {urn:ebay:apis:eBLBaseComponents}CalculatedShippingRateType +class CalculatedShippingRateType + @@schema_type = "CalculatedShippingRateType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["originatingPostalCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "OriginatingPostalCode")]], + ["shippingIrregular", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingIrregular")]], + ["carrierDetails", ["ShippingCarrierDetailsType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CarrierDetails")]], + ["shippingPackage", ["ShippingPackageCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingPackage")]], + ["weightMajor", ["MeasureType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "WeightMajor")]], + ["weightMinor", ["MeasureType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "WeightMinor")]] + ] + + attr_accessor :originatingPostalCode + attr_accessor :shippingIrregular + attr_accessor :carrierDetails + attr_accessor :shippingPackage + attr_accessor :weightMajor + attr_accessor :weightMinor + + def initialize(originatingPostalCode = nil, shippingIrregular = nil, carrierDetails = [], shippingPackage = nil, weightMajor = nil, weightMinor = nil) + @originatingPostalCode = originatingPostalCode + @shippingIrregular = shippingIrregular + @carrierDetails = carrierDetails + @shippingPackage = shippingPackage + @weightMajor = weightMajor + @weightMinor = weightMinor + end +end + +# {urn:ebay:apis:eBLBaseComponents}FlatShippingRateType +class FlatShippingRateType + @@schema_type = "FlatShippingRateType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["additionalShippingCosts", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AdditionalShippingCosts")]], + ["flatShippingHandlingCosts", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FlatShippingHandlingCosts")]], + ["insuranceFee", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InsuranceFee")]], + ["insuranceOption", ["InsuranceOptionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InsuranceOption")]], + ["shippingService", ["ShippingServiceCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingService")]] + ] + + attr_accessor :additionalShippingCosts + attr_accessor :flatShippingHandlingCosts + attr_accessor :insuranceFee + attr_accessor :insuranceOption + attr_accessor :shippingService + + def initialize(additionalShippingCosts = nil, flatShippingHandlingCosts = nil, insuranceFee = nil, insuranceOption = nil, shippingService = nil) + @additionalShippingCosts = additionalShippingCosts + @flatShippingHandlingCosts = flatShippingHandlingCosts + @insuranceFee = insuranceFee + @insuranceOption = insuranceOption + @shippingService = shippingService + end +end + +# {urn:ebay:apis:eBLBaseComponents}SalesTaxType +class SalesTaxType + @@schema_type = "SalesTaxType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["salesTaxPercent", ["SOAP::SOAPFloat", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SalesTaxPercent")]], + ["salesTaxState", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SalesTaxState")]], + ["shippingIncludedInTax", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingIncludedInTax")]] + ] + + attr_accessor :salesTaxPercent + attr_accessor :salesTaxState + attr_accessor :shippingIncludedInTax + + def initialize(salesTaxPercent = nil, salesTaxState = nil, shippingIncludedInTax = nil) + @salesTaxPercent = salesTaxPercent + @salesTaxState = salesTaxState + @shippingIncludedInTax = shippingIncludedInTax + end +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingDetailsType +class ShippingDetailsType + @@schema_type = "ShippingDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["allowPaymentEdit", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AllowPaymentEdit")]], + ["calculatedShippingRate", ["CalculatedShippingRateType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CalculatedShippingRate")]], + ["changePaymentInstructions", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ChangePaymentInstructions")]], + ["flatShippingRate", ["FlatShippingRateType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FlatShippingRate")]], + ["insuranceTotal", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InsuranceTotal")]], + ["insuranceWanted", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InsuranceWanted")]], + ["paymentInstructions", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentInstructions")]], + ["salesTax", ["SalesTaxType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SalesTax")]], + ["sellerPostalCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SellerPostalCode")]] + ] + + attr_accessor :allowPaymentEdit + attr_accessor :calculatedShippingRate + attr_accessor :changePaymentInstructions + attr_accessor :flatShippingRate + attr_accessor :insuranceTotal + attr_accessor :insuranceWanted + attr_accessor :paymentInstructions + attr_accessor :salesTax + attr_accessor :sellerPostalCode + + def initialize(allowPaymentEdit = nil, calculatedShippingRate = nil, changePaymentInstructions = nil, flatShippingRate = [], insuranceTotal = nil, insuranceWanted = nil, paymentInstructions = nil, salesTax = nil, sellerPostalCode = nil) + @allowPaymentEdit = allowPaymentEdit + @calculatedShippingRate = calculatedShippingRate + @changePaymentInstructions = changePaymentInstructions + @flatShippingRate = flatShippingRate + @insuranceTotal = insuranceTotal + @insuranceWanted = insuranceWanted + @paymentInstructions = paymentInstructions + @salesTax = salesTax + @sellerPostalCode = sellerPostalCode + end +end + +# {urn:ebay:apis:eBLBaseComponents}SiteHostedPictureType +class SiteHostedPictureType + @@schema_type = "SiteHostedPictureType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["pictureURL", ["SOAP::SOAPAnyURI[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PictureURL")]], + ["photoDisplay", ["PhotoDisplayCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PhotoDisplay")]], + ["galleryType", ["GalleryTypeCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GalleryType")]] + ] + + attr_accessor :pictureURL + attr_accessor :photoDisplay + attr_accessor :galleryType + + def initialize(pictureURL = [], photoDisplay = nil, galleryType = nil) + @pictureURL = pictureURL + @photoDisplay = photoDisplay + @galleryType = galleryType + end +end + +# {urn:ebay:apis:eBLBaseComponents}VendorHostedPictureType +class VendorHostedPictureType + @@schema_type = "VendorHostedPictureType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["pictureURL", ["SOAP::SOAPAnyURI", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PictureURL")]], + ["galleryURL", ["SOAP::SOAPAnyURI", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GalleryURL")]], + ["galleryType", ["GalleryTypeCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GalleryType")]] + ] + + attr_accessor :pictureURL + attr_accessor :galleryURL + attr_accessor :galleryType + + def initialize(pictureURL = nil, galleryURL = nil, galleryType = nil) + @pictureURL = pictureURL + @galleryURL = galleryURL + @galleryType = galleryType + end +end + +# {urn:ebay:apis:eBLBaseComponents}ValType +class ValType + @@schema_type = "ValType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "ValueID") => "SOAP::SOAPString" + } + @@schema_element = [ + ["valueLiteral", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ValueLiteral")]] + ] + + attr_accessor :valueLiteral + + def xmlattr_ValueID + (@__xmlattr ||= {})[XSD::QName.new(nil, "ValueID")] + end + + def xmlattr_ValueID=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "ValueID")] = value + end + + def initialize(valueLiteral = nil) + @valueLiteral = valueLiteral + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}AttributeType +class AttributeType + @@schema_type = "AttributeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "AttributeID") => "SOAP::SOAPString" + } + @@schema_element = [ + ["value", ["ValType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Value")]] + ] + + attr_accessor :value + + def xmlattr_AttributeID + (@__xmlattr ||= {})[XSD::QName.new(nil, "AttributeID")] + end + + def xmlattr_AttributeID=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "AttributeID")] = value + end + + def initialize(value = []) + @value = value + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}AttributeSetType +class AttributeSetType + @@schema_type = "AttributeSetType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "AttributeSetID") => "SOAP::SOAPString" + } + @@schema_element = [ + ["attribute", ["AttributeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Attribute")]] + ] + + attr_accessor :attribute + + def xmlattr_AttributeSetID + (@__xmlattr ||= {})[XSD::QName.new(nil, "AttributeSetID")] + end + + def xmlattr_AttributeSetID=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "AttributeSetID")] = value + end + + def initialize(attribute = []) + @attribute = attribute + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}ListOfAttributeSetType +class ListOfAttributeSetType < ::Array + @@schema_element = [ + ["AttributeSet", ["AttributeSetType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AttributeSet")]] + ] +end + +# {urn:ebay:apis:eBLBaseComponents}CategoryType +class CategoryType + @@schema_type = "CategoryType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["autoPayEnabled", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AutoPayEnabled")]], + ["b2BVATEnabled", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "B2BVATEnabled")]], + ["catalogEnabled", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CatalogEnabled")]], + ["categoryID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CategoryID")]], + ["categoryLevel", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CategoryLevel")]], + ["categoryName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CategoryName")]], + ["categoryParentID", ["SOAP::SOAPString[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CategoryParentID")]], + ["categoryParentName", ["SOAP::SOAPString[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CategoryParentName")]], + ["cSIDList", ["SOAP::SOAPString[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CSIDList")]], + ["expired", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Expired")]], + ["intlAutosFixedCat", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "IntlAutosFixedCat")]], + ["leafCategory", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LeafCategory")]], + ["virtual", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Virtual")]] + ] + + attr_accessor :autoPayEnabled + attr_accessor :b2BVATEnabled + attr_accessor :catalogEnabled + attr_accessor :categoryID + attr_accessor :categoryLevel + attr_accessor :categoryName + attr_accessor :categoryParentID + attr_accessor :categoryParentName + attr_accessor :cSIDList + attr_accessor :expired + attr_accessor :intlAutosFixedCat + attr_accessor :leafCategory + attr_accessor :virtual + + def initialize(autoPayEnabled = nil, b2BVATEnabled = nil, catalogEnabled = nil, categoryID = nil, categoryLevel = nil, categoryName = nil, categoryParentID = [], categoryParentName = [], cSIDList = [], expired = nil, intlAutosFixedCat = nil, leafCategory = nil, virtual = nil) + @autoPayEnabled = autoPayEnabled + @b2BVATEnabled = b2BVATEnabled + @catalogEnabled = catalogEnabled + @categoryID = categoryID + @categoryLevel = categoryLevel + @categoryName = categoryName + @categoryParentID = categoryParentID + @categoryParentName = categoryParentName + @cSIDList = cSIDList + @expired = expired + @intlAutosFixedCat = intlAutosFixedCat + @leafCategory = leafCategory + @virtual = virtual + end +end + +# {urn:ebay:apis:eBLBaseComponents}StorefrontType +class StorefrontType + @@schema_type = "StorefrontType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["storeCategoryID", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StoreCategoryID")]], + ["storeURL", ["SOAP::SOAPAnyURI", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StoreURL")]] + ] + + attr_accessor :storeCategoryID + attr_accessor :storeURL + + def initialize(storeCategoryID = nil, storeURL = nil) + @storeCategoryID = storeCategoryID + @storeURL = storeURL + end +end + +# {urn:ebay:apis:eBLBaseComponents}ListingDesignerType +class ListingDesignerType + @@schema_type = "ListingDesignerType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["layoutID", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LayoutID")]], + ["optimalPictureSize", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "OptimalPictureSize")]], + ["themeID", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ThemeID")]] + ] + + attr_accessor :layoutID + attr_accessor :optimalPictureSize + attr_accessor :themeID + + def initialize(layoutID = nil, optimalPictureSize = nil, themeID = nil) + @layoutID = layoutID + @optimalPictureSize = optimalPictureSize + @themeID = themeID + end +end + +# {urn:ebay:apis:eBLBaseComponents}CharityType +class CharityType + @@schema_type = "CharityType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["charityName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CharityName")]], + ["charityNumber", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CharityNumber")]], + ["donationPercent", ["SOAP::SOAPFloat", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DonationPercent")]] + ] + + attr_accessor :charityName + attr_accessor :charityNumber + attr_accessor :donationPercent + + def initialize(charityName = nil, charityNumber = nil, donationPercent = nil) + @charityName = charityName + @charityNumber = charityNumber + @donationPercent = donationPercent + end +end + +# {urn:ebay:apis:eBLBaseComponents}SellingStatusType +class SellingStatusType + @@schema_type = "SellingStatusType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["bidCount", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BidCount")]], + ["bidIncrement", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BidIncrement")]], + ["convertedCurrentPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ConvertedCurrentPrice")]], + ["currentPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CurrentPrice")]], + ["highBidder", ["UserType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "HighBidder")]], + ["leadCount", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LeadCount")]], + ["minimumToBid", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MinimumToBid")]], + ["quantitySold", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "QuantitySold")]], + ["reserveMet", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReserveMet")]], + ["secondChanceEligible", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SecondChanceEligible")]] + ] + + attr_accessor :bidCount + attr_accessor :bidIncrement + attr_accessor :convertedCurrentPrice + attr_accessor :currentPrice + attr_accessor :highBidder + attr_accessor :leadCount + attr_accessor :minimumToBid + attr_accessor :quantitySold + attr_accessor :reserveMet + attr_accessor :secondChanceEligible + + def initialize(bidCount = nil, bidIncrement = nil, convertedCurrentPrice = nil, currentPrice = nil, highBidder = nil, leadCount = nil, minimumToBid = nil, quantitySold = nil, reserveMet = nil, secondChanceEligible = nil) + @bidCount = bidCount + @bidIncrement = bidIncrement + @convertedCurrentPrice = convertedCurrentPrice + @currentPrice = currentPrice + @highBidder = highBidder + @leadCount = leadCount + @minimumToBid = minimumToBid + @quantitySold = quantitySold + @reserveMet = reserveMet + @secondChanceEligible = secondChanceEligible + end +end + +# {urn:ebay:apis:eBLBaseComponents}ReviseStatusType +class ReviseStatusType + @@schema_type = "ReviseStatusType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["itemRevised", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemRevised")]], + ["buyItNowAdded", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BuyItNowAdded")]], + ["buyItNowLowered", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BuyItNowLowered")]], + ["reserveLowered", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReserveLowered")]], + ["reserveRemoved", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReserveRemoved")]] + ] + + attr_accessor :itemRevised + attr_accessor :buyItNowAdded + attr_accessor :buyItNowLowered + attr_accessor :reserveLowered + attr_accessor :reserveRemoved + + def initialize(itemRevised = nil, buyItNowAdded = nil, buyItNowLowered = nil, reserveLowered = nil, reserveRemoved = nil) + @itemRevised = itemRevised + @buyItNowAdded = buyItNowAdded + @buyItNowLowered = buyItNowLowered + @reserveLowered = reserveLowered + @reserveRemoved = reserveRemoved + end +end + +# {urn:ebay:apis:eBLBaseComponents}ListingDetailsType +class ListingDetailsType + @@schema_type = "ListingDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["adult", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Adult")]], + ["bindingAuction", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BindingAuction")]], + ["checkoutEnabled", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CheckoutEnabled")]], + ["convertedBuyItNowPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ConvertedBuyItNowPrice")]], + ["convertedStartPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ConvertedStartPrice")]], + ["convertedReservePrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ConvertedReservePrice")]], + ["hasReservePrice", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "HasReservePrice")]], + ["regionName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RegionName")]], + ["relistedItemID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RelistedItemID")]], + ["secondChanceOriginalItemID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SecondChanceOriginalItemID")]], + ["startTime", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StartTime")]], + ["endTime", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "EndTime")]], + ["viewItemURL", ["SOAP::SOAPAnyURI", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ViewItemURL")]] + ] + + attr_accessor :adult + attr_accessor :bindingAuction + attr_accessor :checkoutEnabled + attr_accessor :convertedBuyItNowPrice + attr_accessor :convertedStartPrice + attr_accessor :convertedReservePrice + attr_accessor :hasReservePrice + attr_accessor :regionName + attr_accessor :relistedItemID + attr_accessor :secondChanceOriginalItemID + attr_accessor :startTime + attr_accessor :endTime + attr_accessor :viewItemURL + + def initialize(adult = nil, bindingAuction = nil, checkoutEnabled = nil, convertedBuyItNowPrice = nil, convertedStartPrice = nil, convertedReservePrice = nil, hasReservePrice = nil, regionName = nil, relistedItemID = nil, secondChanceOriginalItemID = nil, startTime = nil, endTime = nil, viewItemURL = nil) + @adult = adult + @bindingAuction = bindingAuction + @checkoutEnabled = checkoutEnabled + @convertedBuyItNowPrice = convertedBuyItNowPrice + @convertedStartPrice = convertedStartPrice + @convertedReservePrice = convertedReservePrice + @hasReservePrice = hasReservePrice + @regionName = regionName + @relistedItemID = relistedItemID + @secondChanceOriginalItemID = secondChanceOriginalItemID + @startTime = startTime + @endTime = endTime + @viewItemURL = viewItemURL + end +end + +# {urn:ebay:apis:eBLBaseComponents}ItemType +class ItemType + @@schema_type = "ItemType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["applicationData", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ApplicationData")]], + ["listOfAttributeSets", ["ListOfAttributeSetType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ListOfAttributeSets")]], + ["autoPay", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AutoPay")]], + ["buyerProtection", ["BuyerProtectionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BuyerProtection")]], + ["buyItNowPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BuyItNowPrice")]], + ["charity", ["CharityType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Charity")]], + ["country", ["CountryCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Country")]], + ["crossPromotion", ["CrossPromotionsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CrossPromotion")]], + ["currency", ["CurrencyCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Currency")]], + ["description", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Description")]], + ["escrow", ["EscrowCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Escrow")]], + ["giftIcon", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GiftIcon")]], + ["giftServices", ["GiftServicesCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GiftServices")]], + ["hitCounter", ["HitCounterCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "HitCounter")]], + ["itemID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemID")]], + ["listingDetails", ["ListingDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ListingDetails")]], + ["listingDesigner", ["ListingDesignerType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ListingDesigner")]], + ["listingDuration", ["ListingDurationCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ListingDuration")]], + ["listingEnhancement", ["ListingEnhancementsCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ListingEnhancement")]], + ["listingType", ["ListingTypeCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ListingType")]], + ["location", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Location")]], + ["partnerCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PartnerCode")]], + ["partnerName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PartnerName")]], + ["paymentMethods", ["BuyerPaymentMethodCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentMethods")]], + ["payPalEmailAddress", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayPalEmailAddress")]], + ["primaryCategory", ["CategoryType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PrimaryCategory")]], + ["privateListing", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PrivateListing")]], + ["quantity", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Quantity")]], + ["regionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RegionID")]], + ["relistLink", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RelistLink")]], + ["reservePrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReservePrice")]], + ["reviseStatus", ["ReviseStatusType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReviseStatus")]], + ["scheduleTime", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ScheduleTime")]], + ["secondaryCategory", ["CategoryType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SecondaryCategory")]], + ["siteHostedPicture", ["SiteHostedPictureType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SiteHostedPicture")]], + ["seller", ["UserType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Seller")]], + ["sellingStatus", ["SellingStatusType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SellingStatus")]], + ["shippingOption", ["ShippingOptionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingOption")]], + ["shippingDetails", ["ShippingDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingDetails")]], + ["shippingRegions", ["ShippingRegionCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingRegions")]], + ["shippingTerms", ["ShippingTermsCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingTerms")]], + ["site", ["SiteCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Site")]], + ["startPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StartPrice")]], + ["storefront", ["StorefrontType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Storefront")]], + ["subTitle", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SubTitle")]], + ["timeLeft", ["SOAP::SOAPDuration", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TimeLeft")]], + ["title", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Title")]], + ["uUID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "UUID")]], + ["vATDetails", ["VATDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "VATDetails")]], + ["vendorHostedPicture", ["VendorHostedPictureType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "VendorHostedPicture")]] + ] + + attr_accessor :applicationData + attr_accessor :listOfAttributeSets + attr_accessor :autoPay + attr_accessor :buyerProtection + attr_accessor :buyItNowPrice + attr_accessor :charity + attr_accessor :country + attr_accessor :crossPromotion + attr_accessor :currency + attr_accessor :description + attr_accessor :escrow + attr_accessor :giftIcon + attr_accessor :giftServices + attr_accessor :hitCounter + attr_accessor :itemID + attr_accessor :listingDetails + attr_accessor :listingDesigner + attr_accessor :listingDuration + attr_accessor :listingEnhancement + attr_accessor :listingType + attr_accessor :location + attr_accessor :partnerCode + attr_accessor :partnerName + attr_accessor :paymentMethods + attr_accessor :payPalEmailAddress + attr_accessor :primaryCategory + attr_accessor :privateListing + attr_accessor :quantity + attr_accessor :regionID + attr_accessor :relistLink + attr_accessor :reservePrice + attr_accessor :reviseStatus + attr_accessor :scheduleTime + attr_accessor :secondaryCategory + attr_accessor :siteHostedPicture + attr_accessor :seller + attr_accessor :sellingStatus + attr_accessor :shippingOption + attr_accessor :shippingDetails + attr_accessor :shippingRegions + attr_accessor :shippingTerms + attr_accessor :site + attr_accessor :startPrice + attr_accessor :storefront + attr_accessor :subTitle + attr_accessor :timeLeft + attr_accessor :title + attr_accessor :uUID + attr_accessor :vATDetails + attr_accessor :vendorHostedPicture + + def initialize(applicationData = nil, listOfAttributeSets = nil, autoPay = nil, buyerProtection = nil, buyItNowPrice = nil, charity = nil, country = nil, crossPromotion = nil, currency = nil, description = nil, escrow = nil, giftIcon = nil, giftServices = [], hitCounter = nil, itemID = nil, listingDetails = nil, listingDesigner = nil, listingDuration = nil, listingEnhancement = [], listingType = nil, location = nil, partnerCode = nil, partnerName = nil, paymentMethods = [], payPalEmailAddress = nil, primaryCategory = nil, privateListing = nil, quantity = nil, regionID = nil, relistLink = nil, reservePrice = nil, reviseStatus = nil, scheduleTime = nil, secondaryCategory = nil, siteHostedPicture = nil, seller = nil, sellingStatus = nil, shippingOption = nil, shippingDetails = nil, shippingRegions = [], shippingTerms = nil, site = nil, startPrice = nil, storefront = nil, subTitle = nil, timeLeft = nil, title = nil, uUID = nil, vATDetails = nil, vendorHostedPicture = nil) + @applicationData = applicationData + @listOfAttributeSets = listOfAttributeSets + @autoPay = autoPay + @buyerProtection = buyerProtection + @buyItNowPrice = buyItNowPrice + @charity = charity + @country = country + @crossPromotion = crossPromotion + @currency = currency + @description = description + @escrow = escrow + @giftIcon = giftIcon + @giftServices = giftServices + @hitCounter = hitCounter + @itemID = itemID + @listingDetails = listingDetails + @listingDesigner = listingDesigner + @listingDuration = listingDuration + @listingEnhancement = listingEnhancement + @listingType = listingType + @location = location + @partnerCode = partnerCode + @partnerName = partnerName + @paymentMethods = paymentMethods + @payPalEmailAddress = payPalEmailAddress + @primaryCategory = primaryCategory + @privateListing = privateListing + @quantity = quantity + @regionID = regionID + @relistLink = relistLink + @reservePrice = reservePrice + @reviseStatus = reviseStatus + @scheduleTime = scheduleTime + @secondaryCategory = secondaryCategory + @siteHostedPicture = siteHostedPicture + @seller = seller + @sellingStatus = sellingStatus + @shippingOption = shippingOption + @shippingDetails = shippingDetails + @shippingRegions = shippingRegions + @shippingTerms = shippingTerms + @site = site + @startPrice = startPrice + @storefront = storefront + @subTitle = subTitle + @timeLeft = timeLeft + @title = title + @uUID = uUID + @vATDetails = vATDetails + @vendorHostedPicture = vendorHostedPicture + end +end + +# {urn:ebay:apis:eBLBaseComponents}TransactionsType +class TransactionsType < ::Array + @@schema_element = [ + ["Transaction", ["TransactionType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Transaction")]] + ] +end + +# {urn:ebay:apis:eBLBaseComponents}TransactionType +class TransactionType + @@schema_type = "TransactionType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["amountPaid", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AmountPaid")]], + ["buyer", ["UserType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Buyer")]], + ["shippingDetails", ["ShippingDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingDetails")]], + ["convertedAmountPaid", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ConvertedAmountPaid")]], + ["convertedTransactionPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ConvertedTransactionPrice")]], + ["createdDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CreatedDate")]], + ["depositType", ["DepositTypeCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DepositType")]], + ["item", ["ItemType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Item")]], + ["quantityPurchased", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "QuantityPurchased")]], + ["shippingHandlingTotal", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingHandlingTotal")]], + ["status", ["TransactionStatusType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Status")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TransactionID")]], + ["authorizationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AuthorizationID")]], + ["transactionPrice", ["AmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TransactionPrice")]], + ["vATPercent", ["SOAP::SOAPDecimal", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "VATPercent")]] + ] + + attr_accessor :amountPaid + attr_accessor :buyer + attr_accessor :shippingDetails + attr_accessor :convertedAmountPaid + attr_accessor :convertedTransactionPrice + attr_accessor :createdDate + attr_accessor :depositType + attr_accessor :item + attr_accessor :quantityPurchased + attr_accessor :shippingHandlingTotal + attr_accessor :status + attr_accessor :transactionID + attr_accessor :authorizationID + attr_accessor :transactionPrice + attr_accessor :vATPercent + + def initialize(amountPaid = nil, buyer = nil, shippingDetails = nil, convertedAmountPaid = nil, convertedTransactionPrice = nil, createdDate = nil, depositType = nil, item = nil, quantityPurchased = nil, shippingHandlingTotal = nil, status = nil, transactionID = nil, authorizationID = nil, transactionPrice = nil, vATPercent = nil) + @amountPaid = amountPaid + @buyer = buyer + @shippingDetails = shippingDetails + @convertedAmountPaid = convertedAmountPaid + @convertedTransactionPrice = convertedTransactionPrice + @createdDate = createdDate + @depositType = depositType + @item = item + @quantityPurchased = quantityPurchased + @shippingHandlingTotal = shippingHandlingTotal + @status = status + @transactionID = transactionID + @authorizationID = authorizationID + @transactionPrice = transactionPrice + @vATPercent = vATPercent + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentMeansType +class PaymentMeansType + @@schema_type = "PaymentMeansType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["typeCodeID", ["SellerPaymentMethodCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TypeCodeID")]] + ] + + attr_accessor :typeCodeID + + def initialize(typeCodeID = nil) + @typeCodeID = typeCodeID + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentType +class PaymentType + @@schema_type = "PaymentType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["paymentMeans", ["PaymentMeansType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentMeans")]] + ] + + attr_accessor :paymentMeans + + def initialize(paymentMeans = nil) + @paymentMeans = paymentMeans + end +end + +# {urn:ebay:apis:eBLBaseComponents}TransactionStatusType +class TransactionStatusType + @@schema_type = "TransactionStatusType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["eBayPaymentStatus", "SOAP::SOAPInt"], + ["incompleteState", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "IncompleteState")]], + ["lastTimeModified", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LastTimeModified")]], + ["paymentMethodUsed", ["BuyerPaymentMethodCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentMethodUsed")]], + ["statusIs", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StatusIs")]] + ] + + attr_accessor :eBayPaymentStatus + attr_accessor :incompleteState + attr_accessor :lastTimeModified + attr_accessor :paymentMethodUsed + attr_accessor :statusIs + + def initialize(eBayPaymentStatus = nil, incompleteState = nil, lastTimeModified = nil, paymentMethodUsed = nil, statusIs = nil) + @eBayPaymentStatus = eBayPaymentStatus + @incompleteState = incompleteState + @lastTimeModified = lastTimeModified + @paymentMethodUsed = paymentMethodUsed + @statusIs = statusIs + end +end + +# {urn:ebay:apis:eBLBaseComponents}UserType +class UserType + @@schema_type = "UserType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["aboutMePage", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AboutMePage")]], + ["eAISToken", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "EAISToken")]], + ["email", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Email")]], + ["feedbackScore", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FeedbackScore")]], + ["feedbackPrivate", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FeedbackPrivate")]], + ["feedbackRatingStar", ["FeedbackRatingStarCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FeedbackRatingStar")]], + ["iDVerified", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "IDVerified")]], + ["newUser", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "NewUser")]], + ["registrationAddress", ["AddressType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RegistrationAddress")]], + ["registrationDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RegistrationDate")]], + ["site", ["SiteCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Site")]], + ["status", ["UserStatusCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Status")]], + ["userID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "UserID")]], + ["userIDChanged", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "UserIDChanged")]], + ["userIDLastChanged", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "UserIDLastChanged")]], + ["vATStatus", ["VATStatusCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "VATStatus")]], + ["buyerInfo", ["BuyerType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BuyerInfo")]], + ["sellerInfo", ["SellerType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SellerInfo")]] + ] + + attr_accessor :aboutMePage + attr_accessor :eAISToken + attr_accessor :email + attr_accessor :feedbackScore + attr_accessor :feedbackPrivate + attr_accessor :feedbackRatingStar + attr_accessor :iDVerified + attr_accessor :newUser + attr_accessor :registrationAddress + attr_accessor :registrationDate + attr_accessor :site + attr_accessor :status + attr_accessor :userID + attr_accessor :userIDChanged + attr_accessor :userIDLastChanged + attr_accessor :vATStatus + attr_accessor :buyerInfo + attr_accessor :sellerInfo + + def initialize(aboutMePage = nil, eAISToken = nil, email = nil, feedbackScore = nil, feedbackPrivate = nil, feedbackRatingStar = nil, iDVerified = nil, newUser = nil, registrationAddress = nil, registrationDate = nil, site = nil, status = nil, userID = nil, userIDChanged = nil, userIDLastChanged = nil, vATStatus = nil, buyerInfo = nil, sellerInfo = nil) + @aboutMePage = aboutMePage + @eAISToken = eAISToken + @email = email + @feedbackScore = feedbackScore + @feedbackPrivate = feedbackPrivate + @feedbackRatingStar = feedbackRatingStar + @iDVerified = iDVerified + @newUser = newUser + @registrationAddress = registrationAddress + @registrationDate = registrationDate + @site = site + @status = status + @userID = userID + @userIDChanged = userIDChanged + @userIDLastChanged = userIDLastChanged + @vATStatus = vATStatus + @buyerInfo = buyerInfo + @sellerInfo = sellerInfo + end +end + +# {urn:ebay:apis:eBLBaseComponents}VATDetailsType +class VATDetailsType + @@schema_type = "VATDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["businessSeller", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BusinessSeller")]], + ["restrictedToBusiness", ["SOAP::SOAPBoolean", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RestrictedToBusiness")]], + ["vATPercent", ["SOAP::SOAPFloat", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "VATPercent")]] + ] + + attr_accessor :businessSeller + attr_accessor :restrictedToBusiness + attr_accessor :vATPercent + + def initialize(businessSeller = nil, restrictedToBusiness = nil, vATPercent = nil) + @businessSeller = businessSeller + @restrictedToBusiness = restrictedToBusiness + @vATPercent = vATPercent + end +end + +# {urn:ebay:apis:eBLBaseComponents}SchedulingInfoType +class SchedulingInfoType + @@schema_type = "SchedulingInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["maxScheduledMinutes", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MaxScheduledMinutes")]], + ["minScheduledMinutes", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MinScheduledMinutes")]], + ["maxScheduledItems", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MaxScheduledItems")]] + ] + + attr_accessor :maxScheduledMinutes + attr_accessor :minScheduledMinutes + attr_accessor :maxScheduledItems + + def initialize(maxScheduledMinutes = nil, minScheduledMinutes = nil, maxScheduledItems = nil) + @maxScheduledMinutes = maxScheduledMinutes + @minScheduledMinutes = minScheduledMinutes + @maxScheduledItems = maxScheduledItems + end +end + +# {urn:ebay:apis:eBLBaseComponents}ItemArrayType +class ItemArrayType < ::Array + @@schema_element = [ + ["Item", ["ItemType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Item")]] + ] +end + +# {urn:ebay:apis:eBLBaseComponents}CategoryArrayType +class CategoryArrayType < ::Array + @@schema_element = [ + ["Category", ["CategoryType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Category")]] + ] +end + +# {urn:ebay:apis:eBLBaseComponents}PaginationType +class PaginationType + @@schema_type = "PaginationType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["entriesPerPage", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "EntriesPerPage")]], + ["pageNumber", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PageNumber")]] + ] + + attr_accessor :entriesPerPage + attr_accessor :pageNumber + + def initialize(entriesPerPage = nil, pageNumber = nil) + @entriesPerPage = entriesPerPage + @pageNumber = pageNumber + end +end + +# {urn:ebay:apis:eBLBaseComponents}ModifiedFieldType +class ModifiedFieldType + @@schema_type = "ModifiedFieldType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["field", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Field")]], + ["modifyType", ["ModifyCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ModifyType")]] + ] + + attr_accessor :field + attr_accessor :modifyType + + def initialize(field = nil, modifyType = nil) + @field = field + @modifyType = modifyType + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaginationResultType +class PaginationResultType + @@schema_type = "PaginationResultType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["totalNumberOfPages", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TotalNumberOfPages")]], + ["totalNumberOfEntries", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TotalNumberOfEntries")]] + ] + + attr_accessor :totalNumberOfPages + attr_accessor :totalNumberOfEntries + + def initialize(totalNumberOfPages = nil, totalNumberOfEntries = nil) + @totalNumberOfPages = totalNumberOfPages + @totalNumberOfEntries = totalNumberOfEntries + end +end + +# {urn:ebay:apis:eBLBaseComponents}ErrorParameterType +class ErrorParameterType + @@schema_type = "ErrorParameterType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "ParamID") => "SOAP::SOAPString" + } + @@schema_element = [ + ["value", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Value")]] + ] + + attr_accessor :value + + def xmlattr_ParamID + (@__xmlattr ||= {})[XSD::QName.new(nil, "ParamID")] + end + + def xmlattr_ParamID=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "ParamID")] = value + end + + def initialize(value = nil) + @value = value + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}ErrorType +class ErrorType + @@schema_type = "ErrorType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["shortMessage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShortMessage")]], + ["longMessage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LongMessage")]], + ["errorCode", ["Token", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorCode")]], + ["severityCode", ["SeverityCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SeverityCode")]], + ["errorParameters", ["ErrorParameterType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorParameters")]] + ] + + attr_accessor :shortMessage + attr_accessor :longMessage + attr_accessor :errorCode + attr_accessor :severityCode + attr_accessor :errorParameters + + def initialize(shortMessage = nil, longMessage = nil, errorCode = nil, severityCode = nil, errorParameters = []) + @shortMessage = shortMessage + @longMessage = longMessage + @errorCode = errorCode + @severityCode = severityCode + @errorParameters = errorParameters + end +end + +# {urn:ebay:apis:eBLBaseComponents}FaultDetailsType +class FaultDetailsType + @@schema_type = "FaultDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["errorCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorCode")]], + ["severity", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Severity")]], + ["detailedMessage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailedMessage")]] + ] + + attr_accessor :errorCode + attr_accessor :severity + attr_accessor :detailedMessage + + def initialize(errorCode = nil, severity = nil, detailedMessage = nil) + @errorCode = errorCode + @severity = severity + @detailedMessage = detailedMessage + end +end + +# {urn:ebay:apis:eBLBaseComponents}AbstractRequestType +class AbstractRequestType + @@schema_type = "AbstractRequestType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["detailLevel", ["DetailLevelCodeType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]], + ["errorLanguage", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]], + ["messageID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]] + ] + + attr_accessor :detailLevel + attr_accessor :errorLanguage + attr_accessor :messageID + attr_accessor :version + attr_reader :__xmlele_any + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(detailLevel = [], errorLanguage = nil, messageID = nil, version = nil) + @detailLevel = detailLevel + @errorLanguage = errorLanguage + @messageID = messageID + @version = version + @__xmlele_any = nil + end +end + +# {urn:ebay:apis:eBLBaseComponents}AbstractResponseType +class AbstractResponseType + @@schema_type = "AbstractResponseType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["ack", ["AckCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Ack")]], + ["correlationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CorrelationID")]], + ["errors", ["ErrorType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Errors")]], + ["version", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]], + ["build", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Build")]], + ["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]] + ] + + attr_accessor :timestamp + attr_accessor :ack + attr_accessor :correlationID + attr_accessor :errors + attr_accessor :version + attr_accessor :build + attr_reader :__xmlele_any + + def set_any(elements) + @__xmlele_any = elements + end + + def initialize(timestamp = nil, ack = nil, correlationID = nil, errors = [], version = nil, build = nil) + @timestamp = timestamp + @ack = ack + @correlationID = correlationID + @errors = errors + @version = version + @build = build + @__xmlele_any = nil + end +end + +# {urn:ebay:apis:eBLBaseComponents}AddressType +class AddressType + @@schema_type = "AddressType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["name", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Name")]], + ["street1", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Street1")]], + ["street2", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Street2")]], + ["cityName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CityName")]], + ["stateOrProvince", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StateOrProvince")]], + ["country", ["CountryCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Country")]], + ["countryName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CountryName")]], + ["phone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Phone")]], + ["postalCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PostalCode")]], + ["addressID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AddressID")]], + ["addressOwner", ["AddressOwnerCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AddressOwner")]], + ["externalAddressID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ExternalAddressID")]], + ["internationalName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InternationalName")]], + ["internationalStateAndCity", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InternationalStateAndCity")]], + ["internationalStreet", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InternationalStreet")]], + ["addressStatus", ["AddressStatusCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AddressStatus")]] + ] + + attr_accessor :name + attr_accessor :street1 + attr_accessor :street2 + attr_accessor :cityName + attr_accessor :stateOrProvince + attr_accessor :country + attr_accessor :countryName + attr_accessor :phone + attr_accessor :postalCode + attr_accessor :addressID + attr_accessor :addressOwner + attr_accessor :externalAddressID + attr_accessor :internationalName + attr_accessor :internationalStateAndCity + attr_accessor :internationalStreet + attr_accessor :addressStatus + + def initialize(name = nil, street1 = nil, street2 = nil, cityName = nil, stateOrProvince = nil, country = nil, countryName = nil, phone = nil, postalCode = nil, addressID = nil, addressOwner = nil, externalAddressID = nil, internationalName = nil, internationalStateAndCity = nil, internationalStreet = nil, addressStatus = nil) + @name = name + @street1 = street1 + @street2 = street2 + @cityName = cityName + @stateOrProvince = stateOrProvince + @country = country + @countryName = countryName + @phone = phone + @postalCode = postalCode + @addressID = addressID + @addressOwner = addressOwner + @externalAddressID = externalAddressID + @internationalName = internationalName + @internationalStateAndCity = internationalStateAndCity + @internationalStreet = internationalStreet + @addressStatus = addressStatus + end +end + +# {urn:ebay:apis:eBLBaseComponents}PersonNameType +class PersonNameType + @@schema_type = "PersonNameType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["salutation", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Salutation")]], + ["firstName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FirstName")]], + ["middleName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MiddleName")]], + ["lastName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LastName")]], + ["suffix", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Suffix")]] + ] + + attr_accessor :salutation + attr_accessor :firstName + attr_accessor :middleName + attr_accessor :lastName + attr_accessor :suffix + + def initialize(salutation = nil, firstName = nil, middleName = nil, lastName = nil, suffix = nil) + @salutation = salutation + @firstName = firstName + @middleName = middleName + @lastName = lastName + @suffix = suffix + end +end + +# {urn:ebay:apis:eBLBaseComponents}SetExpressCheckoutRequestDetailsType +class SetExpressCheckoutRequestDetailsType + @@schema_type = "SetExpressCheckoutRequestDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["orderTotal", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "OrderTotal")]], + ["returnURL", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReturnURL")]], + ["cancelURL", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CancelURL")]], + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Token")]], + ["maxAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MaxAmount")]], + ["orderDescription", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "OrderDescription")]], + ["custom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Custom")]], + ["invoiceID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InvoiceID")]], + ["reqConfirmShipping", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReqConfirmShipping")]], + ["noShipping", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "NoShipping")]], + ["addressOverride", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AddressOverride")]], + ["localeCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LocaleCode")]], + ["pageStyle", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PageStyle")]], + ["cpp_header_image", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "cpp-header-image")]], + ["cpp_header_border_color", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "cpp-header-border-color")]], + ["cpp_header_back_color", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "cpp-header-back-color")]], + ["cpp_payflow_color", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "cpp-payflow-color")]], + ["address", ["AddressType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Address")]], + ["paymentAction", ["PaymentActionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentAction")]], + ["buyerEmail", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BuyerEmail")]] + ] + + attr_accessor :orderTotal + attr_accessor :returnURL + attr_accessor :cancelURL + attr_accessor :token + attr_accessor :maxAmount + attr_accessor :orderDescription + attr_accessor :custom + attr_accessor :invoiceID + attr_accessor :reqConfirmShipping + attr_accessor :noShipping + attr_accessor :addressOverride + attr_accessor :localeCode + attr_accessor :pageStyle + attr_accessor :cpp_header_image + attr_accessor :cpp_header_border_color + attr_accessor :cpp_header_back_color + attr_accessor :cpp_payflow_color + attr_accessor :address + attr_accessor :paymentAction + attr_accessor :buyerEmail + + def initialize(orderTotal = nil, returnURL = nil, cancelURL = nil, token = nil, maxAmount = nil, orderDescription = nil, custom = nil, invoiceID = nil, reqConfirmShipping = nil, noShipping = nil, addressOverride = nil, localeCode = nil, pageStyle = nil, cpp_header_image = nil, cpp_header_border_color = nil, cpp_header_back_color = nil, cpp_payflow_color = nil, address = nil, paymentAction = nil, buyerEmail = nil) + @orderTotal = orderTotal + @returnURL = returnURL + @cancelURL = cancelURL + @token = token + @maxAmount = maxAmount + @orderDescription = orderDescription + @custom = custom + @invoiceID = invoiceID + @reqConfirmShipping = reqConfirmShipping + @noShipping = noShipping + @addressOverride = addressOverride + @localeCode = localeCode + @pageStyle = pageStyle + @cpp_header_image = cpp_header_image + @cpp_header_border_color = cpp_header_border_color + @cpp_header_back_color = cpp_header_back_color + @cpp_payflow_color = cpp_payflow_color + @address = address + @paymentAction = paymentAction + @buyerEmail = buyerEmail + end +end + +# {urn:ebay:apis:eBLBaseComponents}GetExpressCheckoutDetailsResponseDetailsType +class GetExpressCheckoutDetailsResponseDetailsType + @@schema_type = "GetExpressCheckoutDetailsResponseDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Token")]], + ["payerInfo", ["PayerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerInfo")]], + ["custom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Custom")]], + ["invoiceID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InvoiceID")]], + ["contactPhone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ContactPhone")]] + ] + + attr_accessor :token + attr_accessor :payerInfo + attr_accessor :custom + attr_accessor :invoiceID + attr_accessor :contactPhone + + def initialize(token = nil, payerInfo = nil, custom = nil, invoiceID = nil, contactPhone = nil) + @token = token + @payerInfo = payerInfo + @custom = custom + @invoiceID = invoiceID + @contactPhone = contactPhone + end +end + +# {urn:ebay:apis:eBLBaseComponents}DoExpressCheckoutPaymentRequestDetailsType +class DoExpressCheckoutPaymentRequestDetailsType + @@schema_type = "DoExpressCheckoutPaymentRequestDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["paymentAction", ["PaymentActionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentAction")]], + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Token")]], + ["payerID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerID")]], + ["paymentDetails", ["PaymentDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentDetails")]] + ] + + attr_accessor :paymentAction + attr_accessor :token + attr_accessor :payerID + attr_accessor :paymentDetails + + def initialize(paymentAction = nil, token = nil, payerID = nil, paymentDetails = nil) + @paymentAction = paymentAction + @token = token + @payerID = payerID + @paymentDetails = paymentDetails + end +end + +# {urn:ebay:apis:eBLBaseComponents}DoExpressCheckoutPaymentResponseDetailsType +class DoExpressCheckoutPaymentResponseDetailsType + @@schema_type = "DoExpressCheckoutPaymentResponseDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["token", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Token")]], + ["paymentInfo", ["PaymentInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentInfo")]] + ] + + attr_accessor :token + attr_accessor :paymentInfo + + def initialize(token = nil, paymentInfo = nil) + @token = token + @paymentInfo = paymentInfo + end +end + +# {urn:ebay:apis:eBLBaseComponents}DoCaptureResponseDetailsType +class DoCaptureResponseDetailsType + @@schema_type = "DoCaptureResponseDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["authorizationID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AuthorizationID")]], + ["paymentInfo", ["PaymentInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentInfo")]] + ] + + attr_accessor :authorizationID + attr_accessor :paymentInfo + + def initialize(authorizationID = nil, paymentInfo = nil) + @authorizationID = authorizationID + @paymentInfo = paymentInfo + end +end + +# {urn:ebay:apis:eBLBaseComponents}DoDirectPaymentRequestDetailsType +class DoDirectPaymentRequestDetailsType + @@schema_type = "DoDirectPaymentRequestDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["paymentAction", ["PaymentActionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentAction")]], + ["paymentDetails", ["PaymentDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentDetails")]], + ["creditCard", ["CreditCardDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CreditCard")]], + ["iPAddress", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "IPAddress")]], + ["merchantSessionId", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MerchantSessionId")]] + ] + + attr_accessor :paymentAction + attr_accessor :paymentDetails + attr_accessor :creditCard + attr_accessor :iPAddress + attr_accessor :merchantSessionId + + def initialize(paymentAction = nil, paymentDetails = nil, creditCard = nil, iPAddress = nil, merchantSessionId = nil) + @paymentAction = paymentAction + @paymentDetails = paymentDetails + @creditCard = creditCard + @iPAddress = iPAddress + @merchantSessionId = merchantSessionId + end +end + +# {urn:ebay:apis:eBLBaseComponents}BAUpdateResponseDetailsType +class BAUpdateResponseDetailsType + @@schema_type = "BAUpdateResponseDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["mpID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MpID")]], + ["payerInfo", ["PayerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerInfo")]], + ["merchantPullInfo", ["MerchantPullInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MerchantPullInfo")]] + ] + + attr_accessor :mpID + attr_accessor :payerInfo + attr_accessor :merchantPullInfo + + def initialize(mpID = nil, payerInfo = nil, merchantPullInfo = nil) + @mpID = mpID + @payerInfo = payerInfo + @merchantPullInfo = merchantPullInfo + end +end + +# {urn:ebay:apis:eBLBaseComponents}MerchantPullPaymentResponseType +class MerchantPullPaymentResponseType + @@schema_type = "MerchantPullPaymentResponseType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["payerInfo", ["PayerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerInfo")]], + ["paymentInfo", ["PaymentInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentInfo")]], + ["merchantPullInfo", ["MerchantPullInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MerchantPullInfo")]] + ] + + attr_accessor :payerInfo + attr_accessor :paymentInfo + attr_accessor :merchantPullInfo + + def initialize(payerInfo = nil, paymentInfo = nil, merchantPullInfo = nil) + @payerInfo = payerInfo + @paymentInfo = paymentInfo + @merchantPullInfo = merchantPullInfo + end +end + +# {urn:ebay:apis:eBLBaseComponents}MerchantPullInfoType +class MerchantPullInfoType + @@schema_type = "MerchantPullInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["mpStatus", ["MerchantPullStatusCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MpStatus")]], + ["mpMax", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MpMax")]], + ["mpCustom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MpCustom")]], + ["desc", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Desc")]], + ["invoice", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Invoice")]], + ["custom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Custom")]], + ["paymentSourceID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentSourceID")]] + ] + + attr_accessor :mpStatus + attr_accessor :mpMax + attr_accessor :mpCustom + attr_accessor :desc + attr_accessor :invoice + attr_accessor :custom + attr_accessor :paymentSourceID + + def initialize(mpStatus = nil, mpMax = nil, mpCustom = nil, desc = nil, invoice = nil, custom = nil, paymentSourceID = nil) + @mpStatus = mpStatus + @mpMax = mpMax + @mpCustom = mpCustom + @desc = desc + @invoice = invoice + @custom = custom + @paymentSourceID = paymentSourceID + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentTransactionSearchResultType +class PaymentTransactionSearchResultType + @@schema_type = "PaymentTransactionSearchResultType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["timestamp", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timestamp")]], + ["timezone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Timezone")]], + ["type", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Type")]], + ["payer", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Payer")]], + ["payerDisplayName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerDisplayName")]], + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TransactionID")]], + ["status", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Status")]], + ["grossAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GrossAmount")]], + ["feeAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FeeAmount")]], + ["netAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "NetAmount")]] + ] + + attr_accessor :timestamp + attr_accessor :timezone + attr_accessor :type + attr_accessor :payer + attr_accessor :payerDisplayName + attr_accessor :transactionID + attr_accessor :status + attr_accessor :grossAmount + attr_accessor :feeAmount + attr_accessor :netAmount + + def initialize(timestamp = nil, timezone = nil, type = nil, payer = nil, payerDisplayName = nil, transactionID = nil, status = nil, grossAmount = nil, feeAmount = nil, netAmount = nil) + @timestamp = timestamp + @timezone = timezone + @type = type + @payer = payer + @payerDisplayName = payerDisplayName + @transactionID = transactionID + @status = status + @grossAmount = grossAmount + @feeAmount = feeAmount + @netAmount = netAmount + end +end + +# {urn:ebay:apis:eBLBaseComponents}MerchantPullPaymentType +class MerchantPullPaymentType + @@schema_type = "MerchantPullPaymentType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Amount")]], + ["mpID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MpID")]], + ["paymentType", ["MerchantPullPaymentCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentType")]], + ["memo", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Memo")]], + ["emailSubject", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "EmailSubject")]], + ["tax", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Tax")]], + ["shipping", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Shipping")]], + ["handling", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Handling")]], + ["itemName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemName")]], + ["itemNumber", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemNumber")]], + ["invoice", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Invoice")]], + ["custom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Custom")]], + ["buttonSource", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ButtonSource")]] + ] + + attr_accessor :amount + attr_accessor :mpID + attr_accessor :paymentType + attr_accessor :memo + attr_accessor :emailSubject + attr_accessor :tax + attr_accessor :shipping + attr_accessor :handling + attr_accessor :itemName + attr_accessor :itemNumber + attr_accessor :invoice + attr_accessor :custom + attr_accessor :buttonSource + + def initialize(amount = nil, mpID = nil, paymentType = nil, memo = nil, emailSubject = nil, tax = nil, shipping = nil, handling = nil, itemName = nil, itemNumber = nil, invoice = nil, custom = nil, buttonSource = nil) + @amount = amount + @mpID = mpID + @paymentType = paymentType + @memo = memo + @emailSubject = emailSubject + @tax = tax + @shipping = shipping + @handling = handling + @itemName = itemName + @itemNumber = itemNumber + @invoice = invoice + @custom = custom + @buttonSource = buttonSource + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentTransactionType +class PaymentTransactionType + @@schema_type = "PaymentTransactionType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["receiverInfo", ["ReceiverInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReceiverInfo")]], + ["payerInfo", ["PayerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerInfo")]], + ["paymentInfo", ["PaymentInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentInfo")]], + ["paymentItemInfo", ["PaymentItemInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentItemInfo")]] + ] + + attr_accessor :receiverInfo + attr_accessor :payerInfo + attr_accessor :paymentInfo + attr_accessor :paymentItemInfo + + def initialize(receiverInfo = nil, payerInfo = nil, paymentInfo = nil, paymentItemInfo = nil) + @receiverInfo = receiverInfo + @payerInfo = payerInfo + @paymentInfo = paymentInfo + @paymentItemInfo = paymentItemInfo + end +end + +# {urn:ebay:apis:eBLBaseComponents}ReceiverInfoType +class ReceiverInfoType + @@schema_type = "ReceiverInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["business", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Business")]], + ["receiver", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Receiver")]], + ["receiverID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReceiverID")]] + ] + + attr_accessor :business + attr_accessor :receiver + attr_accessor :receiverID + + def initialize(business = nil, receiver = nil, receiverID = nil) + @business = business + @receiver = receiver + @receiverID = receiverID + end +end + +# {urn:ebay:apis:eBLBaseComponents}PayerInfoType +class PayerInfoType + @@schema_type = "PayerInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["payer", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Payer")]], + ["payerID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerID")]], + ["payerStatus", ["PayPalUserStatusCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerStatus")]], + ["payerName", ["PersonNameType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerName")]], + ["payerCountry", ["CountryCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerCountry")]], + ["payerBusiness", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PayerBusiness")]], + ["address", ["AddressType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Address")]], + ["contactPhone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ContactPhone")]] + ] + + attr_accessor :payer + attr_accessor :payerID + attr_accessor :payerStatus + attr_accessor :payerName + attr_accessor :payerCountry + attr_accessor :payerBusiness + attr_accessor :address + attr_accessor :contactPhone + + def initialize(payer = nil, payerID = nil, payerStatus = nil, payerName = nil, payerCountry = nil, payerBusiness = nil, address = nil, contactPhone = nil) + @payer = payer + @payerID = payerID + @payerStatus = payerStatus + @payerName = payerName + @payerCountry = payerCountry + @payerBusiness = payerBusiness + @address = address + @contactPhone = contactPhone + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentInfoType +class PaymentInfoType + @@schema_type = "PaymentInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["transactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TransactionID")]], + ["parentTransactionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ParentTransactionID")]], + ["receiptID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReceiptID")]], + ["transactionType", ["PaymentTransactionCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TransactionType")]], + ["paymentType", ["PaymentCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentType")]], + ["paymentDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentDate")]], + ["grossAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "GrossAmount")]], + ["feeAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "FeeAmount")]], + ["settleAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SettleAmount")]], + ["taxAmount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TaxAmount")]], + ["exchangeRate", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ExchangeRate")]], + ["paymentStatus", ["PaymentStatusCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentStatus")]], + ["pendingReason", ["PendingStatusCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PendingReason")]], + ["reasonCode", ["ReversalReasonCodeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ReasonCode")]] + ] + + attr_accessor :transactionID + attr_accessor :parentTransactionID + attr_accessor :receiptID + attr_accessor :transactionType + attr_accessor :paymentType + attr_accessor :paymentDate + attr_accessor :grossAmount + attr_accessor :feeAmount + attr_accessor :settleAmount + attr_accessor :taxAmount + attr_accessor :exchangeRate + attr_accessor :paymentStatus + attr_accessor :pendingReason + attr_accessor :reasonCode + + def initialize(transactionID = nil, parentTransactionID = nil, receiptID = nil, transactionType = nil, paymentType = nil, paymentDate = nil, grossAmount = nil, feeAmount = nil, settleAmount = nil, taxAmount = nil, exchangeRate = nil, paymentStatus = nil, pendingReason = nil, reasonCode = nil) + @transactionID = transactionID + @parentTransactionID = parentTransactionID + @receiptID = receiptID + @transactionType = transactionType + @paymentType = paymentType + @paymentDate = paymentDate + @grossAmount = grossAmount + @feeAmount = feeAmount + @settleAmount = settleAmount + @taxAmount = taxAmount + @exchangeRate = exchangeRate + @paymentStatus = paymentStatus + @pendingReason = pendingReason + @reasonCode = reasonCode + end +end + +# {urn:ebay:apis:eBLBaseComponents}SubscriptionTermsType +class SubscriptionTermsType + @@schema_type = "SubscriptionTermsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "period") => "SOAP::SOAPString" + } + @@schema_element = [ + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Amount")]] + ] + + attr_accessor :amount + + def xmlattr_period + (@__xmlattr ||= {})[XSD::QName.new(nil, "period")] + end + + def xmlattr_period=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "period")] = value + end + + def initialize(amount = nil) + @amount = amount + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}SubscriptionInfoType +class SubscriptionInfoType + @@schema_type = "SubscriptionInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "reattempt") => "SOAP::SOAPString", + XSD::QName.new(nil, "recurring") => "SOAP::SOAPString" + } + @@schema_element = [ + ["subscriptionID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SubscriptionID")]], + ["subscriptionDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SubscriptionDate")]], + ["effectiveDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "EffectiveDate")]], + ["retryTime", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RetryTime")]], + ["username", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Username")]], + ["password", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Password")]], + ["recurrences", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Recurrences")]], + ["terms", ["SubscriptionTermsType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Terms")]] + ] + + attr_accessor :subscriptionID + attr_accessor :subscriptionDate + attr_accessor :effectiveDate + attr_accessor :retryTime + attr_accessor :username + attr_accessor :password + attr_accessor :recurrences + attr_accessor :terms + + def xmlattr_reattempt + (@__xmlattr ||= {})[XSD::QName.new(nil, "reattempt")] + end + + def xmlattr_reattempt=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "reattempt")] = value + end + + def xmlattr_recurring + (@__xmlattr ||= {})[XSD::QName.new(nil, "recurring")] + end + + def xmlattr_recurring=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "recurring")] = value + end + + def initialize(subscriptionID = nil, subscriptionDate = nil, effectiveDate = nil, retryTime = nil, username = nil, password = nil, recurrences = nil, terms = []) + @subscriptionID = subscriptionID + @subscriptionDate = subscriptionDate + @effectiveDate = effectiveDate + @retryTime = retryTime + @username = username + @password = password + @recurrences = recurrences + @terms = terms + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}AuctionInfoType +class AuctionInfoType + @@schema_type = "AuctionInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "multiItem") => "SOAP::SOAPString" + } + @@schema_element = [ + ["buyerID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BuyerID")]], + ["closingDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ClosingDate")]] + ] + + attr_accessor :buyerID + attr_accessor :closingDate + + def xmlattr_multiItem + (@__xmlattr ||= {})[XSD::QName.new(nil, "multiItem")] + end + + def xmlattr_multiItem=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "multiItem")] = value + end + + def initialize(buyerID = nil, closingDate = nil) + @buyerID = buyerID + @closingDate = closingDate + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}OptionType +class OptionType + @@schema_type = "OptionType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_attribute = { + XSD::QName.new(nil, "name") => "SOAP::SOAPString", + XSD::QName.new(nil, "value") => "SOAP::SOAPString" + } + @@schema_element = [] + + def xmlattr_name + (@__xmlattr ||= {})[XSD::QName.new(nil, "name")] + end + + def xmlattr_name=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "name")] = value + end + + def xmlattr_value + (@__xmlattr ||= {})[XSD::QName.new(nil, "value")] + end + + def xmlattr_value=(value) + (@__xmlattr ||= {})[XSD::QName.new(nil, "value")] = value + end + + def initialize + @__xmlattr = {} + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentDetailsItemType +class PaymentDetailsItemType + @@schema_type = "PaymentDetailsItemType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["name", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Name")]], + ["number", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Number")]], + ["quantity", ["SOAP::SOAPInteger", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Quantity")]], + ["tax", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Tax")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Amount")]] + ] + + attr_accessor :name + attr_accessor :number + attr_accessor :quantity + attr_accessor :tax + attr_accessor :amount + + def initialize(name = nil, number = nil, quantity = nil, tax = nil, amount = nil) + @name = name + @number = number + @quantity = quantity + @tax = tax + @amount = amount + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentItemType +class PaymentItemType + @@schema_type = "PaymentItemType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["name", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Name")]], + ["number", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Number")]], + ["quantity", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Quantity")]], + ["salesTax", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SalesTax")]], + ["amount", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Amount")]], + ["options", ["OptionType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Options")]] + ] + + attr_accessor :name + attr_accessor :number + attr_accessor :quantity + attr_accessor :salesTax + attr_accessor :amount + attr_accessor :options + + def initialize(name = nil, number = nil, quantity = nil, salesTax = nil, amount = nil, options = []) + @name = name + @number = number + @quantity = quantity + @salesTax = salesTax + @amount = amount + @options = options + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentItemInfoType +class PaymentItemInfoType + @@schema_type = "PaymentItemInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["invoiceID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InvoiceID")]], + ["custom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Custom")]], + ["memo", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Memo")]], + ["salesTax", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SalesTax")]], + ["paymentItem", ["PaymentItemType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentItem")]], + ["subscription", ["SubscriptionInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Subscription")]], + ["auction", ["AuctionInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Auction")]] + ] + + attr_accessor :invoiceID + attr_accessor :custom + attr_accessor :memo + attr_accessor :salesTax + attr_accessor :paymentItem + attr_accessor :subscription + attr_accessor :auction + + def initialize(invoiceID = nil, custom = nil, memo = nil, salesTax = nil, paymentItem = [], subscription = nil, auction = nil) + @invoiceID = invoiceID + @custom = custom + @memo = memo + @salesTax = salesTax + @paymentItem = paymentItem + @subscription = subscription + @auction = auction + end +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentDetailsType +class PaymentDetailsType + @@schema_type = "PaymentDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["orderTotal", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "OrderTotal")]], + ["itemTotal", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ItemTotal")]], + ["shippingTotal", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShippingTotal")]], + ["handlingTotal", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "HandlingTotal")]], + ["taxTotal", ["BasicAmountType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "TaxTotal")]], + ["orderDescription", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "OrderDescription")]], + ["custom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Custom")]], + ["invoiceID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "InvoiceID")]], + ["buttonSource", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ButtonSource")]], + ["notifyURL", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "NotifyURL")]], + ["shipToAddress", ["AddressType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ShipToAddress")]], + ["paymentDetailsItem", ["PaymentDetailsItemType[]", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PaymentDetailsItem")]] + ] + + attr_accessor :orderTotal + attr_accessor :itemTotal + attr_accessor :shippingTotal + attr_accessor :handlingTotal + attr_accessor :taxTotal + attr_accessor :orderDescription + attr_accessor :custom + attr_accessor :invoiceID + attr_accessor :buttonSource + attr_accessor :notifyURL + attr_accessor :shipToAddress + attr_accessor :paymentDetailsItem + + def initialize(orderTotal = nil, itemTotal = nil, shippingTotal = nil, handlingTotal = nil, taxTotal = nil, orderDescription = nil, custom = nil, invoiceID = nil, buttonSource = nil, notifyURL = nil, shipToAddress = nil, paymentDetailsItem = []) + @orderTotal = orderTotal + @itemTotal = itemTotal + @shippingTotal = shippingTotal + @handlingTotal = handlingTotal + @taxTotal = taxTotal + @orderDescription = orderDescription + @custom = custom + @invoiceID = invoiceID + @buttonSource = buttonSource + @notifyURL = notifyURL + @shipToAddress = shipToAddress + @paymentDetailsItem = paymentDetailsItem + end +end + +# {urn:ebay:apis:eBLBaseComponents}CreditCardDetailsType +class CreditCardDetailsType + @@schema_type = "CreditCardDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["creditCardType", ["CreditCardTypeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CreditCardType")]], + ["creditCardNumber", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CreditCardNumber")]], + ["expMonth", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ExpMonth")]], + ["expYear", ["SOAP::SOAPInt", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ExpYear")]], + ["cardOwner", ["PayerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CardOwner")]], + ["cVV2", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CVV2")]] + ] + + attr_accessor :creditCardType + attr_accessor :creditCardNumber + attr_accessor :expMonth + attr_accessor :expYear + attr_accessor :cardOwner + attr_accessor :cVV2 + + def initialize(creditCardType = nil, creditCardNumber = nil, expMonth = nil, expYear = nil, cardOwner = nil, cVV2 = nil) + @creditCardType = creditCardType + @creditCardNumber = creditCardNumber + @expMonth = expMonth + @expYear = expYear + @cardOwner = cardOwner + @cVV2 = cVV2 + end +end + +# {urn:ebay:apis:eBLBaseComponents}CustomSecurityHeaderType +class CustomSecurityHeaderType + @@schema_type = "CustomSecurityHeaderType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["eBayAuthToken", "SOAP::SOAPString"], + ["hardExpirationWarning", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "HardExpirationWarning")]], + ["credentials", ["UserIdPasswordType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Credentials")]] + ] + + attr_accessor :eBayAuthToken + attr_accessor :hardExpirationWarning + attr_accessor :credentials + + def initialize(eBayAuthToken = nil, hardExpirationWarning = nil, credentials = nil) + @eBayAuthToken = eBayAuthToken + @hardExpirationWarning = hardExpirationWarning + @credentials = credentials + end +end + +# {urn:ebay:apis:eBLBaseComponents}UserIdPasswordType +class UserIdPasswordType + @@schema_type = "UserIdPasswordType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["appId", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AppId")]], + ["devId", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DevId")]], + ["authCert", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AuthCert")]], + ["username", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Username")]], + ["password", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Password")]], + ["signature", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Signature")]], + ["subject", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Subject")]] + ] + + attr_accessor :appId + attr_accessor :devId + attr_accessor :authCert + attr_accessor :username + attr_accessor :password + attr_accessor :signature + attr_accessor :subject + + def initialize(appId = nil, devId = nil, authCert = nil, username = nil, password = nil, signature = nil, subject = nil) + @appId = appId + @devId = devId + @authCert = authCert + @username = username + @password = password + @signature = signature + @subject = subject + end +end + +# {urn:ebay:apis:eBLBaseComponents}EnterBoardingRequestDetailsType +class EnterBoardingRequestDetailsType + @@schema_type = "EnterBoardingRequestDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["programCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ProgramCode")]], + ["productList", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ProductList")]], + ["partnerCustom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PartnerCustom")]], + ["imageUrl", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ImageUrl")]], + ["marketingCategory", ["MarketingCategoryType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MarketingCategory")]], + ["businessInfo", ["BusinessInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BusinessInfo")]], + ["ownerInfo", ["BusinessOwnerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "OwnerInfo")]], + ["bankAccount", ["BankAccountDetailsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BankAccount")]] + ] + + attr_accessor :programCode + attr_accessor :productList + attr_accessor :partnerCustom + attr_accessor :imageUrl + attr_accessor :marketingCategory + attr_accessor :businessInfo + attr_accessor :ownerInfo + attr_accessor :bankAccount + + def initialize(programCode = nil, productList = nil, partnerCustom = nil, imageUrl = nil, marketingCategory = nil, businessInfo = nil, ownerInfo = nil, bankAccount = nil) + @programCode = programCode + @productList = productList + @partnerCustom = partnerCustom + @imageUrl = imageUrl + @marketingCategory = marketingCategory + @businessInfo = businessInfo + @ownerInfo = ownerInfo + @bankAccount = bankAccount + end +end + +# {urn:ebay:apis:eBLBaseComponents}BusinessInfoType +class BusinessInfoType + @@schema_type = "BusinessInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["type", ["BusinessTypeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Type")]], + ["name", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Name")]], + ["address", ["AddressType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Address")]], + ["workPhone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "WorkPhone")]], + ["category", ["BusinessCategoryType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Category")]], + ["subCategory", ["BusinessSubCategoryType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SubCategory")]], + ["averagePrice", ["AverageTransactionPriceType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AveragePrice")]], + ["averageMonthlyVolume", ["AverageMonthlyVolumeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AverageMonthlyVolume")]], + ["salesVenue", ["SalesVenueType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SalesVenue")]], + ["website", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Website")]], + ["revenueFromOnlineSales", ["PercentageRevenueFromOnlineSalesType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RevenueFromOnlineSales")]], + ["businessEstablished", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "BusinessEstablished")]], + ["customerServiceEmail", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CustomerServiceEmail")]], + ["customerServicePhone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CustomerServicePhone")]] + ] + + attr_accessor :type + attr_accessor :name + attr_accessor :address + attr_accessor :workPhone + attr_accessor :category + attr_accessor :subCategory + attr_accessor :averagePrice + attr_accessor :averageMonthlyVolume + attr_accessor :salesVenue + attr_accessor :website + attr_accessor :revenueFromOnlineSales + attr_accessor :businessEstablished + attr_accessor :customerServiceEmail + attr_accessor :customerServicePhone + + def initialize(type = nil, name = nil, address = nil, workPhone = nil, category = nil, subCategory = nil, averagePrice = nil, averageMonthlyVolume = nil, salesVenue = nil, website = nil, revenueFromOnlineSales = nil, businessEstablished = nil, customerServiceEmail = nil, customerServicePhone = nil) + @type = type + @name = name + @address = address + @workPhone = workPhone + @category = category + @subCategory = subCategory + @averagePrice = averagePrice + @averageMonthlyVolume = averageMonthlyVolume + @salesVenue = salesVenue + @website = website + @revenueFromOnlineSales = revenueFromOnlineSales + @businessEstablished = businessEstablished + @customerServiceEmail = customerServiceEmail + @customerServicePhone = customerServicePhone + end +end + +# {urn:ebay:apis:eBLBaseComponents}BusinessOwnerInfoType +class BusinessOwnerInfoType + @@schema_type = "BusinessOwnerInfoType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["owner", ["PayerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Owner")]], + ["homePhone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "HomePhone")]], + ["mobilePhone", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MobilePhone")]], + ["sSN", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "SSN")]] + ] + + attr_accessor :owner + attr_accessor :homePhone + attr_accessor :mobilePhone + attr_accessor :sSN + + def initialize(owner = nil, homePhone = nil, mobilePhone = nil, sSN = nil) + @owner = owner + @homePhone = homePhone + @mobilePhone = mobilePhone + @sSN = sSN + end +end + +# {urn:ebay:apis:eBLBaseComponents}BankAccountDetailsType +class BankAccountDetailsType + @@schema_type = "BankAccountDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["name", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Name")]], + ["type", ["BankAccountTypeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Type")]], + ["routingNumber", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "RoutingNumber")]], + ["accountNumber", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AccountNumber")]] + ] + + attr_accessor :name + attr_accessor :type + attr_accessor :routingNumber + attr_accessor :accountNumber + + def initialize(name = nil, type = nil, routingNumber = nil, accountNumber = nil) + @name = name + @type = type + @routingNumber = routingNumber + @accountNumber = accountNumber + end +end + +# {urn:ebay:apis:eBLBaseComponents}GetBoardingDetailsResponseDetailsType +class GetBoardingDetailsResponseDetailsType + @@schema_type = "GetBoardingDetailsResponseDetailsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["status", ["BoardingStatusType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Status")]], + ["startDate", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "StartDate")]], + ["lastUpdated", ["SOAP::SOAPDateTime", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "LastUpdated")]], + ["reason", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Reason")]], + ["programName", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ProgramName")]], + ["programCode", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ProgramCode")]], + ["campaignID", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "CampaignID")]], + ["userWithdrawalLimit", ["UserWithdrawalLimitTypeType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "UserWithdrawalLimit")]], + ["partnerCustom", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "PartnerCustom")]], + ["accountOwner", ["PayerInfoType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "AccountOwner")]], + ["credentials", ["APICredentialsType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Credentials")]], + ["configureAPIs", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ConfigureAPIs")]] + ] + + attr_accessor :status + attr_accessor :startDate + attr_accessor :lastUpdated + attr_accessor :reason + attr_accessor :programName + attr_accessor :programCode + attr_accessor :campaignID + attr_accessor :userWithdrawalLimit + attr_accessor :partnerCustom + attr_accessor :accountOwner + attr_accessor :credentials + attr_accessor :configureAPIs + + def initialize(status = nil, startDate = nil, lastUpdated = nil, reason = nil, programName = nil, programCode = nil, campaignID = nil, userWithdrawalLimit = nil, partnerCustom = nil, accountOwner = nil, credentials = nil, configureAPIs = nil) + @status = status + @startDate = startDate + @lastUpdated = lastUpdated + @reason = reason + @programName = programName + @programCode = programCode + @campaignID = campaignID + @userWithdrawalLimit = userWithdrawalLimit + @partnerCustom = partnerCustom + @accountOwner = accountOwner + @credentials = credentials + @configureAPIs = configureAPIs + end +end + +# {urn:ebay:apis:eBLBaseComponents}APICredentialsType +class APICredentialsType + @@schema_type = "APICredentialsType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + @@schema_element = [ + ["username", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Username")]], + ["password", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Password")]], + ["signature", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Signature")]], + ["certificate", ["SOAP::SOAPString", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Certificate")]], + ["type", ["APIAuthenticationType", XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Type")]] + ] + + attr_accessor :username + attr_accessor :password + attr_accessor :signature + attr_accessor :certificate + attr_accessor :type + + def initialize(username = nil, password = nil, signature = nil, certificate = nil, type = nil) + @username = username + @password = password + @signature = signature + @certificate = certificate + @type = type + end +end + +# {urn:ebay:apis:eBLBaseComponents}AccountStateCodeType +class AccountStateCodeType < ::String + @@schema_type = "AccountStateCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Active = AccountStateCodeType.new("Active") + CustomCode = AccountStateCodeType.new("CustomCode") + Inactive = AccountStateCodeType.new("Inactive") + Pending = AccountStateCodeType.new("Pending") +end + +# {urn:ebay:apis:eBLBaseComponents}AckCodeType +class AckCodeType < ::String + @@schema_type = "AckCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = AckCodeType.new("CustomCode") + Failure = AckCodeType.new("Failure") + FailureWithWarning = AckCodeType.new("FailureWithWarning") + Success = AckCodeType.new("Success") + SuccessWithWarning = AckCodeType.new("SuccessWithWarning") + Warning = AckCodeType.new("Warning") +end + +# {urn:ebay:apis:eBLBaseComponents}AddressOwnerCodeType +class AddressOwnerCodeType < ::String + @@schema_type = "AddressOwnerCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = AddressOwnerCodeType.new("CustomCode") + EBay = AddressOwnerCodeType.new("eBay") + PayPal = AddressOwnerCodeType.new("PayPal") +end + +# {urn:ebay:apis:eBLBaseComponents}AuctionTypeCodeType +class AuctionTypeCodeType < ::String + @@schema_type = "AuctionTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AdType = AuctionTypeCodeType.new("Ad type") + Chinese = AuctionTypeCodeType.new("Chinese") + CustomCode = AuctionTypeCodeType.new("CustomCode") + Dutch = AuctionTypeCodeType.new("Dutch") + FixedPriceItem = AuctionTypeCodeType.new("Fixed Price Item") + Live = AuctionTypeCodeType.new("Live") + PersonalOffer = AuctionTypeCodeType.new("Personal Offer") + StoresFixedPrice = AuctionTypeCodeType.new("Stores Fixed-price") + Unknown = AuctionTypeCodeType.new("Unknown") +end + +# {urn:ebay:apis:eBLBaseComponents}BalanceCodeType +class BalanceCodeType < ::String + @@schema_type = "BalanceCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = BalanceCodeType.new("CustomCode") + Other = BalanceCodeType.new("Other") +end + +# {urn:ebay:apis:eBLBaseComponents}BuyerPaymentMethodCodeType +class BuyerPaymentMethodCodeType < ::String + @@schema_type = "BuyerPaymentMethodCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AmEx = BuyerPaymentMethodCodeType.new("AmEx") + CCAccepted = BuyerPaymentMethodCodeType.new("CCAccepted") + COD = BuyerPaymentMethodCodeType.new("COD") + CashOnPickup = BuyerPaymentMethodCodeType.new("CashOnPickup") + CustomCode = BuyerPaymentMethodCodeType.new("CustomCode") + Discover = BuyerPaymentMethodCodeType.new("Discover") + MOCC = BuyerPaymentMethodCodeType.new("MOCC") + MoneyXferAccepted = BuyerPaymentMethodCodeType.new("MoneyXferAccepted") + MoneyXferAcceptedinCheckout = BuyerPaymentMethodCodeType.new("MoneyXferAcceptedinCheckout") + None = BuyerPaymentMethodCodeType.new("None") + Other = BuyerPaymentMethodCodeType.new("Other") + OtherOnlinePayments = BuyerPaymentMethodCodeType.new("OtherOnlinePayments") + PayPal = BuyerPaymentMethodCodeType.new("PayPal") + PaymentSeeDescription = BuyerPaymentMethodCodeType.new("PaymentSeeDescription") + PersonalCheck = BuyerPaymentMethodCodeType.new("PersonalCheck") + VisaMC = BuyerPaymentMethodCodeType.new("VisaMC") +end + +# {urn:ebay:apis:eBLBaseComponents}BuyerProtectionCodeType +class BuyerProtectionCodeType < ::String + @@schema_type = "BuyerProtectionCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = BuyerProtectionCodeType.new("CustomCode") + ItemEligible = BuyerProtectionCodeType.new("ItemEligible") + ItemIneligible = BuyerProtectionCodeType.new("ItemIneligible") + ItemMarkedEligible = BuyerProtectionCodeType.new("ItemMarkedEligible") + ItemMarkedIneligible = BuyerProtectionCodeType.new("ItemMarkedIneligible") +end + +# {urn:ebay:apis:eBLBaseComponents}CheckoutStatusCodeType +class CheckoutStatusCodeType < ::String + @@schema_type = "CheckoutStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + BuyerRequestsTotal = CheckoutStatusCodeType.new("BuyerRequestsTotal") + CheckoutComplete = CheckoutStatusCodeType.new("CheckoutComplete") + CheckoutIncomplete = CheckoutStatusCodeType.new("CheckoutIncomplete") + CustomCode = CheckoutStatusCodeType.new("CustomCode") + SellerResponded = CheckoutStatusCodeType.new("SellerResponded") +end + +# {urn:ebay:apis:eBLBaseComponents}CountryCodeType +class CountryCodeType < ::String + @@schema_type = "CountryCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AA = CountryCodeType.new("AA") + AD = CountryCodeType.new("AD") + AE = CountryCodeType.new("AE") + AF = CountryCodeType.new("AF") + AG = CountryCodeType.new("AG") + AI = CountryCodeType.new("AI") + AL = CountryCodeType.new("AL") + AM = CountryCodeType.new("AM") + AN = CountryCodeType.new("AN") + AO = CountryCodeType.new("AO") + AQ = CountryCodeType.new("AQ") + AR = CountryCodeType.new("AR") + AS = CountryCodeType.new("AS") + AT = CountryCodeType.new("AT") + AU = CountryCodeType.new("AU") + AW = CountryCodeType.new("AW") + AZ = CountryCodeType.new("AZ") + BA = CountryCodeType.new("BA") + BB = CountryCodeType.new("BB") + BD = CountryCodeType.new("BD") + BE = CountryCodeType.new("BE") + BF = CountryCodeType.new("BF") + BG = CountryCodeType.new("BG") + BH = CountryCodeType.new("BH") + BI = CountryCodeType.new("BI") + BJ = CountryCodeType.new("BJ") + BM = CountryCodeType.new("BM") + BN = CountryCodeType.new("BN") + BO = CountryCodeType.new("BO") + BR = CountryCodeType.new("BR") + BS = CountryCodeType.new("BS") + BT = CountryCodeType.new("BT") + BV = CountryCodeType.new("BV") + BW = CountryCodeType.new("BW") + BY = CountryCodeType.new("BY") + BZ = CountryCodeType.new("BZ") + CA = CountryCodeType.new("CA") + CC = CountryCodeType.new("CC") + CD = CountryCodeType.new("CD") + CF = CountryCodeType.new("CF") + CG = CountryCodeType.new("CG") + CH = CountryCodeType.new("CH") + CI = CountryCodeType.new("CI") + CK = CountryCodeType.new("CK") + CL = CountryCodeType.new("CL") + CM = CountryCodeType.new("CM") + CN = CountryCodeType.new("CN") + CO = CountryCodeType.new("CO") + CR = CountryCodeType.new("CR") + CU = CountryCodeType.new("CU") + CV = CountryCodeType.new("CV") + CX = CountryCodeType.new("CX") + CY = CountryCodeType.new("CY") + CZ = CountryCodeType.new("CZ") + CustomCode = CountryCodeType.new("CustomCode") + DE = CountryCodeType.new("DE") + DJ = CountryCodeType.new("DJ") + DK = CountryCodeType.new("DK") + DM = CountryCodeType.new("DM") + DO = CountryCodeType.new("DO") + DZ = CountryCodeType.new("DZ") + EC = CountryCodeType.new("EC") + EE = CountryCodeType.new("EE") + EG = CountryCodeType.new("EG") + EH = CountryCodeType.new("EH") + ER = CountryCodeType.new("ER") + ES = CountryCodeType.new("ES") + ET = CountryCodeType.new("ET") + FI = CountryCodeType.new("FI") + FJ = CountryCodeType.new("FJ") + FK = CountryCodeType.new("FK") + FM = CountryCodeType.new("FM") + FO = CountryCodeType.new("FO") + FR = CountryCodeType.new("FR") + GA = CountryCodeType.new("GA") + GB = CountryCodeType.new("GB") + GD = CountryCodeType.new("GD") + GE = CountryCodeType.new("GE") + GF = CountryCodeType.new("GF") + GH = CountryCodeType.new("GH") + GI = CountryCodeType.new("GI") + GL = CountryCodeType.new("GL") + GM = CountryCodeType.new("GM") + GN = CountryCodeType.new("GN") + GP = CountryCodeType.new("GP") + GQ = CountryCodeType.new("GQ") + GR = CountryCodeType.new("GR") + GS = CountryCodeType.new("GS") + GT = CountryCodeType.new("GT") + GU = CountryCodeType.new("GU") + GW = CountryCodeType.new("GW") + GY = CountryCodeType.new("GY") + HK = CountryCodeType.new("HK") + HM = CountryCodeType.new("HM") + HN = CountryCodeType.new("HN") + HR = CountryCodeType.new("HR") + HT = CountryCodeType.new("HT") + HU = CountryCodeType.new("HU") + ID = CountryCodeType.new("ID") + IE = CountryCodeType.new("IE") + IL = CountryCodeType.new("IL") + IN = CountryCodeType.new("IN") + IO = CountryCodeType.new("IO") + IQ = CountryCodeType.new("IQ") + IR = CountryCodeType.new("IR") + IS = CountryCodeType.new("IS") + IT = CountryCodeType.new("IT") + JM = CountryCodeType.new("JM") + JO = CountryCodeType.new("JO") + JP = CountryCodeType.new("JP") + KE = CountryCodeType.new("KE") + KG = CountryCodeType.new("KG") + KH = CountryCodeType.new("KH") + KI = CountryCodeType.new("KI") + KM = CountryCodeType.new("KM") + KN = CountryCodeType.new("KN") + KP = CountryCodeType.new("KP") + KR = CountryCodeType.new("KR") + KW = CountryCodeType.new("KW") + KY = CountryCodeType.new("KY") + KZ = CountryCodeType.new("KZ") + LA = CountryCodeType.new("LA") + LB = CountryCodeType.new("LB") + LC = CountryCodeType.new("LC") + LI = CountryCodeType.new("LI") + LK = CountryCodeType.new("LK") + LR = CountryCodeType.new("LR") + LS = CountryCodeType.new("LS") + LT = CountryCodeType.new("LT") + LU = CountryCodeType.new("LU") + LV = CountryCodeType.new("LV") + LY = CountryCodeType.new("LY") + MA = CountryCodeType.new("MA") + MC = CountryCodeType.new("MC") + MD = CountryCodeType.new("MD") + MG = CountryCodeType.new("MG") + MH = CountryCodeType.new("MH") + MK = CountryCodeType.new("MK") + ML = CountryCodeType.new("ML") + MM = CountryCodeType.new("MM") + MN = CountryCodeType.new("MN") + MO = CountryCodeType.new("MO") + MP = CountryCodeType.new("MP") + MQ = CountryCodeType.new("MQ") + MR = CountryCodeType.new("MR") + MS = CountryCodeType.new("MS") + MT = CountryCodeType.new("MT") + MU = CountryCodeType.new("MU") + MV = CountryCodeType.new("MV") + MW = CountryCodeType.new("MW") + MX = CountryCodeType.new("MX") + MY = CountryCodeType.new("MY") + MZ = CountryCodeType.new("MZ") + NA = CountryCodeType.new("NA") + NC = CountryCodeType.new("NC") + NE = CountryCodeType.new("NE") + NF = CountryCodeType.new("NF") + NG = CountryCodeType.new("NG") + NI = CountryCodeType.new("NI") + NL = CountryCodeType.new("NL") + NO = CountryCodeType.new("NO") + NP = CountryCodeType.new("NP") + NR = CountryCodeType.new("NR") + NU = CountryCodeType.new("NU") + NZ = CountryCodeType.new("NZ") + OM = CountryCodeType.new("OM") + PA = CountryCodeType.new("PA") + PE = CountryCodeType.new("PE") + PF = CountryCodeType.new("PF") + PG = CountryCodeType.new("PG") + PH = CountryCodeType.new("PH") + PK = CountryCodeType.new("PK") + PL = CountryCodeType.new("PL") + PM = CountryCodeType.new("PM") + PN = CountryCodeType.new("PN") + PR = CountryCodeType.new("PR") + PS = CountryCodeType.new("PS") + PT = CountryCodeType.new("PT") + PW = CountryCodeType.new("PW") + PY = CountryCodeType.new("PY") + QA = CountryCodeType.new("QA") + QM = CountryCodeType.new("QM") + QN = CountryCodeType.new("QN") + QO = CountryCodeType.new("QO") + QP = CountryCodeType.new("QP") + RE = CountryCodeType.new("RE") + RO = CountryCodeType.new("RO") + RU = CountryCodeType.new("RU") + RW = CountryCodeType.new("RW") + SA = CountryCodeType.new("SA") + SB = CountryCodeType.new("SB") + SC = CountryCodeType.new("SC") + SD = CountryCodeType.new("SD") + SE = CountryCodeType.new("SE") + SG = CountryCodeType.new("SG") + SH = CountryCodeType.new("SH") + SI = CountryCodeType.new("SI") + SJ = CountryCodeType.new("SJ") + SK = CountryCodeType.new("SK") + SL = CountryCodeType.new("SL") + SM = CountryCodeType.new("SM") + SN = CountryCodeType.new("SN") + SO = CountryCodeType.new("SO") + SR = CountryCodeType.new("SR") + ST = CountryCodeType.new("ST") + SV = CountryCodeType.new("SV") + SY = CountryCodeType.new("SY") + SZ = CountryCodeType.new("SZ") + TC = CountryCodeType.new("TC") + TD = CountryCodeType.new("TD") + TF = CountryCodeType.new("TF") + TG = CountryCodeType.new("TG") + TH = CountryCodeType.new("TH") + TJ = CountryCodeType.new("TJ") + TK = CountryCodeType.new("TK") + TM = CountryCodeType.new("TM") + TN = CountryCodeType.new("TN") + TO = CountryCodeType.new("TO") + TP = CountryCodeType.new("TP") + TR = CountryCodeType.new("TR") + TT = CountryCodeType.new("TT") + TV = CountryCodeType.new("TV") + TW = CountryCodeType.new("TW") + TZ = CountryCodeType.new("TZ") + UA = CountryCodeType.new("UA") + UG = CountryCodeType.new("UG") + UM = CountryCodeType.new("UM") + US = CountryCodeType.new("US") + UY = CountryCodeType.new("UY") + UZ = CountryCodeType.new("UZ") + VA = CountryCodeType.new("VA") + VC = CountryCodeType.new("VC") + VE = CountryCodeType.new("VE") + VG = CountryCodeType.new("VG") + VI = CountryCodeType.new("VI") + VN = CountryCodeType.new("VN") + VU = CountryCodeType.new("VU") + WF = CountryCodeType.new("WF") + WS = CountryCodeType.new("WS") + YE = CountryCodeType.new("YE") + YT = CountryCodeType.new("YT") + YU = CountryCodeType.new("YU") + ZA = CountryCodeType.new("ZA") + ZM = CountryCodeType.new("ZM") + ZW = CountryCodeType.new("ZW") +end + +# {urn:ebay:apis:eBLBaseComponents}CurrencyCodeType +class CurrencyCodeType < ::String + @@schema_type = "CurrencyCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + ADP = CurrencyCodeType.new("ADP") + AED = CurrencyCodeType.new("AED") + AFA = CurrencyCodeType.new("AFA") + ALL = CurrencyCodeType.new("ALL") + AMD = CurrencyCodeType.new("AMD") + ANG = CurrencyCodeType.new("ANG") + AOA = CurrencyCodeType.new("AOA") + ARS = CurrencyCodeType.new("ARS") + AUD = CurrencyCodeType.new("AUD") + AWG = CurrencyCodeType.new("AWG") + AZM = CurrencyCodeType.new("AZM") + BAM = CurrencyCodeType.new("BAM") + BBD = CurrencyCodeType.new("BBD") + BDT = CurrencyCodeType.new("BDT") + BGL = CurrencyCodeType.new("BGL") + BGN = CurrencyCodeType.new("BGN") + BHD = CurrencyCodeType.new("BHD") + BIF = CurrencyCodeType.new("BIF") + BMD = CurrencyCodeType.new("BMD") + BND = CurrencyCodeType.new("BND") + BOB = CurrencyCodeType.new("BOB") + BOV = CurrencyCodeType.new("BOV") + BRL = CurrencyCodeType.new("BRL") + BSD = CurrencyCodeType.new("BSD") + BTN = CurrencyCodeType.new("BTN") + BWP = CurrencyCodeType.new("BWP") + BYR = CurrencyCodeType.new("BYR") + BZD = CurrencyCodeType.new("BZD") + CAD = CurrencyCodeType.new("CAD") + CDF = CurrencyCodeType.new("CDF") + CHF = CurrencyCodeType.new("CHF") + CLF = CurrencyCodeType.new("CLF") + CLP = CurrencyCodeType.new("CLP") + CNY = CurrencyCodeType.new("CNY") + COP = CurrencyCodeType.new("COP") + CRC = CurrencyCodeType.new("CRC") + CUP = CurrencyCodeType.new("CUP") + CVE = CurrencyCodeType.new("CVE") + CYP = CurrencyCodeType.new("CYP") + CZK = CurrencyCodeType.new("CZK") + CustomCode = CurrencyCodeType.new("CustomCode") + DJF = CurrencyCodeType.new("DJF") + DKK = CurrencyCodeType.new("DKK") + DOP = CurrencyCodeType.new("DOP") + DZD = CurrencyCodeType.new("DZD") + ECS = CurrencyCodeType.new("ECS") + ECV = CurrencyCodeType.new("ECV") + EEK = CurrencyCodeType.new("EEK") + EGP = CurrencyCodeType.new("EGP") + ERN = CurrencyCodeType.new("ERN") + ETB = CurrencyCodeType.new("ETB") + EUR = CurrencyCodeType.new("EUR") + FJD = CurrencyCodeType.new("FJD") + FKP = CurrencyCodeType.new("FKP") + GBP = CurrencyCodeType.new("GBP") + GEL = CurrencyCodeType.new("GEL") + GHC = CurrencyCodeType.new("GHC") + GIP = CurrencyCodeType.new("GIP") + GMD = CurrencyCodeType.new("GMD") + GNF = CurrencyCodeType.new("GNF") + GTQ = CurrencyCodeType.new("GTQ") + GWP = CurrencyCodeType.new("GWP") + GYD = CurrencyCodeType.new("GYD") + HKD = CurrencyCodeType.new("HKD") + HNL = CurrencyCodeType.new("HNL") + HRK = CurrencyCodeType.new("HRK") + HTG = CurrencyCodeType.new("HTG") + HUF = CurrencyCodeType.new("HUF") + IDR = CurrencyCodeType.new("IDR") + ILS = CurrencyCodeType.new("ILS") + INR = CurrencyCodeType.new("INR") + IQD = CurrencyCodeType.new("IQD") + IRR = CurrencyCodeType.new("IRR") + ISK = CurrencyCodeType.new("ISK") + JMD = CurrencyCodeType.new("JMD") + JOD = CurrencyCodeType.new("JOD") + JPY = CurrencyCodeType.new("JPY") + KES = CurrencyCodeType.new("KES") + KGS = CurrencyCodeType.new("KGS") + KHR = CurrencyCodeType.new("KHR") + KMF = CurrencyCodeType.new("KMF") + KPW = CurrencyCodeType.new("KPW") + KRW = CurrencyCodeType.new("KRW") + KWD = CurrencyCodeType.new("KWD") + KYD = CurrencyCodeType.new("KYD") + KZT = CurrencyCodeType.new("KZT") + LAK = CurrencyCodeType.new("LAK") + LBP = CurrencyCodeType.new("LBP") + LKR = CurrencyCodeType.new("LKR") + LRD = CurrencyCodeType.new("LRD") + LSL = CurrencyCodeType.new("LSL") + LTL = CurrencyCodeType.new("LTL") + LVL = CurrencyCodeType.new("LVL") + LYD = CurrencyCodeType.new("LYD") + MAD = CurrencyCodeType.new("MAD") + MDL = CurrencyCodeType.new("MDL") + MGF = CurrencyCodeType.new("MGF") + MKD = CurrencyCodeType.new("MKD") + MMK = CurrencyCodeType.new("MMK") + MNT = CurrencyCodeType.new("MNT") + MOP = CurrencyCodeType.new("MOP") + MRO = CurrencyCodeType.new("MRO") + MTL = CurrencyCodeType.new("MTL") + MUR = CurrencyCodeType.new("MUR") + MVR = CurrencyCodeType.new("MVR") + MWK = CurrencyCodeType.new("MWK") + MXN = CurrencyCodeType.new("MXN") + MXV = CurrencyCodeType.new("MXV") + MYR = CurrencyCodeType.new("MYR") + MZM = CurrencyCodeType.new("MZM") + NAD = CurrencyCodeType.new("NAD") + NGN = CurrencyCodeType.new("NGN") + NIO = CurrencyCodeType.new("NIO") + NOK = CurrencyCodeType.new("NOK") + NPR = CurrencyCodeType.new("NPR") + NZD = CurrencyCodeType.new("NZD") + OMR = CurrencyCodeType.new("OMR") + PAB = CurrencyCodeType.new("PAB") + PEN = CurrencyCodeType.new("PEN") + PGK = CurrencyCodeType.new("PGK") + PHP = CurrencyCodeType.new("PHP") + PKR = CurrencyCodeType.new("PKR") + PLN = CurrencyCodeType.new("PLN") + PYG = CurrencyCodeType.new("PYG") + QAR = CurrencyCodeType.new("QAR") + ROL = CurrencyCodeType.new("ROL") + RUB = CurrencyCodeType.new("RUB") + RUR = CurrencyCodeType.new("RUR") + RWF = CurrencyCodeType.new("RWF") + SAR = CurrencyCodeType.new("SAR") + SBD = CurrencyCodeType.new("SBD") + SCR = CurrencyCodeType.new("SCR") + SDD = CurrencyCodeType.new("SDD") + SEK = CurrencyCodeType.new("SEK") + SGD = CurrencyCodeType.new("SGD") + SHP = CurrencyCodeType.new("SHP") + SIT = CurrencyCodeType.new("SIT") + SKK = CurrencyCodeType.new("SKK") + SLL = CurrencyCodeType.new("SLL") + SOS = CurrencyCodeType.new("SOS") + SRG = CurrencyCodeType.new("SRG") + STD = CurrencyCodeType.new("STD") + SVC = CurrencyCodeType.new("SVC") + SYP = CurrencyCodeType.new("SYP") + SZL = CurrencyCodeType.new("SZL") + THB = CurrencyCodeType.new("THB") + TJS = CurrencyCodeType.new("TJS") + TMM = CurrencyCodeType.new("TMM") + TND = CurrencyCodeType.new("TND") + TOP = CurrencyCodeType.new("TOP") + TPE = CurrencyCodeType.new("TPE") + TRL = CurrencyCodeType.new("TRL") + TTD = CurrencyCodeType.new("TTD") + TWD = CurrencyCodeType.new("TWD") + TZS = CurrencyCodeType.new("TZS") + UAH = CurrencyCodeType.new("UAH") + UGX = CurrencyCodeType.new("UGX") + USD = CurrencyCodeType.new("USD") + USN = CurrencyCodeType.new("USN") + USS = CurrencyCodeType.new("USS") + UYU = CurrencyCodeType.new("UYU") + UZS = CurrencyCodeType.new("UZS") + VEB = CurrencyCodeType.new("VEB") + VND = CurrencyCodeType.new("VND") + VUV = CurrencyCodeType.new("VUV") + WST = CurrencyCodeType.new("WST") + XAF = CurrencyCodeType.new("XAF") + XCD = CurrencyCodeType.new("XCD") + XOF = CurrencyCodeType.new("XOF") + XPF = CurrencyCodeType.new("XPF") + YER = CurrencyCodeType.new("YER") + YUM = CurrencyCodeType.new("YUM") + ZAR = CurrencyCodeType.new("ZAR") + ZMK = CurrencyCodeType.new("ZMK") + ZWD = CurrencyCodeType.new("ZWD") +end + +# {urn:ebay:apis:eBLBaseComponents}DepositTypeCodeType +class DepositTypeCodeType < ::String + @@schema_type = "DepositTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = DepositTypeCodeType.new("CustomCode") + FastDeposit = DepositTypeCodeType.new("FastDeposit") + None = DepositTypeCodeType.new("None") + OtherMethod = DepositTypeCodeType.new("OtherMethod") +end + +# {urn:ebay:apis:eBLBaseComponents}DetailLevelCodeType +class DetailLevelCodeType < ::String + @@schema_type = "DetailLevelCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + ItemReturnAttributes = DetailLevelCodeType.new("ItemReturnAttributes") + ItemReturnDescription = DetailLevelCodeType.new("ItemReturnDescription") + ReturnAll = DetailLevelCodeType.new("ReturnAll") +end + +# {urn:ebay:apis:eBLBaseComponents}EscrowCodeType +class EscrowCodeType < ::String + @@schema_type = "EscrowCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + ByBuyer = EscrowCodeType.new("ByBuyer") + BySeller = EscrowCodeType.new("BySeller") + CustomCode = EscrowCodeType.new("CustomCode") + None = EscrowCodeType.new("None") +end + +# {urn:ebay:apis:eBLBaseComponents}FeedbackRatingStarCodeType +class FeedbackRatingStarCodeType < ::String + @@schema_type = "FeedbackRatingStarCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Blue = FeedbackRatingStarCodeType.new("Blue") + CustomCode = FeedbackRatingStarCodeType.new("CustomCode") + Green = FeedbackRatingStarCodeType.new("Green") + None = FeedbackRatingStarCodeType.new("None") + Purple = FeedbackRatingStarCodeType.new("Purple") + PurpleShooting = FeedbackRatingStarCodeType.new("PurpleShooting") + Red = FeedbackRatingStarCodeType.new("Red") + RedShooting = FeedbackRatingStarCodeType.new("RedShooting") + Turquoise = FeedbackRatingStarCodeType.new("Turquoise") + TurquoiseShooting = FeedbackRatingStarCodeType.new("TurquoiseShooting") + Yellow = FeedbackRatingStarCodeType.new("Yellow") + YellowShooting = FeedbackRatingStarCodeType.new("YellowShooting") +end + +# {urn:ebay:apis:eBLBaseComponents}GalleryTypeCodeType +class GalleryTypeCodeType < ::String + @@schema_type = "GalleryTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = GalleryTypeCodeType.new("CustomCode") + Featured = GalleryTypeCodeType.new("Featured") + Gallery = GalleryTypeCodeType.new("Gallery") +end + +# {urn:ebay:apis:eBLBaseComponents}GeneralPaymentMethodCodeType +class GeneralPaymentMethodCodeType < ::String + @@schema_type = "GeneralPaymentMethodCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + ACH = GeneralPaymentMethodCodeType.new("ACH") + Creditcard = GeneralPaymentMethodCodeType.new("Creditcard") + CustomCode = GeneralPaymentMethodCodeType.new("CustomCode") + Echeck = GeneralPaymentMethodCodeType.new("Echeck") + Other = GeneralPaymentMethodCodeType.new("Other") + PayPalBalance = GeneralPaymentMethodCodeType.new("PayPalBalance") +end + +# {urn:ebay:apis:eBLBaseComponents}GiftServicesCodeType +class GiftServicesCodeType < ::String + @@schema_type = "GiftServicesCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = GiftServicesCodeType.new("CustomCode") + GiftExpressShipping = GiftServicesCodeType.new("GiftExpressShipping") + GiftShipToRecipient = GiftServicesCodeType.new("GiftShipToRecipient") + GiftWrap = GiftServicesCodeType.new("GiftWrap") +end + +# {urn:ebay:apis:eBLBaseComponents}HitCounterCodeType +class HitCounterCodeType < ::String + @@schema_type = "HitCounterCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = HitCounterCodeType.new("CustomCode") + GreenLED = HitCounterCodeType.new("GreenLED") + Hidden = HitCounterCodeType.new("Hidden") + HonestyStyle = HitCounterCodeType.new("HonestyStyle") + NoHitCounter = HitCounterCodeType.new("NoHitCounter") +end + +# {urn:ebay:apis:eBLBaseComponents}InsuranceOptionCodeType +class InsuranceOptionCodeType < ::String + @@schema_type = "InsuranceOptionCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = InsuranceOptionCodeType.new("CustomCode") + IncludedInShippingHandling = InsuranceOptionCodeType.new("IncludedInShippingHandling") + NotOffered = InsuranceOptionCodeType.new("NotOffered") + Optional = InsuranceOptionCodeType.new("Optional") + Required = InsuranceOptionCodeType.new("Required") +end + +# {urn:ebay:apis:eBLBaseComponents}ListingDurationCodeType +class ListingDurationCodeType < ::String + @@schema_type = "ListingDurationCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = ListingDurationCodeType.new("CustomCode") + Days_1 = ListingDurationCodeType.new("Days_1") + Days_10 = ListingDurationCodeType.new("Days_10") + Days_120 = ListingDurationCodeType.new("Days_120") + Days_3 = ListingDurationCodeType.new("Days_3") + Days_30 = ListingDurationCodeType.new("Days_30") + Days_5 = ListingDurationCodeType.new("Days_5") + Days_60 = ListingDurationCodeType.new("Days_60") + Days_7 = ListingDurationCodeType.new("Days_7") + Days_90 = ListingDurationCodeType.new("Days_90") + GTC = ListingDurationCodeType.new("GTC") +end + +# {urn:ebay:apis:eBLBaseComponents}ListingEnhancementsCodeType +class ListingEnhancementsCodeType < ::String + @@schema_type = "ListingEnhancementsCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + BoldTitle = ListingEnhancementsCodeType.new("BoldTitle") + Border = ListingEnhancementsCodeType.new("Border") + CustomCode = ListingEnhancementsCodeType.new("CustomCode") + Featured = ListingEnhancementsCodeType.new("Featured") + Highlight = ListingEnhancementsCodeType.new("Highlight") + HomePageFeatured = ListingEnhancementsCodeType.new("HomePageFeatured") +end + +# {urn:ebay:apis:eBLBaseComponents}ListingTypeCodeType +class ListingTypeCodeType < ::String + @@schema_type = "ListingTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AdType = ListingTypeCodeType.new("AdType") + Chinese = ListingTypeCodeType.new("Chinese") + CustomCode = ListingTypeCodeType.new("CustomCode") + Dutch = ListingTypeCodeType.new("Dutch") + FixedPriceItem = ListingTypeCodeType.new("FixedPriceItem") + Live = ListingTypeCodeType.new("Live") + PersonalOffer = ListingTypeCodeType.new("PersonalOffer") + StoresFixedPrice = ListingTypeCodeType.new("StoresFixedPrice") + Unknown = ListingTypeCodeType.new("Unknown") +end + +# {urn:ebay:apis:eBLBaseComponents}MerchandizingPrefCodeType +class MerchandizingPrefCodeType < ::String + @@schema_type = "MerchandizingPrefCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = MerchandizingPrefCodeType.new("CustomCode") + OptIn = MerchandizingPrefCodeType.new("OptIn") + OptOut = MerchandizingPrefCodeType.new("OptOut") +end + +# {urn:ebay:apis:eBLBaseComponents}ModifyCodeType +class ModifyCodeType < ::String + @@schema_type = "ModifyCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = ModifyCodeType.new("CustomCode") + Dropped = ModifyCodeType.new("Dropped") + Modify = ModifyCodeType.new("Modify") +end + +# {urn:ebay:apis:eBLBaseComponents}PhotoDisplayCodeType +class PhotoDisplayCodeType < ::String + @@schema_type = "PhotoDisplayCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = PhotoDisplayCodeType.new("CustomCode") + None = PhotoDisplayCodeType.new("None") + PicturePack = PhotoDisplayCodeType.new("PicturePack") + SlideShow = PhotoDisplayCodeType.new("SlideShow") + SuperSize = PhotoDisplayCodeType.new("SuperSize") +end + +# {urn:ebay:apis:eBLBaseComponents}PromotionItemPriceTypeCodeType +class PromotionItemPriceTypeCodeType < ::String + @@schema_type = "PromotionItemPriceTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AuctionPrice = PromotionItemPriceTypeCodeType.new("AuctionPrice") + BuyItNowPrice = PromotionItemPriceTypeCodeType.new("BuyItNowPrice") + CustomCode = PromotionItemPriceTypeCodeType.new("CustomCode") +end + +# {urn:ebay:apis:eBLBaseComponents}PromotionItemSelectionCodeType +class PromotionItemSelectionCodeType < ::String + @@schema_type = "PromotionItemSelectionCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Automatic = PromotionItemSelectionCodeType.new("Automatic") + CustomCode = PromotionItemSelectionCodeType.new("CustomCode") + Manual = PromotionItemSelectionCodeType.new("Manual") +end + +# {urn:ebay:apis:eBLBaseComponents}PromotionMethodCodeType +class PromotionMethodCodeType < ::String + @@schema_type = "PromotionMethodCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CrossSell = PromotionMethodCodeType.new("CrossSell") + CustomCode = PromotionMethodCodeType.new("CustomCode") + UpSell = PromotionMethodCodeType.new("UpSell") +end + +# {urn:ebay:apis:eBLBaseComponents}PromotionSchemeCodeType +class PromotionSchemeCodeType < ::String + @@schema_type = "PromotionSchemeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = PromotionSchemeCodeType.new("CustomCode") + ItemToItem = PromotionSchemeCodeType.new("ItemToItem") + ItemToStoreCat = PromotionSchemeCodeType.new("ItemToStoreCat") + StoreToStoreCat = PromotionSchemeCodeType.new("StoreToStoreCat") +end + +# {urn:ebay:apis:eBLBaseComponents}PurchasePurposeTypeCodeType +class PurchasePurposeTypeCodeType < ::String + @@schema_type = "PurchasePurposeTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AuctionItem = PurchasePurposeTypeCodeType.new("AuctionItem") + BuyNowItem = PurchasePurposeTypeCodeType.new("BuyNowItem") + CustomCode = PurchasePurposeTypeCodeType.new("CustomCode") + Donation = PurchasePurposeTypeCodeType.new("Donation") + EBayBilling = PurchasePurposeTypeCodeType.new("eBayBilling") + GiftCertificates = PurchasePurposeTypeCodeType.new("GiftCertificates") + Other = PurchasePurposeTypeCodeType.new("Other") + ShoppingCart = PurchasePurposeTypeCodeType.new("ShoppingCart") + Subscription = PurchasePurposeTypeCodeType.new("Subscription") +end + +# {urn:ebay:apis:eBLBaseComponents}SellerLevelCodeType +class SellerLevelCodeType < ::String + @@schema_type = "SellerLevelCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Bronze = SellerLevelCodeType.new("Bronze") + CustomCode = SellerLevelCodeType.new("CustomCode") + Gold = SellerLevelCodeType.new("Gold") + None = SellerLevelCodeType.new("None") + Platinum = SellerLevelCodeType.new("Platinum") + Silver = SellerLevelCodeType.new("Silver") + Titanium = SellerLevelCodeType.new("Titanium") +end + +# {urn:ebay:apis:eBLBaseComponents}SellerPaymentMethodCodeType +class SellerPaymentMethodCodeType < ::String + @@schema_type = "SellerPaymentMethodCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Amex = SellerPaymentMethodCodeType.new("Amex") + CustomCode = SellerPaymentMethodCodeType.new("CustomCode") + Diners = SellerPaymentMethodCodeType.new("Diners") + Discover = SellerPaymentMethodCodeType.new("Discover") + JCB = SellerPaymentMethodCodeType.new("JCB") + Mastercard = SellerPaymentMethodCodeType.new("Mastercard") + Other = SellerPaymentMethodCodeType.new("Other") + Visa = SellerPaymentMethodCodeType.new("Visa") +end + +# {urn:ebay:apis:eBLBaseComponents}SeverityCodeType +class SeverityCodeType < ::String + @@schema_type = "SeverityCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = SeverityCodeType.new("CustomCode") + Error = SeverityCodeType.new("Error") + Warning = SeverityCodeType.new("Warning") +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingOptionCodeType +class ShippingOptionCodeType < ::String + @@schema_type = "ShippingOptionCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = ShippingOptionCodeType.new("CustomCode") + SiteOnly = ShippingOptionCodeType.new("SiteOnly") + SitePlusRegions = ShippingOptionCodeType.new("SitePlusRegions") + WillNotShip = ShippingOptionCodeType.new("WillNotShip") + WorldWide = ShippingOptionCodeType.new("WorldWide") +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingPackageCodeType +class ShippingPackageCodeType < ::String + @@schema_type = "ShippingPackageCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = ShippingPackageCodeType.new("CustomCode") + LargeEnvelope = ShippingPackageCodeType.new("LargeEnvelope") + Letter = ShippingPackageCodeType.new("Letter") + None = ShippingPackageCodeType.new("None") + PackageThickEnvelope = ShippingPackageCodeType.new("PackageThickEnvelope") + UPSLetter = ShippingPackageCodeType.new("UPSLetter") + USPSFlatRateEnvelope = ShippingPackageCodeType.new("USPSFlatRateEnvelope") + USPSLargePack = ShippingPackageCodeType.new("USPSLargePack") + VeryLargePack = ShippingPackageCodeType.new("VeryLargePack") +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingRatesTypeCodeType +class ShippingRatesTypeCodeType < ::String + @@schema_type = "ShippingRatesTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Calculated = ShippingRatesTypeCodeType.new("Calculated") + CustomCode = ShippingRatesTypeCodeType.new("CustomCode") + Flat = ShippingRatesTypeCodeType.new("Flat") +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingRegionCodeType +class ShippingRegionCodeType < ::String + @@schema_type = "ShippingRegionCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Africa = ShippingRegionCodeType.new("Africa") + Asia = ShippingRegionCodeType.new("Asia") + Caribbean = ShippingRegionCodeType.new("Caribbean") + CustomCode = ShippingRegionCodeType.new("CustomCode") + Europe = ShippingRegionCodeType.new("Europe") + LatinAmerica = ShippingRegionCodeType.new("LatinAmerica") + MiddleEast = ShippingRegionCodeType.new("MiddleEast") + NorthAmerica = ShippingRegionCodeType.new("NorthAmerica") + Oceania = ShippingRegionCodeType.new("Oceania") + SouthAmerica = ShippingRegionCodeType.new("SouthAmerica") +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingServiceCodeType +class ShippingServiceCodeType < ::String + @@schema_type = "ShippingServiceCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = ShippingServiceCodeType.new("CustomCode") + ShippingMethodExpress = ShippingServiceCodeType.new("ShippingMethodExpress") + ShippingMethodNextDay = ShippingServiceCodeType.new("ShippingMethodNextDay") + ShippingMethodStandard = ShippingServiceCodeType.new("ShippingMethodStandard") + UPS2ndDay = ShippingServiceCodeType.new("UPS2ndDay") + UPS3rdDay = ShippingServiceCodeType.new("UPS3rdDay") + UPSGround = ShippingServiceCodeType.new("UPSGround") + UPSNextDay = ShippingServiceCodeType.new("UPSNextDay") + USPSExpressMail = ShippingServiceCodeType.new("USPSExpressMail") + USPSFirstClass = ShippingServiceCodeType.new("USPSFirstClass") + USPSGround = ShippingServiceCodeType.new("USPSGround") + USPSMedia = ShippingServiceCodeType.new("USPSMedia") + USPSParcel = ShippingServiceCodeType.new("USPSParcel") + USPSPriority = ShippingServiceCodeType.new("USPSPriority") +end + +# {urn:ebay:apis:eBLBaseComponents}ShippingTermsCodeType +class ShippingTermsCodeType < ::String + @@schema_type = "ShippingTermsCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + BuyerPays = ShippingTermsCodeType.new("BuyerPays") + CustomCode = ShippingTermsCodeType.new("CustomCode") + SellerPays = ShippingTermsCodeType.new("SellerPays") +end + +# {urn:ebay:apis:eBLBaseComponents}SiteCodeType +class SiteCodeType < ::String + @@schema_type = "SiteCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Australia = SiteCodeType.new("Australia") + Austria = SiteCodeType.new("Austria") + Belgium_Dutch = SiteCodeType.new("Belgium_Dutch") + Belgium_French = SiteCodeType.new("Belgium_French") + Canada = SiteCodeType.new("Canada") + CustomCode = SiteCodeType.new("CustomCode") + EBayMotors = SiteCodeType.new("eBayMotors") + France = SiteCodeType.new("France") + Germany = SiteCodeType.new("Germany") + HongKong = SiteCodeType.new("HongKong") + Italy = SiteCodeType.new("Italy") + Netherlands = SiteCodeType.new("Netherlands") + Singapore = SiteCodeType.new("Singapore") + Spain = SiteCodeType.new("Spain") + Switzerland = SiteCodeType.new("Switzerland") + Taiwan = SiteCodeType.new("Taiwan") + UK = SiteCodeType.new("UK") + US = SiteCodeType.new("US") +end + +# {urn:ebay:apis:eBLBaseComponents}UnitCodeType +class UnitCodeType < ::String + @@schema_type = "UnitCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Cm = UnitCodeType.new("cm") + CustomCode = UnitCodeType.new("CustomCode") + Ft = UnitCodeType.new("ft") + Inches = UnitCodeType.new("inches") + Kg = UnitCodeType.new("kg") + Lbs = UnitCodeType.new("lbs") + Oz = UnitCodeType.new("oz") +end + +# {urn:ebay:apis:eBLBaseComponents}UserStatusCodeType +class UserStatusCodeType < ::String + @@schema_type = "UserStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AccountOnHold = UserStatusCodeType.new("AccountOnHold") + Confirmed = UserStatusCodeType.new("Confirmed") + CreditCardVerify = UserStatusCodeType.new("CreditCardVerify") + CreditCardVerifyHalfOptIn = UserStatusCodeType.new("CreditCardVerifyHalfOptIn") + CreditCardVerifyPassport = UserStatusCodeType.new("CreditCardVerifyPassport") + CustomCode = UserStatusCodeType.new("CustomCode") + Deleted = UserStatusCodeType.new("Deleted") + Ghost = UserStatusCodeType.new("Ghost") + InMaintenance = UserStatusCodeType.new("InMaintenance") + Merged = UserStatusCodeType.new("Merged") + RegistrationCodeMailOut = UserStatusCodeType.new("RegistrationCodeMailOut") + Suspended = UserStatusCodeType.new("Suspended") + TermPending = UserStatusCodeType.new("TermPending") + Unconfirmed = UserStatusCodeType.new("Unconfirmed") + UnconfirmedExpress = UserStatusCodeType.new("UnconfirmedExpress") + UnconfirmedHalfOptIn = UserStatusCodeType.new("UnconfirmedHalfOptIn") + UnconfirmedPassport = UserStatusCodeType.new("UnconfirmedPassport") + Unknown = UserStatusCodeType.new("Unknown") +end + +# {urn:ebay:apis:eBLBaseComponents}VATStatusCodeType +class VATStatusCodeType < ::String + @@schema_type = "VATStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CustomCode = VATStatusCodeType.new("CustomCode") + NoVATTax = VATStatusCodeType.new("NoVATTax") + VATExempt = VATStatusCodeType.new("VATExempt") + VATTax = VATStatusCodeType.new("VATTax") +end + +# {urn:ebay:apis:eBLBaseComponents}CreditCardTypeType +class CreditCardTypeType < ::String + @@schema_type = "CreditCardTypeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Amex = CreditCardTypeType.new("Amex") + Discover = CreditCardTypeType.new("Discover") + MasterCard = CreditCardTypeType.new("MasterCard") + Visa = CreditCardTypeType.new("Visa") +end + +# {urn:ebay:apis:eBLBaseComponents}RefundPurposeTypeCodeType +class RefundPurposeTypeCodeType < ::String + @@schema_type = "RefundPurposeTypeCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Full = RefundPurposeTypeCodeType.new("Full") + Other = RefundPurposeTypeCodeType.new("Other") + Partial = RefundPurposeTypeCodeType.new("Partial") +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentNotificationServiceCodeType +class PaymentNotificationServiceCodeType < ::String + @@schema_type = "PaymentNotificationServiceCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + EBayCN = PaymentNotificationServiceCodeType.new("eBayCN") +end + +# {urn:ebay:apis:eBLBaseComponents}BankIDCodeType +class BankIDCodeType < ::String + @@schema_type = "BankIDCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CCB = BankIDCodeType.new("CCB") + CMB = BankIDCodeType.new("CMB") + ChinaPay = BankIDCodeType.new("ChinaPay") + ICBC = BankIDCodeType.new("ICBC") +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentTransactionCodeType +class PaymentTransactionCodeType < ::String + @@schema_type = "PaymentTransactionCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Cart = PaymentTransactionCodeType.new("cart") + ExpressCheckout = PaymentTransactionCodeType.new("express-checkout") + MassPay = PaymentTransactionCodeType.new("mass-pay") + MerchtPmt = PaymentTransactionCodeType.new("mercht-pmt") + None = PaymentTransactionCodeType.new("none") + SendMoney = PaymentTransactionCodeType.new("send-money") + SubscrCancel = PaymentTransactionCodeType.new("subscr-cancel") + SubscrEot = PaymentTransactionCodeType.new("subscr-eot") + SubscrFailed = PaymentTransactionCodeType.new("subscr-failed") + SubscrModify = PaymentTransactionCodeType.new("subscr-modify") + SubscrPayment = PaymentTransactionCodeType.new("subscr-payment") + SubscrSignup = PaymentTransactionCodeType.new("subscr-signup") + VirtualTerminal = PaymentTransactionCodeType.new("virtual-terminal") + WebAccept = PaymentTransactionCodeType.new("web-accept") +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentStatusCodeType +class PaymentStatusCodeType < ::String + @@schema_type = "PaymentStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + CanceledReversal = PaymentStatusCodeType.new("Canceled-Reversal") + Completed = PaymentStatusCodeType.new("Completed") + Denied = PaymentStatusCodeType.new("Denied") + Expired = PaymentStatusCodeType.new("Expired") + Failed = PaymentStatusCodeType.new("Failed") + InProgress = PaymentStatusCodeType.new("In-Progress") + None = PaymentStatusCodeType.new("None") + PartiallyRefunded = PaymentStatusCodeType.new("Partially-Refunded") + Pending = PaymentStatusCodeType.new("Pending") + Processed = PaymentStatusCodeType.new("Processed") + Refunded = PaymentStatusCodeType.new("Refunded") + Reversed = PaymentStatusCodeType.new("Reversed") + Voided = PaymentStatusCodeType.new("Voided") +end + +# {urn:ebay:apis:eBLBaseComponents}AddressStatusCodeType +class AddressStatusCodeType < ::String + @@schema_type = "AddressStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Confirmed = AddressStatusCodeType.new("Confirmed") + None = AddressStatusCodeType.new("None") + Unconfirmed = AddressStatusCodeType.new("Unconfirmed") +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentActionCodeType +class PaymentActionCodeType < ::String + @@schema_type = "PaymentActionCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Authorization = PaymentActionCodeType.new("Authorization") + None = PaymentActionCodeType.new("None") + Order = PaymentActionCodeType.new("Order") + Sale = PaymentActionCodeType.new("Sale") +end + +# {urn:ebay:apis:eBLBaseComponents}PendingStatusCodeType +class PendingStatusCodeType < ::String + @@schema_type = "PendingStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Address = PendingStatusCodeType.new("address") + Authorization = PendingStatusCodeType.new("authorization") + Echeck = PendingStatusCodeType.new("echeck") + Intl = PendingStatusCodeType.new("intl") + MultiCurrency = PendingStatusCodeType.new("multi-currency") + None = PendingStatusCodeType.new("none") + Order = PendingStatusCodeType.new("order") + Other = PendingStatusCodeType.new("other") + Unilateral = PendingStatusCodeType.new("unilateral") + Upgrade = PendingStatusCodeType.new("upgrade") + Verify = PendingStatusCodeType.new("verify") +end + +# {urn:ebay:apis:eBLBaseComponents}ReceiverInfoCodeType +class ReceiverInfoCodeType < ::String + @@schema_type = "ReceiverInfoCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + EmailAddress = ReceiverInfoCodeType.new("EmailAddress") + UserID = ReceiverInfoCodeType.new("UserID") +end + +# {urn:ebay:apis:eBLBaseComponents}ReversalReasonCodeType +class ReversalReasonCodeType < ::String + @@schema_type = "ReversalReasonCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + BuyerComplaint = ReversalReasonCodeType.new("buyer-complaint") + Chargeback = ReversalReasonCodeType.new("chargeback") + Guarantee = ReversalReasonCodeType.new("guarantee") + None = ReversalReasonCodeType.new("none") + Other = ReversalReasonCodeType.new("other") + Refund = ReversalReasonCodeType.new("refund") +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentCodeType +class PaymentCodeType < ::String + @@schema_type = "PaymentCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Echeck = PaymentCodeType.new("echeck") + Instant = PaymentCodeType.new("instant") + None = PaymentCodeType.new("none") +end + +# {urn:ebay:apis:eBLBaseComponents}PayPalUserStatusCodeType +class PayPalUserStatusCodeType < ::String + @@schema_type = "PayPalUserStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Unverified = PayPalUserStatusCodeType.new("unverified") + Verified = PayPalUserStatusCodeType.new("verified") +end + +# {urn:ebay:apis:eBLBaseComponents}MerchantPullPaymentCodeType +class MerchantPullPaymentCodeType < ::String + @@schema_type = "MerchantPullPaymentCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Any = MerchantPullPaymentCodeType.new("Any") + EcheckOnly = MerchantPullPaymentCodeType.new("EcheckOnly") + InstantOnly = MerchantPullPaymentCodeType.new("InstantOnly") +end + +# {urn:ebay:apis:eBLBaseComponents}MerchantPullStatusCodeType +class MerchantPullStatusCodeType < ::String + @@schema_type = "MerchantPullStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Active = MerchantPullStatusCodeType.new("Active") + Canceled = MerchantPullStatusCodeType.new("Canceled") +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentTransactionStatusCodeType +class PaymentTransactionStatusCodeType < ::String + @@schema_type = "PaymentTransactionStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Denied = PaymentTransactionStatusCodeType.new("Denied") + Pending = PaymentTransactionStatusCodeType.new("Pending") + Processing = PaymentTransactionStatusCodeType.new("Processing") + Reversed = PaymentTransactionStatusCodeType.new("Reversed") + Success = PaymentTransactionStatusCodeType.new("Success") +end + +# {urn:ebay:apis:eBLBaseComponents}PaymentTransactionClassCodeType +class PaymentTransactionClassCodeType < ::String + @@schema_type = "PaymentTransactionClassCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + All = PaymentTransactionClassCodeType.new("All") + BalanceAffecting = PaymentTransactionClassCodeType.new("BalanceAffecting") + BalanceTransfer = PaymentTransactionClassCodeType.new("BalanceTransfer") + Billpay = PaymentTransactionClassCodeType.new("Billpay") + CurrencyConversions = PaymentTransactionClassCodeType.new("CurrencyConversions") + Dividend = PaymentTransactionClassCodeType.new("Dividend") + ECheck = PaymentTransactionClassCodeType.new("ECheck") + Fee = PaymentTransactionClassCodeType.new("Fee") + FundsAdded = PaymentTransactionClassCodeType.new("FundsAdded") + FundsWithdrawn = PaymentTransactionClassCodeType.new("FundsWithdrawn") + MassPay = PaymentTransactionClassCodeType.new("MassPay") + MoneyRequest = PaymentTransactionClassCodeType.new("MoneyRequest") + PayPalDebitCard = PaymentTransactionClassCodeType.new("PayPalDebitCard") + Received = PaymentTransactionClassCodeType.new("Received") + Referral = PaymentTransactionClassCodeType.new("Referral") + Refund = PaymentTransactionClassCodeType.new("Refund") + Reversal = PaymentTransactionClassCodeType.new("Reversal") + Sent = PaymentTransactionClassCodeType.new("Sent") + Shipping = PaymentTransactionClassCodeType.new("Shipping") + Subscription = PaymentTransactionClassCodeType.new("Subscription") +end + +# {urn:ebay:apis:eBLBaseComponents}MatchStatusCodeType +class MatchStatusCodeType < ::String + @@schema_type = "MatchStatusCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Matched = MatchStatusCodeType.new("Matched") + None = MatchStatusCodeType.new("None") + Unmatched = MatchStatusCodeType.new("Unmatched") +end + +# {urn:ebay:apis:eBLBaseComponents}CompleteCodeType +class CompleteCodeType < ::String + @@schema_type = "CompleteCodeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Complete = CompleteCodeType.new("Complete") + NotComplete = CompleteCodeType.new("NotComplete") +end + +# {urn:ebay:apis:eBLBaseComponents}TransactionEntityType +class TransactionEntityType < ::String + @@schema_type = "TransactionEntityType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Auth = TransactionEntityType.new("Auth") + None = TransactionEntityType.new("None") + Order = TransactionEntityType.new("Order") + Payment = TransactionEntityType.new("Payment") + Reauth = TransactionEntityType.new("Reauth") +end + +# {urn:ebay:apis:eBLBaseComponents}MarketingCategoryType +class MarketingCategoryType < ::String + @@schema_type = "MarketingCategoryType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + MarketingCategory1 = MarketingCategoryType.new("Marketing-Category1") + MarketingCategory2 = MarketingCategoryType.new("Marketing-Category2") +end + +# {urn:ebay:apis:eBLBaseComponents}BusinessTypeType +class BusinessTypeType < ::String + @@schema_type = "BusinessTypeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Corporation = BusinessTypeType.new("Corporation") + Government = BusinessTypeType.new("Government") + Individual = BusinessTypeType.new("Individual") + Nonprofit = BusinessTypeType.new("Nonprofit") + Partnership = BusinessTypeType.new("Partnership") + Proprietorship = BusinessTypeType.new("Proprietorship") + Unknown = BusinessTypeType.new("Unknown") +end + +# {urn:ebay:apis:eBLBaseComponents}BusinessCategoryType +class BusinessCategoryType < ::String + @@schema_type = "BusinessCategoryType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Antiques = BusinessCategoryType.new("Antiques") + Arts = BusinessCategoryType.new("Arts") + Automotive = BusinessCategoryType.new("Automotive") + Beauty = BusinessCategoryType.new("Beauty") + Books = BusinessCategoryType.new("Books") + Business = BusinessCategoryType.new("Business") + CamerasAndPhotography = BusinessCategoryType.new("Cameras-and-Photography") + CategoryUnspecified = BusinessCategoryType.new("Category-Unspecified") + Clothing = BusinessCategoryType.new("Clothing") + Collectibles = BusinessCategoryType.new("Collectibles") + ComputerHardwareAndSoftware = BusinessCategoryType.new("Computer-Hardware-and-Software") + CultureAndReligion = BusinessCategoryType.new("Culture-and-Religion") + ElectronicsAndTelecom = BusinessCategoryType.new("Electronics-and-Telecom") + Entertainment = BusinessCategoryType.new("Entertainment") + EntertainmentMemorabilia = BusinessCategoryType.new("Entertainment-Memorabilia") + FoodDrinkAndNutrition = BusinessCategoryType.new("Food-Drink-and-Nutrition") + GiftsAndFlowers = BusinessCategoryType.new("Gifts-and-Flowers") + HobbiesToysAndGames = BusinessCategoryType.new("Hobbies-Toys-and-Games") + HomeAndGarden = BusinessCategoryType.new("Home-and-Garden") + InternetAndNetworkServices = BusinessCategoryType.new("Internet-and-Network-Services") + MediaAndEntertainment = BusinessCategoryType.new("Media-and-Entertainment") + MedicalAndPharmaceutical = BusinessCategoryType.new("Medical-and-Pharmaceutical") + MoneyServiceBusinesses = BusinessCategoryType.new("Money-Service-Businesses") + NonProfitPoliticalAndReligion = BusinessCategoryType.new("Non-Profit-Political-and-Religion") + NotElsewhereClassified = BusinessCategoryType.new("Not-Elsewhere-Classified") + OtherCategories = BusinessCategoryType.new("Other-Categories") + PetsAndAnimals = BusinessCategoryType.new("Pets-and-Animals") + RealEstate = BusinessCategoryType.new("Real-Estate") + Services = BusinessCategoryType.new("Services") + SportsAndRecreation = BusinessCategoryType.new("Sports-and-Recreation") + Travel = BusinessCategoryType.new("Travel") +end + +# {urn:ebay:apis:eBLBaseComponents}BusinessSubCategoryType +class BusinessSubCategoryType < ::String + @@schema_type = "BusinessSubCategoryType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + ANTIQUESAntiquities = BusinessSubCategoryType.new("ANTIQUES-Antiquities") + ANTIQUESArtifactsGraveRelatedAndNativeAmericanCrafts = BusinessSubCategoryType.new("ANTIQUES-Artifacts-Grave-related-and-Native-American-Crafts") + ANTIQUESBooksManuscripts = BusinessSubCategoryType.new("ANTIQUES-Books-Manuscripts") + ANTIQUESCultural = BusinessSubCategoryType.new("ANTIQUES-Cultural") + ANTIQUESDecorative = BusinessSubCategoryType.new("ANTIQUES-Decorative") + ANTIQUESFurniture = BusinessSubCategoryType.new("ANTIQUES-Furniture") + ANTIQUESGeneral = BusinessSubCategoryType.new("ANTIQUES-General") + ANTIQUESGlass = BusinessSubCategoryType.new("ANTIQUES-Glass") + ANTIQUESPottery = BusinessSubCategoryType.new("ANTIQUES-Pottery") + ANTIQUESRugsCarpets = BusinessSubCategoryType.new("ANTIQUES-RugsCarpets") + ARTSANDCRAFTSArtAndCraftSupplies = BusinessSubCategoryType.new("ARTSANDCRAFTS-Art-and-Craft-Supplies") + ARTSANDCRAFTSArtDealerAndGalleries = BusinessSubCategoryType.new("ARTSANDCRAFTS-Art-Dealer-and-Galleries") + ARTSANDCRAFTSFabricsAndSewing = BusinessSubCategoryType.new("ARTSANDCRAFTS-Fabrics-and-Sewing") + ARTSANDCRAFTSGeneral = BusinessSubCategoryType.new("ARTSANDCRAFTS-General") + ARTSANDCRAFTSPainting = BusinessSubCategoryType.new("ARTSANDCRAFTS-Painting") + ARTSANDCRAFTSPhotography = BusinessSubCategoryType.new("ARTSANDCRAFTS-Photography") + ARTSANDCRAFTSPrints = BusinessSubCategoryType.new("ARTSANDCRAFTS-Prints") + ARTSANDCRAFTSQuilting = BusinessSubCategoryType.new("ARTSANDCRAFTS-Quilting") + ARTSANDCRAFTSReproductions = BusinessSubCategoryType.new("ARTSANDCRAFTS-Reproductions") + ARTSANDCRAFTSScrapbooking = BusinessSubCategoryType.new("ARTSANDCRAFTS-Scrapbooking") + ARTSANDCRAFTSSculptures = BusinessSubCategoryType.new("ARTSANDCRAFTS-Sculptures") + ARTSANDCRAFTSWoodworking = BusinessSubCategoryType.new("ARTSANDCRAFTS-Woodworking") + AUTOMOTIVEAutos = BusinessSubCategoryType.new("AUTOMOTIVE-Autos") + AUTOMOTIVEAviation = BusinessSubCategoryType.new("AUTOMOTIVE-Aviation") + AUTOMOTIVEGeneral = BusinessSubCategoryType.new("AUTOMOTIVE-General") + AUTOMOTIVEMotorcycles = BusinessSubCategoryType.new("AUTOMOTIVE-Motorcycles") + AUTOMOTIVEPartsAndSupplies = BusinessSubCategoryType.new("AUTOMOTIVE-Parts-and-Supplies") + AUTOMOTIVEServices = BusinessSubCategoryType.new("AUTOMOTIVE-Services") + AUTOMOTIVEVintageAndCollectibleVehicles = BusinessSubCategoryType.new("AUTOMOTIVE-Vintage-and-Collectible-Vehicles") + BEAUTYBodyCarePersonalHygiene = BusinessSubCategoryType.new("BEAUTY-Body-Care-Personal-Hygiene") + BEAUTYFragrancesAndPerfumes = BusinessSubCategoryType.new("BEAUTY-Fragrances-and-Perfumes") + BEAUTYGeneral = BusinessSubCategoryType.new("BEAUTY-General") + BEAUTYMakeup = BusinessSubCategoryType.new("BEAUTY-Makeup") + BOOKSAudioBooks = BusinessSubCategoryType.new("BOOKS-Audio-Books") + BOOKSChildrenBooks = BusinessSubCategoryType.new("BOOKS-Children-Books") + BOOKSComputerBooks = BusinessSubCategoryType.new("BOOKS-Computer-Books") + BOOKSEducationalAndTextbooks = BusinessSubCategoryType.new("BOOKS-Educational-and-Textbooks") + BOOKSFictionAndLiterature = BusinessSubCategoryType.new("BOOKS-Fiction-and-Literature") + BOOKSGeneral = BusinessSubCategoryType.new("BOOKS-General") + BOOKSMagazines = BusinessSubCategoryType.new("BOOKS-Magazines") + BOOKSNonFiction = BusinessSubCategoryType.new("BOOKS-NonFiction") + BOOKSVintageAndCollectibles = BusinessSubCategoryType.new("BOOKS-Vintage-and-Collectibles") + BUSINESSAdvertising = BusinessSubCategoryType.new("BUSINESS-Advertising") + BUSINESSAgricultural = BusinessSubCategoryType.new("BUSINESS-Agricultural") + BUSINESSConstruction = BusinessSubCategoryType.new("BUSINESS-Construction") + BUSINESSEducational = BusinessSubCategoryType.new("BUSINESS-Educational") + BUSINESSEmployment = BusinessSubCategoryType.new("BUSINESS-Employment") + BUSINESSGeneral = BusinessSubCategoryType.new("BUSINESS-General") + BUSINESSGeneralServices = BusinessSubCategoryType.new("BUSINESS-GeneralServices") + BUSINESSIndustrial = BusinessSubCategoryType.new("BUSINESS-Industrial") + BUSINESSIndustrialSolvents = BusinessSubCategoryType.new("BUSINESS-Industrial-Solvents") + BUSINESSMarketing = BusinessSubCategoryType.new("BUSINESS-Marketing") + BUSINESSMeetingPlanners = BusinessSubCategoryType.new("BUSINESS-Meeting-Planners") + BUSINESSMessagingAndPagingServices = BusinessSubCategoryType.new("BUSINESS-Messaging-and-Paging-Services") + BUSINESSOfficeSuppliesAndEquipment = BusinessSubCategoryType.new("BUSINESS-Office-Supplies-and-Equipment") + BUSINESSPublishing = BusinessSubCategoryType.new("BUSINESS-Publishing") + BUSINESSSeminars = BusinessSubCategoryType.new("BUSINESS-Seminars") + BUSINESSShippingAndPackaging = BusinessSubCategoryType.new("BUSINESS-Shipping-and-Packaging") + BUSINESSWholesale = BusinessSubCategoryType.new("BUSINESS-Wholesale") + CAMERASANDPHOTOGRAPHYAccessories = BusinessSubCategoryType.new("CAMERASANDPHOTOGRAPHY-Accessories") + CAMERASANDPHOTOGRAPHYCameras = BusinessSubCategoryType.new("CAMERASANDPHOTOGRAPHY-Cameras") + CAMERASANDPHOTOGRAPHYFilm = BusinessSubCategoryType.new("CAMERASANDPHOTOGRAPHY-Film") + CAMERASANDPHOTOGRAPHYGeneral = BusinessSubCategoryType.new("CAMERASANDPHOTOGRAPHY-General") + CAMERASANDPHOTOGRAPHYSupplies = BusinessSubCategoryType.new("CAMERASANDPHOTOGRAPHY-Supplies") + CAMERASANDPHOTOGRAPHYVideoEquipment = BusinessSubCategoryType.new("CAMERASANDPHOTOGRAPHY-Video-Equipment") + CLOTHINGAccessories = BusinessSubCategoryType.new("CLOTHING-Accessories") + CLOTHINGBabiesClothingAndSupplies = BusinessSubCategoryType.new("CLOTHING-Babies-Clothing-and-Supplies") + CLOTHINGChildrensClothing = BusinessSubCategoryType.new("CLOTHING-Childrens-Clothing") + CLOTHINGGeneral = BusinessSubCategoryType.new("CLOTHING-General") + CLOTHINGJewelry = BusinessSubCategoryType.new("CLOTHING-Jewelry") + CLOTHINGMensClothing = BusinessSubCategoryType.new("CLOTHING-Mens-Clothing") + CLOTHINGRings = BusinessSubCategoryType.new("CLOTHING-Rings") + CLOTHINGShoes = BusinessSubCategoryType.new("CLOTHING-Shoes") + CLOTHINGWatchesAndClocks = BusinessSubCategoryType.new("CLOTHING-Watches-and-Clocks") + CLOTHINGWeddingClothing = BusinessSubCategoryType.new("CLOTHING-Wedding-Clothing") + CLOTHINGWomensClothing = BusinessSubCategoryType.new("CLOTHING-Womens-Clothing") + COLLECTIBLESAdvertising = BusinessSubCategoryType.new("COLLECTIBLES-Advertising") + COLLECTIBLESAnimals = BusinessSubCategoryType.new("COLLECTIBLES-Animals") + COLLECTIBLESAnimation = BusinessSubCategoryType.new("COLLECTIBLES-Animation") + COLLECTIBLESCoinOperatedBanksAndCasinos = BusinessSubCategoryType.new("COLLECTIBLES-Coin-Operated-Banks-and-Casinos") + COLLECTIBLESCoinsAndPaperMoney = BusinessSubCategoryType.new("COLLECTIBLES-Coins-and-Paper-Money") + COLLECTIBLESComics = BusinessSubCategoryType.new("COLLECTIBLES-Comics") + COLLECTIBLESDecorative = BusinessSubCategoryType.new("COLLECTIBLES-Decorative") + COLLECTIBLESDisneyana = BusinessSubCategoryType.new("COLLECTIBLES-Disneyana") + COLLECTIBLESGeneral = BusinessSubCategoryType.new("COLLECTIBLES-General") + COLLECTIBLESHoliday = BusinessSubCategoryType.new("COLLECTIBLES-Holiday") + COLLECTIBLESKnivesAndSwords = BusinessSubCategoryType.new("COLLECTIBLES-Knives-and-Swords") + COLLECTIBLESMilitaria = BusinessSubCategoryType.new("COLLECTIBLES-Militaria") + COLLECTIBLESPostcardsAndPaper = BusinessSubCategoryType.new("COLLECTIBLES-Postcards-and-Paper") + COLLECTIBLESStamps = BusinessSubCategoryType.new("COLLECTIBLES-Stamps") + COMPUTERHARDWAREANDSOFTWAREAcademicSoftware = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Academic-Software") + COMPUTERHARDWAREANDSOFTWAREBetaSoftware = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Beta-Software") + COMPUTERHARDWAREANDSOFTWAREDesktopPCs = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Desktop-PCs") + COMPUTERHARDWAREANDSOFTWAREGameSoftware = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Game-Software") + COMPUTERHARDWAREANDSOFTWAREGeneral = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-General") + COMPUTERHARDWAREANDSOFTWAREGeneralSoftware = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-GeneralSoftware") + COMPUTERHARDWAREANDSOFTWAREHardware = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Hardware") + COMPUTERHARDWAREANDSOFTWARELaptopsNotebooksPDAs = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Laptops-Notebooks-PDAs") + COMPUTERHARDWAREANDSOFTWAREMonitors = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Monitors") + COMPUTERHARDWAREANDSOFTWARENetworkingEquipment = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Networking-Equipment") + COMPUTERHARDWAREANDSOFTWAREOemSoftware = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Oem-Software") + COMPUTERHARDWAREANDSOFTWAREPartsAndAccessories = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Parts-and-Accessories") + COMPUTERHARDWAREANDSOFTWAREPeripherals = BusinessSubCategoryType.new("COMPUTERHARDWAREANDSOFTWARE-Peripherals") + CULTUREANDRELIGIONChristianity = BusinessSubCategoryType.new("CULTUREANDRELIGION-Christianity") + CULTUREANDRELIGIONCollectibles = BusinessSubCategoryType.new("CULTUREANDRELIGION-Collectibles") + CULTUREANDRELIGIONGeneral = BusinessSubCategoryType.new("CULTUREANDRELIGION-General") + CULTUREANDRELIGIONMetaphysical = BusinessSubCategoryType.new("CULTUREANDRELIGION-Metaphysical") + CULTUREANDRELIGIONNewAge = BusinessSubCategoryType.new("CULTUREANDRELIGION-New-Age") + CULTUREANDRELIGIONOrganizations = BusinessSubCategoryType.new("CULTUREANDRELIGION-Organizations") + CULTUREANDRELIGIONOtherFaiths = BusinessSubCategoryType.new("CULTUREANDRELIGION-Other-Faiths") + ELECTRONICSANDTELECOMBatteries = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Batteries") + ELECTRONICSANDTELECOMCarAudioAndElectronics = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Car-Audio-and-Electronics") + ELECTRONICSANDTELECOMCellPhonesAndPagers = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Cell-Phones-and-Pagers") + ELECTRONICSANDTELECOMGadgetsAndOtherElectronics = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Gadgets-and-other-electronics") + ELECTRONICSANDTELECOMGeneralElectronics = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-GeneralElectronics") + ELECTRONICSANDTELECOMGeneralTelecom = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-GeneralTelecom") + ELECTRONICSANDTELECOMHomeAudio = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Home-Audio") + ELECTRONICSANDTELECOMHomeElectronics = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Home-Electronics") + ELECTRONICSANDTELECOMRadarDectors = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Radar-Dectors") + ELECTRONICSANDTELECOMRadarJammingDevices = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Radar-Jamming-Devices") + ELECTRONICSANDTELECOMSatelliteAndCableTVDescramblers = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Satellite-and-Cable-TV-Descramblers") + ELECTRONICSANDTELECOMScannersRadios = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-ScannersRadios") + ELECTRONICSANDTELECOMSurveillanceEquipment = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Surveillance-Equipment") + ELECTRONICSANDTELECOMTelephoneCards = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Telephone-Cards") + ELECTRONICSANDTELECOMTelephoneEquipment = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Telephone-Equipment") + ELECTRONICSANDTELECOMTelephoneServices = BusinessSubCategoryType.new("ELECTRONICSANDTELECOM-Telephone-Services") + ENTERTAINMENTBootlegRecordings = BusinessSubCategoryType.new("ENTERTAINMENT-Bootleg-Recordings") + ENTERTAINMENTConcerts = BusinessSubCategoryType.new("ENTERTAINMENT-Concerts") + ENTERTAINMENTGeneral = BusinessSubCategoryType.new("ENTERTAINMENT-General") + ENTERTAINMENTMEMORABILIAAutographs = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Autographs") + ENTERTAINMENTMEMORABILIAGeneral = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-General") + ENTERTAINMENTMEMORABILIALimitedEditions = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Limited-Editions") + ENTERTAINMENTMEMORABILIAMovie = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Movie") + ENTERTAINMENTMEMORABILIAMusic = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Music") + ENTERTAINMENTMEMORABILIANovelties = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Novelties") + ENTERTAINMENTMEMORABILIAPhotos = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Photos") + ENTERTAINMENTMEMORABILIAPosters = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Posters") + ENTERTAINMENTMEMORABILIAScienceFiction = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Science-Fiction") + ENTERTAINMENTMEMORABILIASportsAndFanShop = BusinessSubCategoryType.new("ENTERTAINMENTMEMORABILIA-Sports-and-Fan-Shop") + ENTERTAINMENTMovies = BusinessSubCategoryType.new("ENTERTAINMENT-Movies") + ENTERTAINMENTMusic = BusinessSubCategoryType.new("ENTERTAINMENT-Music") + ENTERTAINMENTPromotionalItems = BusinessSubCategoryType.new("ENTERTAINMENT-Promotional-Items") + ENTERTAINMENTTheater = BusinessSubCategoryType.new("ENTERTAINMENT-Theater") + FOODDRINKANDNUTRITIONAlcoholicBeverages = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Alcoholic-Beverages") + FOODDRINKANDNUTRITIONCoffeeAndTea = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Coffee-and-Tea") + FOODDRINKANDNUTRITIONFoodProducts = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Food-Products") + FOODDRINKANDNUTRITIONGeneral = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-General") + FOODDRINKANDNUTRITIONGourmetItems = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Gourmet-Items") + FOODDRINKANDNUTRITIONHealthAndNutrition = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Health-and-Nutrition") + FOODDRINKANDNUTRITIONRestaurant = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Restaurant") + FOODDRINKANDNUTRITIONServices = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Services") + FOODDRINKANDNUTRITIONTobaccoAndCigars = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Tobacco-and-Cigars") + FOODDRINKANDNUTRITIONVitaminsAndSupplements = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Vitamins-and-Supplements") + FOODDRINKANDNUTRITIONWeightManagementAndHealthProducts = BusinessSubCategoryType.new("FOODDRINKANDNUTRITION-Weight-Management-and-Health-Products") + GIFTSANDFLOWERSFlowers = BusinessSubCategoryType.new("GIFTSANDFLOWERS-Flowers") + GIFTSANDFLOWERSGeneral = BusinessSubCategoryType.new("GIFTSANDFLOWERS-General") + GIFTSANDFLOWERSGreetingCards = BusinessSubCategoryType.new("GIFTSANDFLOWERS-Greeting-Cards") + GIFTSANDFLOWERSHumorousGiftsAndNovelties = BusinessSubCategoryType.new("GIFTSANDFLOWERS-Humorous-Gifts-and-Novelties") + GIFTSANDFLOWERSPersonalizedGifts = BusinessSubCategoryType.new("GIFTSANDFLOWERS-Personalized-Gifts") + GIFTSANDFLOWERSProducts = BusinessSubCategoryType.new("GIFTSANDFLOWERS-Products") + GIFTSANDFLOWERSServices = BusinessSubCategoryType.new("GIFTSANDFLOWERS-Services") + HOBBIESTOYSANDGAMESActionFigures = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Action-Figures") + HOBBIESTOYSANDGAMESBackupUnreleasedGames = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-BackupUnreleased-Games") + HOBBIESTOYSANDGAMESBarbies = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Barbies") + HOBBIESTOYSANDGAMESBeanBabies = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Bean-Babies") + HOBBIESTOYSANDGAMESBears = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Bears") + HOBBIESTOYSANDGAMESDiecastToysVehicles = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Diecast-Toys-Vehicles") + HOBBIESTOYSANDGAMESDolls = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Dolls") + HOBBIESTOYSANDGAMESGameCopyingHardwaresoftware = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Game-copying-hardwaresoftware") + HOBBIESTOYSANDGAMESGames = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Games") + HOBBIESTOYSANDGAMESGeneral = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-General") + HOBBIESTOYSANDGAMESModChips = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Mod-Chips") + HOBBIESTOYSANDGAMESModelKits = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Model-Kits") + HOBBIESTOYSANDGAMESVideoGamesAndSystems = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Video-Games-and-Systems") + HOBBIESTOYSANDGAMESVintageAndAntiqueToys = BusinessSubCategoryType.new("HOBBIESTOYSANDGAMES-Vintage-and-Antique-Toys") + HOMEANDGARDENAppliances = BusinessSubCategoryType.new("HOMEANDGARDEN-Appliances") + HOMEANDGARDENBedAndBath = BusinessSubCategoryType.new("HOMEANDGARDEN-Bed-and-Bath") + HOMEANDGARDENFurnishingAndDecorating = BusinessSubCategoryType.new("HOMEANDGARDEN-Furnishing-and-Decorating") + HOMEANDGARDENGardenSupplies = BusinessSubCategoryType.new("HOMEANDGARDEN-Garden-Supplies") + HOMEANDGARDENGeneral = BusinessSubCategoryType.new("HOMEANDGARDEN-General") + HOMEANDGARDENHardwareAndTools = BusinessSubCategoryType.new("HOMEANDGARDEN-Hardware-and-Tools") + HOMEANDGARDENHouseholdGoods = BusinessSubCategoryType.new("HOMEANDGARDEN-Household-Goods") + HOMEANDGARDENKitchenware = BusinessSubCategoryType.new("HOMEANDGARDEN-Kitchenware") + HOMEANDGARDENPlantsAndSeeds = BusinessSubCategoryType.new("HOMEANDGARDEN-Plants-and-Seeds") + HOMEANDGARDENRugsAndCarpets = BusinessSubCategoryType.new("HOMEANDGARDEN-Rugs-and-Carpets") + HOMEANDGARDENSecurityAndHomeDefense = BusinessSubCategoryType.new("HOMEANDGARDEN-Security-and-Home-Defense") + INTERNETANDNETWORKSERVICESAuctionManagementTools = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-Auction-management-tools") + INTERNETANDNETWORKSERVICESBulletinBoard = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-Bulletin-board") + INTERNETANDNETWORKSERVICESEcommerceDevelopment = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-ecommerce-development") + INTERNETANDNETWORKSERVICESGeneral = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-General") + INTERNETANDNETWORKSERVICESOnlineMalls = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-Online-Malls") + INTERNETANDNETWORKSERVICESOnlineServices = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-online-services") + INTERNETANDNETWORKSERVICESTrainingServices = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-training-services") + INTERNETANDNETWORKSERVICESWebHostingAndDesign = BusinessSubCategoryType.new("INTERNETANDNETWORKSERVICES-Web-hosting-and-design") + MEDIAANDENTERTAINMENTConcerts = BusinessSubCategoryType.new("MEDIAANDENTERTAINMENT-Concerts") + MEDIAANDENTERTAINMENTGeneral = BusinessSubCategoryType.new("MEDIAANDENTERTAINMENT-General") + MEDIAANDENTERTAINMENTTheater = BusinessSubCategoryType.new("MEDIAANDENTERTAINMENT-Theater") + MEDICALANDPHARMACEUTICALDental = BusinessSubCategoryType.new("MEDICALANDPHARMACEUTICAL-Dental") + MEDICALANDPHARMACEUTICALDevices = BusinessSubCategoryType.new("MEDICALANDPHARMACEUTICAL-Devices") + MEDICALANDPHARMACEUTICALGeneral = BusinessSubCategoryType.new("MEDICALANDPHARMACEUTICAL-General") + MEDICALANDPHARMACEUTICALMedical = BusinessSubCategoryType.new("MEDICALANDPHARMACEUTICAL-Medical") + MEDICALANDPHARMACEUTICALOpthamalic = BusinessSubCategoryType.new("MEDICALANDPHARMACEUTICAL-Opthamalic") + MEDICALANDPHARMACEUTICALPrescriptionDrugs = BusinessSubCategoryType.new("MEDICALANDPHARMACEUTICAL-Prescription-Drugs") + MONEYSERVICEBUSINESSESCheckCashier = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Check-Cashier") + MONEYSERVICEBUSINESSESCurrencyDealerExchange = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Currency-DealerExchange") + MONEYSERVICEBUSINESSESElectronicCash = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Electronic-Cash") + MONEYSERVICEBUSINESSESGeneral = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-General") + MONEYSERVICEBUSINESSESMoneyOrders = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Money-Orders") + MONEYSERVICEBUSINESSESRemittance = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Remittance") + MONEYSERVICEBUSINESSESStoredValueCards = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Stored-Value-Cards") + MONEYSERVICEBUSINESSESTravelersChecks = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Travelers-Checks") + MONEYSERVICEBUSINESSESWireTransfer = BusinessSubCategoryType.new("MONEYSERVICEBUSINESSES-Wire-Transfer") + NONPROFITPOLITICALANDRELIGIONCharities = BusinessSubCategoryType.new("NONPROFITPOLITICALANDRELIGION-Charities") + NONPROFITPOLITICALANDRELIGIONGeneral = BusinessSubCategoryType.new("NONPROFITPOLITICALANDRELIGION-General") + NONPROFITPOLITICALANDRELIGIONPolitical = BusinessSubCategoryType.new("NONPROFITPOLITICALANDRELIGION-Political") + NONPROFITPOLITICALANDRELIGIONReligious = BusinessSubCategoryType.new("NONPROFITPOLITICALANDRELIGION-Religious") + OtherSubCategories = BusinessSubCategoryType.new("Other-SubCategories") + PETSANDANIMALSGeneral = BusinessSubCategoryType.new("PETSANDANIMALS-General") + PETSANDANIMALSSuppliesAndToys = BusinessSubCategoryType.new("PETSANDANIMALS-Supplies-and-Toys") + PETSANDANIMALSWildlifeProducts = BusinessSubCategoryType.new("PETSANDANIMALS-Wildlife-Products") + REALESTATECommercial = BusinessSubCategoryType.new("REALESTATE-Commercial") + REALESTATEGeneral = BusinessSubCategoryType.new("REALESTATE-General") + REALESTATEResidential = BusinessSubCategoryType.new("REALESTATE-Residential") + REALESTATETimeShares = BusinessSubCategoryType.new("REALESTATE-Time-Shares") + SERVICESAggregators = BusinessSubCategoryType.new("SERVICES-Aggregators") + SERVICESChildCareServices = BusinessSubCategoryType.new("SERVICES-Child-Care-Services") + SERVICESConsulting = BusinessSubCategoryType.new("SERVICES-Consulting") + SERVICESDental = BusinessSubCategoryType.new("SERVICES-Dental") + SERVICESEntertainment = BusinessSubCategoryType.new("SERVICES-Entertainment") + SERVICESEventAndWeddingPlanning = BusinessSubCategoryType.new("SERVICES-Event-and-Wedding-Planning") + SERVICESFinancialServices = BusinessSubCategoryType.new("SERVICES-Financial-Services") + SERVICESGeneral = BusinessSubCategoryType.new("SERVICES-General") + SERVICESGeneralGovernment = BusinessSubCategoryType.new("SERVICES-GeneralGovernment") + SERVICESGraphicAndCommercialDesign = BusinessSubCategoryType.new("SERVICES-Graphic-and-Commercial-Design") + SERVICESImportingExporting = BusinessSubCategoryType.new("SERVICES-ImportingExporting") + SERVICESInsuranceDirect = BusinessSubCategoryType.new("SERVICES-InsuranceDirect") + SERVICESLandscaping = BusinessSubCategoryType.new("SERVICES-Landscaping") + SERVICESLegal = BusinessSubCategoryType.new("SERVICES-Legal") + SERVICESLocksmith = BusinessSubCategoryType.new("SERVICES-Locksmith") + SERVICESMedical = BusinessSubCategoryType.new("SERVICES-Medical") + SERVICESOnlineDating = BusinessSubCategoryType.new("SERVICES-Online-Dating") + SERVICESSchoolsAndColleges = BusinessSubCategoryType.new("SERVICES-Schools-and-Colleges") + SERVICESVision = BusinessSubCategoryType.new("SERVICES-Vision") + SPORTSANDRECREATIONBicyclesAndAccessories = BusinessSubCategoryType.new("SPORTSANDRECREATION-Bicycles-and-Accessories") + SPORTSANDRECREATIONBoatingSailingAndAccessories = BusinessSubCategoryType.new("SPORTSANDRECREATION-Boating-Sailing-and-Accessories") + SPORTSANDRECREATIONCampingAndSurvival = BusinessSubCategoryType.new("SPORTSANDRECREATION-Camping-and-Survival") + SPORTSANDRECREATIONExerciseEquipment = BusinessSubCategoryType.new("SPORTSANDRECREATION-Exercise-Equipment") + SPORTSANDRECREATIONFishing = BusinessSubCategoryType.new("SPORTSANDRECREATION-Fishing") + SPORTSANDRECREATIONGeneral = BusinessSubCategoryType.new("SPORTSANDRECREATION-General") + SPORTSANDRECREATIONGolf = BusinessSubCategoryType.new("SPORTSANDRECREATION-Golf") + SPORTSANDRECREATIONHunting = BusinessSubCategoryType.new("SPORTSANDRECREATION-Hunting") + SPORTSANDRECREATIONPaintball = BusinessSubCategoryType.new("SPORTSANDRECREATION-Paintball") + SPORTSANDRECREATIONSportingGoods = BusinessSubCategoryType.new("SPORTSANDRECREATION-Sporting-Goods") + SPORTSANDRECREATIONSwimmingPoolsAndSpas = BusinessSubCategoryType.new("SPORTSANDRECREATION-Swimming-Pools-and-Spas") + SubCategoryUnspecified = BusinessSubCategoryType.new("SubCategory-Unspecified") + TRAVELAccommodations = BusinessSubCategoryType.new("TRAVEL-Accommodations") + TRAVELAgencies = BusinessSubCategoryType.new("TRAVEL-Agencies") + TRAVELAirlines = BusinessSubCategoryType.new("TRAVEL-Airlines") + TRAVELAirlinesSpiritAir = BusinessSubCategoryType.new("TRAVEL-AirlinesSpirit-Air") + TRAVELAutoRentals = BusinessSubCategoryType.new("TRAVEL-Auto-Rentals") + TRAVELCruises = BusinessSubCategoryType.new("TRAVEL-Cruises") + TRAVELGeneral = BusinessSubCategoryType.new("TRAVEL-General") + TRAVELOtherTransportation = BusinessSubCategoryType.new("TRAVEL-Other-Transportation") + TRAVELServices = BusinessSubCategoryType.new("TRAVEL-Services") + TRAVELSupplies = BusinessSubCategoryType.new("TRAVEL-Supplies") + TRAVELTours = BusinessSubCategoryType.new("TRAVEL-Tours") +end + +# {urn:ebay:apis:eBLBaseComponents}AverageTransactionPriceType +class AverageTransactionPriceType < ::String + @@schema_type = "AverageTransactionPriceType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AverageTransactionPriceNotApplicable = AverageTransactionPriceType.new("AverageTransactionPrice-Not-Applicable") + AverageTransactionPriceRange1 = AverageTransactionPriceType.new("AverageTransactionPrice-Range1") + AverageTransactionPriceRange10 = AverageTransactionPriceType.new("AverageTransactionPrice-Range10") + AverageTransactionPriceRange2 = AverageTransactionPriceType.new("AverageTransactionPrice-Range2") + AverageTransactionPriceRange3 = AverageTransactionPriceType.new("AverageTransactionPrice-Range3") + AverageTransactionPriceRange4 = AverageTransactionPriceType.new("AverageTransactionPrice-Range4") + AverageTransactionPriceRange5 = AverageTransactionPriceType.new("AverageTransactionPrice-Range5") + AverageTransactionPriceRange6 = AverageTransactionPriceType.new("AverageTransactionPrice-Range6") + AverageTransactionPriceRange7 = AverageTransactionPriceType.new("AverageTransactionPrice-Range7") + AverageTransactionPriceRange8 = AverageTransactionPriceType.new("AverageTransactionPrice-Range8") + AverageTransactionPriceRange9 = AverageTransactionPriceType.new("AverageTransactionPrice-Range9") +end + +# {urn:ebay:apis:eBLBaseComponents}AverageMonthlyVolumeType +class AverageMonthlyVolumeType < ::String + @@schema_type = "AverageMonthlyVolumeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AverageMonthlyVolumeNotApplicable = AverageMonthlyVolumeType.new("AverageMonthlyVolume-Not-Applicable") + AverageMonthlyVolumeRange1 = AverageMonthlyVolumeType.new("AverageMonthlyVolume-Range1") + AverageMonthlyVolumeRange2 = AverageMonthlyVolumeType.new("AverageMonthlyVolume-Range2") + AverageMonthlyVolumeRange3 = AverageMonthlyVolumeType.new("AverageMonthlyVolume-Range3") + AverageMonthlyVolumeRange4 = AverageMonthlyVolumeType.new("AverageMonthlyVolume-Range4") + AverageMonthlyVolumeRange5 = AverageMonthlyVolumeType.new("AverageMonthlyVolume-Range5") + AverageMonthlyVolumeRange6 = AverageMonthlyVolumeType.new("AverageMonthlyVolume-Range6") +end + +# {urn:ebay:apis:eBLBaseComponents}SalesVenueType +class SalesVenueType < ::String + @@schema_type = "SalesVenueType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AnotherMarketPlace = SalesVenueType.new("AnotherMarketPlace") + EBay = SalesVenueType.new("eBay") + Other = SalesVenueType.new("Other") + OwnWebsite = SalesVenueType.new("OwnWebsite") + VenueUnspecified = SalesVenueType.new("Venue-Unspecified") +end + +# {urn:ebay:apis:eBLBaseComponents}PercentageRevenueFromOnlineSalesType +class PercentageRevenueFromOnlineSalesType < ::String + @@schema_type = "PercentageRevenueFromOnlineSalesType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + PercentageRevenueFromOnlineSalesNotApplicable = PercentageRevenueFromOnlineSalesType.new("PercentageRevenueFromOnlineSales-Not-Applicable") + PercentageRevenueFromOnlineSalesRange1 = PercentageRevenueFromOnlineSalesType.new("PercentageRevenueFromOnlineSales-Range1") + PercentageRevenueFromOnlineSalesRange2 = PercentageRevenueFromOnlineSalesType.new("PercentageRevenueFromOnlineSales-Range2") + PercentageRevenueFromOnlineSalesRange3 = PercentageRevenueFromOnlineSalesType.new("PercentageRevenueFromOnlineSales-Range3") + PercentageRevenueFromOnlineSalesRange4 = PercentageRevenueFromOnlineSalesType.new("PercentageRevenueFromOnlineSales-Range4") +end + +# {urn:ebay:apis:eBLBaseComponents}BankAccountTypeType +class BankAccountTypeType < ::String + @@schema_type = "BankAccountTypeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Checking = BankAccountTypeType.new("Checking") + Savings = BankAccountTypeType.new("Savings") +end + +# {urn:ebay:apis:eBLBaseComponents}BoardingStatusType +class BoardingStatusType < ::String + @@schema_type = "BoardingStatusType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Cancelled = BoardingStatusType.new("Cancelled") + Completed = BoardingStatusType.new("Completed") + Pending = BoardingStatusType.new("Pending") + Unknown = BoardingStatusType.new("Unknown") +end + +# {urn:ebay:apis:eBLBaseComponents}UserWithdrawalLimitTypeType +class UserWithdrawalLimitTypeType < ::String + @@schema_type = "UserWithdrawalLimitTypeType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + Limited = UserWithdrawalLimitTypeType.new("Limited") + Unknown = UserWithdrawalLimitTypeType.new("Unknown") + Unlimited = UserWithdrawalLimitTypeType.new("Unlimited") +end + +# {urn:ebay:apis:eBLBaseComponents}APIAuthenticationType +class APIAuthenticationType < ::String + @@schema_type = "APIAuthenticationType" + @@schema_ns = "urn:ebay:apis:eBLBaseComponents" + + AuthNone = APIAuthenticationType.new("Auth-None") + Cert = APIAuthenticationType.new("Cert") + Sign = APIAuthenticationType.new("Sign") +end diff --git a/vendor/plugins/paypal/lib/defaultDriver.rb b/vendor/plugins/paypal/lib/defaultDriver.rb new file mode 100644 index 0000000..641c13e --- /dev/null +++ b/vendor/plugins/paypal/lib/defaultDriver.rb @@ -0,0 +1,195 @@ +require 'default.rb' + +require 'soap/rpc/driver' + +class PayPalAPIInterface < ::SOAP::RPC::Driver + DefaultEndpointUrl = "https://api.sandbox.paypal.com/2.0/" + MappingRegistry = ::SOAP::Mapping::Registry.new + + Methods = [ + [ nil, + "refundTransaction", + [ ["in", "RefundTransactionRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "RefundTransactionReq"], true], + ["out", "RefundTransactionResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "RefundTransactionResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "getTransactionDetails", + [ ["in", "GetTransactionDetailsRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "GetTransactionDetailsReq"], true], + ["out", "GetTransactionDetailsResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "GetTransactionDetailsResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "billUser", + [ ["in", "BillUserRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "BillUserReq"], true], + ["out", "BillUserResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "BillUserResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "transactionSearch", + [ ["in", "TransactionSearchRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "TransactionSearchReq"], true], + ["out", "TransactionSearchResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "TransactionSearchResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "massPay", + [ ["in", "MassPayRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "MassPayReq"], true], + ["out", "MassPayResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "MassPayResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "billAgreementUpdate", + [ ["in", "BillAgreementUpdateRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "BillAgreementUpdateReq"], true], + ["out", "body", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "BAUpdateResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "addressVerify", + [ ["in", "AddressVerifyRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "AddressVerifyReq"], true], + ["out", "AddressVerifyResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "AddressVerifyResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "enterBoarding", + [ ["in", "EnterBoardingRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "EnterBoardingReq"], true], + ["out", "EnterBoardingResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "EnterBoardingResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "getBoardingDetails", + [ ["in", "GetBoardingDetailsRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "GetBoardingDetailsReq"], true], + ["out", "GetBoardingDetailsResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "GetBoardingDetailsResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ] + ] + + def initialize(endpoint_url = nil) + endpoint_url ||= DefaultEndpointUrl + super(endpoint_url, nil) + self.mapping_registry = MappingRegistry + init_methods + end + +private + + def init_methods + Methods.each do |definitions| + opt = definitions.last + if opt[:request_style] == :document + add_document_operation(*definitions) + else + add_rpc_operation(*definitions) + qname = definitions[0] + name = definitions[2] + if qname.name != name and qname.name.capitalize == name.capitalize + ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| + __send__(name, *arg) + end + end + end + end + end +end + +require 'soap/rpc/driver' + +class PayPalAPIAAInterface < ::SOAP::RPC::Driver + DefaultEndpointUrl = "https://api-aa.sandbox.paypal.com/2.0/" + MappingRegistry = ::SOAP::Mapping::Registry.new + + Methods = [ + [ nil, + "doExpressCheckoutPayment", + [ ["in", "DoExpressCheckoutPaymentRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoExpressCheckoutPaymentReq"], true], + ["out", "DoExpressCheckoutPaymentResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoExpressCheckoutPaymentResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "setExpressCheckout", + [ ["in", "SetExpressCheckoutRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "SetExpressCheckoutReq"], true], + ["out", "SetExpressCheckoutResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "SetExpressCheckoutResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "getExpressCheckoutDetails", + [ ["in", "GetExpressCheckoutDetailsRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "GetExpressCheckoutDetailsReq"], true], + ["out", "GetExpressCheckoutDetailsResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "GetExpressCheckoutDetailsResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "doDirectPayment", + [ ["in", "DoDirectPaymentRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoDirectPaymentReq"], true], + ["out", "DoDirectPaymentResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoDirectPaymentResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "doCapture", + [ ["in", "DoCaptureRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoCaptureReq"], true], + ["out", "DoCaptureResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoCaptureResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "doReauthorization", + [ ["in", "DoReauthorizationRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoReauthorizationReq"], true], + ["out", "DoReauthorizationResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoReauthorizationResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "doVoid", + [ ["in", "DoVoidRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoVoidReq"], true], + ["out", "DoVoidResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoVoidResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ], + [ nil, + "doAuthorization", + [ ["in", "DoAuthorizationRequest", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoAuthorizationReq"], true], + ["out", "DoAuthorizationResponse", ["::SOAP::SOAPElement", "urn:ebay:api:PayPalAPI", "DoAuthorizationResponse"], true] ], + { :request_style => :document, :request_use => :literal, + :response_style => :document, :response_use => :literal } + ] + ] + + def initialize(endpoint_url = nil) + endpoint_url ||= DefaultEndpointUrl + super(endpoint_url, nil) + self.mapping_registry = MappingRegistry + init_methods + end + +private + + def init_methods + Methods.each do |definitions| + opt = definitions.last + if opt[:request_style] == :document + add_document_operation(*definitions) + else + add_rpc_operation(*definitions) + qname = definitions[0] + name = definitions[2] + if qname.name != name and qname.name.capitalize == name.capitalize + ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| + __send__(name, *arg) + end + end + end + end + end +end + diff --git a/vendor/plugins/paypal/lib/paypal.rb b/vendor/plugins/paypal/lib/paypal.rb new file mode 100644 index 0000000..899a7a5 --- /dev/null +++ b/vendor/plugins/paypal/lib/paypal.rb @@ -0,0 +1,368 @@ +#Ruby on Rails PayPal Plugin v1.0 +#Copyright (C) 2006 Andre Price, ELC Technologies + +#This library is free software; you can redistribute it and/or +#modify it under the terms of the GNU Lesser General Public +#License as published by the Free Software Foundation; either +#version 2.1 of the License, or (at your option) any later version. +# +#This library is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +#Lesser General Public License for more details. +# +#You should have received a copy of the GNU Lesser General Public +#License along with this library; if not, write to the Free Software +#Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# PayPal Plugin- +# ---------------------- +# This plugin implements a directcharge method accessed with Paypal.directcharge(params). +# It currently has 3 functions +# * directcharge +# * directauth +# * capture + +require 'defaultDriver.rb' +require 'soap/header/simplehandler' +require 'pp' +# Requester CredentialsHander == internal class used to communicate with paypal api +class RequesterCredentialsHandler < SOAP::Header::SimpleHandler + HeaderName = XSD::QName.new('urn:ebay:api:PayPalAPI', 'RequesterCredentials') + CredentialsName = XSD::QName.new('urn:ebay:apis:eBLBaseComponents', 'Credentials') + UsernameName = XSD::QName.new(nil, 'Username') + PasswordName = XSD::QName.new(nil, 'Password') + SubjectName = XSD::QName.new(nil, 'Subject') + + def initialize(username, password, subject) + super(HeaderName) + @username, @password, @subject = username, password, subject + end + + def on_simple_outbound + {CredentialsName => {UsernameName => @username, PasswordName => @password, SubjectName => @subject}} + end +end + +class Paypal + +=begin rdocdd +Create the paypal client to communicate with the paypal web services api. +Internaly used function +=end + def Paypal.create_client + environment = ENV['RAILS_ENV'] + live = (environment == 'production') + app_root = File.dirname(__FILE__) + '/../../../..' + config_dir = app_root + '/config' + + prefs = File.expand_path(config_dir + '/paypal.yml') + if File.exists?(prefs) + y = YAML.load(File.open(prefs)) + y.each {|pref, value| eval("@#{pref} =\"#{value}\"")} + y[environment].each {|pref, value| eval("@#{pref} =\"#{value}\"")} + end + + if live + client = PayPalAPIAAInterface.new("https://api.paypal.com/2.0/") + else + client = PayPalAPIAAInterface.new() + end + + client.options['protocol.http.ssl_config.verify_mode'] = OpenSSL::SSL::VERIFY_PEER + client.options['protocol.http.ssl_config.ca_file'] = "#{File.expand_path(config_dir)+'/'+@ca_file}" + client.options['protocol.http.ssl_config.client_cert'] = "#{File.expand_path(config_dir)+'/'+@client_cert}" + client.options['protocol.http.ssl_config.client_key'] = "#{File.expand_path(config_dir)+'/'+@client_keys}" + client.headerhandler << RequesterCredentialsHandler.new(@paypal_username, @paypal_password,'') + + # run ruby with -d to see SOAP wiredumps. + client.wiredump_dev = STDERR if $DEBUG + return client + end + + def Paypal.express_checkout_redirect_url(token) + live = ENV['RAILS_ENV'] == 'production' + if live + return "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=#{token}" + else + return "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=#{token}" + end + end + + def Paypal.express_checkout(params) + details = SetExpressCheckoutRequestDetailsType.new + # details.orderTotal = Paypal._usd_amount(params[:amount]) + a = BasicAmountType.new(String(params[:amount])) + a.xmlattr_currencyID = 'USD' + details.orderTotal = a + + details.cancelURL = params[:cancelURL] + details.returnURL = params[:returnURL] + details.noShipping = params[:noShipping] + details.cpp_header_image = params[:cpp_header_image] + + reqtype = SetExpressCheckoutRequestType.new + reqtype.version = '2.0' + reqtype.setExpressCheckoutRequestDetails = details + req = SetExpressCheckoutReq.new(reqtype) + + return create_client().setExpressCheckout(req) + end + + def Paypal.express_checkout_details(params) + reqtype = GetExpressCheckoutDetailsRequestType.new + reqtype.version = '2.0' + reqtype.token = params[:token] + req = GetExpressCheckoutDetailsReq.new(reqtype) + return create_client().getExpressCheckoutDetails(req) + end + + def Paypal.express_checkout_payment(params) + details = DoExpressCheckoutPaymentRequestDetailsType.new + details.token = params[:token] + details.paymentAction = params[:paymentAction] || 'Sale' + details.payerID = params[:payerID] + details.paymentDetails = PaymentDetailsType.new + details.paymentDetails.orderTotal = _usd_amount(params[:amount]) + + reqtype = DoExpressCheckoutPaymentRequestType.new + reqtype.version = '2.0' + reqtype.doExpressCheckoutPaymentRequestDetails = details + req = DoExpressCheckoutPaymentReq.new(reqtype) + return create_client().doExpressCheckoutPayment(req) + end + +=begin rdoc +Function: directcharge + This function performs a doDirectCharge action. Transfering funds from the parameter's account to your paypal merchant account. + + The return value of this function is either "Success" or "Failure" depending on validity of input. + + The directcharge method takes a hash argument (params). + The method expects the hash to be in the form of: + :firstName => "xxxx", + :lastName => "xxxxxx", + :ip => "127.0.0.1", + :amount => "10,000", + :itemName => "Item", + :addressName => "Home", + :street1 => " " "", + :postalCode => "", + :stateOrProvince => "", + :country => " "", + :creditCardNumber => "", + :cVV2 => "" + :expMonth => 7,//example + :expYear => 2999 //example +=end + + def Paypal.directcharge(params) + + client = create_client() + + directreq = DoDirectPaymentReq.new + drtype = DoDirectPaymentRequestType.new + directreq.doDirectPaymentRequest = drtype + drtype.version = "2.0" + dtype = DoDirectPaymentRequestDetailsType.new + dtype.iPAddress = params[:ip] + + pdetails = PaymentDetailsType.new + pdetails.orderTotal = _usd_amount(params[:amount]) + dtype.paymentDetails = pdetails + + drtype.doDirectPaymentRequestDetails = dtype + dcard = CreditCardDetailsType.new + dtype.paymentAction = "Sale" + payerinfo = PayerInfoType.new + addr = AddressType.new + addr.name = params[:addressName] + addr.street1 = params[:street1] + addr.street2 = params[:street2] + addr.cityName = params[:cityName] + addr.postalCode = params[:postalCode] + addr.stateOrProvince = params[:stateOrProvince] + addr.country = params[:country] + dcard.creditCardType = params[:creditCardType] + dcard.creditCardNumber = params[:creditCardNumber] + if (params[:cVV2]==nil) + dcard.cVV2 = "000" + else + dcard.cVV2 = params[:cVV2] + end + dcard.expMonth = params[:expMonth] + dcard.expYear = params[:expYear] + pname = PersonNameType.new + pname.firstName = params[:firstName] + pname.lastName = params[:lastName] + payerinfo.payerName = pname + paydetailssitem = PaymentDetailsItemType.new + paydetailssitem.name = params[:itemName] + dtype.creditCard = dcard + dcard.cardOwner = payerinfo + payerinfo.address = addr + pdetails.shipToAddress = addr + res = client.doDirectPayment(directreq) + puts res.ack if $DEBUG + #res.ack + return res + end +=begin rdoc +Function: directauth + This function performs a directcharge in authorization mode. This means no actual funds are + transfered upon comletetion of this action. + + The return value of this function is either "Failure" or the transactionID for the authorization. + The transactionID is needed if you intend to capture the funds authroized by this function. + The method expects the param hash to be in the form of : + :firstName => "", + :lastName => "", + :ip => " "", //This value has a maximum of 10,000.00 + :itemName => " "Billing", + :street1 => "", + :street2 => "", + :cityName => "", + :postalCode => "", + :stateOrProvince => "", + :country => "", + :creditCardType => "Visa or MasterCard or Amex or Discover", + :creditCardNumber => " " 1 , //Expiration month in numerical form not string + :expYear => 2006 ///Expiration year in numerical form + +=end + def Paypal.directauth(params) + client = create_client() + + directreq = DoDirectPaymentReq.new + drtype = DoDirectPaymentRequestType.new + directreq.doDirectPaymentRequest = drtype + drtype.version = "2.0" + dtype = DoDirectPaymentRequestDetailsType.new + dtype.iPAddress = params[:ip] + + pdetails = PaymentDetailsType.new + pdetails.orderTotal = _usd_amount(params[:amount]) + dtype.paymentDetails = pdetails + + drtype.doDirectPaymentRequestDetails = dtype + dcard = CreditCardDetailsType.new + dtype.paymentAction = "Authorization" + payerinfo = PayerInfoType.new + addr = AddressType.new + addr.name = params[:addressName] + addr.street1 = params[:street1] + addr.street2 = params[:street2] + addr.cityName = params[:cityName] + addr.postalCode = params[:postalCode] + addr.stateOrProvince = params[:stateOrProvince] + addr.country = params[:country] + dcard.creditCardType = params[:creditCardType] + dcard.creditCardNumber = params[:creditCardNumber] + if (params[:cVV2]==nil) + dcard.cVV2 = "000" + else + dcard.cVV2 = params[:cVV2] + end + dcard.expMonth = params[:expMonth] + dcard.expYear = params[:expYear] + pname = PersonNameType.new + pname.firstName = params[:firstName] + pname.lastName = params[:lastName] + payerinfo.payerName = pname + paydetailssitem = PaymentDetailsItemType.new + paydetailssitem.name = params[:itemName] + dtype.creditCard = dcard + dcard.cardOwner = payerinfo + payerinfo.address = addr + pdetails.shipToAddress = addr + res = client.doDirectPayment(directreq) + #puts res.ack + #if res.ack == "Success" +# return res.transactionID +# else +# return "Failure" + # end + return res + end + +=begin rdoc +Function: capture + + This funcion performs a doCapture. It captures or collects the charge from a previously authorized + transaction. This transaction is referenced by the transactionID returned from directauth. + + The return value of this function is either "Success" or "Failure" + + The parameter hash for this function is to be in the following form: + :transactionID => "" + :amount = > "" //should be less than or equal to + //auth's amount + **WARNING*** This function is currently not functioning correctly. It throws NoMethodErrors even when successfuly making a capture. + Even when running in debug mode with wiredumps the responses from paypal are have Ack values of Success. Indicating an error in the parsing of the response outside this plugin. +=end + def Paypal.capture(params) + client = create_client() + capturetype = DoCaptureRequestType.new + capturetype.version = "2.0" + capturereq = DoCaptureReq.new + capturereq.doCaptureRequest = capturetype + capturetype.authorizationID = params[:transactionID] + capturetype.amount = _usd_amount(params[:amount]) + capturetype.completeType = "Complete" + #begin + res = client.doCapture(capturereq) + #puts res.paymentStatus + #return res.ack + return res + #rescue NoMethodError + # puts "Error Caught, Status lost\n" + # return "Failure" + #end + end + def Paypal.authorize(params) + client = create_client() + authreqtype = DoAuthorizationRequestType.new + authreqtype.version = "2.0" + authreq = DoAuthorizationReq.new + authreq.doAuthorizationRequest = authreqtype + authreqtype.transactionID = params[:transactionID] + authreqtype.amount = _usd_amount(params[:amount]) + res = client.doAuthorization(authreq) + return res + end + def Paypal.reauthorize(params) + client = create_client() + reauthreqtype = DoReauthorizationRequestType.new + reauthreqtype.version = "2.0" + reauthreq = DoReauthorizationReq.new + reauthreq.doReauthorizationRequest = reauthreqtype + reauthreqtype.authorizationID = params[:transactionID] + reauthreqtype.amount = _usd_amount(params[:amount]) + res = client.doReauthorization(reauthreq) + return res + end + def Paypal.void(params) + client = create_client() + voidreqtype = DoVoidRequestType.new + voidreqtype.version = "2.0" + voidreq = DoVoidReq.new + voidreq.doVoidRequest = voidreqtype + voidreqtype.authorizationID = params[:transactionID] + res = client.doVoid(voidreq) + return res + end + + private + def Paypal._usd_amount(amount) + a = BasicAmountType.new(String(amount)) + a.xmlattr_currencyID = 'USD' + return a + end +end diff --git a/vendor/plugins/paypal/test/paypal_test.rb b/vendor/plugins/paypal/test/paypal_test.rb new file mode 100644 index 0000000..077831b --- /dev/null +++ b/vendor/plugins/paypal/test/paypal_test.rb @@ -0,0 +1,81 @@ +require File.dirname(__FILE__) + '/test_helper' +class PaypalTest < Test::Unit::TestCase + def setup + @valid_params = { + :firstName => "Byung", + :lastName => "Kim", + :ip => "24.126.62.178", + :amount => "10.00", # //This value has a maximum of 10,000.00 + :itemName => "Podcast Maker", + :addressName => "Billing", + :street1 => "P.O. Box 741327", + :street2 => "", + :cityName => "Los Angeles", + :postalCode => "90004", + :stateOrProvince => "CA", + :country => "US", + :creditCardType => "Visa", + :creditCardNumber => "4760071907631264", + :cVV2 => "121", + :expMonth => 11 , #//Expiration month in numerical form not string + :expYear => 2007 # ///Expiration year in numerical form + + } + + @invalid_params = { + :firstName => "Byung", + :lastName => "Kim", + :ip => "24.126.62.178", + :amount => "10.00", # //This value has a maximum of 10,000.00 + :itemName => "Podcast Maker", + :addressName => "Billing", + :street1 => "P.O. Box 741327", + :street2 => "", + :cityName => "Los Angeles", + :postalCode => "90004", + :stateOrProvince => "CA", + :country => "US", + :creditCardType => "Visa", + :creditCardNumber => "4478068999371265", + :cVV2 => "000", + :expMonth => 7 , #//Expiration month in numerical form not string + :expYear => 2006 # ///Expiration year in numerical form + } + end + + def test_successful_directcharge + assert Paypal.directcharge(@valid_params).ack == "Success" + end + def test_failed_directcharge + assert Paypal.directcharge(@invalid_params).ack == "Failure" + end + def test_successful_authorization + @result = Paypal.directauth(@valid_params) + assert @result.ack != "Failure" + end + def test_failed_authorization + assert Paypal.directauth(@invalid_params).ack == "Failure" + end + def test_successful_capture + @result = Paypal.directauth(@valid_params).transactionID + params = { + :amount => @valid_params[:amount], + :transactionID => @result + } + result = Paypal.capture(params) + assert result.ack != "Failure" + end + def test_successful_voiding + @result = Paypal.directauth(@valid_params).transactionID + params = { + :transactionID => @result } + result = Paypal.void(params) + assert result.ack == "Success" + end + def test_failed_voiding + params = { :transactionID => "invalidcode" } + result = Paypal.void(params) + assert result.ack == "Failure" + end + +end diff --git a/vendor/plugins/paypal/test/test_helper.rb b/vendor/plugins/paypal/test/test_helper.rb new file mode 100644 index 0000000..0a1f91e --- /dev/null +++ b/vendor/plugins/paypal/test/test_helper.rb @@ -0,0 +1,10 @@ +$:.unshift(File.dirname(__FILE__) + '/../lib') + +require 'rubygems' +require 'test/unit' +require 'active_support/binding_of_caller' +require 'active_support/breakpoint' +require "#{File.dirname(__FILE__)}/../init" + +#config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml')) +#ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite']) From 0ae3978254a3ae8f371bee4d59a6a78824bc3f57 Mon Sep 17 00:00:00 2001 From: andykim78 Date: Sun, 24 Jun 2007 05:25:18 +0000 Subject: [PATCH 002/250] Removed favicon and svn log temporary file git-svn-id: https://potionstore.googlecode.com/svn/trunk@3 25f2d1f3-9e33-0410-bf15-d1b47774bbb0 --- public/favicon.png | Bin 665 -> 0 bytes svn-commit.tmp | 4 ---- 2 files changed, 4 deletions(-) delete mode 100644 public/favicon.png delete mode 100644 svn-commit.tmp diff --git a/public/favicon.png b/public/favicon.png deleted file mode 100644 index 3afeb1776307b13166a9d7dc05dcfd9ec8b2a0f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 665 zcmV;K0%rY*P)l?MB@n$p77$)&*UfY?$OU+OyHmc9-qGJ(6&caPOCgHLk|^Zp)eLZ z1|Sn*uhS*W6k4^4qYA8h8BIyNR)l3`NDm^4rQ-Pj?cIF}rAh1=n{R=lF^Fjd8LPd7 z?SaMvtH5*H;m-91PO3QVfggml_68WUHtU0oH8e@ZL{Y6@Z2S>^K>!FHIQgv|2|rx*6?-KJ|s_IDqT)SlyhUTTb|{Cw%S4 z^!lkd#Qc1w61p1`{C4rY=q!V|S&Pob4_-Ml#M4q>D*8&q;(VrZjxvy*Ovb;cRO;h8 z$h%*^RAc#SpW25l*peIeh4w(4u{zdje@JET3y*L8i(_Nh%v>Q4pW zayjGP%^DBy-(|jDA1To=jC>#Z+W)Te9{~mc(@6;M#HTHd00000NkvXXu0mjf^h`6g diff --git a/svn-commit.tmp b/svn-commit.tmp deleted file mode 100644 index cbeacf0..0000000 --- a/svn-commit.tmp +++ /dev/null @@ -1,4 +0,0 @@ -Initial import of version 0.1.0 ---This line, and those below, will be ignored-- - -A . From 4f9998d30bee18731ca43d23dfd45ad0ef42c4f0 Mon Sep 17 00:00:00 2001 From: andykim78 Date: Sun, 24 Jun 2007 07:15:36 +0000 Subject: [PATCH 003/250] - Searching by order number possible now - Cleaned up sql code for the admin dashboard - Applied patch from Jamie Hardt -- The admin page no longer craps out when there are no orders. git-svn-id: https://potionstore.googlecode.com/svn/trunk@4 25f2d1f3-9e33-0410-bf15-d1b47774bbb0 --- TODO | 8 +- app/controllers/admin_controller.rb | 142 +- log/development.log | 7328 +++++++++++++++++++++++++++ 3 files changed, 7425 insertions(+), 53 deletions(-) diff --git a/TODO b/TODO index 0a80980..b776e3a 100644 --- a/TODO +++ b/TODO @@ -1,11 +1,17 @@ + Any volunteers? - Write some unit tests -- Show sales graphs in the admin site +- Show sales graphs instead of tables in the dashboard Changes: +6/23/2007 +- Searching by order number possible now +- Cleaned up sql code for the admin dashboard +- Applied patch from Jamie Hardt -- The admin page no longer craps out when there are no orders. + 12/11/2006 - AK: No longer says coupons at the bottom when there are no coupons - AK: Percentage based coupons accepted now diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e0e928d..26b4dc6 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,4 +1,3 @@ - class AdminController < ApplicationController # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destroy, :create, :update ], @@ -23,7 +22,7 @@ def signin session[:logged_in] = true redirect_to :action => session[:intended_action] else - flash[:notice] = 'Go home kid. This ain\'t for you.' + flash[:notice] = "Go home kid. This ain't for you." render :action => "signin_form", :layout => 'error' end end @@ -33,28 +32,58 @@ def signout redirect_to home_url end - # Welcome page + # Dashboard page def index + @reports = {} - - # NOTE: mysql should use IFNULL instead of COALESCE - @reports['Today'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product") - @reports['Last 7 Days'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time group by product") - @reports['Last 30 Days'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time group by product") - @reports['Last 365 Days'] = Order.find_by_sql("select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time group by product") + if Product.count == 0 + flash[:notice] = "This store doesn't have any products! Add some!" + redirect_to :action => 'products' and return + end + # NOTE: We have to use SQL because performance is completely unacceptable otherwise + + # helper function + def last_n_days_sql(days) + # NOTE: mysql should use IFNULL instead of COALESCE + return " + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - #{days} <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - #{days} <= order_time + + group by product" + end + + @reports['Today'] = Order.find_by_sql(last_n_days_sql(1)) + @reports['Last 7 Days'] = Order.find_by_sql(last_n_days_sql(7)) + @reports['Last 30 Days'] = Order.find_by_sql(last_n_days_sql(30)) + @reports['Last 365 Days'] = Order.find_by_sql(last_n_days_sql(365)) @report_num_orders = {} @report_totals = {} - + for key in ['Today', 'Last 7 Days', 'Last 30 Days', 'Last 365 Days'] report = @reports[key] orders = 0 total = 0 for product in report orders = product.orders - total += product.earned.to_f + total += product.earned if product end @report_num_orders[key] = orders @report_totals[key] = total @@ -63,48 +92,54 @@ def index # NOTE: mysql uses year, month, and day functions instead of date_part last_8_days_sql = " - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'Free' + where status = 'C' and payment_type != 'Free' - group by year, month, day + group by year, month, day - order by last_time desc limit 8" + order by last_time desc limit 8" last_8_months_sql = " - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'Free' + where status = 'C' and payment_type != 'Free' - group by year, month + group by year, month - order by last_time desc limit 8" + order by last_time desc limit 8" - @daily = Order.find_by_sql(last_8_days_sql) + @daily = Order.find_by_sql(last_8_days_sql) @monthly = Order.find_by_sql(last_8_months_sql) + # Calculate a very simple estimate. + # Takes the average daily sales from the last 30 days to extrapolate the sales + # for the remaining days of the current month today = Date.today - month_days = Date.civil(today.year, today.month, -1).day - - @month_estimate = @monthly.first.earned.to_f + @report_totals['Last 30 Days'] / 30 * (month_days - today.day) - @year_estimate = @month_estimate * 12 + days_in_current_month = Date.civil(today.year, today.month, -1).day + + if @monthly != nil and @monthly.length > 0 + @month_estimate = @monthly.first.earned.to_f + @report_totals['Last 30 Days'] / 30 * (days_in_current_month - today.day) + @year_estimate = @month_estimate * 12 + end + end # Order actions @@ -113,9 +148,10 @@ def find_orders q.strip! redirect_to :back and return if not q conditions = "status != 'P' AND (email ~* '#{q}' OR - first_name ~* '#{q}.*' OR - last_name ~* '#{q}.*' OR - licensee_name ~* '%#{q}.*')" + first_name ~* '#{q}.*' OR + last_name ~* '#{q}.*' OR + licensee_name ~* '%#{q}.*' OR + id = #{q})" @order_pages, @orders = paginate :orders, :per_page => 100, :order => 'order_time DESC', :conditions => conditions render :action => "orders" end @@ -190,20 +226,23 @@ def send_order_emails redirect_to :action => 'order', :id => @order.id end + # Product actions - def products + # Modifying a product doesn't happen often enough, so I am doing it directly through the + # database for now. + def products # unused @product_pages, @products = paginate :products, :per_page => 10 end - def product + def product # unused @product = Product.find(params[:id]) end - def new_product + def new_product # unused @product = Product.new end - def create_product + def create_product # unused @product = Product.new(params[:product]) if @product.save flash[:notice] = 'Product was successfully created.' @@ -213,11 +252,11 @@ def create_product end end - def edit_product + def edit_product # unused @product = Product.find(params[:id]) end - def update_product + def update_product # unused @product = Product.find(params[:id]) if @product.update_attributes(params[:product]) flash[:notice] = 'Product was successfully updated.' @@ -227,7 +266,7 @@ def update_product end end - def destroy_product + def destroy_product # unused Product.find(params[:id]).destroy redirect_to :action => 'list' end @@ -251,7 +290,7 @@ def generate_coupons end end - def add_coupons + def add_coupons # unused if params[:form] form = params[:form] lines = form[:coupons].split("\r\n") @@ -268,8 +307,7 @@ def add_coupons end end - # Mass order - def mass_order + def mass_order # unused if params[:form] form = params[:form] for key in form.keys() diff --git a/log/development.log b/log/development.log index d17b031..848189a 100644 --- a/log/development.log +++ b/log/development.log @@ -1 +1,7329 @@ # Logfile created on Thu Jun 21 22:00:57 -0700 2007 by / + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:52:15) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + + +MissingSourceFile (no such file to load -- postgres): + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' + .//app/controllers/store/order_controller.rb:25:in `new' + .//app/controllers/store/order_controller.rb:13:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:54:00) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + + +MissingSourceFile (no such file to load -- postgres): + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' + .//app/controllers/store/order_controller.rb:25:in `new' + .//app/controllers/store/order_controller.rb:13:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:55:46) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + + +MissingSourceFile (no such file to load -- postgres): + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' + .//app/controllers/store/order_controller.rb:25:in `new' + .//app/controllers/store/order_controller.rb:13:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:55:48) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + + +MissingSourceFile (no such file to load -- postgres): + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' + .//app/controllers/store/order_controller.rb:25:in `new' + .//app/controllers/store/order_controller.rb:13:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:58:15) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + + +MissingSourceFile (no such file to load -- postgres): + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' + .//app/controllers/store/order_controller.rb:25:in `new' + .//app/controllers/store/order_controller.rb:13:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:00:00) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + + +MissingSourceFile (no such file to load -- postgres): + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' + /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' + .//app/controllers/store/order_controller.rb:25:in `new' + .//app/controllers/store/order_controller.rb:13:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:00:56) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + SQL (0.145132) SET client_encoding TO 'utf8' + Product Load (0.298814) SELECT * FROM products WHERE (products."active" = 1)  +Rendering layoutfalseactionnew within layouts/store +Rendering store/order/new + SQL (0.070146)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + +Completed in 1.18067 (0 reqs/sec) | Rendering: 0.03486 (2%) | DB: 0.51409 (43%) | 200 OK [http://localhost/store/] + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:00:57) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {} + + +ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/vc_small.png" with {:method=>:get}): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:00:57) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {} + + +ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/tgr_small.png" with {:method=>:get}): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:01:19) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"admin"} +Rendering layoutfalseactionsignin_form within layouts/error +Rendering admin/signin_form +Completed in 0.00691 (144 reqs/sec) | Rendering: 0.00679 (98%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/] + + +Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:01:23) [POST] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"commit"=>"Abracadabra", "username"=>"andy", "action"=>"signin", "controller"=>"admin", "password"=>"joinus"} +Rendering layoutfalseactionsignin_form within layouts/error +Rendering admin/signin_form +Completed in 0.00358 (278 reqs/sec) | Rendering: 0.00259 (72%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/signin] + + +Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:01:32) [POST] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"commit"=>"Abracadabra", "username"=>"username", "action"=>"signin", "controller"=>"admin", "password"=>"password"} +Rendering layoutfalseactionsignin_form within layouts/error +Rendering admin/signin_form +Completed in 0.00283 (353 reqs/sec) | Rendering: 0.00183 (64%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/signin] + + +Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:01:54) [POST] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"password"} +Redirected to http://localhost:3000/admin +Completed in 0.00160 (625 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://localhost/admin/signin] + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:01:54) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001257)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.026368) SELECT count(*) AS count_all FROM products  + Order Load (0.099808) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product + Order Load (0.111394) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time group by product + Order Load (0.039651) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time group by product + Order Load (0.124279) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time group by product + SQL (0.001378)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.092848)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067136)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.62039 (1 reqs/sec) | Rendering: 0.03251 (5%) | DB: 0.56412 (90%) | 200 OK [http://localhost/admin] + + +Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:02:06) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"orders", "controller"=>"admin"} + SQL (0.001495)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.007407) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  + Order Load (0.044243) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering within layouts/admin +Rendering admin/orders + LineItem Load (0.016709) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  + SQL (0.001059)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + LineItem Load (0.000564) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  + LineItem Load (0.000435) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  + LineItem Load (0.000549) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  + LineItem Load (0.000378) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  + LineItem Load (0.000376) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  + LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  + LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  + LineItem Load (0.000358) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  + LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  + LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  + LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  + LineItem Load (0.000398) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  + LineItem Load (0.000368) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  + LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  + LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  + LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  + LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  + LineItem Load (0.000391) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  + LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  + LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  + LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  + LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  + LineItem Load (0.000406) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  + LineItem Load (0.000354) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  + LineItem Load (0.000431) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  + LineItem Load (0.000354) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  + LineItem Load (0.002257) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  + LineItem Load (0.000432) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  + LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  + LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  + LineItem Load (0.000412) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  + LineItem Load (0.000432) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  + LineItem Load (0.000427) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  + LineItem Load (0.000421) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  + LineItem Load (0.000422) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  + LineItem Load (0.000560) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  + LineItem Load (0.000425) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  + LineItem Load (0.000410) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  + LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  + LineItem Load (0.000404) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  + LineItem Load (0.000364) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  + LineItem Load (0.000426) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  + LineItem Load (0.000366) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  + LineItem Load (0.000428) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  + LineItem Load (0.000804) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  + LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  + LineItem Load (0.000367) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  + LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  + LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  + LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  + LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  + LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  +Completed in 0.41669 (2 reqs/sec) | Rendering: 0.28956 (69%) | DB: 0.10879 (26%) | 200 OK [http://localhost/admin/orders] + + +Processing AdminController#order (for 127.0.0.1 at 2007-06-23 23:02:18) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"order", "id"=>"9110", "controller"=>"admin"} + SQL (0.001342)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.015328) SELECT * FROM orders WHERE (orders."id" = 9110)  +Rendering within layouts/admin +Rendering admin/order + LineItem Load (0.000583) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  + SQL (0.001201)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.001035)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Product Load (0.000441) SELECT * FROM products WHERE (products."id" = 2)  +Rendered store/order/_receipt (0.04026) +Completed in 0.07696 (12 reqs/sec) | Rendering: 0.04342 (56%) | DB: 0.01993 (25%) | 200 OK [http://localhost/admin/order/9110] + + +Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:02:23) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"orders", "controller"=>"admin"} + SQL (0.001350)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.004179) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  + Order Load (0.041271) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering within layouts/admin +Rendering admin/orders + LineItem Load (0.000530) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  + SQL (0.001004)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + LineItem Load (0.000512) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  + LineItem Load (0.000361) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  + LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  + LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  + LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  + LineItem Load (0.000394) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  + LineItem Load (0.000416) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  + LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  + LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  + LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  + LineItem Load (0.000372) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  + LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  + LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  + LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  + LineItem Load (0.000416) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  + LineItem Load (0.000480) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  + LineItem Load (0.000384) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  + LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  + LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  + LineItem Load (0.000418) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  + LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  + LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  + LineItem Load (0.000319) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  + LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  + LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  + LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  + LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  + LineItem Load (0.000362) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  + LineItem Load (0.000378) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  + LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  + LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  + LineItem Load (0.000362) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  + LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  +Completed in 0.27786 (3 reqs/sec) | Rendering: 0.17789 (64%) | DB: 0.08212 (29%) | 200 OK [http://localhost/admin/orders] + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:02:24) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001230)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000272) SELECT count(*) AS count_all FROM products  + Order Load (0.016746) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product + Order Load (0.039318) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time group by product + Order Load (0.039441) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time group by product + Order Load (0.085304) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time group by product + SQL (0.001377)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.072562)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067022)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.44020 (2 reqs/sec) | Rendering: 0.09457 (21%) | DB: 0.32327 (73%) | 200 OK [http://localhost/admin] + + +Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:04:49) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"orders", "controller"=>"admin"} + SQL (0.001497)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.006445) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  + Order Load (0.041652) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering within layouts/admin +Rendering admin/orders + LineItem Load (0.000563) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  + SQL (0.001017)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + LineItem Load (0.000520) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  + LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  + LineItem Load (0.000471) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  + LineItem Load (0.000669) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  + LineItem Load (0.000481) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  + LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  + LineItem Load (0.000456) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  + LineItem Load (0.000404) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  + LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  + LineItem Load (0.000383) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  + LineItem Load (0.000454) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  + LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  + LineItem Load (0.000375) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  + LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  + LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  + LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  + LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  + LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  + LineItem Load (0.000398) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  + LineItem Load (0.000893) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  + LineItem Load (0.001172) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  + LineItem Load (0.000513) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  + LineItem Load (0.000432) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  + LineItem Load (0.000414) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  + LineItem Load (0.000418) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  + LineItem Load (0.000444) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  + LineItem Load (0.000488) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  + LineItem Load (0.000510) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  + LineItem Load (0.000437) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  + LineItem Load (0.000428) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  + LineItem Load (0.000391) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  + LineItem Load (0.000414) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  + LineItem Load (0.000437) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  + LineItem Load (0.000442) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  + LineItem Load (0.000415) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  + LineItem Load (0.000443) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  + LineItem Load (0.000453) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  + LineItem Load (0.000512) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  + LineItem Load (0.000497) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  + LineItem Load (0.000479) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  + LineItem Load (0.000433) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  + LineItem Load (0.000446) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  + LineItem Load (0.000606) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  + LineItem Load (0.000491) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  + LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  + LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  + LineItem Load (0.000399) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  + LineItem Load (0.000400) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  + LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  + LineItem Load (0.000446) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  + LineItem Load (0.000362) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  + LineItem Load (0.000441) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  + LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  + LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  + LineItem Load (0.000418) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  + LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  + LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  + LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  + LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  + LineItem Load (0.000365) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  +Completed in 0.29387 (3 reqs/sec) | Rendering: 0.18510 (62%) | DB: 0.09034 (30%) | 200 OK [http://localhost/admin/orders] + + +Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:04:52) [POST] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"9109"} + SQL (0.001356)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.061511) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '9109' OR + first_name ~* '9109.*' OR + last_name ~* '9109.*' OR + licensee_name ~* '%9109.*' OR + id = 9109))  + Order Load (0.047443) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '9109' OR + first_name ~* '9109.*' OR + last_name ~* '9109.*' OR + licensee_name ~* '%9109.*' OR + id = 9109)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering layoutfalseactionorders within layouts/admin +Rendering admin/orders + LineItem Load (0.000533) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  + SQL (0.001053)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + +Completed in 0.14457 (6 reqs/sec) | Rendering: 0.02087 (14%) | DB: 0.11190 (77%) | 200 OK [http://localhost/admin/find_orders] + + +Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:04:58) [POST] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"9108"} + SQL (0.001335)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.048567) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '9108' OR + first_name ~* '9108.*' OR + last_name ~* '9108.*' OR + licensee_name ~* '%9108.*' OR + id = 9108))  + Order Load (0.048568) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '9108' OR + first_name ~* '9108.*' OR + last_name ~* '9108.*' OR + licensee_name ~* '%9108.*' OR + id = 9108)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering layoutfalseactionorders within layouts/admin +Rendering admin/orders +Completed in 0.11242 (8 reqs/sec) | Rendering: 0.00289 (2%) | DB: 0.09847 (87%) | 200 OK [http://localhost/admin/find_orders] + + +Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:05:01) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"orders", "controller"=>"admin"} + SQL (0.001384)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.006953) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  + Order Load (0.044601) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering within layouts/admin +Rendering admin/orders + LineItem Load (0.000653) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  + SQL (0.001316)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + LineItem Load (0.000780) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  + LineItem Load (0.000560) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  + LineItem Load (0.000401) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  + LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  + LineItem Load (0.000359) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  + LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  + LineItem Load (0.000467) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  + LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  + LineItem Load (0.000367) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  + LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  + LineItem Load (0.000457) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  + LineItem Load (0.000369) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  + LineItem Load (0.000381) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  + LineItem Load (0.000475) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  + LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  + LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  + LineItem Load (0.000852) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  + LineItem Load (0.000445) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  + LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  + LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  + LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  + LineItem Load (0.000385) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  + LineItem Load (0.000455) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  + LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  + LineItem Load (0.000385) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  + LineItem Load (0.000445) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  + LineItem Load (0.000385) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  + LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  + LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  + LineItem Load (0.000885) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  + LineItem Load (0.000421) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  + LineItem Load (0.000364) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  + LineItem Load (0.000547) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  + LineItem Load (0.000400) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  + LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  + LineItem Load (0.000370) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  + LineItem Load (0.000358) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  + LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  + LineItem Load (0.000402) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  + LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  + LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  + LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  + LineItem Load (0.000377) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  + LineItem Load (0.000384) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  + LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  + LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  + LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  + LineItem Load (0.000400) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  + LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  + LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  + LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  + LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  + LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  + LineItem Load (0.000421) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  + LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  + LineItem Load (0.000406) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  + LineItem Load (0.000381) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  + LineItem Load (0.000478) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  + LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  + LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  +Completed in 0.38830 (2 reqs/sec) | Rendering: 0.27647 (71%) | DB: 0.09237 (23%) | 200 OK [http://localhost/admin/orders] + + +Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:05:05) [POST] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"9107"} + SQL (0.001335)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.048327) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '9107' OR + first_name ~* '9107.*' OR + last_name ~* '9107.*' OR + licensee_name ~* '%9107.*' OR + id = 9107))  + Order Load (0.048341) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '9107' OR + first_name ~* '9107.*' OR + last_name ~* '9107.*' OR + licensee_name ~* '%9107.*' OR + id = 9107)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering layoutfalseactionorders within layouts/admin +Rendering admin/orders + LineItem Load (0.000525) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  + SQL (0.001011)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + +Completed in 0.13153 (7 reqs/sec) | Rendering: 0.02071 (15%) | DB: 0.09954 (75%) | 200 OK [http://localhost/admin/find_orders] + + +Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:05:10) [POST] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"91"} + SQL (0.001367)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.044413) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '91' OR + first_name ~* '91.*' OR + last_name ~* '91.*' OR + licensee_name ~* '%91.*' OR + id = 91))  + Order Load (0.044450) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '91' OR + first_name ~* '91.*' OR + last_name ~* '91.*' OR + licensee_name ~* '%91.*' OR + id = 91)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering layoutfalseactionorders within layouts/admin +Rendering admin/orders + LineItem Load (0.013986) SELECT * FROM line_items WHERE (line_items.order_id = 7129)  + SQL (0.001066)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + LineItem Load (0.001079) SELECT * FROM line_items WHERE (line_items.order_id = 5991)  + LineItem Load (0.000879) SELECT * FROM line_items WHERE (line_items.order_id = 1517)  + LineItem Load (0.008833) SELECT * FROM line_items WHERE (line_items.order_id = 91)  +Completed in 0.15360 (6 reqs/sec) | Rendering: 0.02588 (16%) | DB: 0.11607 (75%) | 200 OK [http://localhost/admin/find_orders] + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:16:54) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001370)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000317) SELECT count(*) AS count_all FROM products  + Order Load (0.016802) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product + Order Load (0.038942)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time + group by product + Order Load (0.039336)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time + group by product + Order Load (0.087558)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time + group by product + SQL (0.001372)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.073443)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067468)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.35550 (2 reqs/sec) | Rendering: 0.00529 (1%) | DB: 0.32661 (91%) | 200 OK [http://localhost/admin] + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:17:11) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"admin"} + + +SyntaxError (./script/../config/../app/controllers/admin_controller.rb:347: syntax error, unexpected $end, expecting kEND): + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_file' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in `load_file' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in `require_or_load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:248:in `load_missing_constant' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in `constantize' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/string/inflections.rb:148:in `constantize' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1284:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:17:15) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001354)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000314) SELECT count(*) AS count_all FROM products  + Order Load (0.019151) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product + Order Load (0.039858)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time + group by product + Order Load (0.039333)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time + group by product + Order Load (0.085280)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time + group by product + SQL (0.001389)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.072996)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067914)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.35431 (2 reqs/sec) | Rendering: 0.00461 (1%) | DB: 0.32759 (92%) | 200 OK [http://localhost/admin] + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:17:55) [GET] + Session ID: 1d2432356daffaf1d712e8e97f93c236 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001386)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000308) SELECT count(*) AS count_all FROM products  + Order Load (0.019273) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product + Order Load (0.064829)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + group by product + Order Load (0.040104)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + group by product + Order Load (0.081412)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + from orders inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + group by product + SQL (0.001381)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.073206)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067690)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.37872 (2 reqs/sec) | Rendering: 0.00551 (1%) | DB: 0.34959 (92%) | 200 OK [http://localhost/admin] + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:44:43) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + Product Load (0.000559) SELECT * FROM products WHERE (products."active" = 1)  +Rendering layoutfalseactionnew within layouts/store +Rendering store/order/new + SQL (0.001285)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + +Completed in 0.05702 (17 reqs/sec) | Rendering: 0.00453 (7%) | DB: 0.00184 (3%) | 200 OK [http://localhost/store/] + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:44:43) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {} + + +ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/vc_small.png" with {:method=>:get}): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:44:43) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {} + + +ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/tgr_small.png" with {:method=>:get}): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + + +Processing OrderController#payment (for 127.0.0.1 at 2007-06-23 23:44:46) [POST] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"items"=>{"2"=>"1", "3"=>""}, "commit"=>"  Continue →", "action"=>"payment", "controller"=>"store/order", "payment_type"=>"cc", "coupon"=>""} + SQL (0.001425)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.001203)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.011288) SELECT * FROM orders WHERE (orders."id" = 0)  + SQL (0.001168)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Product Load (0.000328) SELECT * FROM products WHERE (products."id" = 2)  + SQL (0.000147) BEGIN + SQL (0.000107) COMMIT + Product Load (0.000323) SELECT * FROM products WHERE (products."id" = 2)  +Rendering layoutfalseactionpayment_cc within layouts/store +Rendering store/order/payment_cc +Rendered store/order/_form_countries (0.01741) +Rendered store/order/_form_months (0.00160) +Completed in 0.08187 (12 reqs/sec) | Rendering: 0.03321 (40%) | DB: 0.01599 (19%) | 200 OK [http://localhost/store/order/payment] + + +Processing OrderController#purchase (for 127.0.0.1 at 2007-06-23 23:44:54) [POST] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"items"=>{"2"=>"1"}, "commit"=>"  Place Order →", "order"=>{"address1"=>"433 S. Serrano Ave.", "company"=>"ab", "city"=>"Los Angeles", "address2"=>"", "cc_month"=>"1", "cc_number"=>"4916306176169494", "zipcode"=>"90004", "country"=>"US", "cc_code"=>"000", "first_name"=>"Byung", "payment_type"=>"Visa", "last_name"=>"someone", "comment"=>"2", "state"=>"CA", "email"=>"andykim78@gmail.com", "cc_year"=>"2007", "licensee_name"=>"Andy Kim"}, "action"=>"purchase", "onsubmit"=>"javascript:return validate();", "controller"=>"store/order"} + SQL (0.001358)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.001200)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.000421) SELECT * FROM orders WHERE (orders."id" = 0)  + SQL (0.001161)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Product Load (0.000310) SELECT * FROM products WHERE (products."id" = 2)  + SQL (0.000117) BEGIN + SQL (0.000107) COMMIT + Product Load (0.000308) SELECT * FROM products WHERE (products."id" = 2)  + SQL (0.000109) BEGIN + PK and serial sequence (0.040337)  SELECT attr.attname, name.nspname, seq.relname + FROM pg_class seq, + pg_attribute attr, + pg_depend dep, + pg_namespace name, + pg_constraint cons + WHERE seq.oid = dep.objid + AND seq.relnamespace = name.oid + AND seq.relkind = 'S' + AND attr.attrelid = dep.refobjid + AND attr.attnum = dep.refobjsubid + AND attr.attrelid = cons.conrelid + AND attr.attnum = cons.conkey[1] + AND cons.contype = 'p' + AND dep.refobjid = 'orders'::regclass + + Order Create (0.048156) INSERT INTO orders ("address1", "city", "company", "status", "address2", "coupon_id", "failure_reason", "zipcode", "country", "ccnum", "failure_code", "first_name", "order_time", "payment_type", "comment", "last_name", "email", "licensee_name", "state", "transaction_number") VALUES('433 S. Serrano Ave.', 'Los Angeles', 'ab', 'P', '', NULL, NULL, '90004', 'US', 'XXXXXXXXXXXX9494', NULL, 'Byung', '2007-06-23 23:44:54.884570', 'Visa', '2', 'someone', 'andykim78@gmail.com', 'Andy Kim', 'CA', NULL) + SQL (0.008850) SELECT currval('orders_id_seq') + PK and serial sequence (0.003210)  SELECT attr.attname, name.nspname, seq.relname + FROM pg_class seq, + pg_attribute attr, + pg_depend dep, + pg_namespace name, + pg_constraint cons + WHERE seq.oid = dep.objid + AND seq.relnamespace = name.oid + AND seq.relkind = 'S' + AND attr.attrelid = dep.refobjid + AND attr.attnum = dep.refobjsubid + AND attr.attrelid = cons.conrelid + AND attr.attnum = cons.conkey[1] + AND cons.contype = 'p' + AND dep.refobjid = 'line_items'::regclass + + LineItem Create (0.018441) INSERT INTO line_items ("license_key", "order_id", "product_id", "quantity", "unit_price") VALUES(NULL, 9111, 2, 1, 12.95) + SQL (0.000197) SELECT currval('line_items_id_seq') + SQL (0.001067) COMMIT + + +OpenSSL::X509::CertificateError (header too long): + .//lib/soap/httpconfigloader.rb:110:in `initialize' + .//lib/soap/httpconfigloader.rb:110:in `new' + .//lib/soap/httpconfigloader.rb:110:in `cert_from_file' + .//lib/soap/httpconfigloader.rb:68:in `set_ssl_config' + .//lib/soap/property.rb:140:in `each' + .//lib/soap/property.rb:139:in `each' + .//lib/soap/httpconfigloader.rb:61:in `set_ssl_config' + .//lib/soap/httpconfigloader.rb:36:in `set_options' + .//lib/soap/property.rb:115:in `call' + .//lib/soap/property.rb:115:in `[]=' + .//lib/soap/property.rb:114:in `each' + .//lib/soap/property.rb:114:in `[]=' + .//vendor/plugins/paypal/lib/paypal.rb:74:in `create_client' + .//vendor/plugins/paypal/lib/paypal.rb:164:in `directcharge' + .//app/models/order.rb:297:in `paypal_directcharge' + .//app/controllers/store/order_controller.rb:136:in `purchase' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001334)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:45:03) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} +Rendering layoutfalseactionsignin_form within layouts/error +Rendering admin/signin_form +Completed in 0.00233 (428 reqs/sec) | Rendering: 0.00220 (94%) | DB: 0.12668 (5427%) | 200 OK [http://localhost/admin] + SQL (0.001327)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:45:10) [POST] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"password"} +Redirected to http://localhost:3000/admin +Completed in 0.00172 (580 reqs/sec) | DB: 0.00133 (77%) | 302 Found [http://localhost/admin/signin] + SQL (0.001350)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:45:11) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001236)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000272) SELECT count(*) AS count_all FROM products  + Order Load (0.023764)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040637)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040237)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.083638)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072944)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067347)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.34871 (2 reqs/sec) | Rendering: 0.00474 (1%) | DB: 0.33143 (95%) | 200 OK [http://localhost/admin] + SQL (0.001580)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:45:18) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"orders", "controller"=>"admin"} + SQL (0.006558) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  + Order Load (0.041964) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 +Rendering within layouts/admin +Rendering admin/orders + LineItem Load (0.000577) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  + SQL (0.001039)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + LineItem Load (0.000499) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  + LineItem Load (0.000320) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  + LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  + LineItem Load (0.000314) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  + LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  + LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  + LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  + LineItem Load (0.000319) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  + LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  + LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  + LineItem Load (0.000315) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  + LineItem Load (0.000312) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  + LineItem Load (0.000315) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  + LineItem Load (0.000316) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  + LineItem Load (0.000314) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  + LineItem Load (0.000314) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  + LineItem Load (0.000315) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  + LineItem Load (0.000545) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  + LineItem Load (0.000389) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  + LineItem Load (0.000365) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  + LineItem Load (0.000368) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  + LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  + LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  + LineItem Load (0.000354) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  + LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  + LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  + LineItem Load (0.000366) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  + LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  + LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  + LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  + LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  + LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  + LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  + LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  + LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  + LineItem Load (0.000320) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  + LineItem Load (0.000386) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  + LineItem Load (0.000414) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  + LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  + LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  + LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  + LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  + LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  + LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  + LineItem Load (0.000445) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  + LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  + LineItem Load (0.000369) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  + LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  + LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  + LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  + LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  + LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  + LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  + LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  + LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  + LineItem Load (0.000382) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  + LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  + LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  +Completed in 0.35661 (2 reqs/sec) | Rendering: 0.26385 (73%) | DB: 0.08538 (23%) | 200 OK [http://localhost/admin/orders] + SQL (0.001329)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:46:23) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"store/order"} +DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) + Product Load (0.000530) SELECT * FROM products WHERE (products."active" = 1)  +Rendering layoutfalseactionnew within layouts/store +Rendering store/order/new + SQL (0.001230)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + +Completed in 0.01449 (69 reqs/sec) | Rendering: 0.00451 (31%) | DB: 0.00309 (21%) | 200 OK [http://localhost/store/] + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:46:23) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {} + + +ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/vc_small.png" with {:method=>:get}): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:46:23) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {} + + +ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/tgr_small.png" with {:method=>:get}): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + + +Processing OrderController#payment (for 127.0.0.1 at 2007-06-23 23:46:26) [POST] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"items"=>{"2"=>"1", "3"=>""}, "commit"=>"  Continue →", "action"=>"payment", "controller"=>"store/order", "payment_type"=>"cc", "coupon"=>""} + SQL (0.001377)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.001211)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.000468) SELECT * FROM orders WHERE (orders."id" = 0)  + SQL (0.001187)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Product Load (0.000329) SELECT * FROM products WHERE (products."id" = 2)  + SQL (0.000171) BEGIN + SQL (0.000144) COMMIT + Product Load (0.000356) SELECT * FROM products WHERE (products."id" = 2)  +Rendering layoutfalseactionpayment_cc within layouts/store +Rendering store/order/payment_cc +Rendered store/order/_form_countries (0.00240) +Rendered store/order/_form_months (0.00010) +Completed in 0.04457 (22 reqs/sec) | Rendering: 0.00812 (18%) | DB: 0.00524 (11%) | 200 OK [http://localhost/store/order/payment] + + +Processing OrderController#purchase (for 127.0.0.1 at 2007-06-23 23:48:12) [POST] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"items"=>{"2"=>"1"}, "commit"=>"  Place Order →", "order"=>{"address1"=>"433 S. Serrano Ave.", "company"=>"ab", "city"=>"Los Angeles", "address2"=>"", "cc_month"=>"1", "cc_number"=>"4916306176169494", "zipcode"=>"90004", "country"=>"US", "cc_code"=>"000", "first_name"=>"Byung", "payment_type"=>"Visa", "last_name"=>"someone", "comment"=>"2", "state"=>"CA", "email"=>"andykim78@gmail.com", "cc_year"=>"2007", "licensee_name"=>"Andy Kim"}, "action"=>"purchase", "onsubmit"=>"javascript:return validate();", "controller"=>"store/order"} + SQL (0.001338)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.001206)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.000418) SELECT * FROM orders WHERE (orders."id" = 0)  + SQL (0.001178)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Product Load (0.000299) SELECT * FROM products WHERE (products."id" = 2)  + SQL (0.000117) BEGIN + SQL (0.000104) COMMIT + Product Load (0.000306) SELECT * FROM products WHERE (products."id" = 2)  + SQL (0.000111) BEGIN + PK and serial sequence (0.003739)  SELECT attr.attname, name.nspname, seq.relname + FROM pg_class seq, + pg_attribute attr, + pg_depend dep, + pg_namespace name, + pg_constraint cons + WHERE seq.oid = dep.objid + AND seq.relnamespace = name.oid + AND seq.relkind = 'S' + AND attr.attrelid = dep.refobjid + AND attr.attnum = dep.refobjsubid + AND attr.attrelid = cons.conrelid + AND attr.attnum = cons.conkey[1] + AND cons.contype = 'p' + AND dep.refobjid = 'orders'::regclass + + Order Create (0.000653) INSERT INTO orders ("address1", "city", "company", "status", "address2", "coupon_id", "failure_reason", "zipcode", "country", "ccnum", "failure_code", "first_name", "order_time", "payment_type", "comment", "last_name", "email", "licensee_name", "state", "transaction_number") VALUES('433 S. Serrano Ave.', 'Los Angeles', 'ab', 'P', '', NULL, NULL, '90004', 'US', 'XXXXXXXXXXXX9494', NULL, 'Byung', '2007-06-23 23:48:12.826167', 'Visa', '2', 'someone', 'andykim78@gmail.com', 'Andy Kim', 'CA', NULL) + SQL (0.000165) SELECT currval('orders_id_seq') + PK and serial sequence (0.003171)  SELECT attr.attname, name.nspname, seq.relname + FROM pg_class seq, + pg_attribute attr, + pg_depend dep, + pg_namespace name, + pg_constraint cons + WHERE seq.oid = dep.objid + AND seq.relnamespace = name.oid + AND seq.relkind = 'S' + AND attr.attrelid = dep.refobjid + AND attr.attnum = dep.refobjsubid + AND attr.attrelid = cons.conrelid + AND attr.attnum = cons.conkey[1] + AND cons.contype = 'p' + AND dep.refobjid = 'line_items'::regclass + + LineItem Create (0.000521) INSERT INTO line_items ("license_key", "order_id", "product_id", "quantity", "unit_price") VALUES(NULL, 9112, 2, 1, 12.95) + SQL (0.000161) SELECT currval('line_items_id_seq') + SQL (0.000781) COMMIT + SQL (0.000112) BEGIN + LineItem Update (0.023195) UPDATE line_items SET "order_id" = 9112, "product_id" = 2, "unit_price" = 12.95, "license_key" = 'VC-JDA24NEKUAO3YXRE', "quantity" = 1 WHERE "id" = 9194 + SQL (0.000575) COMMIT + SQL (0.000183) BEGIN + Order Update (0.000774) UPDATE orders SET "transaction_number" = NULL, "company" = 'ab', "licensee_name" = 'Andy Kim', "email" = 'andykim78@gmail.com', "ccnum" = 'XXXXXXXXXXXX9494', "payment_type" = 'Visa', "city" = 'Los Angeles', "zipcode" = '90004', "coupon_id" = NULL, "order_time" = '2007-06-23 23:48:12.826167', "address2" = '', "country" = 'US', "failure_reason" = NULL, "status" = 'C', "address1" = '433 S. Serrano Ave.', "state" = 'CA', "failure_code" = NULL, "last_name" = 'someone', "comment" = '2', "first_name" = 'Byung' WHERE "id" = 9112 + SQL (0.000599) COMMIT +Redirected to http://localhost:3000/store/order/thankyou +Rendered ../store/order/_receipt (0.03357) +Sent mail: + From: My Company +To: andykim78@gmail.com +Bcc: orders@mycompany.com +Subject: Purchase Receipt for Order #9112 * +Mime-Version: 1.0 +Content-Type: multipart/alternative; boundary=mimepart_467e13ace81dd_4a8719f4c4a140 + + +--mimepart_467e13ace81dd_4a8719f4c4a140 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: Quoted-printable +Content-Disposition: inline + +Dear Byung someone, + +Thank you for purchasing My Company software. +Below are your application license keys. To activate, please copy +and paste the code to the registration window in the application. + +Voice Candy v1: +VC-JDA24NEKUAO3YXRE + + +Please let us know if you have any questions or comments. +Enjoy your purchase. + +- My Company + + + +RECEIPT +---------------------------------------------------------------------- + +Order Number: 9112 + +Placed On: Sun Jun 24 06:48:12 UTC 2007 + +Registered-To: Byung someone +Company: ab +Email: andykim78@gmail.com + +Billing Address: +433 S. Serrano Ave. +Los Angeles, CA 90004 +United States + +Payment: +Visa, XXXXXXXXXXXX9494 + +Purchased Items: + +1 Voice Candy v1 @ $12.95 each + +Total: $12.95 + + +--mimepart_467e13ace81dd_4a8719f4c4a140 +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: Base64 +Content-Disposition: inline + +PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAg +VHJhbnNpdGlvbmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1s +MS9EVEQveGh0bWwxLXRyYW5zaXRpb25hbC5kdGQiPgo8aHRtbCB4bWxucz0i +aHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+CjxoZWFkPgogICAgPG1l +dGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0 +bWw7IGNoYXJzZXQ9VVRGLTgiLz4KICAgIDx0aXRsZT5NeSBDb21wYW55IFJl +Y2VpcHQ8L3RpdGxlPgogICAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5w +YWdlIHsgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7IHdpZHRoOjU1MHB4OyB9 +CglpbWcgeyBib3JkZXI6IDA7IH0KCWgzIHsgbWFyZ2luLXRvcDogMzBweDsg +fQoJcCB7IGZvbnQtZmFtaWx5OiBoZWx2ZXRpY2EsIHNhbnMtc2VyaWY7IGZv +bnQtc2l6ZTogMTNweDsgbGluZS1oZWlnaHQ6IDE4cHg7IG1hcmdpbi10b3A6 +IDEwcHg7IH0KCXAucHMsIGxpIHsgZm9udC1mYW1pbHk6IGhlbHZldGljYTsg +Zm9udC1zaXplOiAxMnB4OyBsaW5lLWhlaWdodDogMThweDsgfQoJcHJlIHsg +cGFkZGluZzoxMHB4OyBiYWNrZ3JvdW5kLWNvbG9yOiNlZWU7IH0KCWRpdi5k +IHsgaGVpZ2h0OjFweDsgbWFyZ2luOjIwcHggMCAxMHB4OyBib3JkZXItdG9w +OjFweCBkb3R0ZWQgIzk5OTsgfQoJZGl2LnMgeyBoZWlnaHQ6MXg7IG1hcmdp +bjogMjBweCAwIDEwcHg7IH0KICAgIDwvc3R5bGU+CjwvaGVhZD4KPGJvZHk+ +CjxkaXYgY2xhc3M9InBhZ2UiPgogICAgPGRpdiBjbGFzcz0iY2xlYXIiPjwv +ZGl2PgogICAgPGRpdiBpZD0iY29udGVudCI+Cgk8cD5EZWFyIEJ5dW5nIHNv +bWVvbmUsPC9wPgoKCTxwPgoJICAgIFRoYW5rIHlvdSBmb3IgcHVyY2hhc2lu +ZyBNeSBDb21wYW55IHNvZnR3YXJlLiBZb3VyIGxpY2Vuc2Uga2V5cyBhcmUg +YmVsb3cuIElmIHlvdSBhbHJlYWR5IGhhdmUgdGhlIGFwcGxpY2F0aW9uCgkg +ICAgaW5zdGFsbGVkLCB5b3UgY2FuIGFjdGl2YXRlIGJ5IGNsaWNraW5nIHRo +ZSAiQWN0aXZhdGUgTm93IiBsaW5rLgoJPC9wPgoKCTxoMz5MSUNFTlNFIEtF +WTwvaDM+CjxwcmU+ClZvaWNlIENhbmR5IHYxOgpWQy1KREEyNE5FS1VBTzNZ +WFJFIDxhIGhyZWY9IngtY29tLXBvdGlvbmZhY3RvcnktbGljZW5zZS12b2lj +ZWNhbmR5Oi8vVkMtSkRBMjRORUtVQU8zWVhSRSI+QWN0aXZhdGUgTm93PC9h +Pgo8L3ByZT4KCgk8ZGl2IGNsYXNzPSJzIj48L2Rpdj4KCTxwPlBsZWFzZSBs +ZXQgdXMga25vdyBpZiB5b3UgaGF2ZSBhbnkgcXVlc3Rpb25zIG9yIGNvbW1l +bnRzLiBFbmpveSB5b3VyIHB1cmNoYXNlLjwvcD4KICAKCTxwPi0gTXkgQ29t +cGFueTwvcD4KICAKCTxkaXYgY2xhc3M9ImQiPjwvZGl2PgoJPHN0eWxlIHR5 +cGU9InRleHQvY3NzIj4KI3JlY2VpcHQgdGFibGUgeyB3aWR0aDo1NTBweDsg +fQo8L3N0eWxlPgoKPGRpdiBpZD0icmVjZWlwdCIgc3R5bGU9ImZvbnQtZmFt +aWx5OmhlbHZldGljYSxhcmlhbCxzYW5zLXNlcmlmO2ZvbnQtc2l6ZToxMnB4 +O2xpbmUtaGVpZ2h0OjE4cHg7bWFyZ2luLXRvcDozMHB4OyI+CiAgICA8dGFi +bGUgc3R5bGU9ImJvcmRlci1jb2xsYXBzZTpjb2xsYXBzZSI+CiAgICAgICAg +PHRyIGNsYXNzPSJzIj4KICAgICAgICAgICAgPHRkIHN0eWxlPSJwYWRkaW5n +OjVweCAwIDEycHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQgIzc3NyI+ +CgkJCQk8aDIgc3R5bGU9Im1hcmdpbjowO2NvbG9yOiMzMzMiPgoJCQkJCVJl +Y2VpcHQKCQkJCTwvaDI+CgkJCTwvdGQ+CiAgICAgICAgICAgIDx0ZCBpZD0i +b3JkZXJfbnVtYmVyIiBzdHlsZT0icGFkZGluZzo1cHggMCAxMnB4IDA7dmVy +dGljYWwtYWxpZ246Ym90dG9tO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAj +Nzc3Ij4KCQkJCTxoMyBzdHlsZT0ibWFyZ2luOjA7cGFkZGluZzowO2NvbG9y +OiMzMzM7ZGlzcGxheTppbmxpbmUiPgoJCQkJCU9yZGVyIE51bWJlcjogOTEx +MgoJCQkJPC9oMz4KCQkJPC90ZD4KICAgICAgICA8L3RyPgogICAgICAgIDx0 +ciBjbGFzcz0iciI+CiAgICAgICAgICAgIDx0ZCBjb2xzcGFuPSIyIiBzdHls +ZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQgI2Rk +ZCI+CgkJCQk8c3Ryb25nPlRpbWU6PC9zdHJvbmc+IFN1biBKdW4gMjQgMDY6 +NDg6MTIgVVRDIDIwMDcKCQkJPC90ZD4KICAgICAgICA8L3RyPgoKICAgICAg +ICA8dHIgY2xhc3M9InIiPgogICAgICAgICAgICA8dGQgc3R5bGU9InBhZGRp +bmc6NXB4IDA7Ym9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNkZGQiPgoJCQkJ +PHN0cm9uZz5MaWNlbnNlZCB0bzo8L3N0cm9uZz4gQW5keSBLaW0KCQkJPC90 +ZD4KICAgICAgICAgICAgPHRkIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRl +ci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCSAgICAgICAgICAgICAg +ICA8c3Ryb25nPkNvbXBhbnk6PC9zdHJvbmc+IGFiICAgICAgICAgICAgICAg +IDwvdGQ+CgkJCTwvdHI+CiAgICAgICAgPHRyIGNsYXNzPSJyIj4KICAgICAg +ICAgICAgPHRkIGNvbHNwYW49IjIiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2Jv +cmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCTxzdHJvbmc+RW1h +aWw6PC9zdHJvbmc+IGFuZHlraW03OEBnbWFpbC5jb20KCQkJPC90ZD4KICAg +ICAgICA8L3RyPgogICAgICAgIDx0ciBjbGFzcz0iZCI+CiAgICAgICAgICAg +IDx0ZCBzdHlsZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAzcHgg +ZG91YmxlICNkZGQiPgogICAgICAgICAgICAgICAgPHN0cm9uZz5CaWxsaW5n +IEFkZHJlc3M6PC9zdHJvbmc+PGJyLz4KCQkJCUJ5dW5nIHNvbWVvbmU8YnIv +PgoJCQkJICAgICAgICAgICAgICAgIDQzMyBTLiBTZXJyYW5vIEF2ZS48YnIv +PgogICAgICAgICAgICAgICAgTG9zIEFuZ2VsZXMsIENBIDkwMDA0PGJyLz4K +ICAgICAgICAgICAgICAgIFVuaXRlZCBTdGF0ZXMKCQkJCSAgICAgICAgICAg +IDwvdGQ+CgkJCTx0ZCBpZD0icGF5bWVudCIgc3R5bGU9IndpZHRoOjM1JTtw +YWRkaW5nOjVweCAwO2JvcmRlci1ib3R0b206IDNweCBkb3VibGUgI2RkZCI+ +CgkJCQk8c3Ryb25nPlBheW1lbnQ6PC9zdHJvbmc+PGJyLz4KICAgICAgICAg +ICAgICAgIFZpc2EKCQkJCQoJCQkJPGJyLz5YWFhYWFhYWFhYWFg5NDk0CgkJ +CQkKCQkJPC90ZD4KICAgICAgICA8L3RyPgoJCTwvdGFibGU+CgkJPHRhYmxl +IHN0eWxlPSJib3JkZXItY29sbGFwc2U6Y29sbGFwc2UiPgoJCQk8dHIgY2xh +c3M9InIiPgoJCQkJPHRoIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRlci1i +b3R0b206IDFweCBzb2xpZCAjZGRkIj5JdGVtPC90aD4KCQkJCTx0aCBzdHls +ZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQgI2Rk +ZCI+TGljZW5zZSBLZXk8L3RoPgoJCQkJPHRoIHN0eWxlPSJwYWRkaW5nOjVw +eCAwO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkO3RleHQtYWxpZ246 +bGVmdDsiIGNsYXNzPSJ1bml0Ij5Vbml0IFByaWNlPC90aD4KCQkJCTx0aCBz +dHlsZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQg +I2RkZCI+UXR5PC90aD4KCQkJCTx0aCBzdHlsZT0icGFkZGluZzo1cHggMDti +b3JkZXItYm90dG9tOiAxcHggc29saWQgI2RkZCI+UHJpY2U8L3RoPgoJCQk8 +L3RyPgoJCQkJCQk8dHIgY2xhc3M9InIiPgoJCQkJPHRkIGNsYXNzPSJwcm9k +IiBzdHlsZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29s +aWQgI2RkZCI+CgkJCQkJVm9pY2UgQ2FuZHkgdjEKCQkJCTwvdGQ+CgkJCQk8 +dGQgY2xhc3M9ImxpY2Vuc2Vfa2V5IiBzdHlsZT0icGFkZGluZzo1cHggMDt0 +ZXh0LWFsaWduOmNlbnRlcjtib3JkZXItYm90dG9tOiAxcHggc29saWQgI2Rk +ZCI+CgkJCQkJVkMtSkRBMjRORUtVQU8zWVhSRQoJCQkJPC90ZD4KCQkJCTx0 +ZCBjbGFzcz0idW5pdCIgc3R5bGU9InBhZGRpbmc6NXB4IDA7dGV4dC1hbGln +bjpjZW50ZXI7d2lkdGg6MTIlO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAj +ZGRkIj4KCQkJCQkkMTIuOTUKCQkJCTwvdGQ+CgkJCQk8dGQgY2xhc3M9InF0 +eSIgc3R5bGU9InBhZGRpbmc6NXB4IDA7dGV4dC1hbGlnbjpjZW50ZXI7d2lk +dGg6MTIlO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCQkx +CgkJCQk8L3RkPgoJCQkJPHRkIGNsYXNzPSJwcmljZSIgc3R5bGU9InBhZGRp +bmc6NXB4IDA7dGV4dC1hbGlnbjpyaWdodDt3aWR0aDoxMSU7Ym9yZGVyLWJv +dHRvbTogMXB4IHNvbGlkICNkZGQiPgoJCQkJCSQxMi45NQoJCQkJPC90ZD4K +CQkJPC90cj4KCQkJCQkJCQkJPHRyIGlkPSJ0b3RhbCIgY2xhc3M9InIiPgoJ +CQkJPHRkIGNvbHNwYW49IjMiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRl +ci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj48L3RkPgoJCQkJPHRkIGNsYXNz +PSJxdHkiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRlci1ib3R0b206IDFw +eCBzb2xpZCAjZGRkO3RleHQtYWxpZ246Y2VudGVyIj4KCQkJCQk8c3Ryb25n +PlRvdGFsOjwvc3Ryb25nPgoJCQkJPC90ZD4KCQkJCTx0ZCBjbGFzcz0icHJp +Y2UiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRlci1ib3R0b206IDFweCBz +b2xpZCAjZGRkO3RleHQtYWxpZ246cmlnaHQiPgoJCQkJCTxzdHJvbmc+JDEy +Ljk1PC9zdHJvbmc+CgkJCQk8L3RkPgoJCQk8L3RyPgoJCQkJCQk8dHIgY2xh +c3M9InIiPgoJCQkJPHRkIGNvbHNwYW49IjUiIHN0eWxlPSJwYWRkaW5nOjVw +eCAwO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCQk8c3Ry +b25nPkNvbW1lbnQ6PC9zdHJvbmc+IDIKCQkJCTwvdGQ+CgkJCTwvdHI+CgkJ +CQkJPC90YWJsZT4KCTwvZGl2PgoKCgoJICAgIDwvZGl2Pgo8L2Rpdj4KPC9i +b2R5Pgo8L2h0bWw+Cgo= + +--mimepart_467e13ace81dd_4a8719f4c4a140-- + + + +Errno::ECONNREFUSED (Connection refused - connect(2)): + /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `initialize' + /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `new' + /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open' + /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout' + /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout' + /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open' + /usr/local/lib/ruby/1.8/net/smtp.rb:393:in `do_start' + /usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start' + /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start' + /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:565:in `perform_delivery_smtp' + /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:451:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:451:in `deliver!' + /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:333:in `method_missing' + .//app/controllers/store/order_controller.rb:229:in `finish_order' + .//app/controllers/store/order_controller.rb:138:in `purchase' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001348)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing OrderController#thankyou (for 127.0.0.1 at 2007-06-23 23:48:24) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"thankyou", "controller"=>"store/order"} +Rendering within layouts/store +Rendering store/order/thankyou + LineItem Load (0.000536) SELECT * FROM line_items WHERE (line_items.order_id = 9112)  + SQL (0.001013)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'line_items'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.001178)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Product Load (0.000303) SELECT * FROM products WHERE (products."id" = 2)  +Rendered store/order/_receipt (0.00554) +Completed in 0.03340 (29 reqs/sec) | Rendering: 0.02761 (82%) | DB: 0.04408 (131%) | 200 OK [http://localhost/store/order/thankyou] + SQL (0.001330)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:48:56) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001230)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000269) SELECT count(*) AS count_all FROM products  + Order Load (0.042041)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.041200)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039952)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081323)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072906)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066748)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36276 (2 reqs/sec) | Rendering: 0.00466 (1%) | DB: 0.34700 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001544)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:50:41) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001311)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000306) SELECT count(*) AS count_all FROM products  + Order Load (0.041085)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040111)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040134)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081564)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072849)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067025)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36193 (2 reqs/sec) | Rendering: 0.00426 (1%) | DB: 0.34593 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001511)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:50:53) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001276)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000296) SELECT count(*) AS count_all FROM products  + Order Load (0.040560)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040205)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040665)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.082594)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072759)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066975)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36363 (2 reqs/sec) | Rendering: 0.00534 (1%) | DB: 0.34684 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001503)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:51:02) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001275)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000292) SELECT count(*) AS count_all FROM products  + Order Load (0.040162)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040152)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040037)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081521)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.073010)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067583)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36118 (2 reqs/sec) | Rendering: 0.00464 (1%) | DB: 0.34554 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001501)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:51:10) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + + +SyntaxError (./script/../config/../app/controllers/admin_controller.rb:132: syntax error, unexpected tIDENTIFIER, expecting kTHEN or ':' or '\n' or ';' + if @monthy is not nil + ^ +./script/../config/../app/controllers/admin_controller.rb:350: syntax error, unexpected kEND, expecting $end): + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_file' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in `load_file' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in `require_or_load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:248:in `load_missing_constant' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in `constantize' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/string/inflections.rb:148:in `constantize' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1284:in `recognize' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001327)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:51:16) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001810)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000317) SELECT count(*) AS count_all FROM products  + Order Load (0.040992)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.041895)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.041178)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.084034)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.089120)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067801)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.38436 (2 reqs/sec) | Rendering: 0.00465 (1%) | DB: 0.36997 (96%) | 200 OK [http://localhost/admin/] + SQL (0.001507)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:53:51) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001278)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000289) SELECT count(*) AS count_all FROM products  + Order Load (0.039939)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040230)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040340)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.082266)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.076236)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067043)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36623 (2 reqs/sec) | Rendering: 0.00472 (1%) | DB: 0.34913 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001528)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:54:52) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001306)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000298) SELECT count(*) AS count_all FROM products  + Order Load (0.039925)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040099)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040349)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081484)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072956)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066921)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36243 (2 reqs/sec) | Rendering: 0.00549 (1%) | DB: 0.34487 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001515)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:56:41) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001293)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000292) SELECT count(*) AS count_all FROM products  + Order Load (0.039822)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040023)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039978)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081289)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072699)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067042)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.35965 (2 reqs/sec) | Rendering: 0.00466 (1%) | DB: 0.34395 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001494)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:08) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001276)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000297) SELECT count(*) AS count_all FROM products  + Order Load (0.039844)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040036)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040009)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081294)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072996)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067404)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36239 (2 reqs/sec) | Rendering: 0.00532 (1%) | DB: 0.34465 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001492)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:28) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001304)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000304) SELECT count(*) AS count_all FROM products  + Order Load (0.039947)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040015)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039967)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081507)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072755)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067540)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +You might have expected an instance of Array. +The error occurred while evaluating nil.empty?): + .//app/controllers/admin_controller.rb:135:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001506)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:48) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001392)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000317) SELECT count(*) AS count_all FROM products  + Order Load (0.040025)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040145)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039999)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081297)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.073321)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067785)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NameError (undefined local variable or method `monthy' for #): + .//app/controllers/admin_controller.rb:135:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001497)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:54) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001270)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000294) SELECT count(*) AS count_all FROM products  + Order Load (0.039831)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040023)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039986)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081609)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072868)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067541)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +The error occurred while evaluating nil.count): + .//app/controllers/admin_controller.rb:135:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001495)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:58:25) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001282)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000296) SELECT count(*) AS count_all FROM products  + Order Load (0.039841)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.042199)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.041104)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.084305)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.074511)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.068270)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +The error occurred while evaluating nil.count): + .//app/controllers/admin_controller.rb:136:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001508)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:00:10) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001275)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000299) SELECT count(*) AS count_all FROM products  + Order Load (0.039888)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040023)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040045)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081315)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072977)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066883)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +You might have expected an instance of Array. +The error occurred while evaluating nil.length): + .//app/controllers/admin_controller.rb:136:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001496)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:00) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001283)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000296) SELECT count(*) AS count_all FROM products  + Order Load (0.039857)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.039941)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039884)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081378)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072955)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066889)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +You might have expected an instance of Array. +The error occurred while evaluating nil.length): + .//app/controllers/admin_controller.rb:136:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.000469) SET client_encoding TO 'utf8' + SQL (0.007347)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:09) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001351)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000979) SELECT count(*) AS count_all FROM products  + Order Load (0.045343)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.039895)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039778)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081363)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.074440)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066900)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +You might have expected an instance of Array. +The error occurred while evaluating nil.length): + .//app/controllers/admin_controller.rb:136:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001497)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:32) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001285)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000364) SELECT count(*) AS count_all FROM products  + Order Load (0.040368)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.041002)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040520)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081385)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072873)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066829)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +You might have expected an instance of Array. +The error occurred while evaluating nil.length): + .//app/controllers/admin_controller.rb:136:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001481)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:40) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001270)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000288) SELECT count(*) AS count_all FROM products  + Order Load (0.039654)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.039877)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039835)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081362)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072577)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066781)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 + + +NoMethodError (You have a nil object when you didn't expect it! +You might have expected an instance of Array. +The error occurred while evaluating nil.length): + .//app/controllers/admin_controller.rb:136:in `index' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) + SQL (0.001487)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:50) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001304)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000292) SELECT count(*) AS count_all FROM products  + Order Load (0.039823)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040824)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039852)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081359)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072843)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066899)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.38102 (2 reqs/sec) | Rendering: 0.02503 (6%) | DB: 1.39180 (365%) | 200 OK [http://localhost/admin/] + SQL (0.001491)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:57) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001258)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000290) SELECT count(*) AS count_all FROM products  + Order Load (0.039647)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.039979)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039808)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081178)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.073179)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.068753)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36143 (2 reqs/sec) | Rendering: 0.00475 (1%) | DB: 0.34558 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001488)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:08) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001277)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000293) SELECT count(*) AS count_all FROM products  + Order Load (0.039891)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040030)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040475)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.082289)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.073555)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067600)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36247 (2 reqs/sec) | Rendering: 0.00421 (1%) | DB: 0.34690 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001492)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:32) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001277)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000302) SELECT count(*) AS count_all FROM products  + Order Load (0.039710)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.051424)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039835)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081373)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072718)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067129)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.37114 (2 reqs/sec) | Rendering: 0.00468 (1%) | DB: 0.35526 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001514)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:38) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001327)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000347) SELECT count(*) AS count_all FROM products  + Order Load (0.040234)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.039849)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.040453)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081100)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072628)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066745)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.35960 (2 reqs/sec) | Rendering: 0.00414 (1%) | DB: 0.34420 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001490)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:56) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001272)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000292) SELECT count(*) AS count_all FROM products  + Order Load (0.040105)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040199)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039980)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081427)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072998)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.067013)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36177 (2 reqs/sec) | Rendering: 0.00467 (1%) | DB: 0.34478 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001502)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:05:09) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001273)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000302) SELECT count(*) AS count_all FROM products  + Order Load (0.041236)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.039810)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039823)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081210)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072681)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066783)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36077 (2 reqs/sec) | Rendering: 0.00420 (1%) | DB: 0.34462 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001486)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:12:15) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001255)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000297) SELECT count(*) AS count_all FROM products  + Order Load (0.039754)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.039947)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039990)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081395)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + Order Load (0.072866)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.068661)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.36304 (2 reqs/sec) | Rendering: 0.00447 (1%) | DB: 0.34565 (95%) | 200 OK [http://localhost/admin/] + SQL (0.001491)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#login (for 127.0.0.1 at 2007-06-24 00:12:19) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"login", "controller"=>"admin"} + + +ActionController::UnknownAction (No action responded to login): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + SQL (0.001326)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + + +Processing AdminController#logon (for 127.0.0.1 at 2007-06-24 00:12:22) [GET] + Session ID: 7c73f9defbf3304726a2977f2eae82c8 + Parameters: {"action"=>"logon", "controller"=>"admin"} + + +ActionController::UnknownAction (No action responded to logon): + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' + /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' + /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' + /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' + /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' + /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' + script/server:3 + + +Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:12:33) [GET] + Session ID: 1c87af64050ec770da98a9dae64141e5 + Parameters: {"action"=>"index", "controller"=>"admin"} +Rendering layoutfalseactionsignin_form within layouts/error +Rendering admin/signin_form +Completed in 0.02507 (39 reqs/sec) | Rendering: 0.02492 (99%) | DB: 0.00282 (11%) | 200 OK [http://localhost/admin/] + + +Processing AdminController#signin (for 127.0.0.1 at 2007-06-24 00:12:41) [POST] + Session ID: 1c87af64050ec770da98a9dae64141e5 + Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"1"} +Rendering layoutfalseactionsignin_form within layouts/error +Rendering admin/signin_form +Completed in 0.00290 (344 reqs/sec) | Rendering: 0.00187 (64%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/signin] + + +Processing AdminController#signin (for 127.0.0.1 at 2007-06-24 00:13:05) [POST] + Session ID: 1c87af64050ec770da98a9dae64141e5 + Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"password"} +Redirected to http://localhost:3000/admin +Completed in 0.00165 (604 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://localhost/admin/signin] + + +Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:13:05) [GET] + Session ID: 1c87af64050ec770da98a9dae64141e5 + Parameters: {"action"=>"index", "controller"=>"admin"} + SQL (0.001309)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'products'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + SQL (0.000299) SELECT count(*) AS count_all FROM products  + Order Load (0.039989)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 1 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time + + group by product + Order Load (0.040009)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 7 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time + + group by product + Order Load (0.039910)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 30 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time + + group by product + Order Load (0.081410)  + select (select count(*) + from orders + where status = 'C' and + payment_type != 'free' and + current_date - 365 <= order_time) as orders, + sum(line_items.unit_price * quantity) + - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + sum(quantity) as q, + products.name as product + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join products on products.id = line_items.product_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time + + group by product + SQL (0.001392)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull + FROM pg_attribute a LEFT JOIN pg_attrdef d + ON a.attrelid = d.adrelid AND a.attnum = d.adnum + WHERE a.attrelid = 'orders'::regclass + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum + + Order Load (0.072646)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + date_part('day', orders.order_time) as day, + sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month, day + + order by last_time desc limit 8 + Order Load (0.066987)  + select date_part('year', orders.order_time) as year, + date_part('month', orders.order_time) as month, + sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) + - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, + max(orders.order_time) as last_time + + from orders + inner join line_items on orders.id = line_items.order_id + left outer join coupons on coupons.id = orders.coupon_id + + where status = 'C' and payment_type != 'Free' + + group by year, month + + order by last_time desc limit 8 +Rendering within layouts/admin +Rendering admin/index +Completed in 0.37017 (2 reqs/sec) | Rendering: 0.00416 (1%) | DB: 0.34395 (92%) | 200 OK [http://localhost/admin] From 6f4e7b28ac3163974ef468c8a1410db1a5b6898d Mon Sep 17 00:00:00 2001 From: andykim78 Date: Sun, 24 Jun 2007 07:16:19 +0000 Subject: [PATCH 004/250] took out development.log from repo git-svn-id: https://potionstore.googlecode.com/svn/trunk@5 25f2d1f3-9e33-0410-bf15-d1b47774bbb0 --- log/development.log | 7329 ------------------------------------------- 1 file changed, 7329 deletions(-) delete mode 100644 log/development.log diff --git a/log/development.log b/log/development.log deleted file mode 100644 index 848189a..0000000 --- a/log/development.log +++ /dev/null @@ -1,7329 +0,0 @@ -# Logfile created on Thu Jun 21 22:00:57 -0700 2007 by / - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:52:15) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - - -MissingSourceFile (no such file to load -- postgres): - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' - .//app/controllers/store/order_controller.rb:25:in `new' - .//app/controllers/store/order_controller.rb:13:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:54:00) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - - -MissingSourceFile (no such file to load -- postgres): - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' - .//app/controllers/store/order_controller.rb:25:in `new' - .//app/controllers/store/order_controller.rb:13:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:55:46) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - - -MissingSourceFile (no such file to load -- postgres): - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' - .//app/controllers/store/order_controller.rb:25:in `new' - .//app/controllers/store/order_controller.rb:13:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:55:48) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - - -MissingSourceFile (no such file to load -- postgres): - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' - .//app/controllers/store/order_controller.rb:25:in `new' - .//app/controllers/store/order_controller.rb:13:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 22:58:15) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - - -MissingSourceFile (no such file to load -- postgres): - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' - .//app/controllers/store/order_controller.rb:25:in `new' - .//app/controllers/store/order_controller.rb:13:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:00:00) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - - -MissingSourceFile (no such file to load -- postgres): - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `postgresql_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection=' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1402:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1309:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `each' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `map' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1401:in `sanitize_sql_hash' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1388:in `sanitize_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1163:in `add_conditions!' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1096:in `construct_finder_sql' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:997:in `find_every' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:418:in `find' - /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/deprecated_finders.rb:39:in `find_all_without_deprecation' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/deprecation.rb:94:in `find_all' - .//app/controllers/store/order_controller.rb:25:in `new' - .//app/controllers/store/order_controller.rb:13:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:00:56) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - SQL (0.145132) SET client_encoding TO 'utf8' - Product Load (0.298814) SELECT * FROM products WHERE (products."active" = 1)  -Rendering layoutfalseactionnew within layouts/store -Rendering store/order/new - SQL (0.070146)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - -Completed in 1.18067 (0 reqs/sec) | Rendering: 0.03486 (2%) | DB: 0.51409 (43%) | 200 OK [http://localhost/store/] - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:00:57) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {} - - -ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/vc_small.png" with {:method=>:get}): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:00:57) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {} - - -ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/tgr_small.png" with {:method=>:get}): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:01:19) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"admin"} -Rendering layoutfalseactionsignin_form within layouts/error -Rendering admin/signin_form -Completed in 0.00691 (144 reqs/sec) | Rendering: 0.00679 (98%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/] - - -Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:01:23) [POST] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"commit"=>"Abracadabra", "username"=>"andy", "action"=>"signin", "controller"=>"admin", "password"=>"joinus"} -Rendering layoutfalseactionsignin_form within layouts/error -Rendering admin/signin_form -Completed in 0.00358 (278 reqs/sec) | Rendering: 0.00259 (72%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/signin] - - -Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:01:32) [POST] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"commit"=>"Abracadabra", "username"=>"username", "action"=>"signin", "controller"=>"admin", "password"=>"password"} -Rendering layoutfalseactionsignin_form within layouts/error -Rendering admin/signin_form -Completed in 0.00283 (353 reqs/sec) | Rendering: 0.00183 (64%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/signin] - - -Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:01:54) [POST] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"password"} -Redirected to http://localhost:3000/admin -Completed in 0.00160 (625 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://localhost/admin/signin] - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:01:54) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001257)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.026368) SELECT count(*) AS count_all FROM products  - Order Load (0.099808) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product - Order Load (0.111394) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time group by product - Order Load (0.039651) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time group by product - Order Load (0.124279) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time group by product - SQL (0.001378)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.092848)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067136)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.62039 (1 reqs/sec) | Rendering: 0.03251 (5%) | DB: 0.56412 (90%) | 200 OK [http://localhost/admin] - - -Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:02:06) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"orders", "controller"=>"admin"} - SQL (0.001495)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.007407) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  - Order Load (0.044243) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering within layouts/admin -Rendering admin/orders - LineItem Load (0.016709) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  - SQL (0.001059)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - LineItem Load (0.000564) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  - LineItem Load (0.000435) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  - LineItem Load (0.000549) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  - LineItem Load (0.000378) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  - LineItem Load (0.000376) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  - LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  - LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  - LineItem Load (0.000358) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  - LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  - LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  - LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  - LineItem Load (0.000398) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  - LineItem Load (0.000368) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  - LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  - LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  - LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  - LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  - LineItem Load (0.000391) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  - LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  - LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  - LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  - LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  - LineItem Load (0.000406) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  - LineItem Load (0.000354) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  - LineItem Load (0.000431) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  - LineItem Load (0.000354) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  - LineItem Load (0.002257) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  - LineItem Load (0.000432) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  - LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  - LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  - LineItem Load (0.000412) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  - LineItem Load (0.000432) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  - LineItem Load (0.000427) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  - LineItem Load (0.000421) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  - LineItem Load (0.000422) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  - LineItem Load (0.000560) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  - LineItem Load (0.000425) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  - LineItem Load (0.000410) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  - LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  - LineItem Load (0.000404) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  - LineItem Load (0.000364) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  - LineItem Load (0.000426) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  - LineItem Load (0.000366) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  - LineItem Load (0.000428) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  - LineItem Load (0.000804) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  - LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  - LineItem Load (0.000367) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  - LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  - LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  - LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  - LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  - LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  -Completed in 0.41669 (2 reqs/sec) | Rendering: 0.28956 (69%) | DB: 0.10879 (26%) | 200 OK [http://localhost/admin/orders] - - -Processing AdminController#order (for 127.0.0.1 at 2007-06-23 23:02:18) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"order", "id"=>"9110", "controller"=>"admin"} - SQL (0.001342)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.015328) SELECT * FROM orders WHERE (orders."id" = 9110)  -Rendering within layouts/admin -Rendering admin/order - LineItem Load (0.000583) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  - SQL (0.001201)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.001035)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Product Load (0.000441) SELECT * FROM products WHERE (products."id" = 2)  -Rendered store/order/_receipt (0.04026) -Completed in 0.07696 (12 reqs/sec) | Rendering: 0.04342 (56%) | DB: 0.01993 (25%) | 200 OK [http://localhost/admin/order/9110] - - -Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:02:23) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"orders", "controller"=>"admin"} - SQL (0.001350)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.004179) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  - Order Load (0.041271) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering within layouts/admin -Rendering admin/orders - LineItem Load (0.000530) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  - SQL (0.001004)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - LineItem Load (0.000512) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  - LineItem Load (0.000361) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  - LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  - LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  - LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  - LineItem Load (0.000394) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  - LineItem Load (0.000416) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  - LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  - LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  - LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  - LineItem Load (0.000372) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  - LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  - LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  - LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  - LineItem Load (0.000416) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  - LineItem Load (0.000480) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  - LineItem Load (0.000384) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  - LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  - LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  - LineItem Load (0.000418) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  - LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  - LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  - LineItem Load (0.000319) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  - LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  - LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  - LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  - LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  - LineItem Load (0.000362) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  - LineItem Load (0.000378) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  - LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  - LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  - LineItem Load (0.000362) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  - LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  -Completed in 0.27786 (3 reqs/sec) | Rendering: 0.17789 (64%) | DB: 0.08212 (29%) | 200 OK [http://localhost/admin/orders] - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:02:24) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001230)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000272) SELECT count(*) AS count_all FROM products  - Order Load (0.016746) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product - Order Load (0.039318) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time group by product - Order Load (0.039441) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time group by product - Order Load (0.085304) select (select count(*) from orders where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time group by product - SQL (0.001377)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.072562)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067022)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.44020 (2 reqs/sec) | Rendering: 0.09457 (21%) | DB: 0.32327 (73%) | 200 OK [http://localhost/admin] - - -Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:04:49) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"orders", "controller"=>"admin"} - SQL (0.001497)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.006445) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  - Order Load (0.041652) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering within layouts/admin -Rendering admin/orders - LineItem Load (0.000563) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  - SQL (0.001017)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - LineItem Load (0.000520) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  - LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  - LineItem Load (0.000471) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  - LineItem Load (0.000669) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  - LineItem Load (0.000481) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  - LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  - LineItem Load (0.000456) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  - LineItem Load (0.000404) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  - LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  - LineItem Load (0.000383) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  - LineItem Load (0.000454) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  - LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  - LineItem Load (0.000375) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  - LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  - LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  - LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  - LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  - LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  - LineItem Load (0.000398) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  - LineItem Load (0.000893) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  - LineItem Load (0.001172) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  - LineItem Load (0.000513) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  - LineItem Load (0.000432) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  - LineItem Load (0.000414) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  - LineItem Load (0.000418) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  - LineItem Load (0.000444) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  - LineItem Load (0.000488) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  - LineItem Load (0.000510) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  - LineItem Load (0.000437) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  - LineItem Load (0.000428) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  - LineItem Load (0.000391) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  - LineItem Load (0.000414) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  - LineItem Load (0.000437) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  - LineItem Load (0.000442) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  - LineItem Load (0.000415) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  - LineItem Load (0.000443) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  - LineItem Load (0.000453) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  - LineItem Load (0.000512) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  - LineItem Load (0.000497) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  - LineItem Load (0.000479) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  - LineItem Load (0.000433) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  - LineItem Load (0.000446) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  - LineItem Load (0.000606) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  - LineItem Load (0.000491) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  - LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  - LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  - LineItem Load (0.000399) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  - LineItem Load (0.000400) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  - LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  - LineItem Load (0.000446) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  - LineItem Load (0.000362) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  - LineItem Load (0.000441) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  - LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  - LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  - LineItem Load (0.000418) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  - LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  - LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  - LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  - LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  - LineItem Load (0.000365) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  -Completed in 0.29387 (3 reqs/sec) | Rendering: 0.18510 (62%) | DB: 0.09034 (30%) | 200 OK [http://localhost/admin/orders] - - -Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:04:52) [POST] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"9109"} - SQL (0.001356)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.061511) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '9109' OR - first_name ~* '9109.*' OR - last_name ~* '9109.*' OR - licensee_name ~* '%9109.*' OR - id = 9109))  - Order Load (0.047443) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '9109' OR - first_name ~* '9109.*' OR - last_name ~* '9109.*' OR - licensee_name ~* '%9109.*' OR - id = 9109)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering layoutfalseactionorders within layouts/admin -Rendering admin/orders - LineItem Load (0.000533) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  - SQL (0.001053)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - -Completed in 0.14457 (6 reqs/sec) | Rendering: 0.02087 (14%) | DB: 0.11190 (77%) | 200 OK [http://localhost/admin/find_orders] - - -Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:04:58) [POST] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"9108"} - SQL (0.001335)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.048567) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '9108' OR - first_name ~* '9108.*' OR - last_name ~* '9108.*' OR - licensee_name ~* '%9108.*' OR - id = 9108))  - Order Load (0.048568) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '9108' OR - first_name ~* '9108.*' OR - last_name ~* '9108.*' OR - licensee_name ~* '%9108.*' OR - id = 9108)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering layoutfalseactionorders within layouts/admin -Rendering admin/orders -Completed in 0.11242 (8 reqs/sec) | Rendering: 0.00289 (2%) | DB: 0.09847 (87%) | 200 OK [http://localhost/admin/find_orders] - - -Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:05:01) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"orders", "controller"=>"admin"} - SQL (0.001384)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.006953) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  - Order Load (0.044601) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering within layouts/admin -Rendering admin/orders - LineItem Load (0.000653) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  - SQL (0.001316)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - LineItem Load (0.000780) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  - LineItem Load (0.000560) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  - LineItem Load (0.000401) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  - LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  - LineItem Load (0.000359) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  - LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  - LineItem Load (0.000467) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  - LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  - LineItem Load (0.000367) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  - LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  - LineItem Load (0.000457) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  - LineItem Load (0.000369) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  - LineItem Load (0.000381) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  - LineItem Load (0.000475) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  - LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  - LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  - LineItem Load (0.000852) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  - LineItem Load (0.000445) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  - LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  - LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  - LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  - LineItem Load (0.000385) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  - LineItem Load (0.000455) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  - LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  - LineItem Load (0.000385) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  - LineItem Load (0.000445) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  - LineItem Load (0.000385) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  - LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  - LineItem Load (0.000344) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  - LineItem Load (0.000885) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  - LineItem Load (0.000421) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  - LineItem Load (0.000364) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  - LineItem Load (0.000547) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  - LineItem Load (0.000400) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  - LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  - LineItem Load (0.000370) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  - LineItem Load (0.000358) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  - LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  - LineItem Load (0.000402) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  - LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  - LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  - LineItem Load (0.000351) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  - LineItem Load (0.000377) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  - LineItem Load (0.000384) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  - LineItem Load (0.000341) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  - LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  - LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  - LineItem Load (0.000400) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  - LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  - LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  - LineItem Load (0.000345) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  - LineItem Load (0.000355) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  - LineItem Load (0.000329) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  - LineItem Load (0.000421) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  - LineItem Load (0.000346) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  - LineItem Load (0.000406) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  - LineItem Load (0.000381) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  - LineItem Load (0.000478) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  - LineItem Load (0.000348) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  - LineItem Load (0.000327) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  -Completed in 0.38830 (2 reqs/sec) | Rendering: 0.27647 (71%) | DB: 0.09237 (23%) | 200 OK [http://localhost/admin/orders] - - -Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:05:05) [POST] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"9107"} - SQL (0.001335)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.048327) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '9107' OR - first_name ~* '9107.*' OR - last_name ~* '9107.*' OR - licensee_name ~* '%9107.*' OR - id = 9107))  - Order Load (0.048341) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '9107' OR - first_name ~* '9107.*' OR - last_name ~* '9107.*' OR - licensee_name ~* '%9107.*' OR - id = 9107)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering layoutfalseactionorders within layouts/admin -Rendering admin/orders - LineItem Load (0.000525) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  - SQL (0.001011)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - -Completed in 0.13153 (7 reqs/sec) | Rendering: 0.02071 (15%) | DB: 0.09954 (75%) | 200 OK [http://localhost/admin/find_orders] - - -Processing AdminController#find_orders (for 127.0.0.1 at 2007-06-23 23:05:10) [POST] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"commit"=>"Search", "action"=>"find_orders", "controller"=>"admin", "query"=>"91"} - SQL (0.001367)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.044413) SELECT count(*) AS count_all FROM orders WHERE (status != 'P' AND (email ~* '91' OR - first_name ~* '91.*' OR - last_name ~* '91.*' OR - licensee_name ~* '%91.*' OR - id = 91))  - Order Load (0.044450) SELECT * FROM orders WHERE (status != 'P' AND (email ~* '91' OR - first_name ~* '91.*' OR - last_name ~* '91.*' OR - licensee_name ~* '%91.*' OR - id = 91)) ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering layoutfalseactionorders within layouts/admin -Rendering admin/orders - LineItem Load (0.013986) SELECT * FROM line_items WHERE (line_items.order_id = 7129)  - SQL (0.001066)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - LineItem Load (0.001079) SELECT * FROM line_items WHERE (line_items.order_id = 5991)  - LineItem Load (0.000879) SELECT * FROM line_items WHERE (line_items.order_id = 1517)  - LineItem Load (0.008833) SELECT * FROM line_items WHERE (line_items.order_id = 91)  -Completed in 0.15360 (6 reqs/sec) | Rendering: 0.02588 (16%) | DB: 0.11607 (75%) | 200 OK [http://localhost/admin/find_orders] - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:16:54) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001370)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000317) SELECT count(*) AS count_all FROM products  - Order Load (0.016802) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product - Order Load (0.038942)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time - group by product - Order Load (0.039336)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time - group by product - Order Load (0.087558)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time - group by product - SQL (0.001372)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.073443)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067468)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.35550 (2 reqs/sec) | Rendering: 0.00529 (1%) | DB: 0.32661 (91%) | 200 OK [http://localhost/admin] - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:17:11) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"admin"} - - -SyntaxError (./script/../config/../app/controllers/admin_controller.rb:347: syntax error, unexpected $end, expecting kEND): - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_file' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in `load_file' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in `require_or_load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:248:in `load_missing_constant' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in `constantize' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/string/inflections.rb:148:in `constantize' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1284:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:17:15) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001354)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000314) SELECT count(*) AS count_all FROM products  - Order Load (0.019151) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product - Order Load (0.039858)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'free' and current_date - 7 <= order_time - group by product - Order Load (0.039333)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'free' and current_date - 30 <= order_time - group by product - Order Load (0.085280)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and payment_type != 'free' and current_date - 365 <= order_time - group by product - SQL (0.001389)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.072996)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067914)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.35431 (2 reqs/sec) | Rendering: 0.00461 (1%) | DB: 0.32759 (92%) | 200 OK [http://localhost/admin] - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:17:55) [GET] - Session ID: 1d2432356daffaf1d712e8e97f93c236 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001386)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000308) SELECT count(*) AS count_all FROM products  - Order Load (0.019273) select (select count(*) from orders where status = 'C' and payment_type != 'free' and date(order_time) = current_date) as orders, sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, sum(quantity) as q, products.name as product from orders inner join line_items on orders.id = line_items.order_id left outer join products on products.id = line_items.product_id left outer join coupons on coupons.id = orders.coupon_id where status = 'C' and payment_type != 'free' and date(order_time) = current_date group by product - Order Load (0.064829)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - group by product - Order Load (0.040104)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - group by product - Order Load (0.081412)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - from orders inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - group by product - SQL (0.001381)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.073206)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067690)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.37872 (2 reqs/sec) | Rendering: 0.00551 (1%) | DB: 0.34959 (92%) | 200 OK [http://localhost/admin] - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:44:43) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - Product Load (0.000559) SELECT * FROM products WHERE (products."active" = 1)  -Rendering layoutfalseactionnew within layouts/store -Rendering store/order/new - SQL (0.001285)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - -Completed in 0.05702 (17 reqs/sec) | Rendering: 0.00453 (7%) | DB: 0.00184 (3%) | 200 OK [http://localhost/store/] - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:44:43) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {} - - -ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/vc_small.png" with {:method=>:get}): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:44:43) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {} - - -ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/tgr_small.png" with {:method=>:get}): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - - -Processing OrderController#payment (for 127.0.0.1 at 2007-06-23 23:44:46) [POST] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"items"=>{"2"=>"1", "3"=>""}, "commit"=>"  Continue →", "action"=>"payment", "controller"=>"store/order", "payment_type"=>"cc", "coupon"=>""} - SQL (0.001425)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.001203)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.011288) SELECT * FROM orders WHERE (orders."id" = 0)  - SQL (0.001168)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Product Load (0.000328) SELECT * FROM products WHERE (products."id" = 2)  - SQL (0.000147) BEGIN - SQL (0.000107) COMMIT - Product Load (0.000323) SELECT * FROM products WHERE (products."id" = 2)  -Rendering layoutfalseactionpayment_cc within layouts/store -Rendering store/order/payment_cc -Rendered store/order/_form_countries (0.01741) -Rendered store/order/_form_months (0.00160) -Completed in 0.08187 (12 reqs/sec) | Rendering: 0.03321 (40%) | DB: 0.01599 (19%) | 200 OK [http://localhost/store/order/payment] - - -Processing OrderController#purchase (for 127.0.0.1 at 2007-06-23 23:44:54) [POST] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"items"=>{"2"=>"1"}, "commit"=>"  Place Order →", "order"=>{"address1"=>"433 S. Serrano Ave.", "company"=>"ab", "city"=>"Los Angeles", "address2"=>"", "cc_month"=>"1", "cc_number"=>"4916306176169494", "zipcode"=>"90004", "country"=>"US", "cc_code"=>"000", "first_name"=>"Byung", "payment_type"=>"Visa", "last_name"=>"someone", "comment"=>"2", "state"=>"CA", "email"=>"andykim78@gmail.com", "cc_year"=>"2007", "licensee_name"=>"Andy Kim"}, "action"=>"purchase", "onsubmit"=>"javascript:return validate();", "controller"=>"store/order"} - SQL (0.001358)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.001200)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.000421) SELECT * FROM orders WHERE (orders."id" = 0)  - SQL (0.001161)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Product Load (0.000310) SELECT * FROM products WHERE (products."id" = 2)  - SQL (0.000117) BEGIN - SQL (0.000107) COMMIT - Product Load (0.000308) SELECT * FROM products WHERE (products."id" = 2)  - SQL (0.000109) BEGIN - PK and serial sequence (0.040337)  SELECT attr.attname, name.nspname, seq.relname - FROM pg_class seq, - pg_attribute attr, - pg_depend dep, - pg_namespace name, - pg_constraint cons - WHERE seq.oid = dep.objid - AND seq.relnamespace = name.oid - AND seq.relkind = 'S' - AND attr.attrelid = dep.refobjid - AND attr.attnum = dep.refobjsubid - AND attr.attrelid = cons.conrelid - AND attr.attnum = cons.conkey[1] - AND cons.contype = 'p' - AND dep.refobjid = 'orders'::regclass - - Order Create (0.048156) INSERT INTO orders ("address1", "city", "company", "status", "address2", "coupon_id", "failure_reason", "zipcode", "country", "ccnum", "failure_code", "first_name", "order_time", "payment_type", "comment", "last_name", "email", "licensee_name", "state", "transaction_number") VALUES('433 S. Serrano Ave.', 'Los Angeles', 'ab', 'P', '', NULL, NULL, '90004', 'US', 'XXXXXXXXXXXX9494', NULL, 'Byung', '2007-06-23 23:44:54.884570', 'Visa', '2', 'someone', 'andykim78@gmail.com', 'Andy Kim', 'CA', NULL) - SQL (0.008850) SELECT currval('orders_id_seq') - PK and serial sequence (0.003210)  SELECT attr.attname, name.nspname, seq.relname - FROM pg_class seq, - pg_attribute attr, - pg_depend dep, - pg_namespace name, - pg_constraint cons - WHERE seq.oid = dep.objid - AND seq.relnamespace = name.oid - AND seq.relkind = 'S' - AND attr.attrelid = dep.refobjid - AND attr.attnum = dep.refobjsubid - AND attr.attrelid = cons.conrelid - AND attr.attnum = cons.conkey[1] - AND cons.contype = 'p' - AND dep.refobjid = 'line_items'::regclass - - LineItem Create (0.018441) INSERT INTO line_items ("license_key", "order_id", "product_id", "quantity", "unit_price") VALUES(NULL, 9111, 2, 1, 12.95) - SQL (0.000197) SELECT currval('line_items_id_seq') - SQL (0.001067) COMMIT - - -OpenSSL::X509::CertificateError (header too long): - .//lib/soap/httpconfigloader.rb:110:in `initialize' - .//lib/soap/httpconfigloader.rb:110:in `new' - .//lib/soap/httpconfigloader.rb:110:in `cert_from_file' - .//lib/soap/httpconfigloader.rb:68:in `set_ssl_config' - .//lib/soap/property.rb:140:in `each' - .//lib/soap/property.rb:139:in `each' - .//lib/soap/httpconfigloader.rb:61:in `set_ssl_config' - .//lib/soap/httpconfigloader.rb:36:in `set_options' - .//lib/soap/property.rb:115:in `call' - .//lib/soap/property.rb:115:in `[]=' - .//lib/soap/property.rb:114:in `each' - .//lib/soap/property.rb:114:in `[]=' - .//vendor/plugins/paypal/lib/paypal.rb:74:in `create_client' - .//vendor/plugins/paypal/lib/paypal.rb:164:in `directcharge' - .//app/models/order.rb:297:in `paypal_directcharge' - .//app/controllers/store/order_controller.rb:136:in `purchase' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001334)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:45:03) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} -Rendering layoutfalseactionsignin_form within layouts/error -Rendering admin/signin_form -Completed in 0.00233 (428 reqs/sec) | Rendering: 0.00220 (94%) | DB: 0.12668 (5427%) | 200 OK [http://localhost/admin] - SQL (0.001327)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#signin (for 127.0.0.1 at 2007-06-23 23:45:10) [POST] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"password"} -Redirected to http://localhost:3000/admin -Completed in 0.00172 (580 reqs/sec) | DB: 0.00133 (77%) | 302 Found [http://localhost/admin/signin] - SQL (0.001350)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:45:11) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001236)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000272) SELECT count(*) AS count_all FROM products  - Order Load (0.023764)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040637)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040237)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.083638)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072944)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067347)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.34871 (2 reqs/sec) | Rendering: 0.00474 (1%) | DB: 0.33143 (95%) | 200 OK [http://localhost/admin] - SQL (0.001580)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#orders (for 127.0.0.1 at 2007-06-23 23:45:18) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"orders", "controller"=>"admin"} - SQL (0.006558) SELECT count(*) AS count_all FROM orders WHERE (status != 'P')  - Order Load (0.041964) SELECT * FROM orders WHERE (status != 'P') ORDER BY order_time DESC LIMIT 100 OFFSET 0 -Rendering within layouts/admin -Rendering admin/orders - LineItem Load (0.000577) SELECT * FROM line_items WHERE (line_items.order_id = 9110)  - SQL (0.001039)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - LineItem Load (0.000499) SELECT * FROM line_items WHERE (line_items.order_id = 9109)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9107)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9105)  - LineItem Load (0.000320) SELECT * FROM line_items WHERE (line_items.order_id = 9104)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9103)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9102)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9101)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9100)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9099)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9098)  - LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9097)  - LineItem Load (0.000314) SELECT * FROM line_items WHERE (line_items.order_id = 9096)  - LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9093)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9092)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9091)  - LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9090)  - LineItem Load (0.000318) SELECT * FROM line_items WHERE (line_items.order_id = 9089)  - LineItem Load (0.000319) SELECT * FROM line_items WHERE (line_items.order_id = 9088)  - LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9087)  - LineItem Load (0.000317) SELECT * FROM line_items WHERE (line_items.order_id = 9086)  - LineItem Load (0.000315) SELECT * FROM line_items WHERE (line_items.order_id = 9084)  - LineItem Load (0.000312) SELECT * FROM line_items WHERE (line_items.order_id = 9083)  - LineItem Load (0.000315) SELECT * FROM line_items WHERE (line_items.order_id = 9075)  - LineItem Load (0.000316) SELECT * FROM line_items WHERE (line_items.order_id = 9071)  - LineItem Load (0.000314) SELECT * FROM line_items WHERE (line_items.order_id = 9070)  - LineItem Load (0.000314) SELECT * FROM line_items WHERE (line_items.order_id = 9069)  - LineItem Load (0.000315) SELECT * FROM line_items WHERE (line_items.order_id = 9068)  - LineItem Load (0.000545) SELECT * FROM line_items WHERE (line_items.order_id = 9067)  - LineItem Load (0.000389) SELECT * FROM line_items WHERE (line_items.order_id = 9066)  - LineItem Load (0.000365) SELECT * FROM line_items WHERE (line_items.order_id = 9065)  - LineItem Load (0.000368) SELECT * FROM line_items WHERE (line_items.order_id = 9064)  - LineItem Load (0.000363) SELECT * FROM line_items WHERE (line_items.order_id = 9062)  - LineItem Load (0.000352) SELECT * FROM line_items WHERE (line_items.order_id = 9061)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9060)  - LineItem Load (0.000354) SELECT * FROM line_items WHERE (line_items.order_id = 9059)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 9057)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9056)  - LineItem Load (0.000339) SELECT * FROM line_items WHERE (line_items.order_id = 9055)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9054)  - LineItem Load (0.000350) SELECT * FROM line_items WHERE (line_items.order_id = 9053)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9029)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 9028)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 9027)  - LineItem Load (0.000366) SELECT * FROM line_items WHERE (line_items.order_id = 9026)  - LineItem Load (0.000333) SELECT * FROM line_items WHERE (line_items.order_id = 9022)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 9021)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9020)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 9018)  - LineItem Load (0.000334) SELECT * FROM line_items WHERE (line_items.order_id = 9017)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 9016)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 9015)  - LineItem Load (0.000374) SELECT * FROM line_items WHERE (line_items.order_id = 9014)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9013)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 9012)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9011)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 9010)  - LineItem Load (0.000326) SELECT * FROM line_items WHERE (line_items.order_id = 9009)  - LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 9008)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 9007)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 9006)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 9003)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 9000)  - LineItem Load (0.000356) SELECT * FROM line_items WHERE (line_items.order_id = 8612)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8611)  - LineItem Load (0.000321) SELECT * FROM line_items WHERE (line_items.order_id = 8610)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8609)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8608)  - LineItem Load (0.000323) SELECT * FROM line_items WHERE (line_items.order_id = 8607)  - LineItem Load (0.000320) SELECT * FROM line_items WHERE (line_items.order_id = 8606)  - LineItem Load (0.000386) SELECT * FROM line_items WHERE (line_items.order_id = 8605)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8604)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 8603)  - LineItem Load (0.000414) SELECT * FROM line_items WHERE (line_items.order_id = 8602)  - LineItem Load (0.000338) SELECT * FROM line_items WHERE (line_items.order_id = 8601)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 8600)  - LineItem Load (0.000325) SELECT * FROM line_items WHERE (line_items.order_id = 8599)  - LineItem Load (0.000332) SELECT * FROM line_items WHERE (line_items.order_id = 8598)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8597)  - LineItem Load (0.000336) SELECT * FROM line_items WHERE (line_items.order_id = 8596)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8595)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8594)  - LineItem Load (0.000335) SELECT * FROM line_items WHERE (line_items.order_id = 8593)  - LineItem Load (0.000331) SELECT * FROM line_items WHERE (line_items.order_id = 8592)  - LineItem Load (0.000445) SELECT * FROM line_items WHERE (line_items.order_id = 8591)  - LineItem Load (0.000347) SELECT * FROM line_items WHERE (line_items.order_id = 8590)  - LineItem Load (0.000369) SELECT * FROM line_items WHERE (line_items.order_id = 8589)  - LineItem Load (0.000340) SELECT * FROM line_items WHERE (line_items.order_id = 8588)  - LineItem Load (0.000342) SELECT * FROM line_items WHERE (line_items.order_id = 8587)  - LineItem Load (0.000349) SELECT * FROM line_items WHERE (line_items.order_id = 8586)  - LineItem Load (0.000343) SELECT * FROM line_items WHERE (line_items.order_id = 8585)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8584)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8583)  - LineItem Load (0.000324) SELECT * FROM line_items WHERE (line_items.order_id = 8582)  - LineItem Load (0.000322) SELECT * FROM line_items WHERE (line_items.order_id = 8581)  - LineItem Load (0.000330) SELECT * FROM line_items WHERE (line_items.order_id = 8580)  - LineItem Load (0.000328) SELECT * FROM line_items WHERE (line_items.order_id = 8579)  - LineItem Load (0.000382) SELECT * FROM line_items WHERE (line_items.order_id = 8578)  - LineItem Load (0.000353) SELECT * FROM line_items WHERE (line_items.order_id = 8577)  - LineItem Load (0.000337) SELECT * FROM line_items WHERE (line_items.order_id = 8576)  -Completed in 0.35661 (2 reqs/sec) | Rendering: 0.26385 (73%) | DB: 0.08538 (23%) | 200 OK [http://localhost/admin/orders] - SQL (0.001329)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing OrderController#index (for 127.0.0.1 at 2007-06-23 23:46:23) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"store/order"} -DEPRECATION WARNING: find_all is deprecated and will be removed from Rails 2.0 (use find(:all, ...)) See http://www.rubyonrails.org/deprecation for details. (called from new at ./script/../config/../app/controllers/store/order_controller.rb:25) - Product Load (0.000530) SELECT * FROM products WHERE (products."active" = 1)  -Rendering layoutfalseactionnew within layouts/store -Rendering store/order/new - SQL (0.001230)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - -Completed in 0.01449 (69 reqs/sec) | Rendering: 0.00451 (31%) | DB: 0.00309 (21%) | 200 OK [http://localhost/store/] - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:46:23) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {} - - -ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/vc_small.png" with {:method=>:get}): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:46:23) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {} - - -ActionController::RoutingError (no route found to match "/themes/potionfactory/images/store/tgr_small.png" with {:method=>:get}): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - - -Processing OrderController#payment (for 127.0.0.1 at 2007-06-23 23:46:26) [POST] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"items"=>{"2"=>"1", "3"=>""}, "commit"=>"  Continue →", "action"=>"payment", "controller"=>"store/order", "payment_type"=>"cc", "coupon"=>""} - SQL (0.001377)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.001211)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.000468) SELECT * FROM orders WHERE (orders."id" = 0)  - SQL (0.001187)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Product Load (0.000329) SELECT * FROM products WHERE (products."id" = 2)  - SQL (0.000171) BEGIN - SQL (0.000144) COMMIT - Product Load (0.000356) SELECT * FROM products WHERE (products."id" = 2)  -Rendering layoutfalseactionpayment_cc within layouts/store -Rendering store/order/payment_cc -Rendered store/order/_form_countries (0.00240) -Rendered store/order/_form_months (0.00010) -Completed in 0.04457 (22 reqs/sec) | Rendering: 0.00812 (18%) | DB: 0.00524 (11%) | 200 OK [http://localhost/store/order/payment] - - -Processing OrderController#purchase (for 127.0.0.1 at 2007-06-23 23:48:12) [POST] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"items"=>{"2"=>"1"}, "commit"=>"  Place Order →", "order"=>{"address1"=>"433 S. Serrano Ave.", "company"=>"ab", "city"=>"Los Angeles", "address2"=>"", "cc_month"=>"1", "cc_number"=>"4916306176169494", "zipcode"=>"90004", "country"=>"US", "cc_code"=>"000", "first_name"=>"Byung", "payment_type"=>"Visa", "last_name"=>"someone", "comment"=>"2", "state"=>"CA", "email"=>"andykim78@gmail.com", "cc_year"=>"2007", "licensee_name"=>"Andy Kim"}, "action"=>"purchase", "onsubmit"=>"javascript:return validate();", "controller"=>"store/order"} - SQL (0.001338)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.001206)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.000418) SELECT * FROM orders WHERE (orders."id" = 0)  - SQL (0.001178)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Product Load (0.000299) SELECT * FROM products WHERE (products."id" = 2)  - SQL (0.000117) BEGIN - SQL (0.000104) COMMIT - Product Load (0.000306) SELECT * FROM products WHERE (products."id" = 2)  - SQL (0.000111) BEGIN - PK and serial sequence (0.003739)  SELECT attr.attname, name.nspname, seq.relname - FROM pg_class seq, - pg_attribute attr, - pg_depend dep, - pg_namespace name, - pg_constraint cons - WHERE seq.oid = dep.objid - AND seq.relnamespace = name.oid - AND seq.relkind = 'S' - AND attr.attrelid = dep.refobjid - AND attr.attnum = dep.refobjsubid - AND attr.attrelid = cons.conrelid - AND attr.attnum = cons.conkey[1] - AND cons.contype = 'p' - AND dep.refobjid = 'orders'::regclass - - Order Create (0.000653) INSERT INTO orders ("address1", "city", "company", "status", "address2", "coupon_id", "failure_reason", "zipcode", "country", "ccnum", "failure_code", "first_name", "order_time", "payment_type", "comment", "last_name", "email", "licensee_name", "state", "transaction_number") VALUES('433 S. Serrano Ave.', 'Los Angeles', 'ab', 'P', '', NULL, NULL, '90004', 'US', 'XXXXXXXXXXXX9494', NULL, 'Byung', '2007-06-23 23:48:12.826167', 'Visa', '2', 'someone', 'andykim78@gmail.com', 'Andy Kim', 'CA', NULL) - SQL (0.000165) SELECT currval('orders_id_seq') - PK and serial sequence (0.003171)  SELECT attr.attname, name.nspname, seq.relname - FROM pg_class seq, - pg_attribute attr, - pg_depend dep, - pg_namespace name, - pg_constraint cons - WHERE seq.oid = dep.objid - AND seq.relnamespace = name.oid - AND seq.relkind = 'S' - AND attr.attrelid = dep.refobjid - AND attr.attnum = dep.refobjsubid - AND attr.attrelid = cons.conrelid - AND attr.attnum = cons.conkey[1] - AND cons.contype = 'p' - AND dep.refobjid = 'line_items'::regclass - - LineItem Create (0.000521) INSERT INTO line_items ("license_key", "order_id", "product_id", "quantity", "unit_price") VALUES(NULL, 9112, 2, 1, 12.95) - SQL (0.000161) SELECT currval('line_items_id_seq') - SQL (0.000781) COMMIT - SQL (0.000112) BEGIN - LineItem Update (0.023195) UPDATE line_items SET "order_id" = 9112, "product_id" = 2, "unit_price" = 12.95, "license_key" = 'VC-JDA24NEKUAO3YXRE', "quantity" = 1 WHERE "id" = 9194 - SQL (0.000575) COMMIT - SQL (0.000183) BEGIN - Order Update (0.000774) UPDATE orders SET "transaction_number" = NULL, "company" = 'ab', "licensee_name" = 'Andy Kim', "email" = 'andykim78@gmail.com', "ccnum" = 'XXXXXXXXXXXX9494', "payment_type" = 'Visa', "city" = 'Los Angeles', "zipcode" = '90004', "coupon_id" = NULL, "order_time" = '2007-06-23 23:48:12.826167', "address2" = '', "country" = 'US', "failure_reason" = NULL, "status" = 'C', "address1" = '433 S. Serrano Ave.', "state" = 'CA', "failure_code" = NULL, "last_name" = 'someone', "comment" = '2', "first_name" = 'Byung' WHERE "id" = 9112 - SQL (0.000599) COMMIT -Redirected to http://localhost:3000/store/order/thankyou -Rendered ../store/order/_receipt (0.03357) -Sent mail: - From: My Company -To: andykim78@gmail.com -Bcc: orders@mycompany.com -Subject: Purchase Receipt for Order #9112 * -Mime-Version: 1.0 -Content-Type: multipart/alternative; boundary=mimepart_467e13ace81dd_4a8719f4c4a140 - - ---mimepart_467e13ace81dd_4a8719f4c4a140 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: Quoted-printable -Content-Disposition: inline - -Dear Byung someone, - -Thank you for purchasing My Company software. -Below are your application license keys. To activate, please copy -and paste the code to the registration window in the application. - -Voice Candy v1: -VC-JDA24NEKUAO3YXRE - - -Please let us know if you have any questions or comments. -Enjoy your purchase. - -- My Company - - - -RECEIPT ----------------------------------------------------------------------- - -Order Number: 9112 - -Placed On: Sun Jun 24 06:48:12 UTC 2007 - -Registered-To: Byung someone -Company: ab -Email: andykim78@gmail.com - -Billing Address: -433 S. Serrano Ave. -Los Angeles, CA 90004 -United States - -Payment: -Visa, XXXXXXXXXXXX9494 - -Purchased Items: - -1 Voice Candy v1 @ $12.95 each - -Total: $12.95 - - ---mimepart_467e13ace81dd_4a8719f4c4a140 -Content-Type: text/html; charset=utf-8 -Content-Transfer-Encoding: Base64 -Content-Disposition: inline - -PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAg -VHJhbnNpdGlvbmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1s -MS9EVEQveGh0bWwxLXRyYW5zaXRpb25hbC5kdGQiPgo8aHRtbCB4bWxucz0i -aHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+CjxoZWFkPgogICAgPG1l -dGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0 -bWw7IGNoYXJzZXQ9VVRGLTgiLz4KICAgIDx0aXRsZT5NeSBDb21wYW55IFJl -Y2VpcHQ8L3RpdGxlPgogICAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5w -YWdlIHsgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7IHdpZHRoOjU1MHB4OyB9 -CglpbWcgeyBib3JkZXI6IDA7IH0KCWgzIHsgbWFyZ2luLXRvcDogMzBweDsg -fQoJcCB7IGZvbnQtZmFtaWx5OiBoZWx2ZXRpY2EsIHNhbnMtc2VyaWY7IGZv -bnQtc2l6ZTogMTNweDsgbGluZS1oZWlnaHQ6IDE4cHg7IG1hcmdpbi10b3A6 -IDEwcHg7IH0KCXAucHMsIGxpIHsgZm9udC1mYW1pbHk6IGhlbHZldGljYTsg -Zm9udC1zaXplOiAxMnB4OyBsaW5lLWhlaWdodDogMThweDsgfQoJcHJlIHsg -cGFkZGluZzoxMHB4OyBiYWNrZ3JvdW5kLWNvbG9yOiNlZWU7IH0KCWRpdi5k -IHsgaGVpZ2h0OjFweDsgbWFyZ2luOjIwcHggMCAxMHB4OyBib3JkZXItdG9w -OjFweCBkb3R0ZWQgIzk5OTsgfQoJZGl2LnMgeyBoZWlnaHQ6MXg7IG1hcmdp -bjogMjBweCAwIDEwcHg7IH0KICAgIDwvc3R5bGU+CjwvaGVhZD4KPGJvZHk+ -CjxkaXYgY2xhc3M9InBhZ2UiPgogICAgPGRpdiBjbGFzcz0iY2xlYXIiPjwv -ZGl2PgogICAgPGRpdiBpZD0iY29udGVudCI+Cgk8cD5EZWFyIEJ5dW5nIHNv -bWVvbmUsPC9wPgoKCTxwPgoJICAgIFRoYW5rIHlvdSBmb3IgcHVyY2hhc2lu -ZyBNeSBDb21wYW55IHNvZnR3YXJlLiBZb3VyIGxpY2Vuc2Uga2V5cyBhcmUg -YmVsb3cuIElmIHlvdSBhbHJlYWR5IGhhdmUgdGhlIGFwcGxpY2F0aW9uCgkg -ICAgaW5zdGFsbGVkLCB5b3UgY2FuIGFjdGl2YXRlIGJ5IGNsaWNraW5nIHRo -ZSAiQWN0aXZhdGUgTm93IiBsaW5rLgoJPC9wPgoKCTxoMz5MSUNFTlNFIEtF -WTwvaDM+CjxwcmU+ClZvaWNlIENhbmR5IHYxOgpWQy1KREEyNE5FS1VBTzNZ -WFJFIDxhIGhyZWY9IngtY29tLXBvdGlvbmZhY3RvcnktbGljZW5zZS12b2lj -ZWNhbmR5Oi8vVkMtSkRBMjRORUtVQU8zWVhSRSI+QWN0aXZhdGUgTm93PC9h -Pgo8L3ByZT4KCgk8ZGl2IGNsYXNzPSJzIj48L2Rpdj4KCTxwPlBsZWFzZSBs -ZXQgdXMga25vdyBpZiB5b3UgaGF2ZSBhbnkgcXVlc3Rpb25zIG9yIGNvbW1l -bnRzLiBFbmpveSB5b3VyIHB1cmNoYXNlLjwvcD4KICAKCTxwPi0gTXkgQ29t -cGFueTwvcD4KICAKCTxkaXYgY2xhc3M9ImQiPjwvZGl2PgoJPHN0eWxlIHR5 -cGU9InRleHQvY3NzIj4KI3JlY2VpcHQgdGFibGUgeyB3aWR0aDo1NTBweDsg -fQo8L3N0eWxlPgoKPGRpdiBpZD0icmVjZWlwdCIgc3R5bGU9ImZvbnQtZmFt -aWx5OmhlbHZldGljYSxhcmlhbCxzYW5zLXNlcmlmO2ZvbnQtc2l6ZToxMnB4 -O2xpbmUtaGVpZ2h0OjE4cHg7bWFyZ2luLXRvcDozMHB4OyI+CiAgICA8dGFi -bGUgc3R5bGU9ImJvcmRlci1jb2xsYXBzZTpjb2xsYXBzZSI+CiAgICAgICAg -PHRyIGNsYXNzPSJzIj4KICAgICAgICAgICAgPHRkIHN0eWxlPSJwYWRkaW5n -OjVweCAwIDEycHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQgIzc3NyI+ -CgkJCQk8aDIgc3R5bGU9Im1hcmdpbjowO2NvbG9yOiMzMzMiPgoJCQkJCVJl -Y2VpcHQKCQkJCTwvaDI+CgkJCTwvdGQ+CiAgICAgICAgICAgIDx0ZCBpZD0i -b3JkZXJfbnVtYmVyIiBzdHlsZT0icGFkZGluZzo1cHggMCAxMnB4IDA7dmVy -dGljYWwtYWxpZ246Ym90dG9tO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAj -Nzc3Ij4KCQkJCTxoMyBzdHlsZT0ibWFyZ2luOjA7cGFkZGluZzowO2NvbG9y -OiMzMzM7ZGlzcGxheTppbmxpbmUiPgoJCQkJCU9yZGVyIE51bWJlcjogOTEx -MgoJCQkJPC9oMz4KCQkJPC90ZD4KICAgICAgICA8L3RyPgogICAgICAgIDx0 -ciBjbGFzcz0iciI+CiAgICAgICAgICAgIDx0ZCBjb2xzcGFuPSIyIiBzdHls -ZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQgI2Rk -ZCI+CgkJCQk8c3Ryb25nPlRpbWU6PC9zdHJvbmc+IFN1biBKdW4gMjQgMDY6 -NDg6MTIgVVRDIDIwMDcKCQkJPC90ZD4KICAgICAgICA8L3RyPgoKICAgICAg -ICA8dHIgY2xhc3M9InIiPgogICAgICAgICAgICA8dGQgc3R5bGU9InBhZGRp -bmc6NXB4IDA7Ym9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNkZGQiPgoJCQkJ -PHN0cm9uZz5MaWNlbnNlZCB0bzo8L3N0cm9uZz4gQW5keSBLaW0KCQkJPC90 -ZD4KICAgICAgICAgICAgPHRkIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRl -ci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCSAgICAgICAgICAgICAg -ICA8c3Ryb25nPkNvbXBhbnk6PC9zdHJvbmc+IGFiICAgICAgICAgICAgICAg -IDwvdGQ+CgkJCTwvdHI+CiAgICAgICAgPHRyIGNsYXNzPSJyIj4KICAgICAg -ICAgICAgPHRkIGNvbHNwYW49IjIiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2Jv -cmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCTxzdHJvbmc+RW1h -aWw6PC9zdHJvbmc+IGFuZHlraW03OEBnbWFpbC5jb20KCQkJPC90ZD4KICAg -ICAgICA8L3RyPgogICAgICAgIDx0ciBjbGFzcz0iZCI+CiAgICAgICAgICAg -IDx0ZCBzdHlsZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAzcHgg -ZG91YmxlICNkZGQiPgogICAgICAgICAgICAgICAgPHN0cm9uZz5CaWxsaW5n -IEFkZHJlc3M6PC9zdHJvbmc+PGJyLz4KCQkJCUJ5dW5nIHNvbWVvbmU8YnIv -PgoJCQkJICAgICAgICAgICAgICAgIDQzMyBTLiBTZXJyYW5vIEF2ZS48YnIv -PgogICAgICAgICAgICAgICAgTG9zIEFuZ2VsZXMsIENBIDkwMDA0PGJyLz4K -ICAgICAgICAgICAgICAgIFVuaXRlZCBTdGF0ZXMKCQkJCSAgICAgICAgICAg -IDwvdGQ+CgkJCTx0ZCBpZD0icGF5bWVudCIgc3R5bGU9IndpZHRoOjM1JTtw -YWRkaW5nOjVweCAwO2JvcmRlci1ib3R0b206IDNweCBkb3VibGUgI2RkZCI+ -CgkJCQk8c3Ryb25nPlBheW1lbnQ6PC9zdHJvbmc+PGJyLz4KICAgICAgICAg -ICAgICAgIFZpc2EKCQkJCQoJCQkJPGJyLz5YWFhYWFhYWFhYWFg5NDk0CgkJ -CQkKCQkJPC90ZD4KICAgICAgICA8L3RyPgoJCTwvdGFibGU+CgkJPHRhYmxl -IHN0eWxlPSJib3JkZXItY29sbGFwc2U6Y29sbGFwc2UiPgoJCQk8dHIgY2xh -c3M9InIiPgoJCQkJPHRoIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRlci1i -b3R0b206IDFweCBzb2xpZCAjZGRkIj5JdGVtPC90aD4KCQkJCTx0aCBzdHls -ZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQgI2Rk -ZCI+TGljZW5zZSBLZXk8L3RoPgoJCQkJPHRoIHN0eWxlPSJwYWRkaW5nOjVw -eCAwO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkO3RleHQtYWxpZ246 -bGVmdDsiIGNsYXNzPSJ1bml0Ij5Vbml0IFByaWNlPC90aD4KCQkJCTx0aCBz -dHlsZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29saWQg -I2RkZCI+UXR5PC90aD4KCQkJCTx0aCBzdHlsZT0icGFkZGluZzo1cHggMDti -b3JkZXItYm90dG9tOiAxcHggc29saWQgI2RkZCI+UHJpY2U8L3RoPgoJCQk8 -L3RyPgoJCQkJCQk8dHIgY2xhc3M9InIiPgoJCQkJPHRkIGNsYXNzPSJwcm9k -IiBzdHlsZT0icGFkZGluZzo1cHggMDtib3JkZXItYm90dG9tOiAxcHggc29s -aWQgI2RkZCI+CgkJCQkJVm9pY2UgQ2FuZHkgdjEKCQkJCTwvdGQ+CgkJCQk8 -dGQgY2xhc3M9ImxpY2Vuc2Vfa2V5IiBzdHlsZT0icGFkZGluZzo1cHggMDt0 -ZXh0LWFsaWduOmNlbnRlcjtib3JkZXItYm90dG9tOiAxcHggc29saWQgI2Rk -ZCI+CgkJCQkJVkMtSkRBMjRORUtVQU8zWVhSRQoJCQkJPC90ZD4KCQkJCTx0 -ZCBjbGFzcz0idW5pdCIgc3R5bGU9InBhZGRpbmc6NXB4IDA7dGV4dC1hbGln -bjpjZW50ZXI7d2lkdGg6MTIlO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAj -ZGRkIj4KCQkJCQkkMTIuOTUKCQkJCTwvdGQ+CgkJCQk8dGQgY2xhc3M9InF0 -eSIgc3R5bGU9InBhZGRpbmc6NXB4IDA7dGV4dC1hbGlnbjpjZW50ZXI7d2lk -dGg6MTIlO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCQkx -CgkJCQk8L3RkPgoJCQkJPHRkIGNsYXNzPSJwcmljZSIgc3R5bGU9InBhZGRp -bmc6NXB4IDA7dGV4dC1hbGlnbjpyaWdodDt3aWR0aDoxMSU7Ym9yZGVyLWJv -dHRvbTogMXB4IHNvbGlkICNkZGQiPgoJCQkJCSQxMi45NQoJCQkJPC90ZD4K -CQkJPC90cj4KCQkJCQkJCQkJPHRyIGlkPSJ0b3RhbCIgY2xhc3M9InIiPgoJ -CQkJPHRkIGNvbHNwYW49IjMiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRl -ci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj48L3RkPgoJCQkJPHRkIGNsYXNz -PSJxdHkiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRlci1ib3R0b206IDFw -eCBzb2xpZCAjZGRkO3RleHQtYWxpZ246Y2VudGVyIj4KCQkJCQk8c3Ryb25n -PlRvdGFsOjwvc3Ryb25nPgoJCQkJPC90ZD4KCQkJCTx0ZCBjbGFzcz0icHJp -Y2UiIHN0eWxlPSJwYWRkaW5nOjVweCAwO2JvcmRlci1ib3R0b206IDFweCBz -b2xpZCAjZGRkO3RleHQtYWxpZ246cmlnaHQiPgoJCQkJCTxzdHJvbmc+JDEy -Ljk1PC9zdHJvbmc+CgkJCQk8L3RkPgoJCQk8L3RyPgoJCQkJCQk8dHIgY2xh -c3M9InIiPgoJCQkJPHRkIGNvbHNwYW49IjUiIHN0eWxlPSJwYWRkaW5nOjVw -eCAwO2JvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZGRkIj4KCQkJCQk8c3Ry -b25nPkNvbW1lbnQ6PC9zdHJvbmc+IDIKCQkJCTwvdGQ+CgkJCTwvdHI+CgkJ -CQkJPC90YWJsZT4KCTwvZGl2PgoKCgoJICAgIDwvZGl2Pgo8L2Rpdj4KPC9i -b2R5Pgo8L2h0bWw+Cgo= - ---mimepart_467e13ace81dd_4a8719f4c4a140-- - - - -Errno::ECONNREFUSED (Connection refused - connect(2)): - /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `initialize' - /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `new' - /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open' - /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout' - /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout' - /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open' - /usr/local/lib/ruby/1.8/net/smtp.rb:393:in `do_start' - /usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start' - /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start' - /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:565:in `perform_delivery_smtp' - /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:451:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:451:in `deliver!' - /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:333:in `method_missing' - .//app/controllers/store/order_controller.rb:229:in `finish_order' - .//app/controllers/store/order_controller.rb:138:in `purchase' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001348)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing OrderController#thankyou (for 127.0.0.1 at 2007-06-23 23:48:24) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"thankyou", "controller"=>"store/order"} -Rendering within layouts/store -Rendering store/order/thankyou - LineItem Load (0.000536) SELECT * FROM line_items WHERE (line_items.order_id = 9112)  - SQL (0.001013)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'line_items'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.001178)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Product Load (0.000303) SELECT * FROM products WHERE (products."id" = 2)  -Rendered store/order/_receipt (0.00554) -Completed in 0.03340 (29 reqs/sec) | Rendering: 0.02761 (82%) | DB: 0.04408 (131%) | 200 OK [http://localhost/store/order/thankyou] - SQL (0.001330)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:48:56) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001230)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000269) SELECT count(*) AS count_all FROM products  - Order Load (0.042041)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.041200)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039952)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081323)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072906)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066748)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36276 (2 reqs/sec) | Rendering: 0.00466 (1%) | DB: 0.34700 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001544)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:50:41) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001311)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000306) SELECT count(*) AS count_all FROM products  - Order Load (0.041085)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040111)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040134)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081564)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072849)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067025)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36193 (2 reqs/sec) | Rendering: 0.00426 (1%) | DB: 0.34593 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001511)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:50:53) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001276)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000296) SELECT count(*) AS count_all FROM products  - Order Load (0.040560)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040205)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040665)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.082594)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072759)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066975)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36363 (2 reqs/sec) | Rendering: 0.00534 (1%) | DB: 0.34684 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001503)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:51:02) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001275)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000292) SELECT count(*) AS count_all FROM products  - Order Load (0.040162)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040152)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040037)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081521)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.073010)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067583)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36118 (2 reqs/sec) | Rendering: 0.00464 (1%) | DB: 0.34554 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001501)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing ApplicationController#index (for 127.0.0.1 at 2007-06-23 23:51:10) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - - -SyntaxError (./script/../config/../app/controllers/admin_controller.rb:132: syntax error, unexpected tIDENTIFIER, expecting kTHEN or ':' or '\n' or ';' - if @monthy is not nil - ^ -./script/../config/../app/controllers/admin_controller.rb:350: syntax error, unexpected kEND, expecting $end): - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:203:in `load_file' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:202:in `load_file' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:94:in `require_or_load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:248:in `load_missing_constant' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in `constantize' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/string/inflections.rb:148:in `constantize' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1284:in `recognize' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001327)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:51:16) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001810)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000317) SELECT count(*) AS count_all FROM products  - Order Load (0.040992)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.041895)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.041178)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.084034)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.089120)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067801)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.38436 (2 reqs/sec) | Rendering: 0.00465 (1%) | DB: 0.36997 (96%) | 200 OK [http://localhost/admin/] - SQL (0.001507)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:53:51) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001278)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000289) SELECT count(*) AS count_all FROM products  - Order Load (0.039939)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040230)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040340)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.082266)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.076236)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067043)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36623 (2 reqs/sec) | Rendering: 0.00472 (1%) | DB: 0.34913 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001528)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:54:52) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001306)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000298) SELECT count(*) AS count_all FROM products  - Order Load (0.039925)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040099)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040349)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081484)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072956)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066921)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36243 (2 reqs/sec) | Rendering: 0.00549 (1%) | DB: 0.34487 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001515)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:56:41) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001293)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000292) SELECT count(*) AS count_all FROM products  - Order Load (0.039822)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040023)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039978)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081289)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072699)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067042)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.35965 (2 reqs/sec) | Rendering: 0.00466 (1%) | DB: 0.34395 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001494)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:08) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001276)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000297) SELECT count(*) AS count_all FROM products  - Order Load (0.039844)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040036)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040009)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081294)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072996)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067404)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36239 (2 reqs/sec) | Rendering: 0.00532 (1%) | DB: 0.34465 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001492)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:28) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001304)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000304) SELECT count(*) AS count_all FROM products  - Order Load (0.039947)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040015)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039967)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081507)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072755)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067540)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -You might have expected an instance of Array. -The error occurred while evaluating nil.empty?): - .//app/controllers/admin_controller.rb:135:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001506)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:48) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001392)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000317) SELECT count(*) AS count_all FROM products  - Order Load (0.040025)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040145)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039999)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081297)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.073321)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067785)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NameError (undefined local variable or method `monthy' for #): - .//app/controllers/admin_controller.rb:135:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001497)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:57:54) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001270)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000294) SELECT count(*) AS count_all FROM products  - Order Load (0.039831)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040023)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039986)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081609)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072868)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067541)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -The error occurred while evaluating nil.count): - .//app/controllers/admin_controller.rb:135:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001495)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-23 23:58:25) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001282)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000296) SELECT count(*) AS count_all FROM products  - Order Load (0.039841)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.042199)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.041104)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.084305)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.074511)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.068270)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -The error occurred while evaluating nil.count): - .//app/controllers/admin_controller.rb:136:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001508)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:00:10) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001275)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000299) SELECT count(*) AS count_all FROM products  - Order Load (0.039888)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040023)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040045)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081315)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072977)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066883)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -You might have expected an instance of Array. -The error occurred while evaluating nil.length): - .//app/controllers/admin_controller.rb:136:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001496)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:00) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001283)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000296) SELECT count(*) AS count_all FROM products  - Order Load (0.039857)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.039941)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039884)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081378)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072955)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066889)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -You might have expected an instance of Array. -The error occurred while evaluating nil.length): - .//app/controllers/admin_controller.rb:136:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.000469) SET client_encoding TO 'utf8' - SQL (0.007347)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:09) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001351)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000979) SELECT count(*) AS count_all FROM products  - Order Load (0.045343)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.039895)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039778)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081363)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.074440)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066900)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -You might have expected an instance of Array. -The error occurred while evaluating nil.length): - .//app/controllers/admin_controller.rb:136:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001497)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:32) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001285)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000364) SELECT count(*) AS count_all FROM products  - Order Load (0.040368)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.041002)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040520)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081385)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072873)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066829)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -You might have expected an instance of Array. -The error occurred while evaluating nil.length): - .//app/controllers/admin_controller.rb:136:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001481)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:40) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001270)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000288) SELECT count(*) AS count_all FROM products  - Order Load (0.039654)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.039877)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039835)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081362)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072577)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066781)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 - - -NoMethodError (You have a nil object when you didn't expect it! -You might have expected an instance of Array. -The error occurred while evaluating nil.length): - .//app/controllers/admin_controller.rb:136:in `index' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) - SQL (0.001487)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:50) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001304)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000292) SELECT count(*) AS count_all FROM products  - Order Load (0.039823)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040824)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039852)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081359)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072843)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066899)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.38102 (2 reqs/sec) | Rendering: 0.02503 (6%) | DB: 1.39180 (365%) | 200 OK [http://localhost/admin/] - SQL (0.001491)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:02:57) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001258)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000290) SELECT count(*) AS count_all FROM products  - Order Load (0.039647)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.039979)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039808)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081178)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.073179)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.068753)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36143 (2 reqs/sec) | Rendering: 0.00475 (1%) | DB: 0.34558 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001488)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:08) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001277)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000293) SELECT count(*) AS count_all FROM products  - Order Load (0.039891)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040030)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040475)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.082289)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.073555)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067600)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36247 (2 reqs/sec) | Rendering: 0.00421 (1%) | DB: 0.34690 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001492)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:32) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001277)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000302) SELECT count(*) AS count_all FROM products  - Order Load (0.039710)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.051424)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039835)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081373)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072718)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067129)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.37114 (2 reqs/sec) | Rendering: 0.00468 (1%) | DB: 0.35526 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001514)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:38) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001327)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000347) SELECT count(*) AS count_all FROM products  - Order Load (0.040234)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.039849)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.040453)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081100)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072628)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066745)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.35960 (2 reqs/sec) | Rendering: 0.00414 (1%) | DB: 0.34420 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001490)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:03:56) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001272)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000292) SELECT count(*) AS count_all FROM products  - Order Load (0.040105)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040199)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039980)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081427)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072998)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.067013)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36177 (2 reqs/sec) | Rendering: 0.00467 (1%) | DB: 0.34478 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001502)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:05:09) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001273)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000302) SELECT count(*) AS count_all FROM products  - Order Load (0.041236)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.039810)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039823)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081210)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072681)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066783)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(COALESCE(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * COALESCE(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36077 (2 reqs/sec) | Rendering: 0.00420 (1%) | DB: 0.34462 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001486)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:12:15) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001255)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000297) SELECT count(*) AS count_all FROM products  - Order Load (0.039754)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.039947)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039990)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081395)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - Order Load (0.072866)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.068661)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.36304 (2 reqs/sec) | Rendering: 0.00447 (1%) | DB: 0.34565 (95%) | 200 OK [http://localhost/admin/] - SQL (0.001491)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#login (for 127.0.0.1 at 2007-06-24 00:12:19) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"login", "controller"=>"admin"} - - -ActionController::UnknownAction (No action responded to login): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - SQL (0.001326)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - - -Processing AdminController#logon (for 127.0.0.1 at 2007-06-24 00:12:22) [GET] - Session ID: 7c73f9defbf3304726a2977f2eae82c8 - Parameters: {"action"=>"logon", "controller"=>"admin"} - - -ActionController::UnknownAction (No action responded to logon): - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' - /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' - /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/mongrel.rb:60 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' - /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' - /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' - /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' - script/server:3 - - -Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:12:33) [GET] - Session ID: 1c87af64050ec770da98a9dae64141e5 - Parameters: {"action"=>"index", "controller"=>"admin"} -Rendering layoutfalseactionsignin_form within layouts/error -Rendering admin/signin_form -Completed in 0.02507 (39 reqs/sec) | Rendering: 0.02492 (99%) | DB: 0.00282 (11%) | 200 OK [http://localhost/admin/] - - -Processing AdminController#signin (for 127.0.0.1 at 2007-06-24 00:12:41) [POST] - Session ID: 1c87af64050ec770da98a9dae64141e5 - Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"1"} -Rendering layoutfalseactionsignin_form within layouts/error -Rendering admin/signin_form -Completed in 0.00290 (344 reqs/sec) | Rendering: 0.00187 (64%) | DB: 0.00000 (0%) | 200 OK [http://localhost/admin/signin] - - -Processing AdminController#signin (for 127.0.0.1 at 2007-06-24 00:13:05) [POST] - Session ID: 1c87af64050ec770da98a9dae64141e5 - Parameters: {"commit"=>"Abracadabra", "username"=>"admin", "action"=>"signin", "controller"=>"admin", "password"=>"password"} -Redirected to http://localhost:3000/admin -Completed in 0.00165 (604 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://localhost/admin/signin] - - -Processing AdminController#index (for 127.0.0.1 at 2007-06-24 00:13:05) [GET] - Session ID: 1c87af64050ec770da98a9dae64141e5 - Parameters: {"action"=>"index", "controller"=>"admin"} - SQL (0.001309)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'products'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - SQL (0.000299) SELECT count(*) AS count_all FROM products  - Order Load (0.039989)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 1 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 1 <= order_time - - group by product - Order Load (0.040009)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 7 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 7 <= order_time - - group by product - Order Load (0.039910)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 30 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 30 <= order_time - - group by product - Order Load (0.081410)  - select (select count(*) - from orders - where status = 'C' and - payment_type != 'free' and - current_date - 365 <= order_time) as orders, - sum(line_items.unit_price * quantity) - - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - sum(quantity) as q, - products.name as product - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join products on products.id = line_items.product_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and lower(payment_type) != 'free' and current_date - 365 <= order_time - - group by product - SQL (0.001392)  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull - FROM pg_attribute a LEFT JOIN pg_attrdef d - ON a.attrelid = d.adrelid AND a.attnum = d.adnum - WHERE a.attrelid = 'orders'::regclass - AND a.attnum > 0 AND NOT a.attisdropped - ORDER BY a.attnum - - Order Load (0.072646)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - date_part('day', orders.order_time) as day, - sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month, day - - order by last_time desc limit 8 - Order Load (0.066987)  - select date_part('year', orders.order_time) as year, - date_part('month', orders.order_time) as month, - sum(line_items.unit_price * quantity) - sum(coalesce(coupons.amount, 0)) - - sum(line_items.unit_price * quantity * coalesce(percentage, 0) / 100) as earned, - max(orders.order_time) as last_time - - from orders - inner join line_items on orders.id = line_items.order_id - left outer join coupons on coupons.id = orders.coupon_id - - where status = 'C' and payment_type != 'Free' - - group by year, month - - order by last_time desc limit 8 -Rendering within layouts/admin -Rendering admin/index -Completed in 0.37017 (2 reqs/sec) | Rendering: 0.00416 (1%) | DB: 0.34395 (92%) | 200 OK [http://localhost/admin] From a62e2195cea8c5076319d77f23e7e563f0b0a479 Mon Sep 17 00:00:00 2001 From: andykim78 Date: Sun, 24 Jun 2007 20:57:54 +0000 Subject: [PATCH 005/250] - Applied admin_controller functional test patch from Jamie Hardt. Functional tests are now passing at least :) git-svn-id: https://potionstore.googlecode.com/svn/trunk@7 25f2d1f3-9e33-0410-bf15-d1b47774bbb0 --- TODO | 8 +++ db/schema.rb | 79 ------------------------ test/fixtures/coupons.yml | 2 +- test/functional/admin_controller_test.rb | 79 +++++++----------------- 4 files changed, 30 insertions(+), 138 deletions(-) delete mode 100644 db/schema.rb diff --git a/TODO b/TODO index b776e3a..15c28c0 100644 --- a/TODO +++ b/TODO @@ -3,10 +3,18 @@ Any volunteers? - Write some unit tests - Show sales graphs instead of tables in the dashboard +- PayPal Website Payments Standard integration (very low priority for me -AK) +- MySQL compatibility (again, very low priority for me -AK) +- Refactor code to be RESTful and well structured. orders_controller could use some help in that department +- A desktop client someday after the REST refactoring is done? Changes: +6/24/2007 +- Applied admin_controller functional test patch from Jamie Hardt. + Functional tests are now passing at least :) + 6/23/2007 - Searching by order number possible now - Cleaned up sql code for the admin dashboard diff --git a/db/schema.rb b/db/schema.rb deleted file mode 100644 index cca14de..0000000 --- a/db/schema.rb +++ /dev/null @@ -1,79 +0,0 @@ -# This file is autogenerated. Instead of editing this file, please use the -# migrations feature of ActiveRecord to incrementally modify your database, and -# then regenerate this schema definition. - -ActiveRecord::Schema.define(:version => 1) do - - create_table "coupons", :force => true do |t| - t.column "code", :string, :limit => 16, :default => "", :null => false - t.column "description", :string, :limit => 64, :default => "", :null => false - t.column "coupon", :string, :limit => 64, :default => "", :null => false - t.column "product_code", :string, :limit => 16, :default => "", :null => false - t.column "amount", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false - t.column "percentage", :integer - t.column "used_count", :integer - t.column "use_limit", :integer, :default => 1, :null => false - t.column "creation_time", :datetime - t.column "numdays", :integer, :default => 0, :null => false - end - - add_index "coupons", ["coupon"], :name => "coupon" - - create_table "line_items", :force => true do |t| - t.column "order_id", :integer, :default => 0, :null => false - t.column "product_id", :integer, :default => 0, :null => false - t.column "quantity", :integer, :default => 0, :null => false - t.column "unit_price", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false - t.column "license_key", :string, :limit => 64 - end - - add_index "line_items", ["order_id"], :name => "order_id" - add_index "line_items", ["product_id"], :name => "product_id" - - create_table "list_subscribers", :force => true do |t| - t.column "email", :text, :default => "", :null => false - end - - create_table "orders", :force => true do |t| - t.column "coupon_id", :integer - t.column "status", :string, :limit => 1, :default => "P", :null => false - t.column "email", :string, :limit => 128, :default => "", :null => false - t.column "order_time", :datetime - t.column "first_name", :string, :limit => 64, :default => "" - t.column "licensee_name", :string, :limit => 128 - t.column "last_name", :string, :limit => 64, :default => "" - t.column "company", :string, :limit => 64 - t.column "address1", :string, :limit => 64, :default => "" - t.column "address2", :string, :limit => 64 - t.column "city", :string, :limit => 64, :default => "" - t.column "state", :string, :limit => 64, :default => "" - t.column "zipcode", :string, :limit => 64, :default => "" - t.column "country", :string, :limit => 2, :default => "", :null => false - t.column "payment_type", :string, :limit => 16 - t.column "ccnum", :string, :limit => 32 - t.column "comment", :text - t.column "failure_code", :integer - t.column "failure_reason", :string - t.column "transaction_number", :string, :limit => 64 - end - - add_index "orders", ["coupon_id"], :name => "coupon_id" - add_index "orders", ["email"], :name => "email" - - create_table "products", :force => true do |t| - t.column "code", :string, :limit => 16, :default => "", :null => false - t.column "name", :string, :limit => 64, :default => "", :null => false - t.column "price", :decimal, :precision => 10, :scale => 2, :default => 0.0, :null => false - t.column "image_path", :text - t.column "url", :text - t.column "download_url", :text - t.column "license_url_scheme", :text - t.column "active", :integer, :default => 1, :null => false - end - - add_foreign_key_constraint "line_items", "order_id", "orders", "id", :name => "line_items_ibfk_order_id", :on_update => nil, :on_delete => :cascade - add_foreign_key_constraint "line_items", "product_id", "products", "id", :name => "line_items_ibfk_product_id", :on_update => nil, :on_delete => nil - - add_foreign_key_constraint "orders", "coupon_id", "coupons", "id", :name => "orders_ibfk_coupon_id", :on_update => nil, :on_delete => :restrict - -end diff --git a/test/fixtures/coupons.yml b/test/fixtures/coupons.yml index 8794d28..0acc8b3 100644 --- a/test/fixtures/coupons.yml +++ b/test/fixtures/coupons.yml @@ -1,5 +1,5 @@ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html first: - id: 1 + id: 1 another: id: 2 diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index b915bad..eed71f7 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -13,76 +13,39 @@ def setup @response = ActionController::TestResponse.new end - def test_index + def test_index_with_no_password get :index assert_response :success - assert_template 'list' + assert_template 'signin_form' + assert_equal(session[:intended_action] , 'index') end - def test_list - get :list - + def test_signin_with_faulty_password + post :signin, {:username => 'joeblow', :password => 'totallyfakingit'} assert_response :success - assert_template 'list' - - assert_not_nil assigns(:products) + assert_template 'signin_form' end - def test_show - get :show, :id => 1 - - assert_response :success - assert_template 'show' - - assert_not_nil assigns(:product) - assert assigns(:product).valid? + def test_signin_with_good_password + post :signin, { + :username => $STORE_PREFS['admin_username'], + :password => $STORE_PREFS['admin_password']} + + assert_redirected_to :action => nil end - def test_new - get :new - + def test_orders + # anybody else know how I can load data + # into the session? jph/2006-06-24 + process 'orders', {}, { :logged_in => true } assert_response :success - assert_template 'new' - - assert_not_nil assigns(:product) - end - - def test_create - num_products = Product.count - - post :create, :product => {} - - assert_response :redirect - assert_redirected_to :action => 'list' - - assert_equal num_products + 1, Product.count + assert_template 'orders' + assert_not_nil assigns(:orders) end - def test_edit - get :edit, :id => 1 - + def generate_coupons_blank + process 'generate_coupons', {}, { :logged_in => true } assert_response :success - assert_template 'edit' - - assert_not_nil assigns(:product) - assert assigns(:product).valid? - end - - def test_update - post :update, :id => 1 - assert_response :redirect - assert_redirected_to :action => 'show', :id => 1 - end - - def test_destroy - assert_not_nil Product.find(1) - - post :destroy, :id => 1 - assert_response :redirect - assert_redirected_to :action => 'list' - - assert_raise(ActiveRecord::RecordNotFound) { - Product.find(1) - } + assert_template 'generate_coupons' end end From e53676e9d9ac1934e7df324861e437567ffb3219 Mon Sep 17 00:00:00 2001 From: andykim78 Date: Tue, 26 Jun 2007 09:32:45 +0000 Subject: [PATCH 006/250] - admin_controller separted into admin, orders, and products controller - orders and products controllers under admin are RESTful - functional test updated to work with the new structure - admin_controller's signin_form and signin methods under admin unified under login method - orders and products stylesheet moved into admin.css - Cleaned up a few things here and there git-svn-id: https://potionstore.googlecode.com/svn/trunk@9 25f2d1f3-9e33-0410-bf15-d1b47774bbb0 --- README | 2 + TODO | 9 +- app/controllers/admin/orders_controller.rb | 161 ++++++++++ app/controllers/admin/products_controller.rb | 84 ++++++ app/controllers/admin_controller.rb | 277 +++++------------- app/controllers/application.rb | 7 + app/controllers/store/order_controller.rb | 2 +- app/helpers/admin/orders_helper.rb | 2 + app/helpers/admin/products_helper.rb | 2 + app/models/order.rb | 6 +- app/views/admin/_form.rhtml | 13 - app/views/admin/add_order.rhtml | 3 - app/views/admin/edit_order.rhtml | 3 - app/views/admin/generate_coupons.rhtml | 2 +- .../admin/{signin_form.rhtml => login.rhtml} | 2 +- .../{_order_form.rhtml => orders/_form.rhtml} | 7 +- .../{ => orders}/_product_quantities.rhtml | 2 +- app/views/admin/orders/edit.rhtml | 10 + .../{orders.rhtml => orders/index.rhtml} | 33 +-- app/views/admin/orders/new.rhtml | 12 + .../admin/{order.rhtml => orders/show.rhtml} | 8 +- app/views/admin/products.rhtml | 27 -- app/views/admin/products/_form.rhtml | 28 ++ app/views/admin/products/edit.rhtml | 9 + app/views/admin/products/index.rhtml | 26 ++ app/views/admin/products/new.rhtml | 8 + app/views/admin/{ => products}/show.rhtml | 2 +- app/views/layouts/admin.rhtml | 11 +- config/routes.rb | 6 +- public/stylesheets/admin.css | 17 +- test/fixtures/coupons.yml | 24 +- test/fixtures/line_items.yml | 7 +- test/fixtures/list_subscribers.yml | 2 + test/fixtures/orders.yml | 22 +- test/fixtures/products.yml | 17 +- test/functional/admin_controller_test.rb | 26 +- .../admin_orders_controller_test.rb | 92 ++++++ .../admin_products_controller_test.rb | 90 ++++++ test/unit/line_item_test.rb | 2 + test/unit/order_mailer_test.rb | 19 +- test/unit/order_test.rb | 24 +- test/unit/support_mailer_test.rb | 6 +- 42 files changed, 779 insertions(+), 333 deletions(-) create mode 100644 app/controllers/admin/orders_controller.rb create mode 100644 app/controllers/admin/products_controller.rb create mode 100644 app/helpers/admin/orders_helper.rb create mode 100644 app/helpers/admin/products_helper.rb delete mode 100644 app/views/admin/_form.rhtml delete mode 100644 app/views/admin/add_order.rhtml delete mode 100644 app/views/admin/edit_order.rhtml rename app/views/admin/{signin_form.rhtml => login.rhtml} (91%) rename app/views/admin/{_order_form.rhtml => orders/_form.rhtml} (92%) rename app/views/admin/{ => orders}/_product_quantities.rhtml (93%) create mode 100644 app/views/admin/orders/edit.rhtml rename app/views/admin/{orders.rhtml => orders/index.rhtml} (55%) create mode 100644 app/views/admin/orders/new.rhtml rename app/views/admin/{order.rhtml => orders/show.rhtml} (56%) delete mode 100644 app/views/admin/products.rhtml create mode 100644 app/views/admin/products/_form.rhtml create mode 100644 app/views/admin/products/edit.rhtml create mode 100644 app/views/admin/products/index.rhtml create mode 100644 app/views/admin/products/new.rhtml rename app/views/admin/{ => products}/show.rhtml (73%) create mode 100644 test/functional/admin_orders_controller_test.rb create mode 100644 test/functional/admin_products_controller_test.rb diff --git a/README b/README index 11b6f95..fb1e0c1 100644 --- a/README +++ b/README @@ -15,6 +15,7 @@ Features: - Rails 1.2 or higher - Postgresql - money rubygem +- ruby-debug rubygem == Installation @@ -35,6 +36,7 @@ Features: - Install gem dependency: gem install money + gem install ruby-debug - Install PayPal API access certificates into config/certs diff --git a/TODO b/TODO index 15c28c0..8ce9a6d 100644 --- a/TODO +++ b/TODO @@ -8,9 +8,16 @@ Any volunteers? - Refactor code to be RESTful and well structured. orders_controller could use some help in that department - A desktop client someday after the REST refactoring is done? - Changes: +6/26/2007 +- admin_controller separted into admin, orders, and products controller +- orders and products controllers under admin are RESTful +- functional test updated to work with the new structure +- admin_controller's signin_form and signin methods under admin unified under login method +- orders and products stylesheet moved into admin.css +- Cleaned up a few things here and there + 6/24/2007 - Applied admin_controller functional test patch from Jamie Hardt. Functional tests are now passing at least :) diff --git a/app/controllers/admin/orders_controller.rb b/app/controllers/admin/orders_controller.rb new file mode 100644 index 0000000..25a27bf --- /dev/null +++ b/app/controllers/admin/orders_controller.rb @@ -0,0 +1,161 @@ +class Admin::OrdersController < ApplicationController + + layout "admin" + + before_filter :check_authentication + + # GET /orders + # GET /orders.xml + def index + @order_pages, @orders = paginate :orders, :per_page => 100, :order => 'order_time DESC', :conditions => "status != 'P'" + + respond_to do |format| + format.html # index.rhtml + format.xml { render :xml => @orders.to_xml } + end + end + + # GET /orders/1 + # GET /orders/1.xml + def show + @order = Order.find(params[:id]) + + respond_to do |format| + format.html # show.rhtml + format.xml { render :xml => @order.to_xml } + end + end + + # GET /orders/find + def find + q = params[:query] + q.strip! + redirect_to :back and return if not q + conditions = "status != 'P' AND (email ~* '#{q}' OR + first_name ~* '#{q}.*' OR + last_name ~* '#{q}.*' OR + licensee_name ~* '%#{q}.*' OR + id ~* '#{q}')" + @order_pages, @orders = paginate :orders, :per_page => 100, :order => 'order_time DESC', :conditions => conditions + render :action => "index" + end + + # GET /orders/new + def new + @order = Order.new + @order.country = 'US' + @order.payment_type = 'Free' + end + + # GET /orders/1;edit + def edit + @order = Order.find(params[:id]) + end + + # POST /orders + # POST /orders.xml + def create + # must delete the licensee name from parameters because we need to set it after the line items are added + @licensee_name = params[:order][:licensee_name] + params[:order].delete("licensee_name") + @order = Order.new(params[:order]) + @order.status = 'C' + + if not save() + redirect_to :back and return + end + + respond_to do |format| + if @order.save + flash[:notice] = 'Order was successfully created.' + format.html { redirect_to order_url(@order) } + format.xml { head :created, :location => order_url(@order) } + else + format.html { render :action => "new" } + format.xml { render :xml => @order.errors.to_xml } + end + end + end + + # PUT /orders/1 + # PUT /orders/1.xml + def update + # must delete the licensee name from parameters because we need to set it after the line items are added + @licensee_name = params[:order][:licensee_name] + params[:order].delete("licensee_name") + + @order = Order.find(params[:order][:id]) + @order.attributes = params[:order] + + if not save() + redirect_to :back and return + end + + respond_to do |format| + if @order.update_attributes(params[:order]) + flash[:notice] = 'Order was successfully updated.' + format.html { redirect_to order_url(@order) } + format.xml { head :ok } + else + format.html { render :action => "edit" } + format.xml { render :xml => @order.errors.to_xml } + end + end + end + + # DELETE /orders/1 + # DELETE /orders/1.xml + def destroy + @order = Order.find(params[:id]) + @order.destroy + + respond_to do |format| + format.html { redirect_to orders_url } + format.xml { head :ok } + end + end + + def cancel + @order = Order.find(params[:id]) + @order.status = 'X' + @order.update() + redirect_to :action => 'show', :id => @order.id + end + + def uncancel + @order = Order.find(params[:id]) + @order.status = 'C' + @order.update() + redirect_to :action => 'show', :id => @order.id + end + + def send_emails + @order = Order.find(params[:id]) + OrderMailer.deliver_thankyou(@order) # if is_live() + redirect_to :action => 'show', :id => @order.id + end + + protected + def save + begin + @order.transaction do + if not @order.add_or_update_items(params[:items]) + flash[:notice] = 'Order contains no items' + logger.warn('Order contains no items') + raise "Problem" + end + @order.update_item_prices(params[:item_prices]) + @order.skip_cc_validation = true + @order.licensee_name = @licensee_name + if not @order.save() + flash[:notice] = 'Problem saving order' + logger.warn("Could not save order: #{@order.errors}") + raise "Problem" + end + return true + end + rescue + return false + end + end +end diff --git a/app/controllers/admin/products_controller.rb b/app/controllers/admin/products_controller.rb new file mode 100644 index 0000000..7e1b1d7 --- /dev/null +++ b/app/controllers/admin/products_controller.rb @@ -0,0 +1,84 @@ +class Admin::ProductsController < ApplicationController + layout "admin" + + before_filter :check_authentication + + # GET /products + # GET /products.xml + def index + @products = Product.find(:all) + + respond_to do |format| + format.html # index.rhtml + format.xml { render :xml => @products.to_xml } + end + end + + # GET /products/1 + # GET /products/1.xml + def show + @product = Product.find(params[:id]) + + respond_to do |format| + format.html # show.rhtml + format.xml { render :xml => @product.to_xml } + end + end + + # GET /products/new + def new + @product = Product.new + end + + # GET /products/1;edit + def edit + @product = Product.find(params[:id]) + end + + # POST /products + # POST /products.xml + def create + @product = Product.new(params[:product]) + + respond_to do |format| + if @product.save + flash[:notice] = 'Product was successfully created.' + format.html { redirect_to product_url(@product) } + format.xml { head :created, :location => product_url(@product) } + else + format.html { render :action => "new" } + format.xml { render :xml => @product.errors.to_xml } + end + end + end + + # PUT /products/1 + # PUT /products/1.xml + def update + @product = Product.find(params[:id]) + + respond_to do |format| + if @product.update_attributes(params[:product]) + flash[:notice] = 'Product was successfully updated.' + format.html { redirect_to product_url(@product) } + format.xml { head :ok } + else + format.html { render :action => "edit" } + format.xml { render :xml => @product.errors.to_xml } + end + end + end + + # DELETE /products/1 + # DELETE /products/1.xml + def destroy + @product = Product.find(params[:id]) + @product.destroy + + respond_to do |format| + format.html { redirect_to products_url } + format.xml { head :ok } + end + end + +end diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 26b4dc6..51359c6 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -4,30 +4,28 @@ class AdminController < ApplicationController :redirect_to => { :action => :list } # Authentication stuff - before_filter :check_authentication, :except => [:signin_form, :signin] - def check_authentication - unless session[:logged_in] - session[:intended_action] = action_name - render :action => "signin_form", :layout => 'error' - end - end - - def signin_form - render :action => 'signin_form', :layout => 'error' - end + before_filter :check_authentication, :except => [:login] - def signin + def login + unless params[:username] && params[:password] + render :action => "login", :layout => 'error' and return + end + if params[:username] == $STORE_PREFS['admin_username'] && params[:password] == $STORE_PREFS['admin_password'] session[:logged_in] = true - redirect_to :action => session[:intended_action] + if session[:intended_url] != nil + redirect_to session[:intended_url] + else + redirect_to :action => 'index' + end else flash[:notice] = "Go home kid. This ain't for you." - render :action => "signin_form", :layout => 'error' + render :action => "login", :layout => 'error' end end - def signout + def logout session[:logged_in] = nil redirect_to home_url end @@ -142,135 +140,6 @@ def last_n_days_sql(days) end - # Order actions - def find_orders - q = params[:query] - q.strip! - redirect_to :back and return if not q - conditions = "status != 'P' AND (email ~* '#{q}' OR - first_name ~* '#{q}.*' OR - last_name ~* '#{q}.*' OR - licensee_name ~* '%#{q}.*' OR - id = #{q})" - @order_pages, @orders = paginate :orders, :per_page => 100, :order => 'order_time DESC', :conditions => conditions - render :action => "orders" - end - - def orders - @order_pages, @orders = paginate :orders, :per_page => 100, :order => 'order_time DESC', :conditions => "status != 'P'" - end - - def order - @order = Order.find(params[:id]) - end - - def add_order - @order = Order.new() - @order.country = 'US' - @order.payment_type = 'Free' - end - - def edit_order - @order = Order.find(params[:id]) - end - - def modify_order - # must delete the licensee name from parameters because we need to set it after the line items are added - licensee_name = params[:order][:licensee_name] - params[:order].delete("licensee_name") - - if params[:order] && !params[:order][:id].blank? - @order = Order.find(params[:order][:id]) - @order.attributes = params[:order] - else - @order = Order.new(params[:order]) - @order.status = 'C' - end - begin - @order.transaction do - if not @order.add_or_update_items(params[:items]) - flash[:notice] = 'Order contains no items' - raise "Problem" - end - @order.update_item_prices(params[:item_prices]) - @order.skip_cc_validation = true - @order.licensee_name = licensee_name - if not @order.save() - flash[:notice] = 'Problem saving order' - raise "Problem" - end - end - rescue - redirect_to :back and return - end - redirect_to :action => "order", :id => @order.id - end - - def cancel_order - @order = Order.find(params[:id]) - @order.status = 'X' - @order.update() - redirect_to :action => 'order', :id => @order.id - end - - def uncancel_order - @order = Order.find(params[:id]) - @order.status = 'C' - @order.update() - redirect_to :action => 'order', :id => @order.id - end - - def send_order_emails - @order = Order.find(params[:id]) - OrderMailer.deliver_thankyou(@order) # if is_live() - redirect_to :action => 'order', :id => @order.id - end - - - # Product actions - # Modifying a product doesn't happen often enough, so I am doing it directly through the - # database for now. - def products # unused - @product_pages, @products = paginate :products, :per_page => 10 - end - - def product # unused - @product = Product.find(params[:id]) - end - - def new_product # unused - @product = Product.new - end - - def create_product # unused - @product = Product.new(params[:product]) - if @product.save - flash[:notice] = 'Product was successfully created.' - redirect_to :action => 'list' - else - render :action => 'new' - end - end - - def edit_product # unused - @product = Product.find(params[:id]) - end - - def update_product # unused - @product = Product.find(params[:id]) - if @product.update_attributes(params[:product]) - flash[:notice] = 'Product was successfully updated.' - redirect_to :action => 'show', :id => @product - else - render :action => 'edit' - end - end - - def destroy_product # unused - Product.find(params[:id]).destroy - redirect_to :action => 'list' - end - # Coupon actions def generate_coupons if params[:form] @@ -290,68 +159,68 @@ def generate_coupons end end - def add_coupons # unused - if params[:form] - form = params[:form] - lines = form[:coupons].split("\r\n") - lines.reject! {|x| x.strip == ''} - for line in lines - coupon = Coupon.new - coupon.code = form[:code] - coupon.coupon = line.strip() - coupon.product_code = 'x' - coupon.description = form[:description].strip() - coupon.amount = form[:amount].strip() - coupon.save() - end - end - end - - def mass_order # unused - if params[:form] - form = params[:form] - for key in form.keys() - form[key] = form[key].strip() - end - lines = form[:people].split("\r\n") - lines.reject! {|x| x.strip == ''} - for line in lines - fname, lname, email = line.split(",").collect{|x| x.strip} - order = Order.new - - # add item - order.order_time = Time.now() - - order.add_form_items(params[:items]) - order.update_item_prices(params[:item_prices]) - - order.first_name = fname - order.last_name = lname - order.email = email - - order.address1 = 'n/a' - order.address2 = '' - order.city = 'n/a' - order.state = 'n/a' - order.zipcode = 'n/a' - order.country = 'XX' - - order.payment_type = form[:payment_type] - order.cc_number = 'XXXXXXXXXXXXXXXX' - order.cc_month = 'n/a' - order.cc_year = 'n/a' - order.cc_code = 'n/a' - - order.comment = '' +# def add_coupons # unused +# if params[:form] +# form = params[:form] +# lines = form[:coupons].split("\r\n") +# lines.reject! {|x| x.strip == ''} +# for line in lines +# coupon = Coupon.new +# coupon.code = form[:code] +# coupon.coupon = line.strip() +# coupon.product_code = 'x' +# coupon.description = form[:description].strip() +# coupon.amount = form[:amount].strip() +# coupon.save() +# end +# end +# end + +# def mass_order # unused +# if params[:form] +# form = params[:form] +# for key in form.keys() +# form[key] = form[key].strip() +# end +# lines = form[:people].split("\r\n") +# lines.reject! {|x| x.strip == ''} +# for line in lines +# fname, lname, email = line.split(",").collect{|x| x.strip} +# order = Order.new + +# # add item +# order.order_time = Time.now() + +# order.add_form_items(params[:items]) +# order.update_item_prices(params[:item_prices]) + +# order.first_name = fname +# order.last_name = lname +# order.email = email + +# order.address1 = 'n/a' +# order.address2 = '' +# order.city = 'n/a' +# order.state = 'n/a' +# order.zipcode = 'n/a' +# order.country = 'XX' + +# order.payment_type = form[:payment_type] +# order.cc_number = 'XXXXXXXXXXXXXXXX' +# order.cc_month = 'n/a' +# order.cc_year = 'n/a' +# order.cc_code = 'n/a' + +# order.comment = '' - order.status = 'C' - order.save() +# order.status = 'C' +# order.save() - coupons = order.add_promo_coupons() +# coupons = order.add_promo_coupons() - email = OrderMailer.deliver_thankyou(order) - end - end - end +# email = OrderMailer.deliver_thankyou(order) +# end +# end +# end end diff --git a/app/controllers/application.rb b/app/controllers/application.rb index bc269b3..5441683 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -2,6 +2,13 @@ # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base + def check_authentication + unless session[:logged_in] + session[:intended_url] = request.request_uri + logger.debug('intended_url: ' + session[:intended_url]) + redirect_to :controller => "/admin", :action => "login" + end + end end def is_live diff --git a/app/controllers/store/order_controller.rb b/app/controllers/store/order_controller.rb index d50ce5d..465eaa2 100644 --- a/app/controllers/store/order_controller.rb +++ b/app/controllers/store/order_controller.rb @@ -22,7 +22,7 @@ def new session[:order] = nil @qty = {} @payment_type = session[:payment_type] - @products = Product.find_all(:active => 1) + @products = Product.find(:all, :active => 1) if params[:product] @qty[params[:product]] = 1 elsif session[:items] diff --git a/app/helpers/admin/orders_helper.rb b/app/helpers/admin/orders_helper.rb new file mode 100644 index 0000000..443227f --- /dev/null +++ b/app/helpers/admin/orders_helper.rb @@ -0,0 +1,2 @@ +module OrdersHelper +end diff --git a/app/helpers/admin/products_helper.rb b/app/helpers/admin/products_helper.rb new file mode 100644 index 0000000..ab5c42b --- /dev/null +++ b/app/helpers/admin/products_helper.rb @@ -0,0 +1,2 @@ +module ProductsHelper +end diff --git a/app/models/order.rb b/app/models/order.rb index efcec80..5e3870f 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -24,8 +24,10 @@ class Order < ActiveRecord::Base def validate if self.cc_order? && !skip_cc_validation - errors.add_on_blank(['first_name', 'last_name', 'address1', 'city', 'country', - 'cc_number', 'cc_month', 'cc_year', 'cc_code', 'email']) + errors.add_on_blank(['first_name', 'last_name', 'address1', 'city', 'country', 'email']) + if self.status == 'P' + errors.add_on_blank(['cc_number', 'cc_month', 'cc_year', 'cc_code']) + end if ['US', 'CA'].member?(self.country) errors.add_on_blank('zipcode') diff --git a/app/views/admin/_form.rhtml b/app/views/admin/_form.rhtml deleted file mode 100644 index 9ca3ba3..0000000 --- a/app/views/admin/_form.rhtml +++ /dev/null @@ -1,13 +0,0 @@ -<%= error_messages_for 'product' %> - - -


    -<%= text_field 'product', 'name' %>

    - -


    -<%= text_field 'product', 'price' %>

    - -


    -<%= text_field 'product', 'active' %>

    - - diff --git a/app/views/admin/add_order.rhtml b/app/views/admin/add_order.rhtml deleted file mode 100644 index f1da83f..0000000 --- a/app/views/admin/add_order.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -

    Add Order

    - -<%= render :partial => "order_form" -%> diff --git a/app/views/admin/edit_order.rhtml b/app/views/admin/edit_order.rhtml deleted file mode 100644 index 2788da5..0000000 --- a/app/views/admin/edit_order.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -

    Edit Order <%= @order.id %>

    - -<%= render :partial => "order_form" -%> diff --git a/app/views/admin/generate_coupons.rhtml b/app/views/admin/generate_coupons.rhtml index 5623364..5c3a2db 100644 --- a/app/views/admin/generate_coupons.rhtml +++ b/app/views/admin/generate_coupons.rhtml @@ -23,7 +23,7 @@ diff --git a/app/views/admin/signin_form.rhtml b/app/views/admin/login.rhtml similarity index 91% rename from app/views/admin/signin_form.rhtml rename to app/views/admin/login.rhtml index dffaa49..c536bab 100644 --- a/app/views/admin/signin_form.rhtml +++ b/app/views/admin/login.rhtml @@ -4,7 +4,7 @@

    - <% form_tag :action => "signin" do -%> + <% form_tag :action => "login" do -%> - - - -
    diff --git a/app/views/admin/_order_form.rhtml b/app/views/admin/orders/_form.rhtml similarity index 92% rename from app/views/admin/_order_form.rhtml rename to app/views/admin/orders/_form.rhtml index 703ed94..1902bd1 100644 --- a/app/views/admin/_order_form.rhtml +++ b/app/views/admin/orders/_form.rhtml @@ -1,4 +1,3 @@ -<% form_tag :action => "modify_order" do -%> <% if @order -%> <%= hidden_field "order", "id" %> <%= hidden_field "order", "status" %> @@ -64,9 +63,5 @@ Payment Method: <%= text_field "order", "payment_type" %>
    <%= submit_tag "Submit" %>
    -<% end -%> + diff --git a/app/views/admin/_product_quantities.rhtml b/app/views/admin/orders/_product_quantities.rhtml similarity index 93% rename from app/views/admin/_product_quantities.rhtml rename to app/views/admin/orders/_product_quantities.rhtml index 79617ca..89271ca 100644 --- a/app/views/admin/_product_quantities.rhtml +++ b/app/views/admin/orders/_product_quantities.rhtml @@ -1,5 +1,5 @@ - <% for product in Product.find_all() -%> + <% for product in Product.find(:all) -%> <% if @order && @order.has_item_with_product_id(product.id) -%> <% item = @order.line_item_with_product_id(product.id) -%> diff --git a/app/views/admin/orders/edit.rhtml b/app/views/admin/orders/edit.rhtml new file mode 100644 index 0000000..51d2c1e --- /dev/null +++ b/app/views/admin/orders/edit.rhtml @@ -0,0 +1,10 @@ +

    Edit Order <%= @order.id %>

    + +<%= error_messages_for :order %> + +<% form_for(:order, :url => order_path(@order), :html => { :method => :put }) do |f| %> +<%= render :partial => "form" -%> +

    + <%= submit_tag "Update" %> +

    +<% end %> diff --git a/app/views/admin/orders.rhtml b/app/views/admin/orders/index.rhtml similarity index 55% rename from app/views/admin/orders.rhtml rename to app/views/admin/orders/index.rhtml index a010dd2..cb6351b 100644 --- a/app/views/admin/orders.rhtml +++ b/app/views/admin/orders/index.rhtml @@ -1,22 +1,12 @@ - -

    Orders

    -

    -<%= link_to 'Previous page', { :page => @order_pages.current.previous } if @order_pages.current.previous %> -<%= link_to 'Next page', { :page => @order_pages.current.next } if @order_pages.current.next %> -

    + -
    +
    @@ -34,7 +24,7 @@ @@ -54,9 +44,10 @@ end %>
    #
    <%= order.status -%> - <%= link_to order.id, :action => 'order', :id => order %><%= "*" if order.comment != '' %> + <%= link_to order.id, :action => "show", :id => order %><%= "*" if order.comment != '' %> <%= order.order_time.strftime("%m/%d/%y %H:%M") -%> <%= order.licensee_name ? order.licensee_name : order.name -%>
    -

    -<%= link_to 'Previous page', { :page => @order_pages.current.previous } if @order_pages.current.previous %> -<%= link_to 'Next page', { :page => @order_pages.current.next } if @order_pages.current.next %> -

    +
    diff --git a/app/views/admin/orders/new.rhtml b/app/views/admin/orders/new.rhtml new file mode 100644 index 0000000..8e599da --- /dev/null +++ b/app/views/admin/orders/new.rhtml @@ -0,0 +1,12 @@ +

    Add Order

    + +<%= error_messages_for :order %> + +<% form_for(:order, :url => orders_path) do |f| %> +<%= render :partial => "form" -%> +

    + <%= submit_tag "Create" %> +

    +<% end %> + + diff --git a/app/views/admin/order.rhtml b/app/views/admin/orders/show.rhtml similarity index 56% rename from app/views/admin/order.rhtml rename to app/views/admin/orders/show.rhtml index 5c0405c..eb4e555 100644 --- a/app/views/admin/order.rhtml +++ b/app/views/admin/orders/show.rhtml @@ -7,13 +7,13 @@

    Commands

      -
    • <%= link_to "Edit Order", :action => "edit_order", :id => @order.id %>
    • +
    • <%= link_to "Edit Order", :action => "edit", :id => @order.id %>
    • <% if @order.complete? -%> -
    • <%= link_to "Cancel Order", :action => "cancel_order", :id => @order.id %>
    • +
    • <%= link_to "Cancel Order", :action => "cancel", :id => @order.id %>
    • <% elsif @order.status == "X" -%> -
    • <%= link_to "Uncancel Order", :action => "uncancel_order", :id => @order.id %>
    • +
    • <%= link_to "Uncancel Order", :action => "uncancel", :id => @order.id %>
    • <% end -%> <% if @order.complete? -%> -
    • <%= link_to "Send Confirmation Email", :action => "send_order_emails", :id => @order.id %>
    • +
    • <%= link_to "Send Confirmation Email", :action => "send_emails", :id => @order.id %>
    • <% end -%>
    diff --git a/app/views/admin/products.rhtml b/app/views/admin/products.rhtml deleted file mode 100644 index d58e105..0000000 --- a/app/views/admin/products.rhtml +++ /dev/null @@ -1,27 +0,0 @@ -

    Listing products

    - - - - <% for column in Product.content_columns %> - - <% end %> - - -<% for product in @products %> - - <% for column in Product.content_columns %> - - <% end %> - - - - -<% end %> -
    <%= column.human_name %>
    <%=h product.send(column.name) %><%= link_to 'Show', :action => 'show', :id => product %><%= link_to 'Edit', :action => 'edit', :id => product %><%= link_to 'Destroy', { :action => 'destroy', :id => product }, :confirm => 'Are you sure?', :post => true %>
    - -<%= link_to 'Previous page', { :page => @product_pages.current.previous } if @product_pages.current.previous %> -<%= link_to 'Next page', { :page => @product_pages.current.next } if @product_pages.current.next %> - -
    - -<%= link_to 'New product', :action => 'new' %> diff --git a/app/views/admin/products/_form.rhtml b/app/views/admin/products/_form.rhtml new file mode 100644 index 0000000..ef3d065 --- /dev/null +++ b/app/views/admin/products/_form.rhtml @@ -0,0 +1,28 @@ +<%= error_messages_for 'product' %> + + +


    +<%= text_field 'product', 'code' %>

    + +


    +<%= text_field 'product', 'name' %>

    + +


    +<%= text_field 'product', 'price' %>

    + +


    +<%= text_area 'product', 'image_path' , {"cols" => 40, "rows" => 3} %>

    + +


    +<%= text_area 'product', 'url' , {"cols" => 40, "rows" => 3} %>

    + +


    +<%= text_area 'product', 'download_url' , {"cols" => 40, "rows" => 3} %>

    + +


    +<%= text_area 'product', 'license_url_scheme' , {"cols" => 40, "rows" => 3} %>

    + +


    +<%= check_box 'product', 'active' , {} , "1", "0" %>

    + + diff --git a/app/views/admin/products/edit.rhtml b/app/views/admin/products/edit.rhtml new file mode 100644 index 0000000..010467f --- /dev/null +++ b/app/views/admin/products/edit.rhtml @@ -0,0 +1,9 @@ +

    Editing product

    + +<% form_tag :action => 'update', :id => @product do %> + <%= render :partial => 'form' %> + <%= submit_tag 'Edit' %> +<% end %> + +<%= link_to 'Show', :action => 'show', :id => @product %> | +<%= link_to 'Back', :controller => 'admin' , :action => 'products' %> diff --git a/app/views/admin/products/index.rhtml b/app/views/admin/products/index.rhtml new file mode 100644 index 0000000..7851344 --- /dev/null +++ b/app/views/admin/products/index.rhtml @@ -0,0 +1,26 @@ +

    Listing products

    + + + + + + + + + +<% for product in @products %> + + + + + + + + + +<% end %> +
    CodeNamePriceAction
    <%= image_tag(product.image_path) %><%=h product.code %><%=h product.name %><%=h number_to_currency product.price %><%= link_to 'Show', product_path(product) %><%= link_to 'Edit', edit_product_path(product) %><%= link_to 'Destroy', product_path(product), :confirm => 'Are you sure?', :method => :delete %>
    + +
    + +<%= link_to 'New product', :controller => 'products', :action => 'new' %> diff --git a/app/views/admin/products/new.rhtml b/app/views/admin/products/new.rhtml new file mode 100644 index 0000000..50d92cb --- /dev/null +++ b/app/views/admin/products/new.rhtml @@ -0,0 +1,8 @@ +

    New product

    + +<% form_tag :action => 'create' do %> + <%= render :partial => 'form' %> + <%= submit_tag "Create" %> +<% end %> + +<%= link_to 'Back', :controller => 'admin' , :action => 'products' %> diff --git a/app/views/admin/show.rhtml b/app/views/admin/products/show.rhtml similarity index 73% rename from app/views/admin/show.rhtml rename to app/views/admin/products/show.rhtml index 78fcf1d..183df28 100644 --- a/app/views/admin/show.rhtml +++ b/app/views/admin/products/show.rhtml @@ -5,4 +5,4 @@ <% end %> <%= link_to 'Edit', :action => 'edit', :id => @product %> | -<%= link_to 'Back', :action => 'list' %> +<%= link_to 'Back', :controller => 'admin' , :action => 'products' %> diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml index eb4b88d..8b3da88 100644 --- a/app/views/layouts/admin.rhtml +++ b/app/views/layouts/admin.rhtml @@ -9,14 +9,15 @@ <% if session[:logged_in] -%>
      -
    • <%= link_to "Dashboard", :action => "index" %>
    • -
    • <%= link_to "Orders", :action => "orders" %>
    • -
    • <%= link_to "Add Order", :action => "add_order" %>
    • -
    • <%= link_to "Generate Coupons", :action => "generate_coupons" %>
    • +
    • <%= link_to "Dashboard", :controller => "/admin", :action => "index" %>
    • +
    • <%= link_to "Orders", :controller => "admin/orders", :action => "index" %>
    • +
    • <%= link_to "Add Order", :controller => "admin/orders", :action => "new" %>
    • +
    • <%= link_to "Products", :controller => "admin/products", :action => "index" %>
    • +
    • <%= link_to "Generate Coupons", :controller => "/admin", :action => "generate_coupons" %>