kanaui 0.5.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -9
  3. data/Rakefile +4 -5
  4. data/app/assets/javascripts/application.js +1 -1
  5. data/app/assets/javascripts/kanaui/kiddo/kiddo_initialize.js +1 -1
  6. data/app/assets/javascripts/kanaui/reports.dataTables.js +74 -2
  7. data/app/assets/stylesheets/application.css +2 -0
  8. data/app/assets/stylesheets/bootstrap_and_overrides.css +0 -4
  9. data/app/assets/stylesheets/kanaui/reports.css +66 -2
  10. data/app/controllers/kanaui/dashboard_controller.rb +24 -12
  11. data/app/controllers/kanaui/engine_controller.rb +41 -6
  12. data/app/controllers/kanaui/reports_controller.rb +15 -12
  13. data/app/controllers/kanaui/settings_controller.rb +13 -0
  14. data/app/helpers/kanaui/application_helper.rb +2 -2
  15. data/app/helpers/kanaui/dashboard_helper.rb +7 -5
  16. data/app/views/kanaui/dashboard/index.html.erb +153 -125
  17. data/app/views/kanaui/reports/_form.html.erb +30 -16
  18. data/app/views/kanaui/reports/_reports_table.html.erb +22 -0
  19. data/app/views/kanaui/settings/index.html.erb +19 -0
  20. data/config/routes.rb +11 -8
  21. data/lib/kanaui.rb +11 -10
  22. data/lib/kanaui/engine.rb +5 -1
  23. data/lib/kanaui/version.rb +3 -1
  24. data/lib/tasks/kanaui_tasks.rake +1 -0
  25. data/test/dummy/app/assets/config/manifest.js +1 -0
  26. data/test/dummy/bin/bundle +3 -0
  27. data/test/dummy/bin/rails +4 -0
  28. data/test/dummy/bin/rake +4 -0
  29. data/test/dummy/bin/setup +38 -0
  30. data/test/dummy/bin/update +29 -0
  31. data/test/dummy/bin/yarn +11 -0
  32. data/test/dummy/config/application.rb +15 -47
  33. data/test/dummy/config/boot.rb +2 -9
  34. data/test/dummy/config/environment.rb +4 -4
  35. data/test/dummy/config/environments/development.rb +38 -18
  36. data/test/dummy/config/environments/production.rb +61 -39
  37. data/test/dummy/config/environments/test.rb +20 -14
  38. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  39. data/test/dummy/config/initializers/assets.rb +14 -0
  40. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  41. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  42. data/test/dummy/config/initializers/inflections.rb +6 -5
  43. data/test/dummy/config/initializers/killbill_client.rb +3 -3
  44. data/test/dummy/config/initializers/mime_types.rb +0 -1
  45. data/test/dummy/config/initializers/new_framework_defaults_5_1.rb +14 -0
  46. data/test/dummy/config/initializers/wrap_parameters.rb +5 -5
  47. data/test/dummy/config/locales/en.yml +30 -2
  48. data/test/dummy/config/secrets.yml +32 -0
  49. data/test/functional/kanaui/tests_controller_test.rb +2 -0
  50. data/test/integration/navigation_test.rb +7 -5
  51. data/test/kanaui_test.rb +3 -1
  52. data/test/test_helper.rb +7 -7
  53. data/test/unit/helpers/kanaui/tests_helper_test.rb +2 -0
  54. metadata +117 -176
  55. data/app/models/kanaui/dashboard.rb +0 -5
  56. data/test/dummy/config/database.yml +0 -25
@@ -0,0 +1,19 @@
1
+ <div class="column-block">
2
+ <h1>Analytics settings</h1>
3
+
4
+ <div>
5
+ <%= form_tag kanaui_engine.settings_path, :method => :post, :class => 'form-horizontal' do %>
6
+ <div class='form-group'>
7
+ <%= label_tag :account_id, 'Account id', :class => 'col-sm-2 control-label' %>
8
+ <div class="col-sm-4">
9
+ <%= text_field_tag :account_id, nil, :class => 'form-control' %>
10
+ </div>
11
+ </div>
12
+ <div class="form-group">
13
+ <div class="col-sm-offset-2 col-sm-10">
14
+ <%= submit_tag 'Refresh', :class => 'btn btn-default' %>
15
+ </div>
16
+ </div>
17
+ <% end %>
18
+ </div>
19
+ </div>
data/config/routes.rb CHANGED
@@ -1,14 +1,17 @@
1
- Kanaui::Engine.routes.draw do
1
+ # frozen_string_literal: true
2
2
 
