nimbleshop_core 0.0.1.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +13 -0
- data/Rakefile +15 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/american_express.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/authorize_net_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/authorizedotnet_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/discover.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/mastercard.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/visa.png +0 -0
- data/app/assets/images/engines/nimbleshop_cod/cod_small.png +0 -0
- data/app/assets/images/engines/nimbleshop_paypalwp/paypal_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_paypalwp/paypal_small.png +0 -0
- data/app/assets/images/engines/nimbleshop_splitable/splitable.png +0 -0
- data/app/assets/images/engines/nimbleshop_splitable/splitable_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_splitable/splitable_small.png +0 -0
- data/app/assets/javascripts/admin/products/edit.js.coffee +19 -0
- data/app/assets/javascripts/admin/shipping_methods/edit.js.coffee +6 -0
- data/app/assets/javascripts/admin.js +25 -0
- data/app/assets/javascripts/fadeout_success.js.coffee +2 -0
- data/app/assets/javascripts/payment_method.js.coffee +19 -0
- data/app/assets/javascripts/product-group-condition.js.coffee +33 -0
- data/app/assets/javascripts/remove_deletion_of_product_pictures.js.coffee +5 -0
- data/app/assets/javascripts/shipit.js.coffee +10 -0
- data/app/assets/javascripts/twitter_bootstrap.js.coffee +4 -0
- data/app/assets/stylesheets/admin.css +9 -0
- data/app/assets/stylesheets/admin_bootstrap_and_overrides.css.less +38 -0
- data/app/assets/stylesheets/admin_custom.css +104 -0
- data/app/assets/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/app/controllers/admin/custom_fields_controller.rb +56 -0
- data/app/controllers/admin/link_groups_controller.rb +76 -0
- data/app/controllers/admin/main_controller.rb +9 -0
- data/app/controllers/admin/navigations_controller.rb +49 -0
- data/app/controllers/admin/orders_controller.rb +47 -0
- data/app/controllers/admin/payment_methods_controller.rb +26 -0
- data/app/controllers/admin/product_groups_controller.rb +70 -0
- data/app/controllers/admin/products_controller.rb +71 -0
- data/app/controllers/admin/shipments_controller.rb +19 -0
- data/app/controllers/admin/shipping_methods_controller.rb +93 -0
- data/app/controllers/admin/shipping_zones_controller.rb +62 -0
- data/app/controllers/admin/shops_controller.rb +33 -0
- data/app/controllers/admin_controller.rb +38 -0
- data/app/helpers/admin_helper.rb +83 -0
- data/app/helpers/nimbleshop_helper.rb +43 -0
- data/app/helpers/payment_method_helper.rb +52 -0
- data/app/mailers/admin_mailer.rb +22 -0
- data/app/mailers/mailer.rb +31 -0
- data/app/models/address.rb +69 -0
- data/app/models/country_shipping_zone.rb +36 -0
- data/app/models/creditcard.rb +95 -0
- data/app/models/custom_field.rb +8 -0
- data/app/models/custom_field_answer/field.rb +101 -0
- data/app/models/custom_field_answer.rb +17 -0
- data/app/models/line_item.rb +48 -0
- data/app/models/link.rb +3 -0
- data/app/models/link_group.rb +8 -0
- data/app/models/navigation.rb +7 -0
- data/app/models/order.rb +158 -0
- data/app/models/payment_method.rb +20 -0
- data/app/models/payment_transaction.rb +11 -0
- data/app/models/picture.rb +30 -0
- data/app/models/product.rb +76 -0
- data/app/models/product_group.rb +65 -0
- data/app/models/product_group_condition.rb +8 -0
- data/app/models/regional_shipping_zone.rb +25 -0
- data/app/models/shipment.rb +19 -0
- data/app/models/shipment_carrier.rb +3 -0
- data/app/models/shipping_cost_calculator.rb +9 -0
- data/app/models/shipping_method.rb +103 -0
- data/app/models/shipping_zone.rb +9 -0
- data/app/models/shop.rb +26 -0
- data/app/models/tax_calculator.rb +18 -0
- data/app/observers/order_observer.rb +53 -0
- data/app/uploaders/picture_uploader.rb +65 -0
- data/app/views/admin/custom_fields/_form.html.erb +45 -0
- data/app/views/admin/custom_fields/edit.html.erb +7 -0
- data/app/views/admin/custom_fields/index.html.erb +31 -0
- data/app/views/admin/custom_fields/new.html.erb +7 -0
- data/app/views/admin/link_groups/_form.html.erb +31 -0
- data/app/views/admin/link_groups/_link_group.html.erb +50 -0
- data/app/views/admin/link_groups/_link_group_title.html.erb +5 -0
- data/app/views/admin/link_groups/edit.html.erb +8 -0
- data/app/views/admin/link_groups/index.html.erb +29 -0
- data/app/views/admin/link_groups/new.html.erb +9 -0
- data/app/views/admin/mailer/new_order_notification.text.erb +31 -0
- data/app/views/admin/main/index.html.erb +5 -0
- data/app/views/admin/navigations/new.html.erb +29 -0
- data/app/views/admin/orders/_line_item.html.erb +11 -0
- data/app/views/admin/orders/_line_items.html.erb +39 -0
- data/app/views/admin/orders/_payment_info.html.erb +20 -0
- data/app/views/admin/orders/_shipping_info.html.erb +40 -0
- data/app/views/admin/orders/index.html.erb +33 -0
- data/app/views/admin/orders/show.html.erb +40 -0
- data/app/views/admin/payment_methods/index.html.erb +6 -0
- data/app/views/admin/product_groups/_condition.html.mustache +20 -0
- data/app/views/admin/product_groups/_form.html.erb +72 -0
- data/app/views/admin/product_groups/edit.html.erb +7 -0
- data/app/views/admin/product_groups/index.html.erb +30 -0
- data/app/views/admin/product_groups/new.html.erb +7 -0
- data/app/views/admin/product_groups/show.html.erb +9 -0
- data/app/views/admin/products/_custom_field_answer.html.erb +9 -0
- data/app/views/admin/products/_form.html.erb +69 -0
- data/app/views/admin/products/_handle_pictures.html.erb +32 -0
- data/app/views/admin/products/_pictures.html.erb +33 -0
- data/app/views/admin/products/edit.html.erb +26 -0
- data/app/views/admin/products/index.html.erb +34 -0
- data/app/views/admin/products/new.html.erb +9 -0
- data/app/views/admin/shipping_methods/_form.html.erb +58 -0
- data/app/views/admin/shipping_methods/_shipping_method.html.erb +31 -0
- data/app/views/admin/shipping_methods/edit.html.erb +18 -0
- data/app/views/admin/shipping_methods/new.html.erb +7 -0
- data/app/views/admin/shipping_zones/_form.html.erb +31 -0
- data/app/views/admin/shipping_zones/_shipping_method.html.erb +13 -0
- data/app/views/admin/shipping_zones/_shipping_zone.html.erb +47 -0
- data/app/views/admin/shipping_zones/edit.html.erb +8 -0
- data/app/views/admin/shipping_zones/index.html.erb +16 -0
- data/app/views/admin/shipping_zones/new.html.erb +8 -0
- data/app/views/admin/shops/edit.html.erb +119 -0
- data/app/views/layouts/_admin_footer.html.erb +23 -0
- data/app/views/layouts/_admin_sidebar.html.erb +0 -0
- data/app/views/layouts/_container.html.erb +33 -0
- data/app/views/layouts/_top_nav_bar.html.erb +30 -0
- data/app/views/layouts/admin.html.erb +35 -0
- data/app/views/layouts/payment_method.html.erb +12 -0
- data/app/views/mailer/order_notification_to_buyer.text.erb +31 -0
- data/app/views/mailer/shipment_notification_to_buyer.text.erb +34 -0
- data/config/initializers/001_settings_application.rb +10 -0
- data/config/initializers/002_load_core_extensions.rb +8 -0
- data/config/initializers/field_with_error.rb +2 -0
- data/config/initializers/strip_and_nullify.rb +13 -0
- data/config/initializers/time_formats.rb +1 -0
- data/config/locales/en.yml +61 -0
- data/config/routes.rb +56 -0
- data/db/development.sqlite3 +0 -0
- data/db/migrate/20111022144421_create_product_groups.rb +12 -0
- data/db/migrate/20111022144426_create_products.rb +16 -0
- data/db/migrate/20111022144653_create_orders.rb +21 -0
- data/db/migrate/20111022144725_create_line_items.rb +15 -0
- data/db/migrate/20111022234951_create_shops.rb +20 -0
- data/db/migrate/20111026193227_create_link_groups.rb +12 -0
- data/db/migrate/20111026193435_create_navigations.rb +10 -0
- data/db/migrate/20111031135810_create_links.rb +10 -0
- data/db/migrate/20111106193938_create_custom_fields.rb +10 -0
- data/db/migrate/20111106195112_create_custom_field_answers.rb +14 -0
- data/db/migrate/20111106201548_create_product_group_conditions.rb +12 -0
- data/db/migrate/20111107035350_create_creditcard_transactions.rb +15 -0
- data/db/migrate/20111109190754_create_addresses.rb +24 -0
- data/db/migrate/20111125173344_create_pictures.rb +16 -0
- data/db/migrate/20111201024408_create_shipping_methods.rb +16 -0
- data/db/migrate/20111202143154_create_shipping_zones.rb +17 -0
- data/db/migrate/20111203034020_create_payment_methods.rb +14 -0
- data/db/migrate/20111221190000_create_preferences.rb +14 -0
- data/db/migrate/20120105234047_create_shipments.rb +11 -0
- data/db/migrate/20120105234553_create_shipment_carriers.rb +11 -0
- data/db/migrate/20120606165355_create_delayed_jobs.rb +22 -0
- data/db/production.sqlite3 +0 -0
- data/db/schema.rb +265 -0
- data/db/seeds.rb +1 -0
- data/db/test.sqlite3 +0 -0
- data/lib/assets/javascripts/loading_state_for_buttons.js.coffee +3 -0
- data/lib/assets/javascripts/show_help_on_hover.js.coffee +2 -0
- data/lib/assets/javascripts/utils/autoresize.js.coffee +3 -0
- data/lib/assets/javascripts/utils/focus.js.coffee +3 -0
- data/lib/assets/javascripts/utils/formatNumber.js.coffee +25 -0
- data/lib/assets/javascripts/utils/formatPrice.js.coffee +24 -0
- data/lib/generators/nimbleshop/app/app_generator.rb +84 -0
- data/lib/generators/nimbleshop/app/templates/config/application.yml +61 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/airbrake.rb +3 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/cache_images.rb +4 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/carrierwave.rb +36 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/delayed_job.rb +15 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/setup_email.rb +24 -0
- data/lib/nimbleshop/core_ext/activerecord_base.rb +18 -0
- data/lib/nimbleshop/core_ext/filelessio.rb +4 -0
- data/lib/nimbleshop/core_ext/force_ssl.rb +26 -0
- data/lib/nimbleshop/core_ext/mustache_templater_handler.rb +10 -0
- data/lib/nimbleshop/engine.rb +23 -0
- data/lib/nimbleshop/permalink/builder.rb +46 -0
- data/lib/nimbleshop/processor/base.rb +51 -0
- data/lib/nimbleshop/processor.rb +3 -0
- data/lib/nimbleshop/product_group_search/base_field.rb +19 -0
- data/lib/nimbleshop/product_group_search/core_field_strategy.rb +31 -0
- data/lib/nimbleshop/product_group_search/custom_field_strategy.rb +39 -0
- data/lib/nimbleshop/product_group_search/date_field.rb +16 -0
- data/lib/nimbleshop/product_group_search/extension.rb +46 -0
- data/lib/nimbleshop/product_group_search/number_field.rb +17 -0
- data/lib/nimbleshop/product_group_search/text_field.rb +33 -0
- data/lib/nimbleshop/product_group_search.rb +74 -0
- data/lib/nimbleshop/sampledata/data.rb +246 -0
- data/lib/nimbleshop/sampledata/pictures/product1/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product2/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product2/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic4.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic5.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product4/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product4/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product5/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product5/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic10.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic11.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic12.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic13.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic14.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic15.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic16.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic17.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic4.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic5.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic6.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic7.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic8.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic9.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product7/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product7/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product7/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic4.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic5.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic6.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic7.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic8.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product9/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product9/pic2.jpg +0 -0
- data/lib/nimbleshop/util.rb +60 -0
- data/lib/nimbleshop/version.rb +18 -0
- data/lib/nimbleshop_core.rb +23 -0
- data/lib/tasks/localhost2public.rake +8 -0
- data/lib/tasks/setup.rake +26 -0
- data/test/factories/address_factory.rb +31 -0
- data/test/factories/creditcard_factory.rb +30 -0
- data/test/factories/custom_field_answer_factory.rb +6 -0
- data/test/factories/custom_field_factory.rb +21 -0
- data/test/factories/line_item_factory.rb +7 -0
- data/test/factories/link_factory.rb +6 -0
- data/test/factories/link_group_factory.rb +5 -0
- data/test/factories/navigation_factory.rb +6 -0
- data/test/factories/order_factory.rb +49 -0
- data/test/factories/payment_method_factory.rb +6 -0
- data/test/factories/payment_transaction_factory.rb +42 -0
- data/test/factories/picture_factory.rb +11 -0
- data/test/factories/product_group_condition_factory.rb +40 -0
- data/test/factories/product_group_factory.rb +5 -0
- data/test/factories/products_factory.rb +11 -0
- data/test/factories/shipment_carrier_factory.rb +6 -0
- data/test/factories/shipment_factory.rb +6 -0
- data/test/factories/shipping_method_factory.rb +15 -0
- data/test/factories/shipping_zone_factory.rb +5 -0
- data/test/factories/shop_factory.rb +8 -0
- data/test/fixtures/files/avatar.png +0 -0
- data/test/fixtures/link_groups.yml +13 -0
- data/test/fixtures/payment_methods.yml +39 -0
- data/test/fixtures/shops.yml +15 -0
- data/test/helpers/admin_helper_test.rb +37 -0
- data/test/helpers/nimbleshop_helper_test.rb +17 -0
- data/test/integration/admin/link_groups_acceptance_test.rb +39 -0
- data/test/integration/admin/orders_acceptance_test.rb +63 -0
- data/test/integration/admin/payment_methods_acceptance_test.rb +13 -0
- data/test/integration/admin/product_groups_acceptance_test.rb +89 -0
- data/test/integration/admin/products_acceptance_test.rb +105 -0
- data/test/integration/admin/shipping_methods_acceptance_test.rb +63 -0
- data/test/integration/admin/shipping_zones_acceptance_test.rb +16 -0
- data/test/integration/admin/shops_acceptance_test.rb +44 -0
- data/test/integration/checkout/cart_acceptance_test.rb +113 -0
- data/test/integration/checkout/payment_confirmation_acceptance_test.rb +24 -0
- data/test/integration/checkout/paypal_acceptance_test.rb +34 -0
- data/test/integration/checkout/shipping_address_acceptance_test.rb +91 -0
- data/test/integration/checkout/shipping_method_acceptance_test.rb +51 -0
- data/test/integration/homepage_acceptance_test.rb +24 -0
- data/test/integration/products_acceptance_test.rb +12 -0
- data/test/integration/static_pages_acceptance_test.rb +13 -0
- data/test/mailers/mailer_test.rb +25 -0
- data/test/rails_app/Gemfile +27 -0
- data/test/rails_app/Gemfile.lock +218 -0
- data/test/rails_app/Rakefile +10 -0
- data/test/rails_app/app/controllers/application_controller.rb +6 -0
- data/test/rails_app/app/helpers/application_helper.rb +3 -0
- data/test/rails_app/app/views/layouts/application.html.erb +10 -0
- data/test/rails_app/config/application.rb +25 -0
- data/test/rails_app/config/application.yml +61 -0
- data/test/rails_app/config/boot.rb +5 -0
- data/test/rails_app/config/database.yml +18 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +18 -0
- data/test/rails_app/config/environments/production.rb +33 -0
- data/test/rails_app/config/environments/test.rb +33 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/inflections.rb +2 -0
- data/test/rails_app/config/initializers/secret_token.rb +2 -0
- data/test/rails_app/config/routes.rb +10 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/db/development.sqlite3 +0 -0
- data/test/rails_app/db/migrate/20100401102949_create_tables.rb +74 -0
- data/test/rails_app/db/schema.rb +52 -0
- data/test/rails_app/log/development.log +94 -0
- data/test/rails_app/log/test.log +0 -0
- data/test/rails_app/public/404.html +26 -0
- data/test/rails_app/public/422.html +26 -0
- data/test/rails_app/public/500.html +26 -0
- data/test/rails_app/public/favicon.ico +0 -0
- data/test/rails_app/script/rails +10 -0
- data/test/support/address_test_helper.rb +24 -0
- data/test/support/checkout_test_helper.rb +40 -0
- data/test/support/dbify_sql_helper.rb +12 -0
- data/test/support/images/cookware.jpg +0 -0
- data/test/support/must_be_like.rb +24 -0
- data/test/support/shipping_method_test_helper.rb +5 -0
- data/test/support/wait_for_ajax.rb +4 -0
- data/test/test_helper.rb +65 -0
- data/test/unit/address_test.rb +33 -0
- data/test/unit/country_shipping_zone_test.rb +17 -0
- data/test/unit/creditcard_test.rb +33 -0
- data/test/unit/custom_field_answer/field_test.rb +93 -0
- data/test/unit/order_test.rb +70 -0
- data/test/unit/payment_method/authorizedotnet_test.rb +21 -0
- data/test/unit/payment_method/paypalwp_test.rb +17 -0
- data/test/unit/payment_method/splitable_test.rb +18 -0
- data/test/unit/picture_test.rb +24 -0
- data/test/unit/processor/authorize_net_test.rb +236 -0
- data/test/unit/processor/paypal_test.rb +40 -0
- data/test/unit/processor/splitable_test.rb +123 -0
- data/test/unit/product_group_condition_test.rb +188 -0
- data/test/unit/product_group_test.rb +109 -0
- data/test/unit/product_test.rb +60 -0
- data/test/unit/shipping_cost_calculator_test.rb +19 -0
- data/test/unit/shipping_method_test.rb +197 -0
- data/test/unit/shop_test.rb +11 -0
- data/test/unit/tax_calculator_test.rb +13 -0
- data/test/vcr_cassettes/authorize_net/authorize-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/authorize-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/capture-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/capture-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/purchase-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/purchase-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/refund-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/refund-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/void-authorize.yml +38 -0
- data/test/vcr_cassettes/authorize_net/void-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/void-success.yml +38 -0
- data/test/vcr_cassettes/splitable/split-create-failure.yml +48 -0
- data/test/vcr_cassettes/splitable/split-create-success.yml +50 -0
- data/test/vcr_cassettes/splitable/split-draft-create-failure.yml +50 -0
- data/test/vcr_cassettes/splitable/split-draft-create-success.yml +50 -0
- data/vendor/assets/javascripts/accounting.js +406 -0
- data/vendor/assets/javascripts/autoresize.js +275 -0
- data/vendor/assets/javascripts/jquery-1.7.1.js +9267 -0
- data/vendor/assets/javascripts/jquery-form.js +980 -0
- data/vendor/assets/javascripts/jquery-json.js +193 -0
- data/vendor/assets/javascripts/jquery-ui-1.8.16.js +11768 -0
- data/vendor/assets/javascripts/jquery-ujs.js +374 -0
- data/vendor/assets/javascripts/mustache.js +436 -0
- data/vendor/assets/javascripts/nested_form.js +51 -0
- metadata +740 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: /Users/nsingh/dev/nimbleshop_inc/nimbleshop/nimbleshop_authorizedotnet
|
|
3
|
+
specs:
|
|
4
|
+
nimbleshop_authorizedotnet (0.0.1)
|
|
5
|
+
activemerchant
|
|
6
|
+
|
|
7
|
+
PATH
|
|
8
|
+
remote: /Users/nsingh/dev/nimbleshop_inc/nimbleshop/nimbleshop_cod
|
|
9
|
+
specs:
|
|
10
|
+
nimbleshop_cod (0.0.1)
|
|
11
|
+
|
|
12
|
+
PATH
|
|
13
|
+
remote: /Users/nsingh/dev/nimbleshop_inc/nimbleshop/nimbleshop_core
|
|
14
|
+
specs:
|
|
15
|
+
nimbleshop_core (2.1.0.dev)
|
|
16
|
+
activemerchant
|
|
17
|
+
carmen (= 1.0.0.beta2)
|
|
18
|
+
carrierwave (= 0.6.2)
|
|
19
|
+
delayed_job_active_record (= 0.3.2)
|
|
20
|
+
hashr (= 0.0.19)
|
|
21
|
+
mini_magick
|
|
22
|
+
nested_form (= 0.2.1)
|
|
23
|
+
rails (= 3.2.6)
|
|
24
|
+
state_machine
|
|
25
|
+
strong_parameters (= 0.1.3)
|
|
26
|
+
twitter-bootstrap-rails
|
|
27
|
+
valid_email (= 0.0.4)
|
|
28
|
+
|
|
29
|
+
PATH
|
|
30
|
+
remote: /Users/nsingh/dev/nimbleshop_inc/nimbleshop/nimbleshop_paypalwp
|
|
31
|
+
specs:
|
|
32
|
+
nimbleshop_paypalwp (0.0.1)
|
|
33
|
+
activemerchant
|
|
34
|
+
money
|
|
35
|
+
valid_email
|
|
36
|
+
|
|
37
|
+
PATH
|
|
38
|
+
remote: /Users/nsingh/dev/nimbleshop_inc/nimbleshop/nimbleshop_simply
|
|
39
|
+
specs:
|
|
40
|
+
nimbleshop_simply (0.0.1)
|
|
41
|
+
fancybox-rails (= 0.1.4)
|
|
42
|
+
jquery-rails (= 2.0.2)
|
|
43
|
+
|
|
44
|
+
PATH
|
|
45
|
+
remote: /Users/nsingh/dev/nimbleshop_inc/nimbleshop/nimbleshop_splitable
|
|
46
|
+
specs:
|
|
47
|
+
nimbleshop_splitable (0.0.1)
|
|
48
|
+
activemerchant
|
|
49
|
+
|
|
50
|
+
GEM
|
|
51
|
+
remote: https://rubygems.org/
|
|
52
|
+
specs:
|
|
53
|
+
actionmailer (3.2.6)
|
|
54
|
+
actionpack (= 3.2.6)
|
|
55
|
+
mail (~> 2.4.4)
|
|
56
|
+
actionpack (3.2.6)
|
|
57
|
+
activemodel (= 3.2.6)
|
|
58
|
+
activesupport (= 3.2.6)
|
|
59
|
+
builder (~> 3.0.0)
|
|
60
|
+
erubis (~> 2.7.0)
|
|
61
|
+
journey (~> 1.0.1)
|
|
62
|
+
rack (~> 1.4.0)
|
|
63
|
+
rack-cache (~> 1.2)
|
|
64
|
+
rack-test (~> 0.6.1)
|
|
65
|
+
sprockets (~> 2.1.3)
|
|
66
|
+
active_utils (1.0.3)
|
|
67
|
+
activesupport (>= 2.3.11)
|
|
68
|
+
i18n
|
|
69
|
+
activemerchant (1.24.0)
|
|
70
|
+
active_utils (>= 1.0.2)
|
|
71
|
+
activesupport (>= 2.3.11)
|
|
72
|
+
builder (>= 2.0.0)
|
|
73
|
+
i18n
|
|
74
|
+
json (>= 1.5.1)
|
|
75
|
+
money
|
|
76
|
+
nokogiri
|
|
77
|
+
activemodel (3.2.6)
|
|
78
|
+
activesupport (= 3.2.6)
|
|
79
|
+
builder (~> 3.0.0)
|
|
80
|
+
activerecord (3.2.6)
|
|
81
|
+
activemodel (= 3.2.6)
|
|
82
|
+
activesupport (= 3.2.6)
|
|
83
|
+
arel (~> 3.0.2)
|
|
84
|
+
tzinfo (~> 0.3.29)
|
|
85
|
+
activeresource (3.2.6)
|
|
86
|
+
activemodel (= 3.2.6)
|
|
87
|
+
activesupport (= 3.2.6)
|
|
88
|
+
activesupport (3.2.6)
|
|
89
|
+
i18n (~> 0.6)
|
|
90
|
+
multi_json (~> 1.0)
|
|
91
|
+
arel (3.0.2)
|
|
92
|
+
builder (3.0.0)
|
|
93
|
+
carmen (1.0.0.beta2)
|
|
94
|
+
carrierwave (0.6.2)
|
|
95
|
+
activemodel (>= 3.2.0)
|
|
96
|
+
activesupport (>= 3.2.0)
|
|
97
|
+
coffee-rails (3.2.2)
|
|
98
|
+
coffee-script (>= 2.2.0)
|
|
99
|
+
railties (~> 3.2.0)
|
|
100
|
+
coffee-script (2.2.0)
|
|
101
|
+
coffee-script-source
|
|
102
|
+
execjs
|
|
103
|
+
coffee-script-source (1.3.3)
|
|
104
|
+
commonjs (0.2.6)
|
|
105
|
+
delayed_job (3.0.3)
|
|
106
|
+
activesupport (~> 3.0)
|
|
107
|
+
delayed_job_active_record (0.3.2)
|
|
108
|
+
activerecord (> 2.1.0)
|
|
109
|
+
delayed_job (~> 3.0.0)
|
|
110
|
+
erubis (2.7.0)
|
|
111
|
+
execjs (1.4.0)
|
|
112
|
+
multi_json (~> 1.0)
|
|
113
|
+
fancybox-rails (0.1.4)
|
|
114
|
+
railties (>= 3.1.0)
|
|
115
|
+
hashr (0.0.19)
|
|
116
|
+
hike (1.2.1)
|
|
117
|
+
i18n (0.6.0)
|
|
118
|
+
journey (1.0.4)
|
|
119
|
+
jquery-rails (2.0.2)
|
|
120
|
+
railties (>= 3.2.0, < 5.0)
|
|
121
|
+
thor (~> 0.14)
|
|
122
|
+
json (1.7.3)
|
|
123
|
+
less (2.2.1)
|
|
124
|
+
commonjs (~> 0.2.6)
|
|
125
|
+
less-rails (2.2.3)
|
|
126
|
+
actionpack (>= 3.1)
|
|
127
|
+
less (~> 2.2.0)
|
|
128
|
+
libv8 (3.3.10.4)
|
|
129
|
+
mail (2.4.4)
|
|
130
|
+
i18n (>= 0.4.0)
|
|
131
|
+
mime-types (~> 1.16)
|
|
132
|
+
treetop (~> 1.4.8)
|
|
133
|
+
mime-types (1.19)
|
|
134
|
+
mini_magick (3.4)
|
|
135
|
+
subexec (~> 0.2.1)
|
|
136
|
+
money (5.0.0)
|
|
137
|
+
i18n (~> 0.4)
|
|
138
|
+
json
|
|
139
|
+
multi_json (1.3.6)
|
|
140
|
+
nested_form (0.2.1)
|
|
141
|
+
nokogiri (1.5.5)
|
|
142
|
+
polyglot (0.3.3)
|
|
143
|
+
rack (1.4.1)
|
|
144
|
+
rack-cache (1.2)
|
|
145
|
+
rack (>= 0.4)
|
|
146
|
+
rack-ssl (1.3.2)
|
|
147
|
+
rack
|
|
148
|
+
rack-test (0.6.1)
|
|
149
|
+
rack (>= 1.0)
|
|
150
|
+
rails (3.2.6)
|
|
151
|
+
actionmailer (= 3.2.6)
|
|
152
|
+
actionpack (= 3.2.6)
|
|
153
|
+
activerecord (= 3.2.6)
|
|
154
|
+
activeresource (= 3.2.6)
|
|
155
|
+
activesupport (= 3.2.6)
|
|
156
|
+
bundler (~> 1.0)
|
|
157
|
+
railties (= 3.2.6)
|
|
158
|
+
railties (3.2.6)
|
|
159
|
+
actionpack (= 3.2.6)
|
|
160
|
+
activesupport (= 3.2.6)
|
|
161
|
+
rack-ssl (~> 1.3.2)
|
|
162
|
+
rake (>= 0.8.7)
|
|
163
|
+
rdoc (~> 3.4)
|
|
164
|
+
thor (>= 0.14.6, < 2.0)
|
|
165
|
+
rake (0.9.2.2)
|
|
166
|
+
rdoc (3.12)
|
|
167
|
+
json (~> 1.4)
|
|
168
|
+
sass (3.1.20)
|
|
169
|
+
sass-rails (3.2.5)
|
|
170
|
+
railties (~> 3.2.0)
|
|
171
|
+
sass (>= 3.1.10)
|
|
172
|
+
tilt (~> 1.3)
|
|
173
|
+
sprockets (2.1.3)
|
|
174
|
+
hike (~> 1.2)
|
|
175
|
+
rack (~> 1.0)
|
|
176
|
+
tilt (~> 1.1, != 1.3.0)
|
|
177
|
+
sqlite3 (1.3.6)
|
|
178
|
+
state_machine (1.1.2)
|
|
179
|
+
strong_parameters (0.1.3)
|
|
180
|
+
actionpack (>= 3.2.0)
|
|
181
|
+
activemodel (>= 3.2.0)
|
|
182
|
+
subexec (0.2.2)
|
|
183
|
+
therubyracer (0.10.1)
|
|
184
|
+
libv8 (~> 3.3.10)
|
|
185
|
+
thor (0.15.4)
|
|
186
|
+
tilt (1.3.3)
|
|
187
|
+
treetop (1.4.10)
|
|
188
|
+
polyglot
|
|
189
|
+
polyglot (>= 0.3.1)
|
|
190
|
+
twitter-bootstrap-rails (2.1.0)
|
|
191
|
+
actionpack (>= 3.1)
|
|
192
|
+
less-rails (~> 2.2.2)
|
|
193
|
+
railties (>= 3.1)
|
|
194
|
+
therubyracer (~> 0.10.1)
|
|
195
|
+
tzinfo (0.3.33)
|
|
196
|
+
uglifier (1.2.6)
|
|
197
|
+
execjs (>= 0.3.0)
|
|
198
|
+
multi_json (~> 1.3)
|
|
199
|
+
valid_email (0.0.4)
|
|
200
|
+
activemodel
|
|
201
|
+
mail
|
|
202
|
+
|
|
203
|
+
PLATFORMS
|
|
204
|
+
ruby
|
|
205
|
+
|
|
206
|
+
DEPENDENCIES
|
|
207
|
+
coffee-rails (~> 3.2.1)
|
|
208
|
+
jquery-rails
|
|
209
|
+
nimbleshop_authorizedotnet!
|
|
210
|
+
nimbleshop_cod!
|
|
211
|
+
nimbleshop_core!
|
|
212
|
+
nimbleshop_paypalwp!
|
|
213
|
+
nimbleshop_simply!
|
|
214
|
+
nimbleshop_splitable!
|
|
215
|
+
rails (= 3.2.6)
|
|
216
|
+
sass-rails (~> 3.2.3)
|
|
217
|
+
sqlite3
|
|
218
|
+
uglifier (>= 1.0.3)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
3
|
+
|
|
4
|
+
require File.expand_path('../config/application', __FILE__)
|
|
5
|
+
|
|
6
|
+
require 'rake'
|
|
7
|
+
require 'rake/testtask'
|
|
8
|
+
require 'rake/rdoctask'
|
|
9
|
+
|
|
10
|
+
Rails.application.load_tasks
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
|
|
3
|
+
# Issue described in detail here: http://www.ruby-forum.com/topic/1002689 . Please see last comment
|
|
4
|
+
# rvm builds 1.9.2 with libyaml and it falls back to psych yaml parser
|
|
5
|
+
# carmen gem fails with psych. Following two lines fixes the problem
|
|
6
|
+
require 'yaml'
|
|
7
|
+
YAML::ENGINE.yamler= 'syck'
|
|
8
|
+
|
|
9
|
+
require 'rails/all'
|
|
10
|
+
|
|
11
|
+
if defined?(Bundler)
|
|
12
|
+
# If you precompile assets before deploying to production, use this line
|
|
13
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
|
14
|
+
# If you want your assets lazily compiled in production, use this line
|
|
15
|
+
# Bundler.require(:default, :assets, Rails.env)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
module RailsApp
|
|
19
|
+
class Application < Rails::Application
|
|
20
|
+
|
|
21
|
+
# Enable the asset pipeline
|
|
22
|
+
config.assets.enabled = true
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Usage
|
|
2
|
+
#
|
|
3
|
+
# Nimbleshop.config.s3.bucket_name
|
|
4
|
+
#
|
|
5
|
+
common:
|
|
6
|
+
airbrake_api_key: <%= ENV['AIRBRAKE_API_KEY'] %>
|
|
7
|
+
google_analytics_tracking_id: <%= ENV['GOOGLE_ANALYTICS_TRACKING_ID'] %>
|
|
8
|
+
|
|
9
|
+
# this is used for IPN notification and other places where external serivce cannot ping localhost
|
|
10
|
+
use_localhost2public_url: true
|
|
11
|
+
default_localhost2public_url: 4a5w.localtunnel.com
|
|
12
|
+
|
|
13
|
+
authorizedotnet:
|
|
14
|
+
login_id: <%= ENV['AUTHORIZE_NET_LOGIN_ID'] || '26Daqx7Jtw7R' %>
|
|
15
|
+
transaction_key: <%= ENV['AUTHORIZE_NET_TRANSACTION_KEY'] || '66JWf57KKc82W9y6' %>
|
|
16
|
+
|
|
17
|
+
s3:
|
|
18
|
+
access_key_id: <%= ENV['S3_ACCESS_KEY_ID'] %>
|
|
19
|
+
secret_access_key: <%= ENV['S3_SECRET_ACCESS_KEY'] %>
|
|
20
|
+
|
|
21
|
+
sendgrid:
|
|
22
|
+
username: <%= ENV['SENDGRID_USERNAME'] %>
|
|
23
|
+
password: <%= ENV['SENDGRID_PASSWORD'] %>
|
|
24
|
+
domain: <%= ENV['SENDGRID_DOMAIN'] %>
|
|
25
|
+
|
|
26
|
+
mailtrapio:
|
|
27
|
+
username: <%= ENV['MAILTRAPIO_USERNAME'] || 'nimbleshop' %>
|
|
28
|
+
password: <%= ENV['MAILTRAPIO_PASSWORD'] || '7663e1f272637a4b' %>
|
|
29
|
+
|
|
30
|
+
development:
|
|
31
|
+
use_s3: false
|
|
32
|
+
s3:
|
|
33
|
+
bucket_name: <%= ENV['S3_BUCKET_NAME'] %>
|
|
34
|
+
bare_url_with_port: localhost:3000
|
|
35
|
+
|
|
36
|
+
test:
|
|
37
|
+
use_s3: false
|
|
38
|
+
s3:
|
|
39
|
+
bucket_name: <%= ENV['S3_BUCKET_NAME'] %>
|
|
40
|
+
bare_url_with_port: localhost:3000
|
|
41
|
+
cookie_domain: nimbleshop.net
|
|
42
|
+
use_localhost2public_url: false
|
|
43
|
+
authorize_net:
|
|
44
|
+
login_id: 56yBAar72
|
|
45
|
+
transaction_key: 9r3pbH5bnKH29f7d
|
|
46
|
+
|
|
47
|
+
staging:
|
|
48
|
+
use_s3: true
|
|
49
|
+
s3:
|
|
50
|
+
bucket_name: <%= ENV['S3_BUCKET_NAME'] %>
|
|
51
|
+
bare_url_with_port: nimbleshop.net
|
|
52
|
+
deliver_email_for_real_in_staging: <%= ENV['DELIVER_EMAIL_FOR_REAL_IN_STAGING'] %>
|
|
53
|
+
cache_images: true
|
|
54
|
+
|
|
55
|
+
production:
|
|
56
|
+
use_s3: true
|
|
57
|
+
s3:
|
|
58
|
+
bucket_name: <%= ENV['S3_BUCKET_NAME'] %>
|
|
59
|
+
bare_url_with_port: nimbleshop.com
|
|
60
|
+
cache_images: true
|
|
61
|
+
use_localhost2public_url: false
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# SQLite version 3.x
|
|
2
|
+
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
|
3
|
+
development:
|
|
4
|
+
adapter: sqlite3
|
|
5
|
+
database: db/development.sqlite3
|
|
6
|
+
pool: 5
|
|
7
|
+
timeout: 5000
|
|
8
|
+
|
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
|
10
|
+
# re-generated from your development database when you run "rake".
|
|
11
|
+
# Do not set this db to the same as development or production.
|
|
12
|
+
test:
|
|
13
|
+
adapter: sqlite3
|
|
14
|
+
database: ":memory:"
|
|
15
|
+
|
|
16
|
+
production:
|
|
17
|
+
adapter: sqlite3
|
|
18
|
+
database: ":memory:"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
RailsApp::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
|
3
|
+
|
|
4
|
+
# In the development environment your application's code is reloaded on
|
|
5
|
+
# every request. This slows down response time but is perfect for development
|
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
|
7
|
+
config.cache_classes = false
|
|
8
|
+
|
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
|
10
|
+
config.whiny_nils = true
|
|
11
|
+
|
|
12
|
+
# Show full error reports and disable caching
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
config.action_controller.perform_caching = false
|
|
15
|
+
|
|
16
|
+
# Don't care if the mailer can't send
|
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
|
18
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
RailsApp::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
|
3
|
+
|
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
|
5
|
+
# Code is not reloaded between requests
|
|
6
|
+
config.cache_classes = true
|
|
7
|
+
|
|
8
|
+
# Full error reports are disabled and caching is turned on
|
|
9
|
+
config.consider_all_requests_local = false
|
|
10
|
+
config.action_controller.perform_caching = true
|
|
11
|
+
|
|
12
|
+
# See everything in the log (default is :info)
|
|
13
|
+
# config.log_level = :debug
|
|
14
|
+
|
|
15
|
+
# Use a different logger for distributed setups
|
|
16
|
+
# config.logger = SyslogLogger.new
|
|
17
|
+
|
|
18
|
+
# Use a different cache store in production
|
|
19
|
+
# config.cache_store = :mem_cache_store
|
|
20
|
+
|
|
21
|
+
# Disable Rails's static asset server
|
|
22
|
+
# In production, Apache or nginx will already do this
|
|
23
|
+
config.serve_static_assets = false
|
|
24
|
+
|
|
25
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
|
26
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
|
27
|
+
|
|
28
|
+
# Disable delivery errors, bad email addresses will be ignored
|
|
29
|
+
# config.action_mailer.raise_delivery_errors = false
|
|
30
|
+
|
|
31
|
+
# Enable threaded mode
|
|
32
|
+
# config.threadsafe!
|
|
33
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
RailsApp::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
|
3
|
+
|
|
4
|
+
# The test environment is used exclusively to run your application's
|
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
|
8
|
+
config.cache_classes = true
|
|
9
|
+
|
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
|
11
|
+
config.whiny_nils = true
|
|
12
|
+
|
|
13
|
+
# Show full error reports and disable caching
|
|
14
|
+
config.consider_all_requests_local = true
|
|
15
|
+
config.action_controller.perform_caching = false
|
|
16
|
+
|
|
17
|
+
# Disable request forgery protection in test environment
|
|
18
|
+
config.action_controller.allow_forgery_protection = false
|
|
19
|
+
|
|
20
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
|
21
|
+
# The :test delivery method accumulates sent emails in the
|
|
22
|
+
# ActionMailer::Base.deliveries array.
|
|
23
|
+
config.action_mailer.delivery_method = :test
|
|
24
|
+
|
|
25
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
|
26
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
|
27
|
+
# like if you have constraints or database-specific column types
|
|
28
|
+
# config.active_record.schema_format = :sql
|
|
29
|
+
|
|
30
|
+
config.action_dispatch.show_exceptions = false
|
|
31
|
+
|
|
32
|
+
config.active_support.deprecation = :stderr
|
|
33
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
|
5
|
+
|
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
|
7
|
+
Rails.backtrace_cleaner.remove_silencers!
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Rails.application.routes.draw do
|
|
2
|
+
|
|
3
|
+
mount NimbleshopSimply::Engine, :at => '/'
|
|
4
|
+
|
|
5
|
+
mount NimbleshopAuthorizedotnet::Engine, :at => '/nimbleshop_authorizedotnet'
|
|
6
|
+
mount NimbleshopPaypalwp::Engine, :at => '/nimbleshop_paypalwp'
|
|
7
|
+
mount NimbleshopSplitable::Engine, :at => '/nimbleshop_splitable'
|
|
8
|
+
mount NimbleshopCod::Engine, :at => '/nimbleshop_cod'
|
|
9
|
+
|
|
10
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
class CreateTables < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
create_table :users do |t|
|
|
4
|
+
t.string :username
|
|
5
|
+
t.string :facebook_token
|
|
6
|
+
|
|
7
|
+
## Database authenticatable
|
|
8
|
+
t.string :email, :null => false, :default => ""
|
|
9
|
+
t.string :encrypted_password, :null => false, :default => ""
|
|
10
|
+
|
|
11
|
+
## Recoverable
|
|
12
|
+
t.string :reset_password_token
|
|
13
|
+
t.datetime :reset_password_sent_at
|
|
14
|
+
|
|
15
|
+
## Rememberable
|
|
16
|
+
t.datetime :remember_created_at
|
|
17
|
+
|
|
18
|
+
## Trackable
|
|
19
|
+
t.integer :sign_in_count, :default => 0
|
|
20
|
+
t.datetime :current_sign_in_at
|
|
21
|
+
t.datetime :last_sign_in_at
|
|
22
|
+
t.string :current_sign_in_ip
|
|
23
|
+
t.string :last_sign_in_ip
|
|
24
|
+
|
|
25
|
+
## Confirmable
|
|
26
|
+
t.string :confirmation_token
|
|
27
|
+
t.datetime :confirmed_at
|
|
28
|
+
t.datetime :confirmation_sent_at
|
|
29
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
|
30
|
+
|
|
31
|
+
## Lockable
|
|
32
|
+
t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
|
33
|
+
t.string :unlock_token # Only if unlock strategy is :email or :both
|
|
34
|
+
t.datetime :locked_at
|
|
35
|
+
|
|
36
|
+
## Token authenticatable
|
|
37
|
+
t.string :authentication_token
|
|
38
|
+
|
|
39
|
+
t.timestamps
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
create_table :admins do |t|
|
|
43
|
+
## Database authenticatable
|
|
44
|
+
t.string :email, :null => true
|
|
45
|
+
t.string :encrypted_password, :null => true
|
|
46
|
+
|
|
47
|
+
## Recoverable
|
|
48
|
+
t.string :reset_password_token
|
|
49
|
+
t.datetime :reset_password_sent_at
|
|
50
|
+
|
|
51
|
+
## Rememberable
|
|
52
|
+
t.datetime :remember_created_at
|
|
53
|
+
|
|
54
|
+
## Confirmable
|
|
55
|
+
t.string :confirmation_token
|
|
56
|
+
t.datetime :confirmed_at
|
|
57
|
+
t.datetime :confirmation_sent_at
|
|
58
|
+
t.string :unconfirmed_email # Only if using reconfirmable
|
|
59
|
+
|
|
60
|
+
## Lockable
|
|
61
|
+
t.datetime :locked_at
|
|
62
|
+
|
|
63
|
+
## Attribute for testing route blocks
|
|
64
|
+
t.boolean :active, :default => false
|
|
65
|
+
|
|
66
|
+
t.timestamps
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def self.down
|
|
71
|
+
drop_table :users
|
|
72
|
+
drop_table :admins
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
4
|
+
#
|
|
5
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
6
|
+
# database schema. If you need to create the application database on another
|
|
7
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
8
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
9
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
10
|
+
#
|
|
11
|
+
# It's strongly recommended to check this file into your version control system.
|
|
12
|
+
|
|
13
|
+
ActiveRecord::Schema.define(:version => 20100401102949) do
|
|
14
|
+
|
|
15
|
+
create_table "admins", :force => true do |t|
|
|
16
|
+
t.string "email"
|
|
17
|
+
t.string "encrypted_password", :limit => 128
|
|
18
|
+
t.string "password_salt"
|
|
19
|
+
t.string "remember_token"
|
|
20
|
+
t.datetime "remember_created_at"
|
|
21
|
+
t.string "reset_password_token"
|
|
22
|
+
t.integer "failed_attempts", :default => 0
|
|
23
|
+
t.string "unlock_token"
|
|
24
|
+
t.datetime "locked_at"
|
|
25
|
+
t.datetime "created_at"
|
|
26
|
+
t.datetime "updated_at"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
create_table "users", :force => true do |t|
|
|
30
|
+
t.string "username"
|
|
31
|
+
t.string "facebook_token"
|
|
32
|
+
t.string "email", :default => "", :null => false
|
|
33
|
+
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
|
34
|
+
t.string "confirmation_token"
|
|
35
|
+
t.datetime "confirmed_at"
|
|
36
|
+
t.datetime "confirmation_sent_at"
|
|
37
|
+
t.string "reset_password_token"
|
|
38
|
+
t.datetime "remember_created_at"
|
|
39
|
+
t.integer "sign_in_count", :default => 0
|
|
40
|
+
t.datetime "current_sign_in_at"
|
|
41
|
+
t.datetime "last_sign_in_at"
|
|
42
|
+
t.string "current_sign_in_ip"
|
|
43
|
+
t.string "last_sign_in_ip"
|
|
44
|
+
t.integer "failed_attempts", :default => 0
|
|
45
|
+
t.string "unlock_token"
|
|
46
|
+
t.datetime "locked_at"
|
|
47
|
+
t.string "authentication_token"
|
|
48
|
+
t.datetime "created_at"
|
|
49
|
+
t.datetime "updated_at"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|