Skip to content

Commit

Permalink
corrects styles issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpoly committed Jan 26, 2018
1 parent 41c8a06 commit aebbe02
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
7 changes: 4 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
inherit_from: .rubocop_todo.yml


AllCops:
Include:
- Rakefile
Expand Down Expand Up @@ -39,3 +36,7 @@ Style/ClassAndModuleChildren:

Style/Documentation:
Enabled: false

Style/GlobalVars:
Exclude:
- 'config/initializers/redis.rb'
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end

gem 'rails', '~> 5.1.4'
gem 'pg', '~> 0.18'
gem 'puma', '~> 3.7'
gem 'webpacker'
gem 'rails', '~> 5.1.4'
gem 'redis-rails'
gem 'webpacker'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand All @@ -23,9 +23,9 @@ end

group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'web-console', '>= 3.3.0'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'web-console', '>= 3.3.0'
end

ruby '2.4.3'
12 changes: 5 additions & 7 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=31536000'
}
'Cache-Control' => 'public, max-age=31536000'
}

# Compress JavaScripts and CSS.
# config.assets.js_compressor = Uglifier.new(harmony: true)
Expand Down Expand Up @@ -64,11 +64,9 @@

# Use a different cache store in production.
# config.cache_store = :mem_cache_store
if ENV['REDISCLOUD_URL']
config.cache_store = :redis_store, ENV['REDISCLOUD_URL'], { expires_in: 1.day }
config.action_controller.enable_fragment_cache_logging = true # you can remove this line once you made sure caching works on Heroku
end


config.cache_store = :redis_store, ENV['REDISCLOUD_URL'], { expires_in: 1.day } if ENV['REDISCLOUD_URL']

# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "todomvc_stimulus_#{Rails.env}"
Expand Down
4 changes: 3 additions & 1 deletion config/initializers/redis.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# frozen_string_literal: true

$redis = Redis.new
$redis = Redis.new(url: ENV["REDISCLOUD_URL"]) if ENV["REDISCLOUD_URL"]
$redis = Redis.new(url: ENV['REDISCLOUD_URL']) if ENV['REDISCLOUD_URL']

0 comments on commit aebbe02

Please sign in to comment.