3
+ Kanaui::Engine.routes.draw do
3
4
  root to: 'dashboard#index'
4
- resources :dashboard, :only => [:index]
5
- scope "/dashboard" do
6
- match "/available_reports" => "dashboard#available_reports", :via => :get, :as => "available_reports"
7
- match "/reports" => "dashboard#reports", :via => :get, :as => "reports"
5
+ resources :dashboard, only: [:index]
6
+ scope '/dashboard' do
7
+ match '/available_reports' => 'dashboard#available_reports', :via => :get, :as => 'available_reports'
8
+ match '/reports' => 'dashboard#reports', :via => :get, :as => 'reports'
8
9
  end
9
10
 
10
- resources :reports, :only => [:index, :new, :create, :edit, :update, :destroy]
11
- scope "/reports" do
12
- match "/refresh/:id" => "reports#refresh", :via => :put, :as => "refresh_report"
11
+ resources :reports, only: %i[index new create edit update destroy]
12
+ scope '/reports' do
13
+ match '/refresh/:id' => 'reports#refresh', :via => :put, :as => 'refresh_report'
13
14
  end
15
+
16
+ resources :settings, only: %i[index create]
14
17
  end
data/lib/kanaui.rb CHANGED
@@ -1,21 +1,22 @@
1
- require "kanaui/engine"
1
+ # frozen_string_literal: true
2
2
 
3
- module Kanaui
3
+ require 'kanaui/engine'
4
4
 
5
+ module Kanaui
5
6
  mattr_accessor :current_tenant_user
6
7
  mattr_accessor :layout
7
8
 
