Skip to content

Commit 559a36e

Browse files
author
Danny Guinther
committed
Optimize for performance
1 parent 1f34b81 commit 559a36e

File tree

4 files changed

+31
-12
lines changed

4 files changed

+31
-12
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ gem 'rails', '4.0.0'
66
gem 'rails-api'
77

88
# Use postgresql as the database for Active Record
9-
gem 'pg', :platforms => [:mri]
10-
gem 'activerecord-jdbcpostgresql-adapter', "1.3.0.rc1", :platforms => [:jruby]
9+
# gem 'pg', :platforms => [:mri]
10+
# gem 'activerecord-jdbcpostgresql-adapter', "1.3.0.rc1", :platforms => [:jruby]
1111

1212
gem 'puma'
1313
# To use ActiveModel has_secure_password

Gemfile.lock

+6-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ GEM
2727
tzinfo (~> 0.3.37)
2828
arel (4.0.0)
2929
atomic (1.1.13)
30+
atomic (1.1.13-java)
3031
builder (3.1.4)
3132
erubis (2.7.0)
3233
hike (1.2.3)
@@ -37,10 +38,11 @@ GEM
3738
mime-types (1.25)
3839
minitest (4.7.5)
3940
multi_json (1.7.9)
40-
pg (0.16.0)
4141
polyglot (0.3.3)
4242
puma (2.5.1)
4343
rack (>= 1.1, < 2.0)
44+
puma (2.5.1-java)
45+
rack (>= 1.1, < 2.0)
4446
rack (1.5.2)
4547
rack-test (0.6.2)
4648
rack (>= 1.0)
@@ -74,18 +76,19 @@ GEM
7476
thor (0.18.1)
7577
thread_safe (0.1.2)
7678
atomic
79+
thread_safe (0.1.2-java)
80+
atomic
7781
tilt (1.4.1)
7882
treetop (1.4.15)
7983
polyglot
8084
polyglot (>= 0.3.1)
8185
tzinfo (0.3.37)
8286

8387
PLATFORMS
88+
java
8489
ruby
8590

8691
DEPENDENCIES
87-
activerecord-jdbcpostgresql-adapter (= 1.3.0.rc1)
88-
pg
8992
puma
9093
rails (= 4.0.0)
9194
rails-api

config/application.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
require File.expand_path('../boot', __FILE__)
22

3-
require 'active_record/railtie'
3+
# require 'active_record/railtie'
44
require 'action_controller/railtie'
5-
require 'action_mailer/railtie'
6-
require 'rails/test_unit/railtie'
7-
require 'sprockets/railtie'
5+
# require 'action_mailer/railtie'
6+
# require 'rails/test_unit/railtie'
7+
# require 'sprockets/railtie'
88

99
# Require the gems listed in Gemfile, including any gems
1010
# you've limited to :test, :development, or :production.

config/environments/production.rb

+19-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# config.force_ssl = true
4444

4545
# Set to :debug to see everything in the log.
46-
config.log_level = :info
46+
config.log_level = :error
4747

4848
# Prepend all log lines with the following tags.
4949
# config.log_tags = [ :subdomain, :uuid ]
@@ -52,7 +52,7 @@
5252
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
5353

5454
# Use a different cache store in production.
55-
# config.cache_store = :mem_cache_store
55+
config.cache_store = nil
5656

5757
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
5858
# config.action_controller.asset_host = "http://assets.example.com"
@@ -76,5 +76,21 @@
7676
# config.autoflush_log = false
7777

7878
# Use default logging formatter so that PID and timestamp are not suppressed.
79-
config.log_formatter = ::Logger::Formatter.new
79+
config.log_formatter = nil
80+
81+
[
82+
ActionDispatch::ShowExceptions,
83+
ActionDispatch::DebugExceptions,
84+
Rails::Rack::Logger,
85+
Rack::ConditionalGet,
86+
Rack::ETag,
87+
ActionDispatch::RequestId,
88+
ActionDispatch::Callbacks,
89+
Rack::Head,
90+
ActionDispatch::ParamsParser,
91+
ActionDispatch::RemoteIp,
92+
Rack::Runtime,
93+
].each do |mw|
94+
config.middleware.delete(mw)
95+
end
8096
end

0 commit comments

Comments
 (0)