spree_pag_seguro 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/app/models/spree/pag_seguro_payment.rb +1 -0
- data/lib/spree_pag_seguro/engine.rb +1 -7
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/admin/all.js +10 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/javascripts/store/all.js +10 -0
- data/spec/dummy/app/assets/stylesheets/admin/all.css +11 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/assets/stylesheets/store/all.css +11 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +60 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/database.yml +18 -0
- data/spec/dummy/config/environment.rb +7 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/spree.rb +12 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/spree.yml +2 -0
- data/spec/dummy/db/dummy_test +0 -0
- data/spec/dummy/db/migrate/20120301154050_spree_zero_nine_zero.rb +389 -0
- data/spec/dummy/db/migrate/20120301154051_create_indexes_for_inventory_units.rb +6 -0
- data/spec/dummy/db/migrate/20120301154052_add_count_on_hand_to_variants_and_products.rb +49 -0
- data/spec/dummy/db/migrate/20120301154053_change_taxons_to_nested_set.rb +46 -0
- data/spec/dummy/db/migrate/20120301154054_move_to_configurable_gateways.rb +54 -0
- data/spec/dummy/db/migrate/20120301154055_product_groups_and_scopes.rb +18 -0
- data/spec/dummy/db/migrate/20120301154056_add_open_id_authentication_tables.rb +15 -0
- data/spec/dummy/db/migrate/20120301154057_add_openid_field_to_users.rb +24 -0
- data/spec/dummy/db/migrate/20120301154058_change_preference_value_type.rb +10 -0
- data/spec/dummy/db/migrate/20120301154059_create_billing_integrations.rb +12 -0
- data/spec/dummy/db/migrate/20120301154060_charge_refactoring.rb +39 -0
- data/spec/dummy/db/migrate/20120301154061_add_some_indexes.rb +11 -0
- data/spec/dummy/db/migrate/20120301154062_checkout_state_machine.rb +5 -0
- data/spec/dummy/db/migrate/20120301154063_state_for_shipments.rb +5 -0
- data/spec/dummy/db/migrate/20120301154064_make_state_events_polymorphic.rb +12 -0
- data/spec/dummy/db/migrate/20120301154065_ship_address_id_for_checkouts.rb +5 -0
- data/spec/dummy/db/migrate/20120301154066_shipping_method_id_for_checkouts.rb +5 -0
- data/spec/dummy/db/migrate/20120301154067_creditcard_last_four_digits.rb +14 -0
- data/spec/dummy/db/migrate/20120301154068_populate_legacy_shipment_state.rb +15 -0
- data/spec/dummy/db/migrate/20120301154069_add_cost_price.rb +5 -0
- data/spec/dummy/db/migrate/20120301154070_shipment_id_for_inventory_units.rb +25 -0
- data/spec/dummy/db/migrate/20120301154071_cim_fields_for_creditcards.rb +6 -0
- data/spec/dummy/db/migrate/20120301154072_create_return_authorizations.rb +12 -0
- data/spec/dummy/db/migrate/20120301154073_add_return_authorization_to_inventory_units.rb +5 -0
- data/spec/dummy/db/migrate/20120301154074_create_trackers.rb +10 -0
- data/spec/dummy/db/migrate/20120301154075_creditcard_id_for_creditcard_txns.rb +5 -0
- data/spec/dummy/db/migrate/20120301154076_original_creditcard_txn_id_for_creditcard_txns.rb +5 -0
- data/spec/dummy/db/migrate/20120301154077_add_test_mode_to_billing_integration.rb +6 -0
- data/spec/dummy/db/migrate/20120301154078_create_products_product_groups.rb +8 -0
- data/spec/dummy/db/migrate/20120301154079_create_payment_methods.rb +16 -0
- data/spec/dummy/db/migrate/20120301154080_polymorphic_payments.rb +42 -0
- data/spec/dummy/db/migrate/20120301154081_change_payments_payment_method_to_belongs_to.rb +11 -0
- data/spec/dummy/db/migrate/20120301154082_assign_creditcard_txns_to_payment.rb +23 -0
- data/spec/dummy/db/migrate/20120301154083_sti_for_transactions.rb +15 -0
- data/spec/dummy/db/migrate/20120301154084_drop_billing_integrations.rb +16 -0
- data/spec/dummy/db/migrate/20120301154085_deleted_at_for_payment_methods.rb +14 -0
- data/spec/dummy/db/migrate/20120301154086_add_adjustments_index.rb +6 -0
- data/spec/dummy/db/migrate/20120301154087_fix_by_popularity.rb +9 -0
- data/spec/dummy/db/migrate/20120301154088_add_alt_text_to_images.rb +5 -0
- data/spec/dummy/db/migrate/20120301154089_fix_existing_coupon_credits.rb +13 -0
- data/spec/dummy/db/migrate/20120301154090_add_display_to_payment_methods.rb +5 -0
- data/spec/dummy/db/migrate/20120301154091_add_addresses_checkouts_indexes.rb +8 -0
- data/spec/dummy/db/migrate/20120301154092_add_icon_to_taxons.rb +17 -0
- data/spec/dummy/db/migrate/20120301154093_add_description_to_taxons.rb +11 -0
- data/spec/dummy/db/migrate/20120301154094_index_for_shipments_number.rb +5 -0
- data/spec/dummy/db/migrate/20120301154095_add_index_on_users_persistence_token.rb +5 -0
- data/spec/dummy/db/migrate/20120301154096_add_default_to_tax_categories.rb +5 -0
- data/spec/dummy/db/migrate/20120301154097_add_display_to_shipping_methods.rb +5 -0
- data/spec/dummy/db/migrate/20120301154098_rename_payment_method_display.rb +5 -0
- data/spec/dummy/db/migrate/20120301154099_rename_preferences_field.rb +5 -0
- data/spec/dummy/db/migrate/20120301154100_add_guest_flag.rb +5 -0
- data/spec/dummy/db/migrate/20120301154101_drop_order_token.rb +9 -0
- data/spec/dummy/db/migrate/20120301154102_payments_state_and_assigned_to_order_only.rb +14 -0
- data/spec/dummy/db/migrate/20120301154103_create_address_keys_for_order.rb +6 -0
- data/spec/dummy/db/migrate/20120301154104_payment_total_for_orders.rb +5 -0
- data/spec/dummy/db/migrate/20120301154105_shipping_method_id_for_orders.rb +5 -0
- data/spec/dummy/db/migrate/20120301154106_add_shipment_and_payment_state.rb +6 -0
- data/spec/dummy/db/migrate/20120301154107_refactor_adjustments.rb +29 -0
- data/spec/dummy/db/migrate/20120301154108_response_code_and_avs_response_for_payments.rb +6 -0
- data/spec/dummy/db/migrate/20120301154109_change_guest_flag_to_anonymous.rb +5 -0
- data/spec/dummy/db/migrate/20120301154110_email_for_orders.rb +5 -0
- data/spec/dummy/db/migrate/20120301154111_create_mail_methods.rb +10 -0
- data/spec/dummy/db/migrate/20120301154112_rename_frozen_to_locked.rb +5 -0
- data/spec/dummy/db/migrate/20120301154113_move_special_instructions_to_orders.rb +10 -0
- data/spec/dummy/db/migrate/20120301154114_create_log_entries.rb +11 -0
- data/spec/dummy/db/migrate/20120301154115_migrate_transactions_to_payment_state.rb +98 -0
- data/spec/dummy/db/migrate/20120301154116_delete_in_progress_orders.rb +19 -0
- data/spec/dummy/db/migrate/20120301154117_migrate_checkout_to_orders.rb +23 -0
- data/spec/dummy/db/migrate/20120301154118_remove_shipped_state.rb +12 -0
- data/spec/dummy/db/migrate/20120301154119_prevent_nil_payment_total.rb +8 -0
- data/spec/dummy/db/migrate/20120301154120_prevent_nil_email.rb +9 -0
- data/spec/dummy/db/migrate/20120301154121_generate_anonymous_users.rb +20 -0
- data/spec/dummy/db/migrate/20120301154122_update_order_state.rb +12 -0
- data/spec/dummy/db/migrate/20120301154123_cleanup_legacy_tables.rb +11 -0
- data/spec/dummy/db/migrate/20120301154124_remove_number_and_cvv_from_credicard.rb +11 -0
- data/spec/dummy/db/migrate/20120301154125_drop_anonymous_field_for_user.rb +9 -0
- data/spec/dummy/db/migrate/20120301154126_renamed_rma_cancelled_state.rb +9 -0
- data/spec/dummy/db/migrate/20120301154127_fix_problematic_index_names.rb +13 -0
- data/spec/dummy/db/migrate/20120301154128_add_position_to_variants.rb +5 -0
- data/spec/dummy/db/migrate/20120301154129_add_next_state_to_state_events.rb +5 -0
- data/spec/dummy/db/migrate/20120301154130_add_position_to_option_types.rb +5 -0
- data/spec/dummy/db/migrate/20120301154131_remove_trailing_slashes_in_taxon_permalinks.rb +19 -0
- data/spec/dummy/db/migrate/20120301154132_create_activators.rb +14 -0
- data/spec/dummy/db/migrate/20120301154133_eligible_for_adjustments.rb +5 -0
- data/spec/dummy/db/migrate/20120301154134_namespace_top_level_models.rb +52 -0
- data/spec/dummy/db/migrate/20120301154135_migrate_namespaced_polymorphic_models.rb +52 -0
- data/spec/dummy/db/migrate/20120301154136_make_adjustments_polymorphic.rb +9 -0
- data/spec/dummy/db/migrate/20120301154137_add_company_to_addresses.rb +5 -0
- data/spec/dummy/db/migrate/20120301154138_add_inc_tax_to_tax_rates.rb +5 -0
- data/spec/dummy/db/migrate/20120301154139_rename_inc_price_attribute.rb +5 -0
- data/spec/dummy/db/migrate/20120301154140_add_default_tax_zone.rb +5 -0
- data/spec/dummy/db/migrate/20120301154141_associate_shipping_methods_and_shipping_categories.rb +7 -0
- data/spec/dummy/db/migrate/20120301154142_add_match_rules_to_shipping_methods.rb +7 -0
- data/spec/dummy/db/migrate/20120301154143_new_preferences.rb +48 -0
- data/spec/dummy/db/migrate/20120301154144_add_deleted_at_to_tax_category.rb +5 -0
- data/spec/dummy/db/migrate/20120301154145_create_spree_payment_notifications.rb +12 -0
- data/spec/dummy/db/migrate/20120301154146_create_spree_pag_seguro_payments.rb +8 -0
- data/spec/dummy/db/schema.rb +569 -0
- data/spec/dummy/db/seeds.rb +11 -0
- data/spec/dummy/log/test.log +1073 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/dummy/script/rails +6 -0
- metadata +151 -16
data/README.md
CHANGED
@@ -12,6 +12,7 @@ module Spree
|
|
12
12
|
Order.pag_seguro_payment_method.preferred_email,
|
13
13
|
Order.pag_seguro_payment_method.preferred_token,
|
14
14
|
redirect_url: redirect_url,
|
15
|
+
extra_amount: payment.order.shipment.amount,
|
15
16
|
id: order.id)
|
16
17
|
|
17
18
|
pag_seguro_payment.items = order.line_items.map do |item|
|
@@ -3,13 +3,7 @@ module Spree
|
|
3
3
|
class Engine < Rails::Engine
|
4
4
|
engine_name 'spree_pag_seguro'
|
5
5
|
|
6
|
-
initializer "spree.
|
7
|
-
Dir.glob(File.join(File.dirname(__FILE__), "../../lib/spree_pag_seguro_configuration.rb")) do |c|
|
8
|
-
Rails.configuration.cache_classes ? require(c) : load(c)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
initializer "spree.resgiter.pag_seguro_method", after: "spree.register.payment_methods" do |app|
|
6
|
+
initializer "spree.register.pag_seguro_method", after: "spree.register.payment_methods" do |app|
|
13
7
|
app.config.spree.payment_methods << Spree::PaymentMethod::PagSeguroMethod
|
14
8
|
end
|
15
9
|
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
|
8
|
+
//= require admin/spree_pag_seguro
|
9
|
+
|
10
|
+
//= require_tree .
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require_tree .
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
|
8
|
+
//= require store/spree_pag_seguro
|
9
|
+
|
10
|
+
//= require_tree .
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*
|
6
|
+
|
7
|
+
*= require admin/spree_pag_seguro
|
8
|
+
|
9
|
+
*= require_self
|
10
|
+
*= require_tree .
|
11
|
+
*/
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree .
|
7
|
+
*/
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*
|
6
|
+
|
7
|
+
*= require store/spree_pag_seguro
|
8
|
+
|
9
|
+
*= require_self
|
10
|
+
*= require_tree .
|
11
|
+
*/
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
|
7
|
+
require 'spree_pag_seguro'
|
8
|
+
|
9
|
+
module Dummy
|
10
|
+
class Application < Rails::Application
|
11
|
+
|
12
|
+
config.to_prepare do
|
13
|
+
# Load application's model / class decorators
|
14
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
|
15
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Load application's view overrides
|
19
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c|
|
20
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Settings in config/environments/* take precedence over those specified here.
|
25
|
+
# Application configuration should go into files in config/initializers
|
26
|
+
# -- all .rb files in that directory are automatically loaded.
|
27
|
+
|
28
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
29
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
30
|
+
|
31
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
32
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
33
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
34
|
+
|
35
|
+
# Activate observers that should always be running.
|
36
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
37
|
+
|
38
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
39
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
40
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
41
|
+
|
42
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
43
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
44
|
+
# config.i18n.default_locale = :de
|
45
|
+
|
46
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
47
|
+
config.encoding = "utf-8"
|
48
|
+
|
49
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
50
|
+
config.filter_parameters += [:password]
|
51
|
+
|
52
|
+
# Enable the asset pipeline
|
53
|
+
config.assets.enabled = true
|
54
|
+
|
55
|
+
# Version of your assets, change this if you want to expire all your assets
|
56
|
+
config.assets.version = '1.0'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
Dummy::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
|
+
# 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
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
|
28
|
+
# Expands the lines which load the assets
|
29
|
+
config.assets.debug = true
|
30
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
Dummy::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
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to Rails.root.join("public/assets")
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Use a different logger for distributed setups
|
37
|
+
# config.logger = SyslogLogger.new
|
38
|
+
|
39
|
+
# Use a different cache store in production
|
40
|
+
# config.cache_store = :mem_cache_store
|
41
|
+
|
42
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
43
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
44
|
+
|
45
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
46
|
+
# config.assets.precompile += %w( search.js )
|
47
|
+
|
48
|
+
# Disable delivery errors, bad email addresses will be ignored
|
49
|
+
# config.action_mailer.raise_delivery_errors = false
|
50
|
+
|
51
|
+
# Enable threaded mode
|
52
|
+
# config.threadsafe!
|
53
|
+
|
54
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
55
|
+
# the I18n.default_locale when a translation can not be found)
|
56
|
+
config.i18n.fallbacks = true
|
57
|
+
|
58
|
+
# Send deprecation notices to registered listeners
|
59
|
+
config.active_support.deprecation = :notify
|
60
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Dummy::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
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
33
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
34
|
+
# like if you have constraints or database-specific column types
|
35
|
+
# config.active_record.schema_format = :sql
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
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
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'b7f74fed6d833099e0e106e4a0a1a6840d6025d5542451fe0b38cc3cbc84a249b9279fae26b76c5413d1f69099d03a94a83b2690b2095291102ab14044b46c7f'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Configure Spree Preferences
|
2
|
+
#
|
3
|
+
# Note: Initializing preferences available within the Admin will overwrite any changes that were made through the user interface when you restart.
|
4
|
+
# If you would like users to be able to update a setting with the Admin it should NOT be set here.
|
5
|
+
#
|
6
|
+
# In order to initialize a setting do:
|
7
|
+
# config.setting_name = 'new value'
|
8
|
+
Spree.config do |config|
|
9
|
+
# Example:
|
10
|
+
# Uncomment to override the default site name.
|
11
|
+
# config.site_name = "Spree Demo Site"
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters :format => [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|