8
- self.current_tenant_user = lambda { |session, user|
9
- {:username => 'admin',
10
- :password => 'password',
11
- :session_id => nil,
12
- :api_key => KillBillClient.api_key,
13
- :api_secret => KillBillClient.api_secret}
9
+ self.current_tenant_user = lambda { |_session, _user|
10
+ { username: 'admin',
11
+ password: 'password',
12
+ session_id: nil,
13
+ api_key: KillBillClient.api_key,
14
+ api_secret: KillBillClient.api_secret }
14
15
  }
15
16
 
16
- def self.config(&block)
17
+ def self.config
17
18
  {
18
- :layout => layout || 'kanaui/layouts/kanaui_application',
19
+ layout: layout || 'kanaui/layouts/kanaui_application'
19
20
  }
20
21
  end
21
22
  end
data/lib/kanaui/engine.rb CHANGED
@@ -1,14 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Dependencies
2
4
  #
3
5
  # Sigh. Rails autoloads the gems specified in the Gemfile and nothing else.
4
6
  # We need to explicitly require all of our dependencies listed in kanaui.gemspec
5
7
  #
6
8
  # See also https://github.com/carlhuda/bundler/issues/49
9
+ require 'js-routes'
7
10
  require 'jquery-rails'
8
11
  require 'jquery-datatables-rails'
12
+ require 'font-awesome-rails'
13
+ require 'twitter-bootstrap-rails'
9
14
  require 'bootstrap-datepicker-rails'
10
15
  require 'd3_rails'
11
- require 'momentjs-rails'
12
16
  require 'spinjs-rails'
13
17
  require 'killbill_client'
14
18
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Kanaui
2
- VERSION = "0.5.1"
4
+ VERSION = '2.1.0'
3
5
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # desc "Explaining what the task does"
2
3
  # task :kanaui do
3
4
  # # Task goes here
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a starting point to setup your application.
15
+ # Add necessary setup steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ # Install JavaScript dependencies if using Yarn
22
+ # system('bin/yarn')
23
+
24
+
25
+ # puts "\n== Copying sample files =="
26
+ # unless File.exist?('config/database.yml')
27
+ # cp 'config/database.yml.sample', 'config/database.yml'
28
+ # end
29
+
30
+ puts "\n== Preparing database =="
31
+ system! 'bin/rails db:setup'
32
+
33
+ puts "\n== Removing old logs and tempfiles =="
34
+ system! 'bin/rails log:clear tmp:clear'
35
+
36
+ puts "\n== Restarting application server =="
37
+ system! 'bin/rails restart'
38
+ end
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a way to update your development environment automatically.
15
+ # Add necessary update steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ puts "\n== Updating database =="
22
+ system! 'bin/rails db:migrate'
23
+
24
+ puts "\n== Removing old logs and tempfiles =="
25
+ system! 'bin/rails log:clear tmp:clear'
26
+
27
+ puts "\n== Restarting application server =="
28
+ system! 'bin/rails restart'
29
+ end
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ VENDOR_PATH = File.expand_path('..', __dir__)
3
+ Dir.chdir(VENDOR_PATH) do
4
+ begin
5
+ exec "yarnpkg #{ARGV.join(" ")}"
6
+ rescue Errno::ENOENT
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
10
+ end
11
+ end
@@ -1,58 +1,26 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require_relative 'boot'
2
2
 
3
- require 'rails/all'
4
- Bundler.require(*Rails.groups)
5
- require "kanaui"
3
+ require 'action_controller/railtie'
4
+ require 'action_view/railtie'
5
+ require 'rails/test_unit/railtie'
6
+ require 'sprockets/railtie'
6
7
 
7
- require "jquery-rails"
8
- require "twitter-bootstrap-rails"
9
- require "d3_rails"
8
+ # Require the gems listed in Gemfile, including any gems
9
+ # you've limited to :test, :development, or :production.
10
+ Bundler.require(*Rails.groups)
10
11
 
11
- require "js-routes"
12
+ #
13
+ # Required to load the Kanaui engine into the dummy app
14
+ #
15
+ require File.expand_path('../../../../lib/kanaui.rb', __FILE__)
12
16
 
13
17
  module Dummy
14
18
  class Application < Rails::Application
19
+ # Initialize configuration defaults for originally generated Rails version.
20
+ config.load_defaults 5.1
21
+
15
22
  # Settings in config/environments/* take precedence over those specified here.
16
23
  # Application configuration should go into files in config/initializers
17
24
  # -- all .rb files in that directory are automatically loaded.
18
-
19
- # Custom directories with classes and modules you want to be autoloadable.
20
- # config.autoload_paths += %W(#{config.root}/extras)
21
-
22
- # Only load the plugins named here, in the order given (default is alphabetical).
23
- # :all can be used as a placeholder for all plugins not explicitly named.
24
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
25
-
26
- # Activate observers that should always be running.
27
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
28
-
29
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
30
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
31
- # config.time_zone = 'Central Time (US & Canada)'
32
-
33
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
34
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
35
- # config.i18n.default_locale = :de
36
-
37
- # Configure the default encoding used in templates for Ruby 1.9.
38
- config.encoding = "utf-8"
39
-
40
- # Configure sensitive parameters which will be filtered from the log file.
41
- config.filter_parameters += [:password]
42
-
43
- # Enable escaping HTML in JSON.
44
- config.active_support.escape_html_entities_in_json = true
45
-
46
- # Use SQL instead of Active Record's schema dumper when creating the database.
47
- # This is necessary if your schema can't be completely dumped by the schema dumper,
48
- # like if you have constraints or database-specific column types
49
- # config.active_record.schema_format = :sql
50
-
51
- # Enable the asset pipeline
52
- config.assets.enabled = true
53
-
54
- # Version of your assets, change this if you want to expire all your assets
55
- config.assets.version = '1.0'
56
25
  end
57
26
  end
58
-
@@ -1,10 +1,3 @@
1
- require 'rubygems'
2
- gemfile = File.expand_path('../../../../Gemfile', __FILE__)
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
2
 
4
- if File.exist?(gemfile)
5
- ENV['BUNDLE_GEMFILE'] = gemfile
6
- require 'bundler'
7
- Bundler.setup
8
- end
9
-
10
- $:.unshift File.expand_path('../../../../lib', __FILE__)
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -1,5 +1,5 @@
1
- # Load the rails application
2
- require File.expand_path('../application', __FILE__)
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
3
 
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -1,34 +1,54 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports.
13
+ config.consider_all_requests_local = true
14
+
15
+ # Enable/disable caching. By default caching is disabled.
16
+ if Rails.root.join('tmp/caching-dev.txt').exist?
17
+ config.action_controller.perform_caching = true
11
18
 
12
- # Show full error reports and disable caching
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
19
+ config.cache_store = :memory_store
20
+ config.public_file_server.headers = {
21
+ 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
22
+ }
23
+ else
24
+ config.action_controller.perform_caching = false
15
25
 
16
- # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
26
+ config.cache_store = :null_store
27
+ end
18
28
 
19
- # Print deprecation notices to the Rails logger
29
+ # Don't care if the mailer can't send.
30
+ # config.action_mailer.raise_delivery_errors = false
31
+
32
+ # config.action_mailer.perform_caching = false
33
+
34
+ # Print deprecation notices to the Rails logger.
20
35
  config.active_support.deprecation = :log
21
36
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
37
+ # Raise an error on page load if there are pending migrations.
38
+ # config.active_record.migration_error = :page_load
24
39
 
25
- #config.assets.paths << "#{Rails}/vendor/assets/fonts"
40
+ # Debug mode disables concatenation and preprocessing of assets.
41
+ # This option may cause significant delays in view rendering with a large
42
+ # number of complex assets.
43
+ config.assets.debug = true
26
44
 
27
- # Do not compress assets
28
- config.assets.compress = false
45
+ # Suppress logger output for asset requests.
46
+ config.assets.quiet = true
29
47
 
30
- # Expands the lines which load the assets
31
- config.assets.debug = false
48
+ # Raises error for missing translations
49
+ # config.action_view.raise_on_missing_translations = true
32
50
 
33
- config.eager_load = false
51
+ # Use an evented file watcher to asynchronously detect changes in source code,
52
+ # routes, locales, etc. This feature depends on the listen gem.
53
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
34
54
  end
@@ -1,69 +1,91 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
- # Full error reports are disabled and caching is turned on
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.
8
14
  config.consider_all_requests_local = false
9
15
  config.action_controller.perform_caching = true
10
16
 
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
17
+ # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
18
+ # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
19
+ # `config/secrets.yml.key`.
20
+ config.read_encrypted_secrets = true
21
+
22
+ # Disable serving static files from the `/public` folder by default since
23
+ # Apache or NGINX already handles this.
24
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
13
25
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
26
+ # Compress JavaScripts and CSS.
27
+ config.assets.js_compressor = :uglifier
28
+ # config.assets.css_compressor = :sass
16
29
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
30
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
18
31
  config.assets.compile = false
19
32
 
20
- # Generate digests for assets URLs
21
- config.assets.digest = true
33
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
22
34
 
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
35
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
36
+ # config.action_controller.asset_host = 'http://assets.example.com'
25
37
 
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
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
41
+
42
+ # Mount Action Cable outside main process or domain
43
+ # config.action_cable.mount_path = nil
44
+ # config.action_cable.url = 'wss://example.com/cable'
45
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
29
46
 
30
47
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
48
  # config.force_ssl = true
32
49
 
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
35
-
36
- # Prepend all log lines with the following tags
37
- # config.log_tags = [ :subdomain, :uuid ]
50
+ # Use the lowest log level to ensure availability of diagnostic information
51
+ # when problems arise.
52
+ config.log_level = :debug
38
53
 
39
- # Use a different logger for distributed setups
40
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
54
+ # Prepend all log lines with the following tags.
55
+ config.log_tags = [ :request_id ]
41
56
 
42
- # Use a different cache store in production
57
+ # Use a different cache store in production.
43
58
  # config.cache_store = :mem_cache_store
44
59
 
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
60
+ # Use a real queuing backend for Active Job (and separate queues per environment)
61
+ # config.active_job.queue_adapter = :resque
62
+ # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
63
+ # config.action_mailer.perform_caching = false
47
64
 
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
50
-
51
- # Disable delivery errors, bad email addresses will be ignored
65
+ # Ignore bad email addresses and do not raise email delivery errors.
66
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
52
67
  # config.action_mailer.raise_delivery_errors = false
53
68
 
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
69
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
70
+ # the I18n.default_locale when a translation cannot be found).
59
71
  config.i18n.fallbacks = true
60
72
 
61
- # Send deprecation notices to registered listeners
73
+ # Send deprecation notices to registered listeners.
62
74
  config.active_support.deprecation = :notify
63
75
 
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
76
+ # Use default logging formatter so that PID and timestamp are not suppressed.
77
+ config.log_formatter = ::Logger::Formatter.new
67
78
 
68
- config.eager_load = true
79
+ # Use a different logger for distributed setups.
80
+ # require 'syslog/logger'
81
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
82
+
83
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
84
+ logger = ActiveSupport::Logger.new(STDOUT)
85
+ logger.formatter = config.log_formatter
86
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
87
+ end
88
+
89
+ # Do not dump schema after migrations.
90
+ # config.active_record.dump_schema_after_migration = false
69
91
  end