shoppy 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +34 -0
- data/app/.DS_Store +0 -0
- data/app/api/apihelpers/api_auth.rb +50 -0
- data/app/api/base.rb +7 -0
- data/app/api/v1/auth.rb +57 -0
- data/app/api/v1/test.rb +15 -0
- data/app/api/v1/users.rb +50 -0
- data/app/api/v1/v1_api.rb +15 -0
- data/app/api/vo/user_vo.rb +7 -0
- data/app/assets/fonts/.DS_Store +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/images/.DS_Store +0 -0
- data/app/assets/images/Sorting icons.psd +0 -0
- data/app/assets/images/back_disabled.png +0 -0
- data/app/assets/images/back_enabled.png +0 -0
- data/app/assets/images/back_enabled_hover.png +0 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/forward_disabled.png +0 -0
- data/app/assets/images/forward_enabled.png +0 -0
- data/app/assets/images/forward_enabled_hover.png +0 -0
- data/app/assets/images/shoppy.svg +34 -0
- data/app/assets/images/sort_asc.png +0 -0
- data/app/assets/images/sort_asc_disabled.png +0 -0
- data/app/assets/images/sort_both.png +0 -0
- data/app/assets/images/sort_desc.png +0 -0
- data/app/assets/images/sort_desc_disabled.png +0 -0
- data/app/assets/images/spritemap.png +0 -0
- data/app/assets/images/spritemap@2x.png +0 -0
- data/app/assets/javascripts/.DS_Store +0 -0
- data/app/assets/javascripts/bootstrap.js +2114 -0
- data/app/assets/javascripts/bootstrap.min.js +6 -0
- data/app/assets/javascripts/jasny-bootstrap.min.js +6 -0
- data/app/assets/javascripts/jquery.dataTables.min.js +155 -0
- data/app/assets/javascripts/main.js +29 -0
- data/app/assets/javascripts/shoppy.js +31 -0
- data/app/assets/stylesheets/.DS_Store +0 -0
- data/app/assets/stylesheets/bootstrap.css +6203 -0
- data/app/assets/stylesheets/jasny-bootstrap.css +621 -0
- data/app/assets/stylesheets/jquery.dataTables.min.css +1 -0
- data/app/assets/stylesheets/jquery.dataTables_themeroller.css +330 -0
- data/app/assets/stylesheets/shoppy.css +23 -0
- data/app/assets/stylesheets/style.sass +79 -0
- data/app/controllers/.DS_Store +0 -0
- data/app/controllers/shoppy/accounts_controller.rb +102 -0
- data/app/controllers/shoppy/application_controller.rb +23 -0
- data/app/controllers/shoppy/brands_controller.rb +60 -0
- data/app/controllers/shoppy/cart_controller.rb +46 -0
- data/app/controllers/shoppy/categories_controller.rb +72 -0
- data/app/controllers/shoppy/concerns/.keep +0 -0
- data/app/controllers/shoppy/customer_addresses_controller.rb +90 -0
- data/app/controllers/shoppy/home_controller.rb +9 -0
- data/app/controllers/shoppy/inventories_controller.rb +62 -0
- data/app/controllers/shoppy/locations_controller.rb +80 -0
- data/app/controllers/shoppy/logs_controller.rb +9 -0
- data/app/controllers/shoppy/manufacturers_controller.rb +77 -0
- data/app/controllers/shoppy/options_controller.rb +63 -0
- data/app/controllers/shoppy/orders_controller.rb +130 -0
- data/app/controllers/shoppy/products_controller.rb +98 -0
- data/app/controllers/shoppy/reviews_controller.rb +70 -0
- data/app/controllers/shoppy/sessions_controller.rb +5 -0
- data/app/controllers/shoppy/settings_controller.rb +26 -0
- data/app/controllers/shoppy/shipments_controller.rb +125 -0
- data/app/controllers/shoppy/variants_controller.rb +104 -0
- data/app/helpers/shoppy/accounts_helper.rb +5 -0
- data/app/helpers/shoppy/application_helper.rb +19 -0
- data/app/helpers/shoppy/brands_helper.rb +4 -0
- data/app/helpers/shoppy/cart_helper.rb +66 -0
- data/app/helpers/shoppy/categories_helper.rb +4 -0
- data/app/helpers/shoppy/customer_addresses_helper.rb +4 -0
- data/app/helpers/shoppy/home_helper.rb +5 -0
- data/app/helpers/shoppy/inventories_helper.rb +53 -0
- data/app/helpers/shoppy/locations_helper.rb +4 -0
- data/app/helpers/shoppy/logs_helper.rb +4 -0
- data/app/helpers/shoppy/manufacturers_helper.rb +4 -0
- data/app/helpers/shoppy/options_helper.rb +43 -0
- data/app/helpers/shoppy/orders_helper.rb +61 -0
- data/app/helpers/shoppy/products_helper.rb +65 -0
- data/app/helpers/shoppy/reviews_helper.rb +4 -0
- data/app/helpers/shoppy/settings_helper.rb +5 -0
- data/app/helpers/shoppy/shipments_helper.rb +43 -0
- data/app/helpers/shoppy/variants_helper.rb +4 -0
- data/app/models/shoppy/.DS_Store +0 -0
- data/app/models/shoppy/admin.rb +5 -0
- data/app/models/shoppy/brand.rb +23 -0
- data/app/models/shoppy/cart_item.rb +13 -0
- data/app/models/shoppy/category.rb +50 -0
- data/app/models/shoppy/concerns/.DS_Store +0 -0
- data/app/models/shoppy/concerns/models/api_token_authenticatable.rb +36 -0
- data/app/models/shoppy/concerns/models/hashable.rb +60 -0
- data/app/models/shoppy/concerns/models/optionable.rb +60 -0
- data/app/models/shoppy/concerns/models/promotional.rb +36 -0
- data/app/models/shoppy/concerns/models/taggable.rb +44 -0
- data/app/models/shoppy/customer.rb +10 -0
- data/app/models/shoppy/customer_address.rb +44 -0
- data/app/models/shoppy/inventory.rb +18 -0
- data/app/models/shoppy/log.rb +8 -0
- data/app/models/shoppy/manufacturer.rb +35 -0
- data/app/models/shoppy/options_group.rb +57 -0
- data/app/models/shoppy/options_item.rb +18 -0
- data/app/models/shoppy/order.rb +15 -0
- data/app/models/shoppy/order_line.rb +16 -0
- data/app/models/shoppy/payment_method.rb +19 -0
- data/app/models/shoppy/product.rb +43 -0
- data/app/models/shoppy/review.rb +12 -0
- data/app/models/shoppy/setting.rb +11 -0
- data/app/models/shoppy/shipment.rb +11 -0
- data/app/models/shoppy/stock_location.rb +47 -0
- data/app/models/shoppy/user.rb +37 -0
- data/app/models/shoppy/variant.rb +48 -0
- data/app/views/.DS_Store +0 -0
- data/app/views/accounts/admins.html.erb +104 -0
- data/app/views/accounts/customers.html.erb +106 -0
- data/app/views/accounts/show.html.erb +50 -0
- data/app/views/brands/index.html.erb +85 -0
- data/app/views/brands/show.html.erb +31 -0
- data/app/views/cart/index.html.erb +52 -0
- data/app/views/categories/index.html.erb +84 -0
- data/app/views/categories/show.html.erb +29 -0
- data/app/views/customer_addresses/index.html.erb +112 -0
- data/app/views/customer_addresses/show.html.erb +50 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +12 -0
- data/app/views/devise/registrations/edit.html.erb +29 -0
- data/app/views/devise/registrations/new.html.erb +23 -0
- data/app/views/devise/sessions/new.html.erb +33 -0
- data/app/views/devise/shared/_links.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/home/index.html.erb +4 -0
- data/app/views/inventories/.DS_Store +0 -0
- data/app/views/inventories/index.html.erb +119 -0
- data/app/views/layouts/.DS_Store +0 -0
- data/app/views/layouts/shoppy.html.erb +27 -0
- data/app/views/locations/index.html.erb +120 -0
- data/app/views/locations/show.html.erb +58 -0
- data/app/views/logs/index.html.erb +49 -0
- data/app/views/manufacturers/index.html.erb +119 -0
- data/app/views/manufacturers/show.html.erb +62 -0
- data/app/views/options/index.html.erb +90 -0
- data/app/views/options/show.html.erb +32 -0
- data/app/views/orders/index.html.erb +174 -0
- data/app/views/orders/show.html.erb +74 -0
- data/app/views/products/index.html.erb +102 -0
- data/app/views/products/show.html.erb +112 -0
- data/app/views/reviews/index.html.erb +58 -0
- data/app/views/reviews/show.html.erb +46 -0
- data/app/views/settings/show.html.erb +50 -0
- data/app/views/shared/_custom_file_input.html.erb +12 -0
- data/app/views/shared/_flashes.html.erb +21 -0
- data/app/views/shared/_navigation.html.erb +66 -0
- data/app/views/shipments/index.html.erb +97 -0
- data/app/views/shipments/show.html.erb +84 -0
- data/app/views/variants/index.html.erb +119 -0
- data/app/views/variants/show.html.erb +114 -0
- data/bin/shoppy +183 -0
- data/config/routes.rb +124 -0
- data/db/.DS_Store +0 -0
- data/db/migrate/001__setup_hstore.rb +9 -0
- data/db/migrate/002__create_logs.rb +11 -0
- data/db/migrate/003__devise_create_users.rb +49 -0
- data/db/migrate/004__add_personal_info_to_user.rb +8 -0
- data/db/migrate/005__create_user_addresses.rb +16 -0
- data/db/migrate/006__create_categories.rb +11 -0
- data/db/migrate/007__create_brands.rb +10 -0
- data/db/migrate/008__create_manufacturers.rb +19 -0
- data/db/migrate/009__create_options_groups.rb +10 -0
- data/db/migrate/010__create_options_items.rb +10 -0
- data/db/migrate/011__create_products.rb +14 -0
- data/db/migrate/012__create_product_options_joint_table.rb +9 -0
- data/db/migrate/013__create_stock_locations.rb +18 -0
- data/db/migrate/014__create_variants.rb +12 -0
- data/db/migrate/015__add_promotional_to_variant.rb +8 -0
- data/db/migrate/016__create_inventories.rb +12 -0
- data/db/migrate/017__create_payment_methods.rb +9 -0
- data/db/migrate/018__create_cart_items.rb +12 -0
- data/db/migrate/019__create_orders.rb +11 -0
- data/db/migrate/020__create_order_lines.rb +14 -0
- data/db/migrate/021__add_type_to_user.rb +5 -0
- data/db/migrate/022__rename_user_address_to_customer_address.rb +5 -0
- data/db/migrate/023__create_shipments.rb +12 -0
- data/db/migrate/024__add_shipment_id_to_order_line.rb +5 -0
- data/db/migrate/025__change_user_gender_to_not_nullable.rb +5 -0
- data/db/migrate/026__add_category_id_to_product.rb +5 -0
- data/db/migrate/027__add_attachment_brand_image_to_brands.rb +11 -0
- data/db/migrate/028__add_delivery_date_to_shipment.rb +5 -0
- data/db/migrate/029__add_customer_info_to_order.rb +13 -0
- data/db/migrate/030__add_status_to_order.rb +5 -0
- data/db/migrate/031__add_default_address_to_user.rb +5 -0
- data/db/migrate/032__add_options_to_variant.rb +5 -0
- data/db/migrate/033__add_display_to_options_groups.rb +5 -0
- data/db/migrate/034__add_points_to_variant.rb +5 -0
- data/db/migrate/035__add_points_to_user.rb +5 -0
- data/db/migrate/036__define_ids.rb +25 -0
- data/db/migrate/037__create_seed_users.rb +13 -0
- data/db/migrate/038__add_name_to_customer_address.rb +5 -0
- data/db/migrate/039__create_reviews.rb +14 -0
- data/db/migrate/040__alter_table_customer_address.rb +5 -0
- data/db/migrate/041__create_settings.rb +23 -0
- data/lib/.DS_Store +0 -0
- data/lib/shoppy.rb +13 -0
- data/lib/shoppy/client.rb +53 -0
- data/lib/shoppy/engine.rb +4 -0
- data/lib/shoppy/version.rb +3 -0
- data/lib/tasks/shoppy_tasks.rake +4 -0
- data/lib/template/.gitignore +20 -0
- data/lib/template/Gemfile +46 -0
- data/lib/template/Gemfile.lock +218 -0
- data/lib/template/Rakefile +6 -0
- data/lib/template/app/assets/images/.keep +0 -0
- data/lib/template/app/assets/javascripts/application.js +13 -0
- data/lib/template/app/assets/stylesheets/application.css +15 -0
- data/lib/template/app/controllers/accounts_controller.rb +3 -0
- data/lib/template/app/controllers/application_controller.rb +3 -0
- data/lib/template/app/controllers/brands_controller.rb +3 -0
- data/lib/template/app/controllers/cart_controller.rb +3 -0
- data/lib/template/app/controllers/categories_controller.rb +3 -0
- data/lib/template/app/controllers/concerns/.keep +0 -0
- data/lib/template/app/controllers/customer_addresses_controller.rb +3 -0
- data/lib/template/app/controllers/home_controller.rb +3 -0
- data/lib/template/app/controllers/inventories_controller.rb +3 -0
- data/lib/template/app/controllers/locations_controller.rb +3 -0
- data/lib/template/app/controllers/logs_controller.rb +3 -0
- data/lib/template/app/controllers/manufacturers_controller.rb +3 -0
- data/lib/template/app/controllers/options_controller.rb +3 -0
- data/lib/template/app/controllers/orders_controller.rb +3 -0
- data/lib/template/app/controllers/products_controller.rb +3 -0
- data/lib/template/app/controllers/reviews_controller.rb +3 -0
- data/lib/template/app/controllers/sessions_controller.rb +3 -0
- data/lib/template/app/controllers/settings_controller.rb +3 -0
- data/lib/template/app/controllers/shipments_controller.rb +3 -0
- data/lib/template/app/controllers/variants_controller.rb +3 -0
- data/lib/template/app/helpers/.keep +0 -0
- data/lib/template/app/helpers/orders_helper.rb +4 -0
- data/lib/template/app/mailers/.keep +0 -0
- data/lib/template/app/models/.keep +0 -0
- data/lib/template/app/models/account.rb +4 -0
- data/lib/template/app/models/admin.rb +4 -0
- data/lib/template/app/models/brand.rb +3 -0
- data/lib/template/app/models/cart_item.rb +3 -0
- data/lib/template/app/models/category.rb +3 -0
- data/lib/template/app/models/concerns/.keep +0 -0
- data/lib/template/app/models/concerns/hashable.rb +4 -0
- data/lib/template/app/models/customer.rb +4 -0
- data/lib/template/app/models/customer_address.rb +3 -0
- data/lib/template/app/models/inventory.rb +3 -0
- data/lib/template/app/models/log.rb +3 -0
- data/lib/template/app/models/manufacturer.rb +3 -0
- data/lib/template/app/models/option_item.rb +3 -0
- data/lib/template/app/models/options_group.rb +3 -0
- data/lib/template/app/models/order.rb +3 -0
- data/lib/template/app/models/order_line.rb +3 -0
- data/lib/template/app/models/payment_method.rb +3 -0
- data/lib/template/app/models/product.rb +3 -0
- data/lib/template/app/models/review.rb +3 -0
- data/lib/template/app/models/setting.rb +3 -0
- data/lib/template/app/models/shipment.rb +3 -0
- data/lib/template/app/models/stock_location.rb +3 -0
- data/lib/template/app/models/variant.rb +3 -0
- data/lib/template/app/views/layouts/.keep +0 -0
- data/lib/template/bin/bundle +3 -0
- data/lib/template/bin/rails +8 -0
- data/lib/template/bin/rake +8 -0
- data/lib/template/bin/spring +18 -0
- data/lib/template/config.ru +4 -0
- data/lib/template/config/application.rb +23 -0
- data/lib/template/config/boot.rb +4 -0
- data/lib/template/config/database.yml +86 -0
- data/lib/template/config/environment.rb +5 -0
- data/lib/template/config/environments/development.rb +37 -0
- data/lib/template/config/environments/production.rb +78 -0
- data/lib/template/config/environments/test.rb +39 -0
- data/lib/template/config/initializers/assets.rb +8 -0
- data/lib/template/config/initializers/backtrace_silencers.rb +7 -0
- data/lib/template/config/initializers/cookies_serializer.rb +3 -0
- data/lib/template/config/initializers/devise.rb +256 -0
- data/lib/template/config/initializers/filter_parameter_logging.rb +4 -0
- data/lib/template/config/initializers/inflections.rb +16 -0
- data/lib/template/config/initializers/mime_types.rb +4 -0
- data/lib/template/config/initializers/session_store.rb +3 -0
- data/lib/template/config/initializers/wrap_parameters.rb +14 -0
- data/lib/template/config/locales/devise.en.yml +59 -0
- data/lib/template/config/locales/en.yml +23 -0
- data/lib/template/config/routes.rb +3 -0
- data/lib/template/config/secrets.yml +22 -0
- data/lib/template/db/migrate/.keep +0 -0
- data/lib/template/db/seeds.rb +7 -0
- data/lib/template/lib/assets/.keep +0 -0
- data/lib/template/lib/tasks/.keep +0 -0
- data/lib/template/log/.keep +0 -0
- data/lib/template/public/404.html +67 -0
- data/lib/template/public/422.html +67 -0
- data/lib/template/public/500.html +66 -0
- data/lib/template/public/favicon.ico +0 -0
- data/lib/template/public/robots.txt +5 -0
- data/lib/template/test/controllers/.keep +0 -0
- data/lib/template/test/fixtures/.keep +0 -0
- data/lib/template/test/helpers/.keep +0 -0
- data/lib/template/test/integration/.keep +0 -0
- data/lib/template/test/mailers/.keep +0 -0
- data/lib/template/test/models/.keep +0 -0
- data/lib/template/test/test_helper.rb +10 -0
- data/lib/template/vendor/assets/javascripts/.keep +0 -0
- data/lib/template/vendor/assets/stylesheets/.keep +0 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/shoppy/Users/alybadawy/exp/shoppy/lib/template/Gemfile.lock +217 -0
- data/test/shoppy/Users/alybadawy/exp/shoppy/lib/template/README.rdoc +28 -0
- data/test/shoppy/Users/alybadawy/exp/shoppy/lib/template/config.ru +4 -0
- data/test/shoppy_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +495 -0
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast
|
4
|
+
# It gets overwritten when you run the `spring binstub` command
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require "rubygems"
|
8
|
+
require "bundler"
|
9
|
+
|
10
|
+
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
|
11
|
+
ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
|
12
|
+
ENV["GEM_HOME"] = ""
|
13
|
+
Gem.paths = ENV
|
14
|
+
|
15
|
+
gem "spring", match[1]
|
16
|
+
require "spring/binstub"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(*Rails.groups)
|
8
|
+
|
9
|
+
module Unicorn
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
+
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
+
# config.i18n.default_locale = :de
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# PostgreSQL. Versions 8.2 and up are supported.
|
2
|
+
#
|
3
|
+
# Install the pg driver:
|
4
|
+
# gem install pg
|
5
|
+
# On OS X with Homebrew:
|
6
|
+
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
|
7
|
+
# On OS X with MacPorts:
|
8
|
+
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
|
9
|
+
# On Windows:
|
10
|
+
# gem install pg
|
11
|
+
# Choose the win32 build.
|
12
|
+
# Install PostgreSQL and put its /bin directory on your path.
|
13
|
+
#
|
14
|
+
# Configure Using Gemfile
|
15
|
+
# gem 'pg'
|
16
|
+
#
|
17
|
+
default: &default
|
18
|
+
adapter: postgresql
|
19
|
+
encoding: unicode
|
20
|
+
# For details on connection pooling, see rails configuration guide
|
21
|
+
# http://guides.rubyonrails.org/configuring.html#database-pooling
|
22
|
+
pool: 5
|
23
|
+
|
24
|
+
development:
|
25
|
+
<<: *default
|
26
|
+
database: shoppy_development
|
27
|
+
|
28
|
+
# The specified database role being used to connect to postgres.
|
29
|
+
# To create additional roles in postgres see `$ createuser --help`.
|
30
|
+
# When left blank, postgres will use the default role. This is
|
31
|
+
# the same name as the operating system user that initialized the database.
|
32
|
+
#username: dokana
|
33
|
+
|
34
|
+
# The password associated with the postgres role (username).
|
35
|
+
#password:
|
36
|
+
|
37
|
+
# Connect on a TCP socket. Omitted by default since the client uses a
|
38
|
+
# domain socket that doesn't need configuration. Windows does not have
|
39
|
+
# domain sockets, so uncomment these lines.
|
40
|
+
#host: localhost
|
41
|
+
|
42
|
+
# The TCP port the server listens on. Defaults to 5432.
|
43
|
+
# If your server runs on a different port number, change accordingly.
|
44
|
+
#port: 5432
|
45
|
+
|
46
|
+
# Schema search path. The server defaults to $user,public
|
47
|
+
#schema_search_path: myapp,sharedapp,public
|
48
|
+
|
49
|
+
# Minimum log levels, in increasing order:
|
50
|
+
# debug5, debug4, debug3, debug2, debug1,
|
51
|
+
# log, notice, warning, error, fatal, and panic
|
52
|
+
# Defaults to warning.
|
53
|
+
#min_messages: notice
|
54
|
+
|
55
|
+
# Warning: The database defined as "test" will be erased and
|
56
|
+
# re-generated from your development database when you run "rake".
|
57
|
+
# Do not set this db to the same as development or production.
|
58
|
+
test:
|
59
|
+
<<: *default
|
60
|
+
database: shoppy_test
|
61
|
+
|
62
|
+
# As with config/secrets.yml, you never want to store sensitive information,
|
63
|
+
# like your database password, in your source code. If your source code is
|
64
|
+
# ever seen by anyone, they now have access to your database.
|
65
|
+
#
|
66
|
+
# Instead, provide the password as a unix environment variable when you boot
|
67
|
+
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
|
68
|
+
# for a full rundown on how to provide these environment variables in a
|
69
|
+
# production deployment.
|
70
|
+
#
|
71
|
+
# On Heroku and other platform providers, you may have a full connection URL
|
72
|
+
# available as an environment variable. For example:
|
73
|
+
#
|
74
|
+
# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
|
75
|
+
#
|
76
|
+
# You can use this database configuration with:
|
77
|
+
#
|
78
|
+
# production:
|
79
|
+
# url: <%= ENV['DATABASE_URL'] %>
|
80
|
+
#
|
81
|
+
production:
|
82
|
+
<<: *default
|
83
|
+
database: shoppy_production
|
84
|
+
username: shoppy
|
85
|
+
password: <%= ENV['SHOPPY_DATABASE_PASSWORD'] %>
|
86
|
+
host: localhost
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.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 web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
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
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Adds additional error checking when serving assets at runtime.
|
31
|
+
# Checks for improperly declared sprockets dependencies.
|
32
|
+
# Raises helpful error messages.
|
33
|
+
config.assets.raise_runtime_errors = true
|
34
|
+
|
35
|
+
# Raises error for missing translations
|
36
|
+
# config.action_view.raise_on_missing_translations = true
|
37
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_assets = false
|
24
|
+
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
28
|
+
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
36
|
+
|
37
|
+
# Specifies the header that your server uses for sending files.
|
38
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
39
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
40
|
+
|
41
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
42
|
+
# config.force_ssl = true
|
43
|
+
|
44
|
+
# Set to :debug to see everything in the log.
|
45
|
+
config.log_level = :info
|
46
|
+
|
47
|
+
# Prepend all log lines with the following tags.
|
48
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
49
|
+
|
50
|
+
# Use a different logger for distributed setups.
|
51
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
52
|
+
|
53
|
+
# Use a different cache store in production.
|
54
|
+
# config.cache_store = :mem_cache_store
|
55
|
+
|
56
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
57
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
58
|
+
|
59
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
60
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
61
|
+
# config.action_mailer.raise_delivery_errors = false
|
62
|
+
|
63
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
64
|
+
# the I18n.default_locale when a translation cannot be found).
|
65
|
+
config.i18n.fallbacks = true
|
66
|
+
|
67
|
+
# Send deprecation notices to registered listeners.
|
68
|
+
config.active_support.deprecation = :notify
|
69
|
+
|
70
|
+
# Disable automatic flushing of the log to improve performance.
|
71
|
+
# config.autoflush_log = false
|
72
|
+
|
73
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
74
|
+
config.log_formatter = ::Logger::Formatter.new
|
75
|
+
|
76
|
+
# Do not dump schema after migrations.
|
77
|
+
config.active_record.dump_schema_after_migration = false
|
78
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.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
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Raises error for missing translations
|
38
|
+
# config.action_view.raise_on_missing_translations = true
|
39
|
+
end
|