payola-payments 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +200 -0
  3. data/LICENSE +6 -0
  4. data/README.md +80 -0
  5. data/Rakefile +5 -4
  6. data/app/assets/javascripts/payola/application.js +3 -3
  7. data/app/assets/javascripts/payola/checkout_button.js +29 -19
  8. data/app/assets/javascripts/payola/subscription_checkout_button.js +7 -1
  9. data/app/assets/javascripts/payola/subscription_form_onestep.js +27 -0
  10. data/app/assets/stylesheets/payola/application.css +4 -4
  11. data/app/controllers/concerns/payola/affiliate_behavior.rb +1 -1
  12. data/app/controllers/concerns/payola/status_behavior.rb +1 -1
  13. data/app/controllers/payola/application_controller.rb +8 -0
  14. data/app/controllers/payola/cards_controller.rb +14 -14
  15. data/app/controllers/payola/customers_controller.rb +11 -12
  16. data/app/controllers/payola/subscriptions_controller.rb +16 -8
  17. data/app/controllers/payola/transactions_controller.rb +1 -1
  18. data/app/models/concerns/payola/plan.rb +2 -1
  19. data/app/models/payola/subscription.rb +5 -0
  20. data/app/services/payola/cancel_subscription.rb +6 -5
  21. data/app/services/payola/change_subscription_plan.rb +3 -1
  22. data/app/services/payola/change_subscription_quantity.rb +1 -1
  23. data/app/services/payola/create_sale.rb +12 -2
  24. data/app/services/payola/create_subscription.rb +1 -1
  25. data/app/services/payola/start_subscription.rb +9 -1
  26. data/app/services/payola/update_customer.rb +1 -1
  27. data/app/views/payola/subscriptions/_change_plan.html.erb +2 -0
  28. data/app/views/payola/subscriptions/_checkout.html.erb +1 -1
  29. data/app/views/payola/transactions/_checkout.html.erb +4 -2
  30. data/config/locales/en.yml +17 -0
  31. data/db/migrate/20151205004838_change_tax_percent_format_in_payola_subscriptions.rb +9 -0
  32. data/lib/payola.rb +6 -0
  33. data/lib/payola/version.rb +1 -1
  34. data/spec/concerns/plan_spec.rb +16 -4
  35. data/spec/controllers/payola/cards_controller_spec.rb +92 -8
  36. data/spec/controllers/payola/customers_controller_spec.rb +47 -4
  37. data/spec/controllers/payola/subscriptions_controller_spec.rb +59 -46
  38. data/spec/controllers/payola/transactions_controller_spec.rb +33 -30
  39. data/spec/dummy/Rakefile +1 -1
  40. data/spec/dummy/app/assets/javascripts/application.js +3 -3
  41. data/spec/dummy/app/assets/stylesheets/application.css +4 -4
  42. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  43. data/spec/dummy/app/views/layouts/application.html.erb +27 -11
  44. data/spec/dummy/bin/rails +1 -1
  45. data/spec/dummy/config.ru +2 -1
  46. data/spec/dummy/config/application.rb +1 -2
  47. data/spec/dummy/config/boot.rb +2 -2
  48. data/spec/dummy/config/environment.rb +1 -1
  49. data/spec/dummy/config/environments/development.rb +1 -37
  50. data/spec/dummy/config/environments/production.rb +1 -82
  51. data/spec/dummy/config/environments/rails_4/development.rb +37 -0
  52. data/spec/dummy/config/environments/rails_4/production.rb +82 -0
  53. data/spec/dummy/config/environments/rails_4/test.rb +45 -0
  54. data/spec/dummy/config/environments/rails_5/development.rb +54 -0
  55. data/spec/dummy/config/environments/rails_5/production.rb +86 -0
  56. data/spec/dummy/config/environments/rails_5/test.rb +44 -0
  57. data/spec/dummy/config/environments/test.rb +1 -45
  58. data/spec/dummy/config/initializers/assets.rb +3 -0
  59. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -1
  60. data/spec/dummy/config/initializers/new_framework_defaults.rb +26 -0
  61. data/spec/dummy/config/secrets.yml +1 -1
  62. data/spec/dummy/config/spring.rb +8 -0
  63. data/spec/dummy/db/schema.rb +9 -12
  64. data/spec/dummy/db/test.sqlite3 +0 -0
  65. data/spec/dummy/log/test.log +134732 -0
  66. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  67. data/spec/dummy/public/apple-touch-icon.png +0 -0
  68. data/spec/models/payola/env_wrapper_spec.rb +13 -0
  69. data/spec/models/payola/sale_spec.rb +7 -7
  70. data/spec/models/payola/subscription_spec.rb +8 -3
  71. data/spec/payola_spec.rb +8 -8
  72. data/spec/services/payola/cancel_subscription_spec.rb +20 -4
  73. data/spec/services/payola/change_subscription_plan_spec.rb +2 -1
  74. data/spec/services/payola/change_subscription_quantity_spec.rb +23 -7
  75. data/spec/services/payola/charge_card_spec.rb +30 -25
  76. data/spec/services/payola/invoice_failed_spec.rb +1 -0
  77. data/spec/services/payola/invoice_paid_spec.rb +1 -0
  78. data/spec/services/payola/start_subscription_spec.rb +15 -0
  79. data/spec/spec_helper.rb +4 -2
  80. data/spec/support/http_methods_with_keyword_args.rb +21 -0
  81. data/spec/support/params_helper.rb +9 -0
  82. data/spec/worker_spec.rb +2 -2
  83. metadata +41 -13
  84. data/config/database.yml.ci +0 -6
@@ -13,25 +13,27 @@ module Payola
13
13
  it "should pass args to CreateSale and queue the job" do
14
14
  sale = double
15
15
  errors = double
16
- errors.should_receive(:full_messages).and_return([])
17
- sale.should_receive(:state).and_return('pending')
18
- sale.should_receive(:error).and_return(nil)
19
- sale.should_receive(:errors).and_return(errors)
20
- sale.should_receive(:save).and_return(true)
21
- sale.should_receive(:guid).at_least(1).times.and_return('blah')
22
-
23
- CreateSale.should_receive(:call).with(
24
- 'product_class' => 'product',
25
- 'permalink' => @product.permalink,
26
- 'controller' => 'payola/transactions',
27
- 'action' => 'create',
28
- 'product' => @product,
29
- 'coupon' => nil,
30
- 'affiliate' => nil
16
+ expect(errors).to receive(:full_messages).and_return([])
17
+ expect(sale).to receive(:state).and_return('pending')
18
+ expect(sale).to receive(:error).and_return(nil)
19
+ expect(sale).to receive(:errors).and_return(errors)
20
+ expect(sale).to receive(:save).and_return(true)
21
+ expect(sale).to receive(:guid).at_least(1).times.and_return('blah')
22
+
23
+ expect(CreateSale).to receive(:call).with(
24
+ permitted_params(
25
+ 'product_class' => 'product',
26
+ 'permalink' => @product.permalink,
27
+ 'controller' => 'payola/transactions',
28
+ 'action' => 'create',
29
+ 'product' => @product,
30
+ 'coupon' => nil,
31
+ 'affiliate' => nil
32
+ )
31
33
  ).and_return(sale)
32
34
 
33
- Payola.should_receive(:queue!)
34
- post :create, product_class: @product.product_class, permalink: @product.permalink
35
+ expect(Payola).to receive(:queue!)
36
+ post :create, params: { product_class: @product.product_class, permalink: @product.permalink }
35
37
 
36
38
  expect(response.status).to eq 200
37
39
  parsed_body = JSON.load(response.body)
@@ -41,18 +43,18 @@ module Payola
41
43
  describe "with an error" do
42
44
  it "should return an error in json" do
43
45
  sale = double
44
- sale.should_receive(:error).and_return(nil)
45
- sale.should_receive(:save).and_return(false)
46
- sale.should_receive(:state).and_return('failed')
47
- sale.should_receive(:guid).at_least(1).times.and_return('blah')
46
+ expect(sale).to receive(:error).and_return(nil)
47
+ expect(sale).to receive(:save).and_return(false)
48
+ expect(sale).to receive(:state).and_return('failed')
49
+ expect(sale).to receive(:guid).at_least(1).times.and_return('blah')
48
50
  error = double
49
- error.should_receive(:full_messages).and_return(['done did broke'])
50
- sale.should_receive(:errors).and_return(error)
51
+ expect(error).to receive(:full_messages).and_return(['done did broke'])
52
+ expect(sale).to receive(:errors).and_return(error)
51
53
 
52
- CreateSale.should_receive(:call).and_return(sale)
53
- Payola.should_not_receive(:queue!)
54
+ expect(CreateSale).to receive(:call).and_return(sale)
55
+ expect(Payola).to_not receive(:queue!)
54
56
 
55
- post :create, product_class: @product.product_class, permalink: @product.permalink
57
+ post :create, params: { product_class: @product.product_class, permalink: @product.permalink }
56
58
 
57
59
  expect(response.status).to eq 400
58
60
  parsed_body = JSON.load(response.body)
@@ -62,13 +64,14 @@ module Payola
62
64
  end
63
65
 
64
66
  describe '#status' do
65
- it "should return 404 if it can't find the sale" do
66
- get :status, guid: 'doesnotexist'
67
+ it "should return 404 with no response body if it can't find the sale" do
68
+ get :status, params: { guid: 'doesnotexist' }
67
69
  expect(response.status).to eq 404
70
+ expect(response.body).to be_blank
68
71
  end
69
72
  it "should return json with properties" do
70
73
  sale = create(:sale)
71
- get :status, guid: sale.guid
74
+ get :status, params: { guid: sale.guid }
72
75
 
73
76
  expect(response.status).to eq 200
74
77
 
@@ -83,7 +86,7 @@ module Payola
83
86
  describe '#show' do
84
87
  it "should redirect to the product's redirect path" do
85
88
  sale = create(:sale)
86
- get :show, guid: sale.guid
89
+ get :show, params: { guid: sale.guid }
87
90
 
88
91
  expect(response).to redirect_to '/'
89
92
  end
@@ -1,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require File.expand_path('../config/application', __FILE__)
4
+ require_relative 'config/application'
5
5
 
6
6
  Rails.application.load_tasks
@@ -2,12 +2,12 @@
2
2
  // listed below.
3
3
  //
4
4
  // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
9
  //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
13
  //= require_tree .
@@ -3,12 +3,12 @@
3
3
  * listed below.
4
4
  *
5
5
  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
8
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
12
  *
13
13
  *= require_tree .
14
14
  *= require_self
@@ -6,4 +6,8 @@ class ApplicationController < ActionController::Base
6
6
  def payola_can_modify_subscription?(subscription)
7
7
  true
8
8
  end
9
+
10
+ def payola_can_modify_customer?(customer)
11
+ true
12
+ end
9
13
  end
@@ -1,16 +1,32 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
7
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
8
- <%= csrf_meta_tags %>
9
- <%= render 'payola/transactions/stripe_header' %>
10
- </head>
11
- <body data-no-turbolinks="true">
3
+ <% if Rails::VERSION::MAJOR == 5 %>
4
+ <head>
5
+ <title>Dummy</title>
6
+ <%= csrf_meta_tags %>
12
7
 
13
- <%= yield %>
8
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
9
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
10
+ <%= render 'payola/transactions/stripe_header' %>
11
+ </head>
14
12
 
15
- </body>
13
+ <body>
14
+ <%= yield %>
15
+ </body>
16
+ <% elsif Rails::VERSION::MAJOR == 4 %>
17
+ <head>
18
+ <title>Dummy</title>
19
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
20
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
21
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
22
+ <%= csrf_meta_tags %>
23
+ <%= render 'payola/transactions/stripe_header' %>
24
+ </head>
25
+
26
+ <body data-no-turbolinks="true">
27
+ <%= yield %>
28
+ </body>
29
+ <% else %>
30
+ <% raise "Unsupported Rails version #{Rails::VERSION}" %>
31
+ <% end %>
16
32
  </html>
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
3
  require_relative '../config/boot'
4
4
  require 'rails/commands'
@@ -1,4 +1,5 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require_relative 'config/environment'
4
+
4
5
  run Rails.application
@@ -1,4 +1,4 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require_relative 'boot'
2
2
 
3
3
  require 'rails/all'
4
4
 
@@ -21,4 +21,3 @@ module Dummy
21
21
  config.i18n.available_locales = [:en, :de]
22
22
  end
23
23
  end
24
-
@@ -1,5 +1,5 @@
1
1
  # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
3
 
4
4
  require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
2
+ require_relative 'application'
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -1,37 +1 @@
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
1
+ require_relative "rails_#{Rails::VERSION::MAJOR}/development"
@@ -1,82 +1 @@
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` has 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
- # Precompile additional assets.
60
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
61
- # config.assets.precompile += %w( search.js )
62
-
63
- # Ignore bad email addresses and do not raise email delivery errors.
64
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
- # config.action_mailer.raise_delivery_errors = false
66
-
67
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
- # the I18n.default_locale when a translation cannot be found).
69
- config.i18n.fallbacks = true
70
-
71
- # Send deprecation notices to registered listeners.
72
- config.active_support.deprecation = :notify
73
-
74
- # Disable automatic flushing of the log to improve performance.
75
- # config.autoflush_log = false
76
-
77
- # Use default logging formatter so that PID and timestamp are not suppressed.
78
- config.log_formatter = ::Logger::Formatter.new
79
-
80
- # Do not dump schema after migrations.
81
- config.active_record.dump_schema_after_migration = false
82
- end
1
+ require_relative "rails_#{Rails::VERSION::MAJOR}/production"
@@ -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,82 @@
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` has 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
+ # Precompile additional assets.
60
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
61
+ # config.assets.precompile += %w( search.js )
62
+
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
+ # config.action_mailer.raise_delivery_errors = false
66
+
67
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
+ # the I18n.default_locale when a translation cannot be found).
69
+ config.i18n.fallbacks = true
70
+
71
+ # Send deprecation notices to registered listeners.
72
+ config.active_support.deprecation = :notify
73
+
74
+ # Disable automatic flushing of the log to improve performance.
75
+ # config.autoflush_log = false
76
+
77
+ # Use default logging formatter so that PID and timestamp are not suppressed.
78
+ config.log_formatter = ::Logger::Formatter.new
79
+
80
+ # Do not dump schema after migrations.
81
+ config.active_record.dump_schema_after_migration = false
82
+ end